20 #ifndef _PROCPARSER_HXX_
21 #define _PROCPARSER_HXX_
38 template <
class T=YACS::ENGINE::Proc*>
56 for (
int i = 0; attr[
i];
i += 2)
58 if(std::string(attr[
i]) ==
"state")
59 this->
state(attr[i+1]);
60 if(std::string(attr[i]) ==
"name")
66 std::string
name(
"proc");
69 currentProc->
names.push_back(
"");
105 std::map<std::string, std::string>::const_iterator pt;
116 if(currentProc->
containerMap.count(
"DefaultContainer") != 0)
121 currentProc->
containerMap[
"DefaultContainer"]->checkCapabilityToDealWith(inst);
129 std::cerr <<
"WARNING: Unknown container " << t.
_container <<
" ignored" << std::endl;
138 std::vector<machine>::const_iterator iter;
141 DEBTRACE(
"machine name: " << (*iter)._name )
146 std::cerr <<
"Warning: container " << t.
_name <<
" already defined. It will be ignored" << std::endl;
151 std::string kindOfContainer;
154 kindOfContainer=pt->second;
166 template <
class T> proctypeParser<T> proctypeParser<T>::procParser;
175 DEBTRACE(
"proctypeParser::onStart: " << el )
176 std::string element(el);
177 this->checkOrder(element);
212 if ( this->_defaultParsersMap )
214 if((this->_defaultParsersMap)->count(element) != 0)
216 pp=(*(this->_defaultParsersMap))[element];
220 std::cerr <<
"There is no parser for this element type. It will be ignored! " << element << std::endl;
224 this->SetUserDataAndPush(pp);
233 DEBTRACE(
"proctypeParser::onEnd: " << el )
234 std::string element(el);
237 else if(element ==
"sequence")sequence(((
seqtypeParser*)child)->post());
238 else if(element ==
"objref")objref(((
objtypeParser*)child)->post());
257 else if(element ==
"switch")this->switch_(((
switchtypeParser*)child)->post());
260 else if(element ==
"datalink") this->datalink(((
linktypeParser<>*)child)->post());