Update date in Doxyfile
[anna.git] / source / comm / Resource.cpp
1 // ANNA - Anna is Not Nothingness Anymore                                                         //
2 //                                                                                                //
3 // (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo                         //
4 //                                                                                                //
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 //
7
8
9 #include <anna/core/functions.hpp>
10
11 #include <anna/comm/Resource.hpp>
12
13 #include <anna/xml/Node.hpp>
14 #include <anna/xml/Attribute.hpp>
15
16 using namespace std;
17 using namespace anna;
18
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()));
25   return result;
26 }
27
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()));
33 }