Coin  4.0.3
Coin3D core library
Loading...
Searching...
No Matches
ScXMLStateMachine Class Reference

Manager for processing events and setting states in SCXML structures. More...

#include <Inventor/scxml/ScXMLStateMachine.h>

Inheritance diagram for ScXMLStateMachine:
ScXMLEventTarget ScXMLObject SoScXMLStateMachine

Public Member Functions

virtual void addDeleteCallback (ScXMLStateMachineDeleteCB *callback, void *userdata)
 
virtual void addStateChangeCallback (ScXMLStateChangeCB *callback, void *userdata)
 
virtual const ScXMLEltgetActiveState (int idx) const
 
const ScXMLDocumentgetDescription (void) const
 
const char * getEnabledModuleName (int idx) const
 
ScXMLEvaluatorgetEvaluator (void) const
 
int getLogLevel (void) const
 
const SbNamegetName (void) const
 
virtual int getNumActiveStates (void) const
 
int getNumEnabledModules (void) const
 
const SbNamegetSessionId (void) const
 
virtual SoType getTypeId (void) const
 Returns the type identification of an object derived from a class inheriting SoBase. This is used for runtime type checking and "downward" casting.
 
virtual const char * getVariable (const char *name) const
 
virtual void initialize (void)
 
virtual SbBool isActive (void) const
 
virtual SbBool isFinished (void) const
 
SbBool isModuleEnabled (const char *modulename) const
 
virtual void removeDeleteCallback (ScXMLStateMachineDeleteCB *callback, void *userdata)
 
virtual void removeStateChangeCallback (ScXMLStateChangeCB *callback, void *userdata)
 
virtual void setDescription (ScXMLDocument *document)
 
void setEnabledModulesList (const SbList< const char * > &modulenames)
 
virtual void setEvaluator (ScXMLEvaluator *evaluator)
 
virtual void setLogLevel (int loglevel)
 
virtual void setName (const SbName &name)
 
virtual void setSessionId (const SbName &sessionid)
 
virtual void setVariable (const char *name, const char *value)
 
- Public Member Functions inherited from ScXMLEventTarget
virtual const ScXMLEventgetCurrentEvent (void) const
 
const char * getEventTargetName (void) const
 
const char * getEventTargetType (void) const
 
virtual SbBool processEventQueue (void)
 
virtual void queueEvent (const SbName &eventid)
 
virtual void queueEvent (const ScXMLEvent *event)
 
virtual void queueInternalEvent (const SbName &eventid)
 
virtual void queueInternalEvent (const ScXMLEvent *event)
 
virtual SbBool sendExternalEvent (const ScXMLSendElt *sendelt)
 
virtual SbBool sendInternalEvent (const ScXMLEventElt *sendelt)
 
virtual void setEventTargetName (const char *targetname)
 
virtual void setEventTargetType (const char *targettype)
 
- Public Member Functions inherited from ScXMLObject
SbBool isOfType (SoType type) const
 Returns TRUE if the type of this object is either of the same type or inherited from type.
 

Static Public Member Functions

static void cleanClass (void)
 
static voidcreateInstance (void)
 
static SoType getClassTypeId (void)
 
static ScXMLStateMachinegetStateMachineForSessionId (const SbName &sessionid)
 
static void initClass (void)
 
- Static Public Member Functions inherited from ScXMLEventTarget
static void cleanClass (void)
 
static SoType getClassTypeId (void)
 
static void initClass (void)
 
- Static Public Member Functions inherited from ScXMLObject
static void cleanClass (void)
 Does the opposite of initClass, deallocates any class specific resources and resets the class to an uninitialized state with respect to the Coin type system.
 
static SoType getClassTypeId (void)
 This static method returns the SoType object associated with objects of this class.
 
static void initClass (void)
 Sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system.
 

Protected Member Functions

virtual SbBool processOneEvent (const ScXMLEvent *event)
 
- Protected Member Functions inherited from ScXMLEventTarget
virtual const ScXMLEventgetNextEvent (void)
 
virtual const ScXMLEventgetNextExternalEvent (void)
 
virtual const ScXMLEventgetNextInternalEvent (void)
 
virtual void setCurrentEvent (const ScXMLEvent *event)
 

Additional Inherited Members

- Static Protected Member Functions inherited from ScXMLEventTarget
static ScXMLEventTargetgetEventTarget (const char *targettype, const char *targetname, const char *sessionid=NULL)
 
static void registerEventTarget (ScXMLEventTarget *target, const char *sessionid=NULL)
 
static void unregisterEventTarget (ScXMLEventTarget *target, const char *sessionid=NULL)
 
- Static Protected Member Functions inherited from ScXMLObject
static void registerClassType (const char *xmlns, const char *classname, SoType type)
 
static void registerInvokeClassType (const char *xmlns, const char *targettype, const char *source, SoType type)
 
- Protected Attributes inherited from ScXMLEventTarget
const ScXMLEventcurrentevent
 
SbBool isprocessingqueue
 
char * targetname
 
char * targettype
 

Detailed Description

Manager for processing events and setting states in SCXML structures.

Since
Coin 3.0

Member Function Documentation

◆ addDeleteCallback()

void ScXMLStateMachine::addDeleteCallback ( ScXMLStateMachineDeleteCB * cb,
void * userdata )
virtual

Registers a callback to be called when the state machine object is being deleted.

◆ addStateChangeCallback()

void ScXMLStateMachine::addStateChangeCallback ( ScXMLStateChangeCB * callback,
void * userdata )
virtual

Registers a callback to be called when the state machine exits or enters a state.

◆ getActiveState()

const ScXMLElt * ScXMLStateMachine::getActiveState ( int idx) const
virtual

Returns the Nth active state.

◆ getNumActiveStates()

int ScXMLStateMachine::getNumActiveStates ( void ) const
virtual

This method returns the current event during event processing, and NULL when not processing events.

Event processing is in special cases done with NULL as the current event, as for instance during state machine initialization.

Returns the number of active states in the state machine. This number should currently be 1, but in the future, when <parallel> is implemented, it can be greater.

◆ getSessionId()

const SbName & ScXMLStateMachine::getSessionId ( void ) const

Returns the session identifier string for the state machine.

◆ getTypeId()

SoType ScXMLStateMachine::getTypeId ( void ) const
virtual

Returns the type identification of an object derived from a class inheriting SoBase. This is used for runtime type checking and "downward" casting.

See also
SoBase::getTypeId() const

Implements ScXMLEventTarget.

Reimplemented in SoScXMLStateMachine.

◆ getVariable()

const char * ScXMLStateMachine::getVariable ( const char * name) const
virtual

Reimplemented in SoScXMLStateMachine.

◆ initialize()

void ScXMLStateMachine::initialize ( void )
virtual

Fire up the engine.

◆ isActive()

SbBool ScXMLStateMachine::isActive ( void ) const
virtual

Returns whether the state machine is active or not.

◆ isFinished()

SbBool ScXMLStateMachine::isFinished ( void ) const
virtual

Returns whether the state machine has run to completion or not.

◆ processOneEvent()

SbBool ScXMLStateMachine::processOneEvent ( const ScXMLEvent * event)
protectedvirtual

Processes one event. This is an internal inner event-loop utility function.

Reimplemented from ScXMLEventTarget.

◆ removeDeleteCallback()

void ScXMLStateMachine::removeDeleteCallback ( ScXMLStateMachineDeleteCB * cb,
void * userdata )
virtual

Unregisters a callback to be called when the state machine object is being deleted.

◆ removeStateChangeCallback()

void ScXMLStateMachine::removeStateChangeCallback ( ScXMLStateChangeCB * callback,
void * userdata )
virtual

Unregisters a callback to be called when the state machine exits or enters a state.

◆ setSessionId()

void ScXMLStateMachine::setSessionId ( const SbName & sessionidarg)
virtual

This sets the session identifier for the state machine. Using this is optional, since state machines are already assigned unique session ids at construction-time.


The documentation for this class was generated from the following files: