]> git.llucax.com Git - z.facultad/75.42/plaqui.git/blobdiff - Model/include/logiccontrol.h
Se agrega al EXAMPLE_PATH Constructor/doc para los ejemplos de XML.
[z.facultad/75.42/plaqui.git] / Model / include / logiccontrol.h
index 76f71742808c0493114720c5a06e9de54fd7dcf2..e3c252e4aa1023c0a0619f03b205d40145c3e920 100644 (file)
@@ -3,6 +3,7 @@
 #define _LOGIC_CONTROL_H_
 
 #include "iconector.h"
+#include <string>
 
 namespace PlaQui {
 namespace Model {
@@ -40,6 +41,17 @@ public:
         *  \see Exclusa::update
         */
        bool is_operational() { return (in_list.begin() != in_list.end()); }
+
+       void get_state_as_xml(std::stringstream &out) {
+               out << "\t<logic name=\"" << name << "\">" << std::endl;
+               out << "\t\t<active>" << ((get_output())?"true":"false") << "</active>" << std::endl;
+               out << "\t</logic>" << std::endl;
+       }
+
+       void set_name(const std::string &_name) { name = _name; }
+       std::string get_name() { return name; }
+protected:
+       std::string name;
 };
 
 }