1 // ANNA - Anna is Not Nothingness Anymore //
3 // (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo //
5 // See project site at http://redmine.teslayout.com/projects/anna-suite //
6 // See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE //
9 #include <anna/core/functions.hpp>
11 #include <anna/comm/Resource.hpp>
13 #include <anna/xml/Node.hpp>
14 #include <anna/xml/Attribute.hpp>
19 xml::Node* comm::Resource::asXML(xml::Node* parent) const
20 throw(RuntimeException) {
21 xml::Node* result = parent->createChild("comm.Resource");
22 result->createAttribute("Name", getName());
23 result->createAttribute("Enabled", functions::asString(isEnabled()));
24 result->createAttribute("Available", functions::asString(isAvailable()));
28 void comm::Resource::asAttribute(xml::Node* node) const
29 throw(RuntimeException) {
30 node->createAttribute("Name", getName());
31 node->createAttribute("Enabled", functions::asString(isEnabled()));
32 node->createAttribute("Available", functions::asString(isAvailable()));