1 #ifndef GPM_ModelGraphElement_H
2 #define GPM_ModelGraphElement_H
98 mRules[index]->setAction(action);
103 void swap(
const unsigned int& i,
const unsigned int& j);
112 return mRules.getSize();
121 int n=mRules.getSize();
122 for (
int i=0;i<n;i++)
123 if (mRules[i]->getName().compare(name)==0)
return i;
131 if ((index<0) || (index>=((
int)mRules.getSize())))
return "";
132 return mRules[index]->getName();
141 if ((index<0) || (index>=((
int)mRules.getSize())))
return null;
142 return mRules[index].get();
151 if ((index<0) || (index>=((
int)mRules.size())))
return null;
152 return mRules[index].get();
void removeRule(const tString &varName)
remove rule corresponding to varName
Definition: GPM_ModelGraphElement.cpp:63
This class describes a model GraphElement interface.
Definition: GPM_ModelGraphElement.h:21
tBoolean setRuleAction(const tString &varName, const tFlag &action)
set rule action
Definition: GPM_ModelGraphElement.cpp:71
void addRule(const tString &varName, SP::GPM_Rule r)
add rule corresponding to varName
Definition: GPM_ModelGraphElement.cpp:53
int getRulesNumber() const
get the rules number
Definition: GPM_ModelGraphElement.h:111
tBoolean orderTriggerRules()
Definition: GPM_ModelGraphElement.cpp:89
virtual ~GPM_ModelGraphElement(void)
destroy
Definition: GPM_ModelGraphElement.cpp:10
#define tBoolean
Definition: types.h:35
GPM_ModelGraphElement(void)
create
Definition: GPM_ModelGraphElement.cpp:7
virtual void updateEnvironment(const map< tString, SP::GPM_Variable > &env)
update the environment
Definition: GPM_ModelGraphElement.cpp:29
#define null
Definition: types.h:13
void setRuleAction(const int &index, const tFlag &action)
set rule action
Definition: GPM_ModelGraphElement.h:97
void updateRules(const GPM_ModelClassFactory &cf)
update rules
Definition: GPM_ModelGraphElement.cpp:40
This class describes a rule.
Definition: GPM_Rule.h:23
int getRuleIndex(const tString &name) const
Definition: GPM_ModelGraphElement.h:120
This class is the class to save GPM classes.
Definition: GPM_ModelClassFactory.h:16
void swap(const unsigned int &i, const unsigned int &j)
swap 2 elements
Definition: GPM_ModelGraphElement.cpp:81
const GPM_Rule * getRule(const int &index) const
get the rule at index
Definition: GPM_ModelGraphElement.h:140
#define tString
Definition: types.h:36
void clearRules()
clear rules
Definition: GPM_ModelGraphElement.h:66
GPM_Rule * getRule(const int &index)
get the rule at index
Definition: GPM_ModelGraphElement.h:150
tString getRuleName(const int &index) const
get the rule corresponding to variable name
Definition: GPM_ModelGraphElement.h:130
This class is the base class of all graph classes.
Definition: GPM_Object.h:17
virtual void copy(const GPM_ModelGraphElement &vertex)
copy
Definition: GPM_ModelGraphElement.cpp:13
DEFINE_SPTR(GPM_ModelGraphElement)
#define tFlag
Definition: types.h:14