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

the <assign> SCXML element. More...

#include <Inventor/scxml/ScXMLAssignElt.h>

Inheritance diagram for ScXMLAssignElt:
ScXMLExecutableElt ScXMLElt ScXMLObject

Public Member Functions

 ScXMLAssignElt (void)
 
virtual void copyContents (const ScXMLElt *rhs)
 
virtual void execute (ScXMLStateMachine *statemachine) const
 
virtual const char * getDataIDAttribute (void) const
 
virtual const char * getExprAttribute (void) const
 
virtual const char * getLocationAttribute (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 SbBool handleXMLAttributes (void)
 
virtual const ScXMLEltsearch (const char *attrname, const char *attrvalue) const
 
virtual void setDataIDAttribute (const char *dataID)
 
virtual void setExprAttribute (const char *expr)
 
virtual void setLocationAttribute (const char *location)
 
- Public Member Functions inherited from ScXMLElt
ScXMLEltclone (void) const
 
ScXMLEltgetContainer (void) const
 
const char * getXMLAttribute (const char *attribute) const
 
SbBool isContainedIn (const ScXMLElt *object) const
 
virtual void setContainer (ScXMLElt *container)
 
void setXMLAttribute (const char *attribute, const char *value)
 
- 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 ScXMLEltReadergetElementReader (void)
 
static void initClass (void)
 
- Static Public Member Functions inherited from ScXMLExecutableElt
static void cleanClass (void)
 
static SoType getClassTypeId (void)
 
static void initClass (void)
 
- Static Public Member Functions inherited from ScXMLElt
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 Attributes

char * dataID
 
char * expr
 
char * location
 

Additional Inherited Members

- Static Protected Member Functions inherited from ScXMLElt
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)
 
- 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)
 

Detailed Description

the <assign> SCXML element.

The <assign> element is only functional under a profile that has an implementation of the Data Module. The "minimum" profile does not implement one, but the "x-coin" profile does.

The following attributes are accepted:

  • location
  • dataID
  • expr

Either location or dataID can be specified at a time.

If dataID is specified, then the target of the assignment is the <data> element that has the ID attribute set to the same value.

If location is specified, a profile-dependent variable addressing is used. The "minimum" profile does not define any, and the "x-coin" profile defines the following address schemes for writable variables:

  • _data.{id} means targeting an existing <data> variable.
  • coin:temp.{id} means targeting a temporary variable, creating one if necessary.

Temporary variables in the "x-coin" profile have the lifetime of one SCXML event. To have persistent data, use <data> variables. They stay alive for the same duration the ScXMLStateMachine exists.

Temporary variables are particularly useful for the <send> element, because the namelist attribute can address them with implicit prefix, which means the event targets can read them out based on logical names instead of SCXML data model addresses.

See also
ScXMLDataModelElt, ScXMLDataElt, ScXMLSendElt

Constructor & Destructor Documentation

◆ ScXMLAssignElt()

ScXMLAssignElt::ScXMLAssignElt ( void )

Constructor that sets up an empty ScXMLAssignElt object.

Member Function Documentation

◆ cleanClass()

void ScXMLAssignElt::cleanClass ( void )
static

Cleans out the class type SoType object.

◆ copyContents()

void ScXMLAssignElt::copyContents ( const ScXMLElt * rhs)
virtual

Reimplemented from ScXMLExecutableElt.

◆ execute()

void ScXMLAssignElt::execute ( ScXMLStateMachine * statemachine) const
virtual

Reimplemented from ScXMLExecutableElt.

◆ getTypeId()

SoType ScXMLAssignElt::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 ScXMLExecutableElt.

◆ handleXMLAttributes()

SbBool ScXMLAssignElt::handleXMLAttributes ( void )
virtual

This method is called when the file reader has set all the XML attributes on the object, and wants the object to handle them and report if the values were OK or if a read error should be produced.

Returns
TRUE if the attributes are OK, and FALSE on error.

This base class implementation does nothing and just returns TRUE.

Reimplemented from ScXMLElt.

◆ initClass()

void ScXMLAssignElt::initClass ( void )
static

Creates the ScXMLAssignElt class type SoType object.

◆ search()

const ScXMLElt * ScXMLAssignElt::search ( const char * attrname,
const char * attrvalue ) const
virtual

This method searches the SCXML structure for an element with the given attribute value for the given attribute.

Returns NULL if nothing was found.

This function needs to be reimplemented to traverse child elements.

Reimplemented from ScXMLElt.


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