11 #ifndef FAUDES_HIO_CONTROLLER_H
12 #define FAUDES_HIO_CONTROLLER_H
47 template <
class GlobalAttr,
class StateAttr,
class EventAttr,
class TransAttr>
192 void SetYp(
const std::string& rName);
216 void SetUp(
const std::string& rName);
246 bool IsYp(
const std::string& rName)
const;
268 bool IsUp(
const std::string& rName)
const;
342 void SetYc(
const std::string& rName);
366 void SetUc(
const std::string& rName);
396 bool IsYc(
const std::string& rName)
const;
418 bool IsUc(
const std::string& rName)
const;
458 bool IsY(
const std::string& rName)
const;
488 bool IsU(
const std::string& rName)
const;
518 bool IsP(
const std::string& rName)
const;
548 bool IsC(
const std::string& rName)
const;
628 bool IsQYP(
const std::string& rName)
const;
704 bool IsQUp(
const std::string& rName)
const;
780 bool IsQUc(
const std::string& rName)
const;
932 bool IsErr(
const std::string& rName)
const;
960 #define THIS THioController<GlobalAttr, StateAttr, EventAttr, TransAttr>
961 #define BASE TaGenerator<GlobalAttr, StateAttr, EventAttr, TransAttr>
962 #define TEMP template <class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
967 FD_DG(
"HioController(" <<
this <<
")::HioController()");
972 FD_DG(
"HioController(" <<
this <<
")::HioController(rOtherGen)");
977 FD_DG(
"HioController(" <<
this <<
")::HioController(rOtherGen)");
987 ) :
BASE(rOtherGen) {
988 FD_DG(
"HioController(" <<
this <<
")::HioController(rOtherGen)");
996 TEMP THIS::THioController(
const std::string& rFileName) :
BASE(rFileName) {
997 FD_DG(
"HioController(" <<
this <<
")::HioController(rFilename) : done");
1005 res->EventSymbolTablep(BASE::mpEventSymbolTable);
1006 res->mStateNamesEnabled=BASE::mStateNamesEnabled;
1012 return new THIS(*
this);
1018 THIS res= BASE::NewAGen();
1026 EventAttr attr=BASE::EventAttribute(index);
1031 TEMP bool THIS::IsY(
const std::string& rName)
const {
1032 EventAttr attr=BASE::EventAttribute(rName);
1038 EventAttr attr=BASE::EventAttribute(index);
1043 TEMP bool THIS::IsU(
const std::string& rName)
const {
1044 EventAttr attr=BASE::EventAttribute(rName);
1050 FD_DG(
"HioController(" <<
this <<
")::YEvents()");
1052 EventSet::Iterator it;
1053 for(it=BASE::AlphabetBegin(); it!=BASE::AlphabetEnd(); it++) {
1054 if(IsY(*it)) res.
Insert(*it);
1061 FD_DG(
"HioController(" <<
this <<
")::UEvents()");
1063 EventSet::Iterator it;
1064 for(it=BASE::AlphabetBegin(); it!=BASE::AlphabetEnd(); it++) {
1065 if(IsU(*it)) res.
Insert(*it);
1074 FD_DG(
"HioController(" <<
this <<
")::InsYpEvent(" << index <<
")");
1078 BASE::InsEvent(index,attr);
1082 TEMP Idx THIS::InsYpEvent(
const std::string& rName) {
1083 FD_DG(
"HioController(" <<
this <<
")::InsYpEvent(" << rName <<
")");
1087 return BASE::InsEvent(rName,attr);
1092 FD_DG(
"HioController(" <<
this <<
")::InsUpEvent(" << index <<
")");
1096 BASE::InsEvent(index,attr);
1100 TEMP Idx THIS::InsUpEvent(
const std::string& rName) {
1101 FD_DG(
"HioController(" <<
this <<
")::InsUpEvent(" << rName <<
")");
1105 return BASE::InsEvent(rName,attr);
1110 FD_DG(
"HioController(" <<
this <<
")::SetYp(" << index <<
")");
1111 EventAttr attr=BASE::EventAttribute(index);
1114 BASE::pAlphabet->Attribute(index,attr);
1118 TEMP void THIS::SetYp(
const std::string& rName) {
1119 FD_DG(
"HioController(" <<
this <<
")::SetYp(" << rName <<
")");
1120 Idx index = BASE::EventIndex(rName);
1126 FD_DG(
"HioController(" <<
this <<
")::SetYp(rEvents)");
1127 EventSet::Iterator it;
1128 for(it=rEvents.
Begin(); it!=rEvents.
End(); it++) {
1135 FD_DG(
"HioController(" <<
this <<
")::SetUp(" << index <<
")");
1136 EventAttr attr=BASE::EventAttribute(index);
1139 BASE::pAlphabet->Attribute(index,attr);
1143 TEMP void THIS::SetUp(
const std::string& rName) {
1144 FD_DG(
"HioController(" <<
this <<
")::SetUp(" << rName <<
")");
1145 Idx index = BASE::EventIndex(rName);
1151 FD_DG(
"HioController(" <<
this <<
")::SetUp(rEvents)");
1152 EventSet::Iterator it;
1153 for(it=rEvents.
Begin(); it!=rEvents.
End(); it++) {
1160 EventAttr attr=BASE::EventAttribute(index);
1161 return (attr.IsY() && attr.IsP());
1165 TEMP bool THIS::IsYp(
const std::string& rName)
const {
1166 EventAttr attr=BASE::EventAttribute(rName);
1167 return (attr.IsY() && attr.IsP());
1172 EventAttr attr=BASE::EventAttribute(index);
1173 return (attr.IsU() && attr.IsP());
1177 TEMP bool THIS::IsUp(
const std::string& rName)
const {
1178 EventAttr attr=BASE::EventAttribute(rName);
1179 return (attr.IsU() && attr.IsP());
1184 FD_DG(
"HioController(" <<
this <<
")::YpEvents()");
1186 EventSet::Iterator it;
1187 for(it=BASE::AlphabetBegin(); it!=BASE::AlphabetEnd(); it++) {
1188 if(IsYp(*it)) res.
Insert(*it);
1195 FD_DG(
"HioController(" <<
this <<
")::UpEvents()");
1197 EventSet::Iterator it;
1198 for(it=BASE::AlphabetBegin(); it!=BASE::AlphabetEnd(); it++) {
1199 if(IsUp(*it)) res.
Insert(*it);
1208 FD_DG(
"HioController(" <<
this <<
")::InsYcEvent(" << index <<
")");
1212 BASE::InsEvent(index,attr);
1216 TEMP Idx THIS::InsYcEvent(
const std::string& rName) {
1217 FD_DG(
"HioController(" <<
this <<
")::InsYcEvent(" << rName <<
")");
1221 return BASE::InsEvent(rName,attr);
1226 FD_DG(
"HioController(" <<
this <<
")::InsUcEvent(" << index <<
")");
1230 BASE::InsEvent(index,attr);
1234 TEMP Idx THIS::InsUcEvent(
const std::string& rName) {
1235 FD_DG(
"HioController(" <<
this <<
")::InsUcEvent(" << rName <<
")");
1239 return BASE::InsEvent(rName,attr);
1244 FD_DG(
"HioController(" <<
this <<
")::SetYc(" << index <<
")");
1245 EventAttr attr=BASE::EventAttribute(index);
1248 BASE::pAlphabet->Attribute(index,attr);
1252 TEMP void THIS::SetYc(
const std::string& rName) {
1253 FD_DG(
"HioController(" <<
this <<
")::SetYc(" << rName <<
")");
1254 Idx index = BASE::EventIndex(rName);
1260 FD_DG(
"HioController(" <<
this <<
")::SetYc(rEvents)");
1261 EventSet::Iterator it;
1262 for(it=rEvents.
Begin(); it!=rEvents.
End(); it++) {
1269 FD_DG(
"HioController(" <<
this <<
")::SetUc(" << index <<
")");
1270 EventAttr attr=BASE::EventAttribute(index);
1273 BASE::pAlphabet->Attribute(index,attr);
1277 TEMP void THIS::SetUc(
const std::string& rName) {
1278 FD_DG(
"HioController(" <<
this <<
")::SetUc(" << rName <<
")");
1279 Idx index = BASE::EventIndex(rName);
1285 FD_DG(
"HioController(" <<
this <<
")::SetUc(rEvents)");
1286 EventSet::Iterator it;
1287 for(it=rEvents.
Begin(); it!=rEvents.
End(); it++) {
1294 EventAttr attr=BASE::EventAttribute(index);
1295 return (attr.IsY() && attr.IsC());
1299 TEMP bool THIS::IsYc(
const std::string& rName)
const {
1300 EventAttr attr=BASE::EventAttribute(rName);
1301 return (attr.IsY() && attr.IsC());
1306 EventAttr attr=BASE::EventAttribute(index);
1307 return (attr.IsU() && attr.IsC());
1311 TEMP bool THIS::IsUc(
const std::string& rName)
const {
1312 EventAttr attr=BASE::EventAttribute(rName);
1313 return (attr.IsU() && attr.IsC());
1318 FD_DG(
"HioController(" <<
this <<
")::YcEvents()");
1320 EventSet::Iterator it;
1321 for(it=BASE::AlphabetBegin(); it!=BASE::AlphabetEnd(); it++) {
1322 if(IsYc(*it)) res.
Insert(*it);
1329 FD_DG(
"HioController(" <<
this <<
")::UcEvents()");
1331 EventSet::Iterator it;
1332 for(it=BASE::AlphabetBegin(); it!=BASE::AlphabetEnd(); it++) {
1333 if(IsUc(*it)) res.
Insert(*it);
1342 EventAttr attr=BASE::EventAttribute(index);
1347 TEMP bool THIS::IsP(
const std::string& rName)
const {
1348 EventAttr attr=BASE::EventAttribute(rName);
1354 EventAttr attr=BASE::EventAttribute(index);
1359 TEMP bool THIS::IsC(
const std::string& rName)
const {
1360 EventAttr attr=BASE::EventAttribute(rName);
1366 FD_DG(
"HioController(" <<
this <<
")::PEvents()");
1368 EventSet::Iterator it;
1369 for(it=BASE::AlphabetBegin(); it!=BASE::AlphabetEnd(); it++) {
1370 if(IsP(*it)) res.
Insert(*it);
1377 FD_DG(
"HioController(" <<
this <<
")::EEvents()");
1379 EventSet::Iterator it;
1380 for(it=BASE::AlphabetBegin(); it!=BASE::AlphabetEnd(); it++) {
1381 if(IsC(*it)) res.
Insert(*it);
1394 FD_DG(
"HioController(" <<
this <<
")::" << index <<
")");
1395 StateAttr attr=BASE::StateAttribute(index);
1404 BASE::pStates->Attribute(index,attr);
1408 TEMP void THIS::SetQYp(
const std::string& rName) {
1409 FD_DG(
"HioController(" <<
this <<
")::" << rName <<
")");
1410 Idx index = BASE::StateIndex(rName);
1416 FD_DG(
"HioController(" <<
this <<
")::rStates)");
1417 StateSet::Iterator sit;
1418 for(sit=rStates.
Begin(); sit!=rStates.
End(); sit++) {
1425 FD_DG(
"HioController(" <<
this <<
")::ClrQYP(" << index <<
")");
1426 StateAttr attr=BASE::StateAttribute(index);
1429 BASE::pStates->Attribute(index,attr);
1433 TEMP void THIS::ClrQYP(
const std::string& rName) {
1434 FD_DG(
"HioController(" <<
this <<
")::ClrQYP(" << rName <<
")");
1435 Idx index = BASE::StateIndex(rName);
1441 FD_DG(
"HioController(" <<
this <<
")::ClrQYP(rStates)");
1442 StateSet::Iterator sit;
1443 for(sit=rStates.
Begin(); sit!=rStates.
End(); sit++) {
1450 StateAttr attr=BASE::StateAttribute(index);
1451 return attr.IsQY() && attr.IsQP() && attr.IsQC();
1455 TEMP bool THIS::IsQYP(
const std::string& rName)
const {
1456 Idx index = BASE::StateIndex(rName);
1457 return IsQYP(index);
1462 FD_DG(
"HioController(" <<
this <<
")::QYPStates()");
1464 StateSet::Iterator sit;
1465 for(sit=BASE::StatesBegin(); sit!=BASE::StatesEnd(); sit++) {
1466 if(IsQYP(*sit)) res.
Insert(*sit);
1474 FD_DG(
"HioController(" <<
this <<
")::SetQUp(" << index <<
")");
1475 StateAttr attr=BASE::StateAttribute(index);
1484 BASE::pStates->Attribute(index,attr);
1488 TEMP void THIS::SetQUp(
const std::string& rName) {
1489 FD_DG(
"HioController(" <<
this <<
")::SetQUp(" << rName <<
")");
1490 Idx index = BASE::StateIndex(rName);
1496 FD_DG(
"HioController(" <<
this <<
")::SetQUp(rStates)");
1497 StateSet::Iterator sit;
1498 for(sit=rStates.
Begin(); sit!=rStates.
End(); sit++) {
1505 FD_DG(
"HioController(" <<
this <<
")::ClrQUp(" << index <<
")");
1506 StateAttr attr=BASE::StateAttribute(index);
1509 BASE::pStates->Attribute(index,attr);
1513 TEMP void THIS::ClrQUp(
const std::string& rName) {
1514 FD_DG(
"HioController(" <<
this <<
")::ClrQUp(" << rName <<
")");
1515 Idx index = BASE::StateIndex(rName);
1521 FD_DG(
"HioController(" <<
this <<
")::ClrQUp(rStates)");
1522 StateSet::Iterator sit;
1523 for(sit=rStates.
Begin(); sit!=rStates.
End(); sit++) {
1530 StateAttr attr=BASE::StateAttribute(index);
1531 return attr.IsQU() && attr.IsQP();
1535 TEMP bool THIS::IsQUp(
const std::string& rName)
const {
1536 Idx index = BASE::StateIndex(rName);
1537 return IsQUp(index);
1542 FD_DG(
"HioController(" <<
this <<
")::QUpStates()");
1544 StateSet::Iterator sit;
1545 for(sit=BASE::StatesBegin(); sit!=BASE::StatesEnd(); sit++) {
1546 if(IsQUp(*sit)) res.
Insert(*sit);
1556 FD_DG(
"HioController(" <<
this <<
")::SetQUc(" << index <<
")");
1557 StateAttr attr=BASE::StateAttribute(index);
1566 BASE::pStates->Attribute(index,attr);
1570 TEMP void THIS::SetQUc(
const std::string& rName) {
1571 FD_DG(
"HioController(" <<
this <<
")::SetQUc(" << rName <<
")");
1572 Idx index = BASE::StateIndex(rName);
1578 FD_DG(
"HioController(" <<
this <<
")::SetQUc(rStates)");
1579 StateSet::Iterator sit;
1580 for(sit=rStates.
Begin(); sit!=rStates.
End(); sit++) {
1587 FD_DG(
"HioController(" <<
this <<
")::ClrQUc(" << index <<
")");
1588 StateAttr attr=BASE::StateAttribute(index);
1591 BASE::pStates->Attribute(index,attr);
1595 TEMP void THIS::ClrQUc(
const std::string& rName) {
1596 FD_DG(
"HioController(" <<
this <<
")::ClrQUc(" << rName <<
")");
1597 Idx index = BASE::StateIndex(rName);
1603 FD_DG(
"HioController(" <<
this <<
")::ClrQUc(rStates)");
1604 StateSet::Iterator sit;
1605 for(sit=rStates.
Begin(); sit!=rStates.
End(); sit++) {
1612 StateAttr attr=BASE::StateAttribute(index);
1613 return attr.IsQU() && attr.IsQC();
1617 TEMP bool THIS::IsQUc(
const std::string& rName)
const {
1618 Idx index = BASE::StateIndex(rName);
1619 return IsQUc(index);
1624 FD_DG(
"HioController(" <<
this <<
")::QUcStates()");
1626 StateSet::Iterator sit;
1627 for(sit=BASE::StatesBegin(); sit!=BASE::StatesEnd(); sit++) {
1628 if(IsQUc(*sit)) res.
Insert(*sit);
1637 FD_DG(
"HioController(" <<
this <<
")::SetQYcUp(" << index <<
")");
1638 StateAttr attr=BASE::StateAttribute(index);
1647 BASE::pStates->Attribute(index,attr);
1651 TEMP void THIS::SetQYcUp(
const std::string& rName) {
1652 FD_DG(
"HioController(" <<
this <<
")::SetQYcUp(" << rName <<
")");
1653 Idx index = BASE::StateIndex(rName);
1659 FD_DG(
"HioController(" <<
this <<
")::SetQYcUp(rStates)");
1660 StateSet::Iterator sit;
1661 for(sit=rStates.
Begin(); sit!=rStates.
End(); sit++) {
1668 FD_DG(
"HioController(" <<
this <<
")::ClrQYcUp(" << index <<
")");
1669 StateAttr attr=BASE::StateAttribute(index);
1671 BASE::pStates->Attribute(index,attr);
1675 TEMP void THIS::ClrQYcUp(
const std::string& rName) {
1676 FD_DG(
"HioController(" <<
this <<
")::ClrQYcUp(" << rName <<
")");
1677 Idx index = BASE::StateIndex(rName);
1683 FD_DG(
"HioController(" <<
this <<
")::ClrQYcUp(rStates)");
1684 StateSet::Iterator sit;
1685 for(sit=rStates.
Begin(); sit!=rStates.
End(); sit++) {
1692 StateAttr attr=BASE::StateAttribute(index);
1693 return attr.IsQYcUp();
1697 TEMP bool THIS::IsQYcUp(
const std::string& rName)
const {
1698 Idx index = BASE::StateIndex(rName);
1699 return IsQYcUp(index);
1704 FD_DG(
"HioController(" <<
this <<
")::QYcUpStates()");
1706 StateSet::Iterator sit;
1707 for(sit=BASE::StatesBegin(); sit!=BASE::StatesEnd(); sit++) {
1708 if(IsQYcUp(*sit)) res.
Insert(*sit);
1715 FD_DG(
"HioPlant(" <<
this <<
")::SetErr(" << index <<
")");
1716 StateAttr attr=BASE::StateAttribute(index);
1718 BASE::pStates->Attribute(index,attr);
1722 TEMP void THIS::SetErr(
const std::string& rName) {
1723 FD_DG(
"HioPlant(" <<
this <<
")::SetErr(" << rName <<
")");
1724 Idx index = BASE::StateIndex(rName);
1730 FD_DG(
"HioPlant(" <<
this <<
")::SetErr(rStates)");
1731 StateSet::Iterator sit;
1732 for(sit=rStates.
Begin(); sit!=rStates.
End(); sit++) {
1739 FD_DG(
"HioPlant(" <<
this <<
")::ClrErr(" << index <<
")");
1740 StateAttr attr=BASE::StateAttribute(index);
1742 BASE::pStates->Attribute(index,attr);
1746 TEMP void THIS::ClrErr(
const std::string& rName) {
1747 FD_DG(
"HioPlant(" <<
this <<
")::ClrErr(" << rName <<
")");
1748 Idx index = BASE::StateIndex(rName);
1754 FD_DG(
"HioPlant(" <<
this <<
")::ClrErr(rStates)");
1755 StateSet::Iterator sit;
1756 for(sit=rStates.
Begin(); sit!=rStates.
End(); sit++) {
1763 StateAttr attr=BASE::StateAttribute(index);
1764 return attr.IsErr();
1768 TEMP bool THIS::IsErr(
const std::string& rName)
const {
1769 Idx index = BASE::StateIndex(rName);
1770 return IsErr(index);
1775 FD_DG(
"HioPlant(" <<
this <<
")::ErrStates()");
1777 StateSet::Iterator sit;
1778 for(sit=BASE::StatesBegin(); sit!=BASE::StatesEnd(); sit++) {
1779 if(IsErr(*sit)) res.
Insert(*sit);
1833 std::string& rReportStr);
#define FD_DG(message)
Debug: optional report on generator operations.
Idx Insert(void)
Insert new index to set.
Set of indices with symbolic names.
bool Insert(const Idx &rIndex)
Add an element by index.
Generator with I/O-controller attributes.
void SetQYp(const std::string &rName)
Mark state as QYP-state (by name)
THioController(void)
Creates an empty HioController object.
void SetUc(const std::string &rName)
Mark event as Uc-event (by name)
void ClrQUc(const std::string &rName)
Mark state as NOT QUc-state (by name)
StateSet ErrStates(void) const
Get StateSet with Err-states.
bool IsP(Idx index) const
Is event P-event? (by index)
EventSet PEvents(void) const
Get EventSet with P-events.
bool IsQYP(Idx index) const
Is state QYP-state (by index)
void ClrQYP(const StateSet &rStates)
Mark set of states as NOT QYP-states (by index)
THioController(const THioController &rOtherGen)
HioController from a HioController.
void ClrQUc(Idx index)
Mark state as NOT QUc-state (by index)
void ClrQUp(const std::string &rName)
Mark state as NOT QUp-state (by name)
void ClrQUp(const StateSet &rStates)
Mark set of states as NOT QUp-states (by index)
bool IsUc(const std::string &rName) const
Is event Uc-event (by name)
void SetYp(const std::string &rName)
Mark event as Yp-event(by name)
bool IsQUp(const std::string &rName) const
Is state QUp-state (by name)
EventSet YcEvents(void) const
Get EventSet with Yc-events.
void SetQUc(const StateSet &rStates)
Mark set of states as QUc-states.
void ClrErr(Idx index)
Mark state as NOT Err-state (by index)
void InsYcEvent(Idx index)
Add an existing Yc-event to generator.
StateSet QYcUpStates(void) const
Get StateSet with QYcUp-states.
bool IsQYcUp(Idx index) const
Is state QYcUp-state (by index)
void ClrQYcUp(Idx index)
Mark state as NOT QYcUp-state (by index)
void SetQUp(const std::string &rName)
Mark state as QUp-state (by name)
StateSet QYPStates(void) const
Get StateSet with QYP-states.
void SetErr(Idx index)
Mark state as Err-state (by index)
bool IsYp(const std::string &rName) const
Is event Yp-event(by name)
void InsYpEvent(Idx index)
Add an existing Yp-event to generator.
void SetUc(const EventSet &rEvents)
Mark set of events as Uc-events.
void SetUp(const std::string &rName)
Mark event Up-event(by name)
THioController(const Generator &rOtherGen)
HioController from a std Generator.
void SetQYcUp(Idx index)
Mark event as QYcUp-state (by index)
bool IsY(const std::string &rName) const
Is event Y-event? (by name)
void InsUcEvent(Idx index)
Add an existing Uc-event to generator.
void ClrQYcUp(const std::string &rName)
Mark state as NOT QYcUp-state (by name)
void SetErr(const std::string &rName)
Mark state as Err-state (by name)
void SetYp(Idx index)
Mark event as Yp-event (by index)
void ClrQYP(const std::string &rName)
Mark state as NOT QYP-state (by name)
void SetQUc(const std::string &rName)
Mark state as QUc-state (by name)
bool IsU(Idx index) const
Is event U-event? (by index)
void ClrQYP(Idx index)
Mark state as NOT QYP-state (by index)
bool IsYc(const std::string &rName) const
Is event Yc-event (by name)
void SetYc(Idx index)
Mark event as Yc-event (by index)
bool IsY(Idx index) const
Is event Y-event? (by index)
EventSet CEvents(void) const
Get EventSet with E-events.
void ClrErr(const StateSet &rStates)
Mark set of states as NOT Err-states (by index)
bool IsQYP(const std::string &rName) const
Is state QYP-state (by name)
void SetErr(const StateSet &rStates)
Mark set of states as Err-states.
bool IsQYcUp(const std::string &rName) const
Is state QYcUp-state (by name)
bool IsUp(const std::string &rName) const
Is event Up-event(by name)
void SetUc(Idx index)
Mark event as Uc-event (by index)
bool IsC(const std::string &rName) const
Is event E-event? (by name)
void SetQUc(Idx index)
Mark event as QUc-state (by index)
bool IsU(const std::string &rName) const
Is event U-event? (by name)
virtual THioController * Copy(void) const
Construct copy on heap.
void SetYc(const EventSet &rEvents)
Mark set of events as Yc-events.
Idx InsYcEvent(const std::string &rName)
Add new named Yc-event to generator.
virtual THioController & operator=(const THioController &rOtherGen)
Assignment operator (uses copy )
StateSet QUpStates(void) const
Get StateSet with QUp-states.
EventSet UcEvents(void) const
Get EventSet with Uc-events.
THioController(const std::string &rFileName)
construct a HioController from file
void ClrErr(const std::string &rName)
Mark state as NOT Err-state (by name)
void SetQUp(const StateSet &rStates)
Mark set of states as QUp-states.
EventSet YEvents(void) const
Get EventSet with Y-events.
EventSet UEvents(void) const
Get EventSet with U-events.
THioController NewHioController(void) const
Create empty HioController with same symboltable as this.
bool IsQUc(const std::string &rName) const
Is state QUc-state (by name)
EventSet YpEvents(void) const
Get EventSet with Yp-events.
bool IsUc(Idx index) const
Is event Uc-event (by index)
void SetQYp(Idx index)
Mark state as QYP-state (by index)
THioController * New(void) const
Construct on heap.
void SetUp(const EventSet &rEvents)
Mark set of events as Up-events.
Idx InsUpEvent(const std::string &rName)
Add new named Up-event to generator.
bool IsUp(Idx index) const
Is event Up-event(by index)
void SetQUp(Idx index)
Mark event as QUp-state (by index)
bool IsYp(Idx index) const
Is event Yp-event(by index)
bool IsQUp(Idx index) const
Is state QUp-state (by index)
void SetYc(const std::string &rName)
Mark event as Yc-event (by name)
void SetQYcUp(const std::string &rName)
Mark state as QYcUp-state (by name)
void SetQYcUp(const StateSet &rStates)
Mark set of states as QYcUp-states.
virtual bool UpdateAttributes(void)
Updates internal attributes.
void SetQYp(const StateSet &rStates)
Mark set of states as QYP-states.
void ClrQYcUp(const StateSet &rStates)
Mark set of states as NOT QYcUp-states (by index)
Idx InsYpEvent(const std::string &rName)
Add new named Yp-event to generator.
void SetUp(Idx index)
Mark event Up-event(by index)
void SetYp(const EventSet &rEvents)
Mark set of events as Yp-events.
THioController(const Generator &rOtherGen, const EventSet &rYc, const EventSet &rUc, const EventSet &rYp, const EventSet &rUp)
HioController from a std Generator and event sets.
Idx InsUcEvent(const std::string &rName)
Add new named Uc-event to generator.
StateSet QUcStates(void) const
Get StateSet with QUc-states.
EventSet UpEvents(void) const
Get EventSet with Up-events.
void ClrQUc(const StateSet &rStates)
Mark set of states as NOT QUc-states (by index)
bool IsQUc(Idx index) const
Is state QUc-state (by index)
bool IsC(Idx index) const
Is event E-event? (by index)
bool IsP(const std::string &rName) const
Is event P-event? (by name)
void InsUpEvent(Idx index)
Add an existing Up-event to generator.
void ClrQUp(Idx index)
Mark state as NOT QUp-state (by index)
bool IsErr(Idx index) const
Is state Err-state (by index)
bool IsYc(Idx index) const
Is event Yc-event (by index)
bool IsErr(const std::string &rName) const
Is state Err-state (by name)
Generator with specified attribute types.
virtual TaGenerator & Assign(const Type &rSrc)
Copy from other faudes Type (try to cast to agenerator or pass to base)
Base class of all FAUDES generators.
Includes all libFAUDES headers, no plugins.
Iterator End(void) const
Iterator to the end of set.
Iterator Begin(void) const
Iterator to the begin of set.
Event and state attributes for hierarchical I/O systems.
libFAUDES resides within the namespace faudes.
uint32_t Idx
Type definition for index type (allways 32bit)
THioController< AttributeVoid, HioStateFlags, HioEventFlags, AttributeVoid > HioController
bool IsHioControllerForm(HioController &rHioController, StateSet &rQUc, StateSet &rQYP, StateSet &rQUp, StateSet &rQYcUp, EventSet &rErrEvSet, TransSet &rErrTrSet, StateSet &rErrStSet, std::string &rReportStr)
IsHioControllerForm: check if rHioController is in I/O-controller form and assign state attributes.
void HioStatePartition(HioConstraint &rHioConstraint)
Function definition for run-time interface.