Version: 8.3.0
YACS::ENGINE::arrayParser Class Reference

#include <LoadState.hxx>

Inheritance diagram for YACS::ENGINE::arrayParser:
Collaboration diagram for YACS::ENGINE::arrayParser:

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 value)
 

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 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 158 of file LoadState.hxx.

Member Function Documentation

void arrayParser::addData ( std::string  value)
virtual

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

Reimplemented from xmlParserBase.

Definition at line 684 of file LoadState.cxx.

685 {
686  string val = "<array>" + value + "</array>";
687  _data = val;
688 }
void arrayParser::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 654 of file LoadState.cxx.

References DEBTRACE, and YACS::ENGINE::XMLINVALUE.

655 {
656  DEBTRACE("arrayParser::init()");
657  _state = XMLINVALUE;
658  _father = father;
659  _stackState.push(_state);
660  if (p) getAttributes(p);
661 }
void arrayParser::onEnd ( const XML_Char name)
virtual

Reimplemented from YACS::ENGINE::stateParser.

Definition at line 691 of file LoadState.cxx.

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

692 {
693  // cerr << "arrayParser::onEnd " << name << endl;
694  // cerr << _data << endl;
696  stateParser::onEnd(name);
697 }
void arrayParser::onStart ( const XML_Char elem,
const xmlChar **  p 
)
virtual

Reimplemented from YACS::ENGINE::stateParser.

Definition at line 664 of file LoadState.cxx.

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

665 {
666  string element(elem);
667  DEBTRACE("array type " << element);
668  stateParser *parser = 0;
669  if (element == "data") parser = new dataParser();
670  else
671  {
672  _what = "expected data, got <" + element + ">";
674  stopParse(_what);
675  }
676  if (parser)
677  {
678  _stackParser.push(parser);
679  XML_SetUserData(_xmlParser, parser);
680  parser->init(p, this);
681  }
682 }

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