C, E printing, etc.

This commit is contained in:
Artur Meski
2018-11-24 17:02:26 +00:00
parent c72eb7ac4a
commit 85e1e1d16b
2 changed files with 23 additions and 0 deletions

View File

@@ -93,6 +93,13 @@ std::string FormRSCTLK::toStr(void) const
else if (oper == RSCTLK_UK) {
return "K[" + getSingleAgent() + "](" + arg[0]->toStr() + ")";
}
else if (oper == RSCTLK_NC) {
return "NC[" + getAgentsStr() + "](" + arg[0]->toStr() + ")";
}
else if (oper == RSCTLK_UC) {
return "C[" + getAgentsStr() + "](" + arg[0]->toStr() + ")";
}
else {
return "??";
@@ -252,6 +259,21 @@ void FormRSCTLK::encodeActions(const SymRS *srs)
}
}
std::string FormRSCTLK::getAgentsStr(void) const
{
std::string r = "";
bool first = true;
for (const auto &a : agents)
{
if (first)
first = false;
else
r += " ";
r += a;
}
return r;
}
ProcSet FormRSCTLK::getAgentsAsProcSet(RctSys *rs) const
{
ProcSet processes;