Version: 8.3.0
outputParser Class Reference
Inheritance diagram for outputParser:
Collaboration diagram for outputParser:

Public Member Functions

virtual void init (const xmlChar **p, xmlParserBase *father=0)
 
virtual void onStart (const XML_Char *elem, const xmlChar **p)
 
virtual void onEnd (const XML_Char *name)
 
virtual void addData (std::string)
 

Additional Inherited Members

- Static Public Member Functions inherited from YACS::ENGINE::stateParser
static void setProc (Proc *p)
 
static void setRuntime (Runtime *runtime)
 
- Public Attributes inherited from xmlParserBase
std::map< std::string, int > counts
 
- Static Public Attributes inherited from YACS::ENGINE::stateParser
static XMLReadState _state
 
static std::string _what
 
- Protected Member Functions inherited from YACS::ENGINE::stateParser
virtual void onStart (const XML_Char *elem, const xmlChar **p)
 
virtual void onEnd (const XML_Char *name)
 
virtual void charData (std::string data)
 
- Protected Attributes inherited from xmlParserBase
std::map< std::string,
std::string > 
_mapAttrib
 
std::string _data
 
xmlParserBase_father
 
- Static Protected Attributes inherited from YACS::ENGINE::stateParser
static std::stack< XMLReadState_stackState
 
static Proc_p
 
static Runtime_runtime
 
static std::map< std::string,
YACS::StatesForNode
_nodeStateValue
 
static std::map< std::string,
YACS::StatesForNode
_nodeStates
 

Detailed Description

Definition at line 188 of file LoadState.cxx.

Member Function Documentation

virtual void outputParser::addData ( std::string  value)
inlinevirtual

Add data on the data attribute of the parser object dedicated to an xml tag

Reimplemented from xmlParserBase.

Definition at line 226 of file LoadState.cxx.

227  {
228  //DEBTRACE("outputParser::addData" << elem);
229  }
virtual void outputParser::init ( const xmlChar **  p,
xmlParserBase father = 0 
)
inlinevirtual

all parsers must know their father parser (father tag), in order to set values or attributes in father.

Reimplemented from YACS::ENGINE::stateParser.

Definition at line 191 of file LoadState.cxx.

References YACS::ENGINE::XMLNOCONTEXT, and YASSERT.

192  {
193  //DEBTRACE("outputParser::init()");
195  _father = father;
196  YASSERT( dynamic_cast<nodeParser*> (father));
197  _stackState.push(_state);
198  if (p) getAttributes(p);
199  }
virtual void outputParser::onEnd ( const XML_Char name)
inlinevirtual

to be specialized for each kind of xml tag

Reimplemented from xmlParserBase.

Definition at line 220 of file LoadState.cxx.

References YACS::ENGINE::stateParser::onEnd().

221  {
222  //DEBTRACE("outputParser::onEnd" << elem);
223  //DEBTRACE("portName: " << _mapAttrib["name"] << "value: " << _data );
224  stateParser::onEnd(name);
225  }
virtual void outputParser::onStart ( const XML_Char elem,
const xmlChar **  p 
)
inlinevirtual

to be specialized for each kind of xml tag

Reimplemented from xmlParserBase.

Definition at line 200 of file LoadState.cxx.

References YACS::ENGINE::stateParser::init(), and YACS::ENGINE::XMLFATALERROR.

201  {
202  //DEBTRACE("outputParser::onStart" << elem);
203  string element(elem);
204  stateParser *parser = 0;
205  if (element == "name") parser = new attrParser();
206  else if (element == "value") parser = new valueParser();
207  else
208  {
209  _what = "expected name or value, got <" + element + ">";
211  stopParse(_what);
212  }
213  if (parser)
214  {
215  _stackParser.push(parser);
216  XML_SetUserData(_xmlParser, parser);
217  parser->init(p, this);
218  }
219  }

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