Version: 9.15.0
YACS::linktypeParser< T > Struct Template Reference

#include <linkParsers.hxx>

Inheritance diagram for YACS::linktypeParser< T >:
Collaboration diagram for YACS::linktypeParser< T >:

Public Member Functions

virtual void onStart (const XML_Char *el, const XML_Char **attr)
 
virtual void onEnd (const char *el, parser *child)
 
virtual void buildAttr (const XML_Char **attr)
 
virtual void fromport (const std::string &name)
 
virtual void toport (const std::string &name)
 
virtual T & post ()
 
- Public Member Functions inherited from YACS::controltypeParser< mylink >
virtual void pre ()
 
virtual void fromnode (const std::string &name)
 
virtual void tonode (const std::string &name)
 
virtual void property (const myprop &prop)
 
- Public Member Functions inherited from YACS::parser
 parser ()
 
virtual ~parser ()
 
virtual void SetUserDataAndPush (parser *pp)
 
virtual void charData (const XML_Char *s, int len)
 
virtual void endParser ()
 
virtual void init ()
 
virtual void incrCount (const XML_Char *elem)
 
virtual void checkOrder (std::string &el)
 
virtual void maxcount (std::string name, int max, std::string &el)
 
virtual void mincount (std::string name, int min)
 
virtual void maxchoice (std::string *names, int max, std::string &el)
 
virtual void minchoice (std::string *names, int min)
 
virtual void required (const std::string &name, const XML_Char **attr)
 
std::stack< parser * > & getStack ()
 
template<class T >
post ()
 
void logError (const std::string &reason)
 

Static Public Attributes

static linktypeParser< T > linkParser
 
- Static Public Attributes inherited from YACS::controltypeParser< mylink >
static controltypeParser< mylinkcontrolParser
 
- Static Public Attributes inherited from YACS::parser
static parser main_parser
 
static std::stack< parser * > _stackParser
 

Additional Inherited Members

- Static Public Member Functions inherited from YACS::parser
static void XMLCALL start_document (void *data)
 
static void XMLCALL end_document (void *data)
 
static void XMLCALL start_element (void *data, const xmlChar *name, const xmlChar **p)
 
static void XMLCALL end_element (void *data, const xmlChar *name)
 
static void XMLCALL characters (void *data, const xmlChar *ch, int len)
 
static void XMLCALL comment (void *data, const xmlChar *value)
 
static void XMLCALL cdata_block (void *data, const xmlChar *value, int len)
 
static void XMLCALL warning (void *data, const char *fmt,...)
 
static void XMLCALL error (void *data, const char *fmt,...)
 
static void XMLCALL fatal_error (void *data, const char *fmt,...)
 
static void XML_SetUserData (_xmlParserCtxt *ctxt, parser *par)
 
- Public Attributes inherited from YACS::controltypeParser< mylink >
mylink _link
 
- Public Attributes inherited from YACS::parser
std::string _file
 
std::string _content
 
std::map< std::string, int > * _counts
 
std::map< std::string, int > _orders
 
int _orderState
 
int _level
 
std::stack< std::map< std::string, int > * > _stackCount
 
std::stack< int > _stackOrder
 
std::map< std::string, parser * > * _defaultParsersMap
 

Detailed Description

template<class T = mylink>
struct YACS::linktypeParser< T >

Definition at line 82 of file linkParsers.hxx.

Member Function Documentation

◆ buildAttr()

template<class T = mylink>
virtual void YACS::linktypeParser< T >::buildAttr ( const XML_Char **  attr)
inlinevirtual

Reimplemented from YACS::parser.

Definition at line 113 of file linkParsers.hxx.

114  {
115  if (!attr)
116  return;
117  for (int i = 0; attr[i]; i += 2)
118  {
119  if((std::string(attr[i]) == "control")
120  && (std::string(attr[i+1]) == "false"))
121  this->_link._withControl=false;
122  }
123  }

References YACS::controltypeParser< mylink >::_link, mylink::_withControl, and yacsorb.CORBAEngineTest::i.

◆ fromport()

template<class T = mylink>
virtual void YACS::linktypeParser< T >::fromport ( const std::string &  name)
inlinevirtual

Definition at line 124 of file linkParsers.hxx.

125  {
126  this->_link.fromport(name);
127  }

References YACS::controltypeParser< mylink >::_link, and mylink::fromport().

Referenced by YACS::linktypeParser< T >::onEnd().

◆ onEnd()

template<class T = mylink>
virtual void YACS::linktypeParser< T >::onEnd ( const char *  el,
parser child 
)
inlinevirtual

Reimplemented from YACS::controltypeParser< mylink >.

Definition at line 104 of file linkParsers.hxx.

105  {
106  std::string element(el);
107  if(element == "fromnode")this->fromnode(((stringtypeParser*)child)->post());
108  else if(element == "tonode")this->tonode(((stringtypeParser*)child)->post());
109  else if(element == "toport")toport(((stringtypeParser*)child)->post());
110  else if(element == "fromport")fromport(((stringtypeParser*)child)->post());
111  else if(element == "property")this->property(((propertytypeParser*)child)->post());
112  }
virtual void tonode(const std::string &name)
Definition: linkParsers.hxx:63
virtual void fromnode(const std::string &name)
Definition: linkParsers.hxx:59
virtual void property(const myprop &prop)
Definition: linkParsers.hxx:67
virtual void fromport(const std::string &name)
virtual T & post()
virtual void toport(const std::string &name)

References YACS::controltypeParser< mylink >::fromnode(), YACS::linktypeParser< T >::fromport(), YACS::linktypeParser< T >::post(), YACS::controltypeParser< mylink >::property(), YACS::controltypeParser< mylink >::tonode(), and YACS::linktypeParser< T >::toport().

◆ onStart()

template<class T = mylink>
virtual void YACS::linktypeParser< T >::onStart ( const XML_Char el,
const XML_Char **  attr 
)
inlinevirtual

Reimplemented from YACS::controltypeParser< mylink >.

Definition at line 86 of file linkParsers.hxx.

87  {
88  std::string element(el);
89  this->maxcount("fromnode",1,element);
90  this->maxcount("tonode",1,element);
91  this->maxcount("fromport",1,element);
92  this->maxcount("toport",1,element);
94  if(element == "fromnode")pp=&stringtypeParser::stringParser;
95  else if(element == "tonode")pp=&stringtypeParser::stringParser;
96  else if(element == "toport")pp=&stringtypeParser::stringParser;
97  else if(element == "fromport")pp=&stringtypeParser::stringParser;
98  else if(element == "property")pp=&propertytypeParser::propertyParser;
99  this->SetUserDataAndPush(pp);
100  pp->init();
101  pp->pre();
102  pp->buildAttr(attr);
103  }
virtual void maxcount(std::string name, int max, std::string &el)
Definition: parserBase.cxx:122
virtual void SetUserDataAndPush(parser *pp)
Definition: parserBase.cxx:55
static parser main_parser
Definition: parserBase.hxx:41
static propertytypeParser propertyParser
static stringtypeParser stringParser
Definition: dataParsers.hxx:33

References YACS::parser::buildAttr(), YACS::parser::init(), YACS::parser::main_parser, YACS::parser::maxcount(), YACS::parser::pre(), YACS::propertytypeParser::propertyParser, YACS::parser::SetUserDataAndPush(), and YACS::stringtypeParser::stringParser.

◆ post()

template<class T = mylink>
virtual T& YACS::linktypeParser< T >::post ( )
inlinevirtual

Reimplemented from YACS::controltypeParser< mylink >.

Definition at line 132 of file linkParsers.hxx.

133  {
134  this->mincount("fromnode",1);
135  this->mincount("tonode",1);
136  this->mincount("fromport",1);
137  this->mincount("toport",1);
138  return this->_link;
139  }
virtual void mincount(std::string name, int min)
Definition: parserBase.cxx:134

References YACS::controltypeParser< mylink >::_link, and YACS::parser::mincount().

Referenced by YACS::linktypeParser< T >::onEnd().

◆ toport()

template<class T = mylink>
virtual void YACS::linktypeParser< T >::toport ( const std::string &  name)
inlinevirtual

Definition at line 128 of file linkParsers.hxx.

129  {
130  this->_link.toport(name);
131  }

References YACS::controltypeParser< mylink >::_link, and mylink::toport().

Referenced by YACS::linktypeParser< T >::onEnd().

Member Data Documentation

◆ linkParser

template<class T >
linktypeParser< T > YACS::linktypeParser< T >::linkParser
static

Definition at line 84 of file linkParsers.hxx.


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