OMNeT++ Simulation Library
6.0.3
|
#include <cfsm.h>
Store the state of an FSM. This class is used in conjunction with the FSM_Switch() and other FSM_ macros.
Public Member Functions | |
Constructors, destructor, assignment. | |
cFSM (const char *name=nullptr) | |
cFSM (const cFSM &other) | |
cFSM & | operator= (const cFSM &vs) |
Redefined cObject member functions. | |
virtual cFSM * | dup () const override |
virtual std::string | str () const override |
FSM functions. | |
int | getState () const |
const char * | getStateName () const |
int | isInTransientState () const |
void | setState (int state, const char *stateName=nullptr) |
Public Member Functions inherited from cOwnedObject | |
cOwnedObject () | |
cOwnedObject (const char *name, bool namepooling=true) | |
cOwnedObject (const cOwnedObject &obj) | |
virtual | ~cOwnedObject () |
cOwnedObject & | operator= (const cOwnedObject &o) |
virtual cObject * | getOwner () const override |
virtual bool | isOwnedObject () const override |
Public Member Functions inherited from cNamedObject | |
cNamedObject () | |
cNamedObject (const char *name, bool namepooling=true) | |
cNamedObject (const cNamedObject &obj) | |
virtual | ~cNamedObject () |
cNamedObject & | operator= (const cNamedObject &o) |
virtual void | setName (const char *s) |
virtual const char * | getName () const override |
virtual void | setNamePooling (bool b) |
virtual bool | getNamePooling () |
Public Member Functions inherited from cObject | |
cObject () | |
cObject (const cObject &other)=default | |
virtual | ~cObject () |
virtual const char * | getClassName () const |
bool | isName (const char *s) const |
virtual const char * | getFullName () const |
virtual std::string | getFullPath () const |
virtual std::string | getClassAndFullName () const |
virtual std::string | getClassAndFullPath () const |
const cObject * | getThisPtr () const |
virtual std::ostream & | printOn (std::ostream &os) const |
virtual bool | isSoftOwner () const |
virtual void | forEachChild (cVisitor *v) |
cObject * | findObject (const char *name, bool deep=true) |
virtual cClassDescriptor * | getDescriptor () const |
void | copyNotSupported () const |
Additional Inherited Members | |
Static Public Member Functions inherited from cOwnedObject | |
static long | getTotalObjectCount () |
static long | getLiveObjectCount () |
static void | resetObjectCounters () |
static cSoftOwner * | getOwningContext () |
Protected Member Functions inherited from cObject | |
virtual void | take (cOwnedObject *obj) |
virtual void | drop (cOwnedObject *obj) |
void | dropAndDelete (cOwnedObject *obj) |
|
explicit |
Constructor.
Assignment operator. The name member is not copied; see cOwnedObject's operator=() for more details.
|
inlineoverridevirtual |
|
overridevirtual |
|
inline |
Returns the state the FSM is currently in.
|
inline |
Returns the name of the state the FSM is currently in.
|
inline |
Returns true if the FSM is currently in a transient state.
|
inline |
Sets the state of the FSM. This method is usually invoked through the FSM_Goto() macro.
The first arg is the state code. The second arg is the name of the state. setState() assumes this is pointer to a string literal (the string is not copied, only the pointer is stored).