Processes, switching
This commit is contained in:
5
rs.cc
5
rs.cc
@@ -54,6 +54,11 @@ Entity RctSys::getEntityID(std::string name)
|
|||||||
return entities_names[name];
|
return entities_names[name];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RctSys::setCurrentProcess(std::string processName)
|
||||||
|
{
|
||||||
|
VERB_LN(2, "Current Process: " << processName);
|
||||||
|
}
|
||||||
|
|
||||||
void RctSys::pushReactant(std::string entityName)
|
void RctSys::pushReactant(std::string entityName)
|
||||||
{
|
{
|
||||||
if (!hasEntity(entityName))
|
if (!hasEntity(entityName))
|
||||||
|
|||||||
3
rs.hh
3
rs.hh
@@ -40,6 +40,9 @@ class RctSys
|
|||||||
bool hasEntity(std::string entityName);
|
bool hasEntity(std::string entityName);
|
||||||
void addEntity(std::string entityName);
|
void addEntity(std::string entityName);
|
||||||
std::string getEntityName(Entity entityID);
|
std::string getEntityName(Entity entityID);
|
||||||
|
|
||||||
|
void setCurrentProcess(std::string processName);
|
||||||
|
|
||||||
void pushReactant(std::string entityName);
|
void pushReactant(std::string entityName);
|
||||||
void pushInhibitor(std::string entityName);
|
void pushInhibitor(std::string entityName);
|
||||||
void pushProduct(std::string entityName);
|
void pushProduct(std::string entityName);
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ class rsin_driver;
|
|||||||
|
|
||||||
system:
|
system:
|
||||||
| OPTIONS LCB options RCB system
|
| OPTIONS LCB options RCB system
|
||||||
| REACTIONS LCB reactions RCB system
|
| REACTIONS LCB reactionsets RCB system
|
||||||
| INITIALCONTEXTS LCB initstates RCB system
|
| INITIALCONTEXTS LCB initstates RCB system
|
||||||
| CONTEXTENTITIES LCB actionentities RCB system
|
| CONTEXTENTITIES LCB actionentities RCB system
|
||||||
| CONTEXTAUTOMATON LCB ctxaut RCB system
|
| CONTEXTAUTOMATON LCB ctxaut RCB system
|
||||||
@@ -104,6 +104,20 @@ option:
|
|||||||
* REACTIONS
|
* REACTIONS
|
||||||
* -------------------------
|
* -------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
reactionsets:
|
||||||
|
| processname LCB reactions RCB SEMICOL
|
||||||
|
;
|
||||||
|
|
||||||
|
processname: IDENTIFIER {
|
||||||
|
//driver.getReactionSystem()->ctxAutAddState(*$1);
|
||||||
|
//
|
||||||
|
// Set the current process name for which we are saving reactions...
|
||||||
|
//
|
||||||
|
driver.getReactionSystem()->setCurrentProcess(*$1);
|
||||||
|
free($1);
|
||||||
|
}
|
||||||
|
|
||||||
reactions:
|
reactions:
|
||||||
| reactions reaction SEMICOL
|
| reactions reaction SEMICOL
|
||||||
;
|
;
|
||||||
|
|||||||
Reference in New Issue
Block a user