45 const char OutNode::IMPL_NAME[]=
"XML";
47 OutNode::OutNode(
const std::string& name)
65 std::list<InputPort *>::const_iterator iter;
72 std::string xmlValue=inp->
dump();
73 std::string::size_type
i=xmlValue.find_first_of(
'/',0);
74 xmlValue=xmlValue.substr(
i);
75 i=xmlValue.find_first_of(
'<',0);
76 std::ifstream fin(xmlValue.substr(0,
i).c_str());
77 std::ofstream fout(inp->
getData().c_str());
79 out <<
"<value><objref>" << inp->
getData() <<
"</objref></value>" << std::endl;
82 out << inp->
dump() << std::endl;
88 DEBTRACE(
"+++++++ OutNode::execute +++++++++++");
91 std::ofstream out(
_ref.c_str());
96 DEBTRACE(
"+++++++ end OutNode::execute +++++++++++" );
112 DEBTRACE(
"OutNode::checkBasicConsistency");
115 string what =
"OutNode ";
117 what +=
" only accepts InputPorts, no OutputPorts";
120 list<InputPort *>::const_iterator iter;
126 string what(
"Input port: ");
127 what += (*iter)->getName();
128 what +=
" is not an InputPresetPort. PresetNode ";
130 what +=
" only accepts InputPresetPorts";
140 return new OutNode(*
this,father);
Base class for all composed nodes.
Class for data parameters specification.
std::list< InputPort * > _setOfInputPort
std::list< OutputPort * > _setOfOutputPort
Base class for all nodes.
std::string _implementation
const std::string & getName() const
virtual void accept(Visitor *visitor)
static const char IMPL_NAME[]
virtual void dump(std::ostream &os)
virtual void setData(InputPort *port, const std::string &data)
OutNode(const std::string &name)
virtual void checkBasicConsistency() const
virtual InputPort * createInputPort(const std::string &inputPortName, TypeCode *type)
Node * simpleClone(ComposedNode *father, bool editionOnly) const
Base class for all type objects.
virtual void visitOutNode(DataNode *node)=0