Version: 8.3.0
YACS::ENGINE::attrParser Class Reference

#include <LoadState.hxx>

Inheritance diagram for YACS::ENGINE::attrParser:
Collaboration diagram for YACS::ENGINE::attrParser:

Public Member Functions

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

Public Attributes

std::string _attrValue
 

Additional Inherited Members

- Static Public Member Functions inherited from YACS::ENGINE::stateParser
static void setProc (Proc *p)
 
static void setRuntime (Runtime *runtime)
 
- Static Public Attributes inherited from YACS::ENGINE::stateParser
static XMLReadState _state
 
static std::string _what
 
- Protected Member Functions inherited from xmlParserBase
void getAttributes (const xmlChar **p)
 
virtual void onStart (const XML_Char *elem, const xmlChar **p)
 
virtual void onEnd (const XML_Char *name)
 
virtual void incrCount (const XML_Char *elem)
 
virtual void end ()
 
virtual void stopParse (std::string what)
 
- 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 129 of file LoadState.hxx.

Member Function Documentation

void attrParser::charData ( std::string  data)
virtual

to be specialized following the kind of xml tag

Reimplemented from YACS::ENGINE::stateParser.

Definition at line 507 of file LoadState.cxx.

508 {
509  _attrValue = data;
510 }
void attrParser::init ( const xmlChar **  p,
xmlParserBase father = 0 
)
virtual

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 489 of file LoadState.cxx.

References DEBTRACE.

490 {
491  DEBTRACE("attrParser::init()");
492  //_state = XMLINNODE;
493  _father = father;
494  _stackState.push(_state); // keep current state
495  if (p) getAttributes(p);
496 }
void attrParser::onEnd ( const XML_Char name)
virtual

Reimplemented from YACS::ENGINE::stateParser.

Definition at line 512 of file LoadState.cxx.

References YACS::ENGINE::stateParser::onEnd(), and YASSERT.

513 {
514  // cerr << "end attrParser " << name << " " << _stackParser.size() << endl;
515  YASSERT(_father);
516  _father->setAttribute((char*)name, _attrValue);
517  stateParser::onEnd(name);
518 }
void attrParser::onStart ( const XML_Char elem,
const xmlChar **  p 
)
virtual

Reimplemented from YACS::ENGINE::stateParser.

Definition at line 499 of file LoadState.cxx.

References YACS::ENGINE::XMLFATALERROR.

500 {
501  string element(elem);
502  _what = "expected nothing, got <" + element + ">";
504  stopParse(_what);
505 }

Member Data Documentation

std::string YACS::ENGINE::attrParser::_attrValue

Definition at line 136 of file LoadState.hxx.


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