10 #ifndef FAUDES_PD_GOTOGENERATOR_H
11 #define FAUDES_PD_GOTOGENERATOR_H
82 void InitState(
const std::set<Lr1Configuration>& initState){ mInitState = initState; }
90 const std::set<Lr1Configuration>&
InitState()
const {
return mInitState; }
103 template <
class GlobalAttr,
class StateAttr,
class EventAttr,
class TransAttr>
253 void ConfigSet(
Idx index,
const std::set<Lr1Configuration>& configs);
263 std::set<Lr1Configuration>
const& ConfigSet(
Idx index)
const;
273 Idx StateIndex(
const std::set<Lr1Configuration>& configs)
const;
281 virtual bool Valid(
void)
const;
286 typedef TgotoGenerator<AttributeVoid, AttributeGotoState, AttributeVoid, AttributeGotoTransition>
291 #define THISGOTO TgotoGenerator<GlobalAttr, StateAttr, EventAttr, TransAttr>
292 #define BASEGOTO TaGenerator<GlobalAttr, StateAttr, EventAttr, TransAttr>
293 #define TEMPGOTO template <class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
298 FD_DG(
"GotoGenerator(" <<
this <<
")::GotoGenerator()");
302 TEMPGOTO THISGOTO::TgotoGenerator(
const TgotoGenerator& rOtherGen) :
BASEGOTO(rOtherGen) {
303 FD_DG(
"GotoGenerator(" <<
this <<
")::GotoGenerator(rOtherGotoGen)");
307 TEMPGOTO THISGOTO::TgotoGenerator(
const vGenerator& rOtherGen) :
BASEGOTO(rOtherGen) {
309 FD_DG(
"GotoGenerator(" <<
this <<
")::GotoGenerator(rOtherGen)");
313 TEMPGOTO THISGOTO::TgotoGenerator(
const std::string& rFileName) :
BASEGOTO(rFileName) {
314 FD_DG(
"GotoGenerator(" <<
this <<
")::GotoGenerator(file)");
320 FD_DG(
"TgotoGenerator(" <<
this <<
")::Assign([type] " << &rSrc <<
")");
322 if(&rSrc==static_cast<const Type*>(
this))
return *
this;
324 BASEGOTO::Assign(rSrc);
333 res->EventSymbolTablep(BASEGOTO::mpEventSymbolTable);
334 res->mStateNamesEnabled=BASEGOTO::mStateNamesEnabled;
335 res->mReindexOnWrite=BASEGOTO::mReindexOnWrite;
359 return BASEGOTO::SetTransition(rTrans,attr);
365 Idx ev = BASEGOTO::InsEvent(
"dummy");
366 return SetTransition(Transition(x1,ev,x2), symbol);
370 return BASEGOTO::pTransRel->Attribute(rTrans).Symbol();
374 TEMPGOTO void THISGOTO::ConfigSet(
Idx index,
const std::set<Lr1Configuration>& configs){
375 BASEGOTO::pStates->Attributep(index)->ConfigSet(configs);
379 TEMPGOTO std::set<Lr1Configuration>
const& THISGOTO::ConfigSet(
Idx index)
const{
380 return BASEGOTO::pStates->Attributep(index)->ConfigSet();
384 TEMPGOTO Idx THISGOTO::StateIndex(
const std::set<Lr1Configuration>& configs)
const{
386 StateSet::Iterator stateit;
388 for(stateit = BASEGOTO::StatesBegin(); stateit != BASEGOTO::StatesEnd(); stateit++){
391 std::set<Lr1Configuration> curretConfigs = BASEGOTO::pStates->Attributep(*stateit)->ConfigSet();
403 TEMPGOTO bool THISGOTO::Valid(
void)
const {
404 FD_DV(
"GotoGenerator(" <<
this <<
")::Valid()");
406 if(!BASEGOTO::Valid())
return false;