Version: 8.3.0
YACS::ENGINE::XmlNode Class Reference

#include <XMLNode.hxx>

Inheritance diagram for YACS::ENGINE::XmlNode:
Collaboration diagram for YACS::ENGINE::XmlNode:

Public Member Functions

 XmlNode (const XmlNode &other, ComposedNode *father)
 
 XmlNode (const std::string &name)
 
virtual void execute ()
 
virtual void load ()
 DISTRIBUTION NOT YET implemented for XMLNode. More...
 
virtual void setRef (const std::string &ref)
 Associate a new component instance to this service node. More...
 
virtual void setScript (const std::string &script)
 
virtual std::string getScript () const
 
virtual ServiceNodecreateNode (const std::string &name)
 
virtual std::string getKind () const
 Return the service node kind. More...
 
- Public Member Functions inherited from YACS::ENGINE::ServiceNode
virtual bool isDeployable () const
 By definition of ServiceNode class. More...
 
virtual void setComponent (ComponentInstance *compo) throw (Exception)
 Associate an existing component instance to this service node AND check the consistency regarding the deployment from root node point of view. More...
 
virtual ComponentInstancegetComponent ()
 Return the associated component instance. More...
 
virtual const ComponentInstancegetComponent () const
 
virtual ContainergetContainer ()
 Return the associated container. More...
 
virtual std::string getRef ()
 
virtual void setMethod (const std::string &method)
 
virtual std::string getMethod ()
 
virtual ~ServiceNode ()
 
virtual void accept (Visitor *visitor)
 
virtual std::string typeName ()
 
- Public Member Functions inherited from YACS::ENGINE::ElementaryNode
virtual ~ElementaryNode ()
 
void exUpdateState ()
 Update the node state. More...
 
void init (bool start=true)
 
YACS::StatesForNode getState () const
 
void getReadyTasks (std::vector< Task * > &tasks)
 
void edRemovePort (Port *port) throw (Exception)
 
std::list< ElementaryNode * > getRecursiveConstituents () const
 
std::list< ProgressWeightgetProgressWeight () const
 Get the progress weight for all elementary nodes. More...
 
NodegetChildByName (const std::string &name) const throw (Exception)
 
virtual void checkBasicConsistency () const throw (Exception)
 
ComposedNodegetDynClonerIfExists (const ComposedNode *levelToStop) const
 
int getNumberOfInputPorts () const
 
int getNumberOfOutputPorts () const
 
std::string getInPortName (const InPort *) const throw (Exception)
 
std::string getOutPortName (const OutPort *) const throw (Exception)
 
InputPortgetInputPort (const std::string &name) const throw (Exception)
 
OutputPortgetOutputPort (const std::string &name) const throw (Exception)
 
std::list< InputPort * > getSetOfInputPort () const
 
std::list< OutputPort * > getSetOfOutputPort () const
 
std::list< InputPort * > getLocalInputPorts () const
 
std::list< OutputPort * > getLocalOutputPorts () const
 
std::set< OutPort * > getAllOutPortsLeavingCurrentScope () const
 
std::set< InPort * > getAllInPortsComingFromOutsideOfCurrentScope () const
 
virtual std::vector< std::pair
< OutPort *, InPort * > > 
getSetOfLinksLeavingCurrentScope () const
 
virtual std::vector< std::pair
< InPort *, OutPort * > > 
getSetOfLinksComingInCurrentScope () const
 
std::list< InputDataStreamPort * > getSetOfInputDataStreamPort () const
 
std::list< OutputDataStreamPort * > getSetOfOutputDataStreamPort () const
 
InputDataStreamPortgetInputDataStreamPort (const std::string &name) const throw (Exception)
 
OutputDataStreamPortgetOutputDataStreamPort (const std::string &name) const throw (Exception)
 
virtual InputPortcreateInputPort (const std::string &inputPortName, TypeCode *type)
 
virtual OutputPortcreateOutputPort (const std::string &outputPortName, TypeCode *type)
 
virtual InputDataStreamPortcreateInputDataStreamPort (const std::string &inputPortDSName, TypeCode *type)
 
virtual OutputDataStreamPortcreateOutputDataStreamPort (const std::string &outputPortDSName, TypeCode *type)
 
virtual InputPortedAddInputPort (const std::string &inputPortName, TypeCode *type) throw (Exception)
 
virtual OutputPortedAddOutputPort (const std::string &outputPortName, TypeCode *type) throw (Exception)
 
virtual InputDataStreamPortedAddInputDataStreamPort (const std::string &inputPortDSName, TypeCode *type) throw (Exception)
 
virtual OutputDataStreamPortedAddOutputDataStreamPort (const std::string &outputPortDSName, TypeCode *type) throw (Exception)
 
virtual void edOrderInputPorts (const std::list< InputPort * > &ports)
 
virtual void edOrderOutputPorts (const std::list< OutputPort * > &ports)
 
virtual void edUpdateState ()
 update the status of the node More...
 
virtual void ensureLoading ()
 Put this node into TOLOAD state when possible. More...
 
int getMaxLevelOfParallelism () const
 
void begin ()
 
bool isReady ()
 
void finished ()
 
void aborted ()
 
void loaded ()
 Notify this node that it is loaded. More...
 
void connected ()
 Notify this node that it is connected. More...
 
virtual std::string getErrorDetails ()
 Give a description of error when node status is ERROR. More...
 
virtual void initService ()
 
virtual void connectService ()
 
virtual void disconnectService ()
 
virtual void getCoupledTasks (std::set< Task * > &coupledSet)
 Calls getCoupledNodes for Task interface. More...
 
virtual void getCoupledNodes (std::set< Task * > &coupledSet)
 Put all nodes that are coupled to this node in coupledSet. More...
 
virtual void addDatastreamPortToInitMultiService (const std::string &port_name, int number)
 
template<class PORT >
void edRemovePortTypedFromSet (PORT *port, std::list< PORT * > &setOfPorts) throw (Exception)
 
template<class PORT >
bool isPortNameAlreadyExist (const std::string &portName, const std::list< PORT * > &setOfPorts)
 
- Public Member Functions inherited from YACS::ENGINE::Node
virtual ~Node ()
 
virtual void shutdown (int level)
 Stop all pending activities of the node. More...
 
virtual void resetState (int level)
 Reset the node state depending on the parameter level. More...
 
Nodeclone (ComposedNode *father, bool editionOnly=true) const
 This method MUST NEVER BE VIRTUAL More...
 
NodecloneWithoutCompAndContDeepCpy (ComposedNode *father, bool editionOnly=true) const
 This method MUST NEVER BE VIRTUAL More...
 
void setState (YACS::StatesForNode theState)
 Sets the given state for node. More...
 
virtual YACS::StatesForNode getEffectiveState () const
 Return the node state in the context of its father. More...
 
virtual YACS::StatesForNode getEffectiveState (const Node *) const
 Return the effective state of a node in the context of this one (its father) More...
 
std::string getColorState (YACS::StatesForNode state) const
 Return the color associated to a state. More...
 
InGategetInGate ()
 
OutGategetOutGate ()
 
const std::string & getName () const
 
void setName (const std::string &name)
 Change the name of the node. More...
 
ComposedNodegetFather () const
 
const std::string getId () const
 
bool exIsControlReady () const
 
std::list< Node * > getOutNodes () const
 
virtual void writeDot (std::ostream &os) const
 Dump to the input stream a dot representation of the node. More...
 
virtual void exFailedState ()
 Notify this node that its execution has failed. More...
 
virtual void exDisabledState ()
 Notify this node that it has been disabled. More...
 
std::list< InPort * > getSetOfInPort () const
 
std::list< OutPort * > getSetOfOutPort () const
 
virtual std::set< InputPort * > edGetSetOfUnitializedInputPort () const
 Becomes deprecated soon. Replaced by ComposedNode::CheckConsistency. More...
 
virtual bool edAreAllInputPortInitialized () const
 Becomes deprecated soon. Replaced by ComposedNode::CheckConsistency. More...
 
InPortgetInPort (const std::string &name) const throw (Exception)
 
InPropertyPortgetInPropertyPort () const throw (Exception)
 
virtual OutPortgetOutPort (const std::string &name) const throw (Exception)
 
std::list< ComposedNode * > getAllAscendanceOf (ComposedNode *levelToStop=0) const
 
bool operator> (const Node &other) const
 
bool operator< (const Node &other) const
 
std::string getImplementation () const
 
virtual ComposedNodegetRootNode () const throw (Exception)
 
virtual void setProperty (const std::string &name, const std::string &value)
 
virtual std::string getProperty (const std::string &name)
 
std::map< std::string,
std::string > 
getProperties ()
 
std::map< std::string,
std::string > 
getPropertyMap ()
 
virtual void setProperties (std::map< std::string, std::string > properties)
 
virtual ProcgetProc ()
 
virtual const ProcgetProc () const
 
std::string getQualifiedName () const
 same as Node::getName() in most cases, but differs for children of switch More...
 
int getNumId ()
 return node instance identifiant, unique for each node instance More...
 
std::vector< std::pair
< std::string, int > > 
getDPLScopeInfo (ComposedNode *gfn)
 
virtual void applyDPLScope (ComposedNode *gfn)
 
virtual void sendEvent (const std::string &event)
 emit notification to all observers registered with the dispatcher More...
 
virtual void sendEvent2 (const std::string &event, void *something)
 emit notification to all observers registered with the dispatcher More...
 
virtual std::string getErrorDetails () const
 
virtual void setErrorDetails (const std::string &error)
 
virtual void modified ()
 Sets Node in modified state and its father if it exists. More...
 
virtual int isModified ()
 
virtual int isValid ()
 indicates if the node is valid (returns 1) or not (returns 0) More...
 
virtual std::string getErrorReport ()
 returns a string that contains an error report if the node is in error More...
 
virtual std::string getContainerLog ()
 returns a string that contains the name of the container log file if it exists More...
 
virtual void cleanNodes ()
 Clean the node in case of not clean exit. More...
 
- Public Member Functions inherited from YACS::ENGINE::Task
virtual ~Task ()
 

Static Public Attributes

static const char IMPL_NAME [] ="XML"
 
static const char KIND [] ="xmlsh"
 
- Static Public Attributes inherited from YACS::ENGINE::ServiceNode
static const char KIND [] =""
 

Protected Member Functions

NodesimpleClone (ComposedNode *father, bool editionOnly) const
 
- Protected Member Functions inherited from YACS::ENGINE::ServiceNode
 ServiceNode (const std::string &name)
 
 ServiceNode (const ServiceNode &other, ComposedNode *father)
 
void performDuplicationOfPlacement (const Node &other)
 performs a duplication of placement using clone method of containers and components. clone behaviour is driven by attachOnCloning attribute. More...
 
void performShallowDuplicationOfPlacement (const Node &other)
 performs a also duplication of placement but here containers and components are not copied at all whatever the value of attachedOnCloning. More...
 
- Protected Member Functions inherited from YACS::ENGINE::ElementaryNode
 ElementaryNode (const std::string &name)
 
 ElementaryNode (const ElementaryNode &other, ComposedNode *father)
 
void initCommonPartWithoutStateManagement (bool start)
 
virtual void createMultiDatastreamPorts ()
 
void edDisconnectAllLinksWithMe ()
 
bool areAllInputPortsValid () const
 
template<class PORT >
PORT * getPort (const std::string &name, const std::list< PORT * > &setOfPorts) const throw (Exception)
 
template<class PORT , class ENUMTYPE >
PORT * edAddPort (const std::string &portName, std::list< PORT * > &setOfPorts, ENUMTYPE type) throw (Exception)
 
template<class PORT , class ENUMTYPE >
bool edCheckAddPort (const std::string &portName, std::list< PORT * > &setOfPorts, ENUMTYPE type) throw (Exception)
 
- Protected Member Functions inherited from YACS::ENGINE::Node
 Node (const std::string &name)
 
 Node (const Node &other, ComposedNode *father)
 
virtual void exForwardFailed ()
 
virtual void exForwardFinished ()
 

Protected Attributes

std::string _script
 
- Protected Attributes inherited from YACS::ENGINE::ServiceNode
ComponentInstance_component
 
std::string _method
 
std::string _ref
 
- Protected Attributes inherited from YACS::ENGINE::ElementaryNode
std::list< InputPort * > _setOfInputPort
 
std::list< OutputPort * > _setOfOutputPort
 
std::list< InputDataStreamPort * > _setOfInputDataStreamPort
 
std::list< OutputDataStreamPort * > _setOfOutputDataStreamPort
 
bool _createDatastreamPorts
 
bool _multi_port_node
 
- Protected Attributes inherited from YACS::ENGINE::Node
InGate _inGate
 
OutGate _outGate
 
InPropertyPort_inPropertyPort
 
std::string _name
 
ComposedNode_father
 
YACS::StatesForNode _state
 
int _modified
 
std::string _errorDetails
 
int _numId
 
std::string _implementation
 
std::map< std::string,
std::string > 
_propertyMap
 

Additional Inherited Members

- Static Public Member Functions inherited from YACS::ENGINE::Node
static std::string getStateName (YACS::StatesForNode state)
 Return the name of a state. More...
 
- Public Attributes inherited from YACS::ENGINE::Node
YACS::Colour _colour
 
- Static Protected Member Functions inherited from YACS::ENGINE::ElementaryNode
template<class PORT >
static void edRemovePortTypedFromSet (PORT *port, std::list< PORT * > &setOfPorts) throw (Exception)
 
template<class PORT >
static bool isPortNameAlreadyExist (const std::string &portName, const std::list< PORT * > &setOfPorts)
 
- Static Protected Attributes inherited from YACS::ENGINE::Node
static const char SEP_CHAR_IN_PORT [] ="."
 
static int _total = 0
 

Detailed Description

Definition at line 29 of file XMLNode.hxx.

Constructor & Destructor Documentation

XmlNode::XmlNode ( const XmlNode other,
ComposedNode father 
)

Definition at line 54 of file XMLNode.cxx.

References YACS::ENGINE::Node::_implementation, YACS::ENGINE::ServiceNode::_ref, and IMPL_NAME.

Referenced by simpleClone().

55  : _script(other._script), ServiceNode(other, father)
56 {
58  _ref = other._ref;
59 }
XmlNode::XmlNode ( const std::string &  name)

Definition at line 61 of file XMLNode.cxx.

References YACS::ENGINE::Node::_implementation, and IMPL_NAME.

62  : ServiceNode(name)
63 {
65 }

Member Function Documentation

virtual ServiceNode* YACS::ENGINE::XmlNode::createNode ( const std::string &  name)
inlinevirtual

Implements YACS::ENGINE::ServiceNode.

Definition at line 42 of file XMLNode.hxx.

43  { throw Exception("not implemented"); }
void XmlNode::execute ( )
virtual

Implements YACS::ENGINE::Task.

Definition at line 93 of file XMLNode.cxx.

References YACS::ENGINE::ServiceNode::_method, YACS::ENGINE::ServiceNode::_ref, YACS::ENGINE::ElementaryNode::_setOfInputPort, YACS::ENGINE::ElementaryNode::_setOfOutputPort, DEBTRACE, doc, YACS::ENGINE::DataPort::edGetType(), gui.CONNECTOR::f(), YACS::ENGINE::DataPort::getName(), YACS::ENGINE::ElementaryNode::getNumberOfOutputPorts(), YACS::ENGINE::InputXmlPort::getXml(), YACS::ENGINE::TypeCode::kind(), MUTEX, p, YACS::ENGINE::OutputXmlPort::put(), PMMLBasicsTestLauncher::ret, and run().

94 {
95  DEBTRACE("execute");
96  char dir[]="yacsXXXXXX";
97  // add a lock around mkdtemp (seems not thread safe)
98  {
100 #ifdef WIN32
101  char mdir [512+1];
102  GetTempPath(MAX_PATH+1, mdir);
103  CreateDirectory(mdir, NULL);
104 #else
105  char* mdir=mkdtemp(dir);
106 #endif
107  if(mdir==NULL)
108  {
109  perror("mkdtemp failed");
110  std::cerr << "Problem in mkdtemp " << dir << " " << mdir << std::endl;
111  throw Exception("Execution problem in mkdtemp");
112  }
113  }
114  std::string sdir(dir);
115  std::string input=sdir+"/input";
116  std::ofstream f(input.c_str());
117  f<<"<methodCall> <methodName>" << _method << "</methodName> <params>"<<std::endl;
118  DEBTRACE("---------------XmlNode::inputs---------------");
119  list<InputPort *>::iterator iter;
120  for(iter = _setOfInputPort.begin(); iter != _setOfInputPort.end(); iter++)
121  {
122  InputXmlPort *p=(InputXmlPort *)*iter;
123  DEBTRACE("port name: " << p->getName());
124  DEBTRACE("port kind: " << p->edGetType()->kind());
125  const char* ob=p->getXml();
126  DEBTRACE("Xml: " << ob );
127  f<<"<param>" << ob << "</param>"<<std::endl;
128  }
129  f<<"</params>"<<std::endl;
130  f<<"</methodCall>"<<std::endl;
131  f.close();
132  DEBTRACE("--------------XmlNode::calculation---------------" << _ref );
133  std::string call=sdir+"/run.sh";
134  std::ofstream run(call.c_str());
135  run << "#!/bin/sh" << std::endl;
136  run << "cd " << sdir << std::endl;
137  if(_ref[0]=='/' || _ref[0]=='~')
138  run << _ref << "> stdout 2>&1 " << std::endl;
139  else
140  run << "../"<<_ref << "> stdout 2>&1 " << std::endl;
141  //run << "cat stdout" << std::endl;
142  run.close();
143  chmod(call.c_str(),00777);
144 
145  std::string call2="/bin/sh "+call;
146  int ret=system(call2.c_str());
147  if(ret)
148  {
149  std::cerr << "Problem: " << ret << std::endl;
150  DEBTRACE("Problem: " << ret);
151  throw Exception("Execution problem");
152  }
153  std::string output=sdir+"/output";
154  xmlDocPtr doc;
155  doc = xmlReadFile(output.c_str(), NULL, 0);
156  if (doc == NULL)
157  {
158  DEBTRACE("Failed to parse " << output);
159  throw Exception("Execution problem");
160  }
161  xmlNodePtr cur;
162  cur = xmlDocGetRootElement(doc);
163  if (cur == NULL)
164  {
165  DEBTRACE("empty document " );
166  xmlFreeDoc(doc);
167  throw Exception("Execution problem");
168  }
169  if (xmlStrcmp(cur->name, (const xmlChar *) "methodResponse"))
170  {
171  DEBTRACE("document of the wrong type, root node != methodResponse");
172  xmlFreeDoc(doc);
173  throw Exception("Execution problem");
174  }
175  cur = cur->xmlChildrenNode;
176  xmlBufferPtr buf=xmlBufferCreate();
177  list<OutputPort *>::iterator iter2;
178  iter2 = _setOfOutputPort.begin();
179  OutputXmlPort *p;
180  p=(OutputXmlPort *)*iter2;
181  int nres=0;
182 
183  while (cur != NULL)
184  {
185  if ((!xmlStrcmp(cur->name, (const xmlChar *)"fault")))
186  {
187  DEBTRACE("exception in shell" );
188  xmlFreeDoc(doc);
189  throw Exception("Execution problem");
190  }
191  if ((!xmlStrcmp(cur->name, (const xmlChar *)"params")))
192  {
193  xmlNodePtr cur0 = cur->xmlChildrenNode;
194  while (cur0 != NULL)
195  {
196  if ((!xmlStrcmp(cur0->name, (const xmlChar *)"param")))
197  {
198  xmlNodePtr cur1 = cur0->xmlChildrenNode;
199  while (cur1 != NULL)
200  {
201  if ((!xmlStrcmp(cur1->name, (const xmlChar *)"value")))
202  {
203  xmlNodePtr cur2=cur1->xmlChildrenNode;
204  while (cur2 != NULL)
205  {
206  if ((!xmlStrcmp(cur2->name, (const xmlChar *)"int")))
207  {
208  //got an int
209  if(getNumberOfOutputPorts()!=1)
210  {
211  //mismatch
212  xmlBufferFree(buf);
213  xmlFreeDoc(doc);
214  throw Exception("Execution problem:mismatch in output numbers");
215  }
216  xmlBufferEmpty(buf);
217  xmlNodeDump(buf,doc,cur1,0,0);
218  DEBTRACE(xmlBufferContent(buf));
219  p->put(xmlBufferContent(buf));
220  }
221  if ((!xmlStrcmp(cur2->name, (const xmlChar *)"double")))
222  {
223  //got an double
224  if(getNumberOfOutputPorts()!=1)
225  {
226  //mismatch
227  xmlBufferFree(buf);
228  xmlFreeDoc(doc);
229  throw Exception("Execution problem:mismatch in output numbers");
230  }
231  xmlBufferEmpty(buf);
232  xmlNodeDump(buf,doc,cur1,0,0);
233  DEBTRACE(xmlBufferContent(buf));
234  p->put(xmlBufferContent(buf));
235  }
236  if ((!xmlStrcmp(cur2->name, (const xmlChar *)"string")))
237  {
238  //got an string
239  if(getNumberOfOutputPorts()!=1)
240  {
241  //mismatch
242  xmlBufferFree(buf);
243  xmlFreeDoc(doc);
244  throw Exception("Execution problem:mismatch in output port numbers");
245  }
246  xmlBufferEmpty(buf);
247  xmlNodeDump(buf,doc,cur1,0,0);
248  DEBTRACE(xmlBufferContent(buf));
249  p->put(xmlBufferContent(buf));
250  }
251  if ((!xmlStrcmp(cur2->name, (const xmlChar *)"boolean")))
252  {
253  //got an boolean
254  if(getNumberOfOutputPorts()!=1)
255  {
256  //mismatch
257  xmlBufferFree(buf);
258  xmlFreeDoc(doc);
259  throw Exception("Execution problem:mismatch in output port numbers");
260  }
261  xmlBufferEmpty(buf);
262  xmlNodeDump(buf,doc,cur1,0,0);
263  DEBTRACE(xmlBufferContent(buf));
264  p->put(xmlBufferContent(buf));
265  }
266  if ((!xmlStrcmp(cur2->name, (const xmlChar *)"objref")))
267  {
268  //got an objref
269  if(getNumberOfOutputPorts()!=1)
270  {
271  //mismatch
272  xmlBufferFree(buf);
273  xmlFreeDoc(doc);
274  throw Exception("Execution problem:mismatch in output port numbers");
275  }
276  xmlBufferEmpty(buf);
277  xmlNodeDump(buf,doc,cur1,0,0);
278  DEBTRACE(xmlBufferContent(buf));
279  p->put(xmlBufferContent(buf));
280  }
281  if ((!xmlStrcmp(cur2->name, (const xmlChar *)"struct")))
282  {
283  //got an struct
284  if(getNumberOfOutputPorts()!=1)
285  {
286  //mismatch
287  xmlBufferFree(buf);
288  xmlFreeDoc(doc);
289  throw Exception("Execution problem:mismatch in output port numbers");
290  }
291  xmlBufferEmpty(buf);
292  xmlNodeDump(buf,doc,cur1,0,0);
293  DEBTRACE(xmlBufferContent(buf));
294  p->put(xmlBufferContent(buf));
295  }
296  if ((!xmlStrcmp(cur2->name, (const xmlChar *)"array")))
297  {
298  //got a tuple of results or only one result (but a list)
299  if(getNumberOfOutputPorts()==1)
300  {
301  //It's a one result list
302  xmlBufferEmpty(buf);
303  xmlNodeDump(buf,doc,cur1,0,0);
304  DEBTRACE(xmlBufferContent(buf));
305  p->put(xmlBufferContent(buf));
306  }
307  else
308  {
309  //It's a list of results
310  xmlNodePtr cur3=cur2->xmlChildrenNode;
311  while (cur3 != NULL)
312  {
313  if ((!xmlStrcmp(cur3->name, (const xmlChar *)"data")))
314  {
315  xmlNodePtr cur4=cur3->xmlChildrenNode;
316  while (cur4 != NULL)
317  {
318  if ((!xmlStrcmp(cur4->name, (const xmlChar *)"value")))
319  {
320  nres++;
321  if(nres > getNumberOfOutputPorts())
322  {
323  //mismatch
324  xmlBufferFree(buf);
325  xmlFreeDoc(doc);
326  throw Exception("Execution problem:mismatch in output port numbers");
327  }
328  xmlBufferEmpty(buf);
329  xmlNodeDump(buf,doc,cur4,0,0);
330  DEBTRACE(xmlBufferContent(buf));
331  p=(OutputXmlPort *)*iter2;
332  p->put(xmlBufferContent(buf));
333  iter2++;
334  }
335  cur4 = cur4->next;
336  } // end while value
337  break;
338  }
339  cur3 = cur3->next;
340  } // end while data
341  }
342  break;
343  }
344  cur2 = cur2->next;
345  } // end while array
346  break;
347  }
348  cur1 = cur1->next;
349  } // end while value
350  }
351  cur0 = cur0->next;
352  }// end while param
353  }
354  cur = cur->next;
355  }
356  xmlBufferFree(buf);
357  xmlFreeDoc(doc);
358 }
std::string XmlNode::getKind ( ) const
virtual

Return the service node kind.

A runtime can provide several implementations of a service node. Each implementation has a different kind. A ComponentInstance can be associated to a ServiceNode with the same kind.

Reimplemented from YACS::ENGINE::ServiceNode.

Definition at line 88 of file XMLNode.cxx.

References KIND.

89 {
90  return KIND;
91 }
std::string XmlNode::getScript ( ) const
virtual

Definition at line 83 of file XMLNode.cxx.

References _script.

84 {
85  return _script;
86 }
virtual void YACS::ENGINE::XmlNode::load ( )
inlinevirtual

DISTRIBUTION NOT YET implemented for XMLNode.

Reimplemented from YACS::ENGINE::ServiceNode.

Definition at line 38 of file XMLNode.hxx.

38 { }
void XmlNode::setRef ( const std::string &  ref)
virtual

Associate a new component instance to this service node.

A new component instance with type name ref is created (from runtime factory createComponentInstance) and associated to the node.

Reimplemented from YACS::ENGINE::ServiceNode.

Definition at line 72 of file XMLNode.cxx.

References YACS::ENGINE::ServiceNode::_ref, and gui.CONNECTOR::ref().

73 {
74  //No component instance here
75  _ref=ref;
76 }
void XmlNode::setScript ( const std::string &  script)
virtual

Definition at line 78 of file XMLNode.cxx.

References _script.

79 {
80  _script=script;
81 }
Node * XmlNode::simpleClone ( ComposedNode father,
bool  editionOnly 
) const
protectedvirtual

Implements YACS::ENGINE::Node.

Definition at line 67 of file XMLNode.cxx.

References XmlNode().

68 {
69  return new XmlNode(*this,father);
70 }

Member Data Documentation

std::string YACS::ENGINE::XmlNode::_script
protected

Definition at line 49 of file XMLNode.hxx.

Referenced by getScript(), and setScript().

const char XmlNode::IMPL_NAME ="XML"
static

Definition at line 46 of file XMLNode.hxx.

Referenced by XmlNode().

const char XmlNode::KIND ="xmlsh"
static

Definition at line 47 of file XMLNode.hxx.

Referenced by getKind().


The documentation for this class was generated from the following files: