Version: 9.15.0
YACS::ENGINE::simpleTypeParser Class Reference

#include <LoadState.hxx>

Inheritance diagram for YACS::ENGINE::simpleTypeParser:
Collaboration diagram for YACS::ENGINE::simpleTypeParser:

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 charData (std::string data)
 
- Public Member Functions inherited from xmlParserBase
void setAttribute (std::string key, std::string value)
 
std::string getAttribute (std::string key)
 
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)
 
- Static Public Member Functions inherited from xmlParserBase
static void XMLCALL start_document (void *userData)
 
static void XMLCALL end_document (void *userData)
 
static void XMLCALL start_element (void *userData, const xmlChar *name, const xmlChar **p)
 
static void XMLCALL end_element (void *userData, const xmlChar *name)
 
static void XMLCALL characters (void *userData, const xmlChar *ch, int len)
 
static void XMLCALL comment (void *userData, const xmlChar *value)
 
static void XMLCALL warning (void *userData, const char *fmt,...)
 
static void XMLCALL error (void *userData, const char *fmt,...)
 
static void XMLCALL fatal_error (void *userData, const char *fmt,...)
 
static void XMLCALL cdata_block (void *userData, const xmlChar *value, int len)
 
static void cleanGarbage ()
 
static int getGarbageSize ()
 
static void XML_SetUserData (_xmlParserCtxt *ctxt, xmlParserBase *parser)
 
- 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
 
- Static Public Attributes inherited from xmlParserBase
static _xmlParserCtxt * _xmlParser
 
static std::stack< xmlParserBase * > _stackParser
 
- 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
 
- Static Protected Attributes inherited from xmlParserBase
static std::list< xmlParserBase * > _garbage
 

Detailed Description

Definition at line 177 of file LoadState.hxx.

Member Function Documentation

◆ charData()

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

to be specialized following the kind of xml tag

Reimplemented from YACS::ENGINE::stateParser.

Definition at line 778 of file LoadState.cxx.

779 {
780  _data = _data + data;
781 }
std::string _data

◆ init()

void simpleTypeParser::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 753 of file LoadState.cxx.

754 {
755  DEBTRACE("simpleTypeParser::init()");
756  _state = XMLINVALUE;
757  _father = father;
758  _stackState.push(_state);
759  if (p) getAttributes(p);
760 }
#define DEBTRACE(msg)
Definition: YacsTrace.hxx:31
static std::stack< XMLReadState > _stackState
Definition: LoadState.hxx:98
static XMLReadState _state
Definition: LoadState.hxx:83
xmlParserBase * _father
void getAttributes(const xmlChar **p)
Proc * p
Definition: driver.cxx:216

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

◆ onEnd()

void simpleTypeParser::onEnd ( const XML_Char name)
virtual

Reimplemented from YACS::ENGINE::stateParser.

Definition at line 770 of file LoadState.cxx.

771 {
772  string val = string("<") + (char*) name + ">" + _data + "</" + (char*) name +">";
773  DEBTRACE( val );
774  _father->addData(val);
775  stateParser::onEnd(name);
776 }
virtual void onEnd(const XML_Char *name)
Definition: LoadState.cxx:111
virtual void addData(std::string value)

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

◆ onStart()

void simpleTypeParser::onStart ( const XML_Char elem,
const xmlChar **  p 
)
virtual

Reimplemented from YACS::ENGINE::stateParser.

Definition at line 762 of file LoadState.cxx.

763 {
764  string element(elem);
765  _what = "expected nothing, got <" + element + ">";
767  stopParse(_what);
768 }
static std::string _what
Definition: LoadState.hxx:84
virtual void stopParse(std::string what)

References YACS::ENGINE::XMLFATALERROR.


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