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

#include <loopParsers.hxx>

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

Public Member Functions

virtual void name (const std::string &name)
 
virtual T post ()
 
- Public Member Functions inherited from YACS::looptypeParser< ENGINE::WhileLoop * >
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 pre ()
 
virtual void state (const std::string &name)
 
virtual void property (const myprop &prop)
 
virtual void inline_ (ENGINE::InlineNode *const &n)
 
virtual void sinline (ENGINE::ServiceInlineNode *const &n)
 
virtual void service (ENGINE::ServiceNode *const &n)
 
virtual void server (ENGINE::ServerNode *const &n)
 
virtual void remote (ENGINE::InlineNode *const &n)
 
virtual void node (ENGINE::InlineNode *const &n)
 
virtual void forloop (ENGINE::ForLoop *const &b)
 
virtual void foreach (ENGINE::ForEachLoopGen *const &b)
 
virtual void optimizer (ENGINE::OptimizerLoop *const &b)
 
virtual void while_ (ENGINE::WhileLoop *const &b)
 
virtual void switch_ (ENGINE::Switch *const &b)
 
virtual void bloc (ENGINE::Bloc *const &b)
 
virtual void datalink (const mylink &l)
 
- 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 whilelooptypeParser< T > whileloopParser
 
- 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::looptypeParser< ENGINE::WhileLoop * >
std::string _state
 
ENGINE::WhileLoop_cnode
 
std::vector< ENGINE::WhileLoop * > _cnodes
 
- 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 = ENGINE::WhileLoop*>
struct YACS::whilelooptypeParser< T >

Definition at line 284 of file loopParsers.hxx.

Member Function Documentation

◆ name()

template<class T >
void YACS::whilelooptypeParser< T >::name ( const std::string &  name)
virtual

Reimplemented from YACS::looptypeParser< ENGINE::WhileLoop * >.

Definition at line 294 of file loopParsers.hxx.

295  {
296  DEBTRACE( "while_name: " << name )
297  std::string fullname=currentProc->names.back()+name;
299  currentProc->nodeMap[fullname]=this->_cnode;
300  this->_cnodes.push_back(this->_cnode);
301  currentProc->names.push_back(fullname+'.');
302  }
#define DEBTRACE(msg)
Definition: YacsTrace.hxx:31
YACS::ENGINE::Runtime * theRuntime
Definition: parsers.cxx:40
YACS::ENGINE::Proc * currentProc
Definition: parserBase.cxx:30
std::map< std::string, Node * > nodeMap
Definition: Proc.hxx:87
std::vector< std::string > names
Definition: Proc.hxx:93
virtual WhileLoop * createWhileLoop(const std::string &name)
Definition: Runtime.cxx:241
std::vector< ENGINE::WhileLoop * > _cnodes
Definition: loopParsers.hxx:72
virtual void name(const std::string &name)

References YACS::ENGINE::Runtime::createWhileLoop(), currentProc, DEBTRACE, YACS::ENGINE::Proc::names, YACS::ENGINE::Proc::nodeMap, and theRuntime.

◆ post()

template<class T >
T YACS::whilelooptypeParser< T >::post
virtual

Definition at line 305 of file loopParsers.hxx.

306  {
307  DEBTRACE( "while_post" << this->_cnode->getName() )
308  ENGINE::InputPort *cond=this->_cnode->edGetConditionPort();
309  cond->edInit(true);
310  T b=this->_cnode;
311  this->_cnodes.pop_back();
312  currentProc->names.pop_back();
313  this->_cnode=this->_cnodes.empty() ? 0 : this->_cnodes.back();
314  return b;
315  }
std::string getName() const

References gui.CONNECTOR::b, currentProc, DEBTRACE, YACS::ENGINE::InputPort::edInit(), and YACS::ENGINE::Proc::names.

Member Data Documentation

◆ whileloopParser

template<class T >
whilelooptypeParser< T > YACS::whilelooptypeParser< T >::whileloopParser
static

Definition at line 286 of file loopParsers.hxx.


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