.TH "ScXMLTransitionElt" 3 "Fri Sep 6 2024 15:32:06" "Version 4.0.3" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME ScXMLTransitionElt \- the \fR\fP SCXML element\&. .SH SYNOPSIS .br .PP .PP \fR#include \fP .PP Inherits \fBScXMLElt\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "virtual \fBSoType\fP \fBgetTypeId\fP (void) const" .br .RI "Returns the type identification of an object derived from a class inheriting \fBSoBase\fP\&. This is used for runtime type checking and 'downward' casting\&. " .ti -1c .RI "virtual void \fBsetEventAttribute\fP (const char *event)" .br .ti -1c .RI "const char * \fBgetEventAttribute\fP (void) const" .br .ti -1c .RI "virtual void \fBsetCondAttribute\fP (const char *cond)" .br .ti -1c .RI "const char * \fBgetCondAttribute\fP (void) const" .br .ti -1c .RI "virtual void \fBsetTargetAttribute\fP (const char *target)" .br .ti -1c .RI "const char * \fBgetTargetAttribute\fP (void) const" .br .ti -1c .RI "virtual void \fBsetAnchorAttribute\fP (const char *anchor)" .br .ti -1c .RI "const char * \fBgetAnchorAttribute\fP (void) const" .br .ti -1c .RI "virtual SbBool \fBhandleXMLAttributes\fP (void)" .br .ti -1c .RI "virtual void \fBcopyContents\fP (const \fBScXMLElt\fP *rhs)" .br .ti -1c .RI "virtual const \fBScXMLElt\fP * \fBsearch\fP (const char *attrname, const char *attrvalue) const" .br .ti -1c .RI "SbBool \fBisConditionLess\fP (void) const" .br .ti -1c .RI "SbBool \fBisTargetLess\fP (void) const" .br .ti -1c .RI "SbBool \fBisSelfReferencing\fP (void) const" .br .ti -1c .RI "virtual SbBool \fBisEventMatch\fP (const \fBScXMLEvent\fP *event) const" .br .ti -1c .RI "virtual SbBool \fBevaluateCondition\fP (\fBScXMLStateMachine\fP *statemachine)" .br .ti -1c .RI "virtual int \fBgetNumExecutables\fP (void) const" .br .ti -1c .RI "virtual \fBScXMLExecutableElt\fP * \fBgetExecutable\fP (int idx) const" .br .ti -1c .RI "virtual void \fBaddExecutable\fP (\fBScXMLExecutableElt\fP *executable)" .br .ti -1c .RI "virtual void \fBremoveExecutable\fP (\fBScXMLExecutableElt\fP *executable)" .br .ti -1c .RI "virtual void \fBclearAllExecutables\fP (void)" .br .ti -1c .RI "virtual void \fBexecute\fP (\fBScXMLStateMachine\fP *statemachine) const" .br .in -1c Public Member Functions inherited from \fBScXMLElt\fP .in +1c .ti -1c .RI "void \fBsetXMLAttribute\fP (const char *attribute, const char *value)" .br .ti -1c .RI "const char * \fBgetXMLAttribute\fP (const char *attribute) const" .br .ti -1c .RI "\fBScXMLElt\fP * \fBclone\fP (void) const" .br .ti -1c .RI "virtual void \fBsetContainer\fP (\fBScXMLElt\fP *container)" .br .ti -1c .RI "\fBScXMLElt\fP * \fBgetContainer\fP (void) const" .br .ti -1c .RI "SbBool \fBisContainedIn\fP (const \fBScXMLElt\fP *object) const" .br .in -1c Public Member Functions inherited from \fBScXMLObject\fP .in +1c .ti -1c .RI "SbBool \fBisOfType\fP (\fBSoType\fP type) const" .br .RI "Returns \fRTRUE\fP if the type of this object is either of the same type or inherited from \fItype\fP\&. " .in -1c .SS "Static Public Member Functions" .in +1c .ti -1c .RI "static \fBScXMLEltReader\fP * \fBgetElementReader\fP (void)" .br .ti -1c .RI "static \fBSoType\fP \fBgetClassTypeId\fP (void)" .br .ti -1c .RI "static void * \fBcreateInstance\fP (void)" .br .ti -1c .RI "static void \fBinitClass\fP (void)" .br .ti -1c .RI "static void \fBcleanClass\fP (void)" .br .in -1c Static Public Member Functions inherited from \fBScXMLElt\fP .in +1c .ti -1c .RI "static \fBSoType\fP \fBgetClassTypeId\fP (void)" .br .ti -1c .RI "static void \fBinitClass\fP (void)" .br .ti -1c .RI "static void \fBcleanClass\fP (void)" .br .in -1c Static Public Member Functions inherited from \fBScXMLObject\fP .in +1c .ti -1c .RI "static \fBSoType\fP \fBgetClassTypeId\fP (void)" .br .RI "This static method returns the \fBSoType\fP object associated with objects of this class\&. " .ti -1c .RI "static void \fBinitClass\fP (void)" .br .RI "Sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system\&. " .ti -1c .RI "static void \fBcleanClass\fP (void)" .br .RI "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\&. " .in -1c .SS "Protected Attributes" .in +1c .ti -1c .RI "char * \fBevent\fP" .br .ti -1c .RI "char * \fBcond\fP" .br .ti -1c .RI "char * \fBtarget\fP" .br .ti -1c .RI "char * \fBanchor\fP" .br .ti -1c .RI "SbBool \fBneedprefixmatching\fP" .br .ti -1c .RI "\fBSbName\fP \fBeventkey\fP" .br .ti -1c .RI "\fBSbName\fP \fBtargetkey\fP" .br .in -1c .SS "Additional Inherited Members" Static Protected Member Functions inherited from \fBScXMLElt\fP .in +1c .ti -1c .RI "static void \fBregisterClassType\fP (const char *xmlns, const char *classname, \fBSoType\fP type)" .br .ti -1c .RI "static void \fBregisterInvokeClassType\fP (const char *xmlns, const char *targettype, const char *source, \fBSoType\fP type)" .br .in -1c Static Protected Member Functions inherited from \fBScXMLObject\fP .in +1c .ti -1c .RI "static void \fBregisterClassType\fP (const char *xmlns, const char *classname, \fBSoType\fP type)" .br .ti -1c .RI "static void \fBregisterInvokeClassType\fP (const char *xmlns, const char *targettype, const char *source, \fBSoType\fP type)" .br .in -1c .SH "Detailed Description" .PP the \fR\fP SCXML element\&. The \fR\fP element is used for invoking executable code and transition from the current active states in a state machine to a new set of active states\&. .PP By plural active states, it is meant that all the parent states of active states are also active at the same time, which is helpful when organizing common event triggered \fR\fP transitions\&. Putting transitions in the root \fR\fP element means that they are always active\&. .PP You also have the concept of parallel states in SCXML\&. This is not \fIyet\fP supported in Coin SCXML\&. .PP The following attributes are accepted: .PD 0 .IP "\(bu" 1 \fRevent\fP .IP "\(bu" 1 \fRcond\fP .IP "\(bu" 1 \fRtarget\fP .IP "\(bu" 1 \fRanchor\fP - not supported .PP The \fRevent\fP attribute specifies the event that the transition will trigger for, if the \fR\fP element is in an active state\&. The \fIevent\fP attribute can be specified with wildcard matching using \fR'*'\fP, but with the following restrictions: .PD 0 .IP "\(bu" 1 \fR'*'\fP must be at the end of the event name match\&. .IP "\(bu" 1 \fR'*'\fP must match full dot-separated words\&. .PP Example 1: \fRevent='*'\fP .PP Example 2: \fRevent='error\&.*'\fP .PP The \fRcond\fP attribute can be used to specify additional conditions that must be met for the \fR\fP to be triggered\&. The condition expression language depends on which profile the SCXML state machine uses\&. .PP The \fR'minimum'\fP profile only specifies one function, which is the \fRIn\fP({ID}) function\&. In() evaluates to TRUE if the state machine is currently in the state with the given ID\&. .PP The \fR'x-coin'\fP profile implements a number of expressions that evaluates to a truth value\&. While in development, documenting the expression language seems like too much overhead, so that part will have to wait\&. The source code can do the talking\&. See Coin/src/scxml/eval-coin-tab\&.y\&. .PP The \fRtarget\fP attribute specifies the target states to transition to\&. If parallel states had been implemented, you would be able to specify multiple states in this attribute, but for now you can only specify one target state\&. If \fRtarget\fP is dropped, then the transition does not change what the active state is and will just execute the executable parts it contains\&. If \fRtarget\fP is the \fRid\fP of the \fRstate\fP the \fR\fP is in, the state will be left/exited and then reentered again\&. For active substates, this means they will also be exited of course\&. .PP The \fRanchor\fP attribute is not supported\&. .PP \fR\fP elements can contain executable SCXML elements as XML children, meaning \fR\fP /\fR\fP / \fR\fP, \fR\fP, \fR\fP, \fR\fP, \fR\fP\&. .PP \fBSince\fP .RS 4 Coin 3\&.0 .RE .PP \fBSee also\fP .RS 4 \fBScXMLIfElt\fP, \fBScXMLAssignElt\fP, \fBScXMLSendElt\fP, \fBScXMLEventElt\fP, \fBScXMLLogElt\fP .RE .PP .SH "Member Function Documentation" .PP .SS "\fBSoType\fP ScXMLTransitionElt::getTypeId (void ) const\fR [virtual]\fP" .PP Returns the type identification of an object derived from a class inheriting \fBSoBase\fP\&. This is used for runtime type checking and 'downward' casting\&. .PP \fBSee also\fP .RS 4 \fBSoBase::getTypeId() const\fP .RE .PP .PP Implements \fBScXMLElt\fP\&. .SS "SbBool ScXMLTransitionElt::handleXMLAttributes (void )\fR [virtual]\fP" 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\&. .PP \fBReturns\fP .RS 4 TRUE if the attributes are OK, and FALSE on error\&. .RE .PP This base class implementation does nothing and just returns TRUE\&. .PP Reimplemented from \fBScXMLElt\fP\&. .SS "void ScXMLTransitionElt::copyContents (const \fBScXMLElt\fP * rhs)\fR [virtual]\fP" .PP Reimplemented from \fBScXMLElt\fP\&. .SS "const \fBScXMLElt\fP * ScXMLTransitionElt::search (const char * attrname, const char * attrvalue) const\fR [virtual]\fP" This method searches the SCXML structure for an element with the given attribute value for the given attribute\&. .PP Returns NULL if nothing was found\&. .PP This function needs to be reimplemented to traverse child elements\&. .PP Reimplemented from \fBScXMLElt\fP\&. .SS "SbBool ScXMLTransitionElt::isConditionLess (void ) const" Returns whether this is a conditionless SCXML transition or not\&. .PP A conditionless transition should always be taken\&. .SS "SbBool ScXMLTransitionElt::isTargetLess (void ) const" Returns whether this is a transition without a target setting or not\&. .PP When a targetless transition is taken, the state machine's state does not change\&. This differs from setting the target to its own state, which will cause the state machine to leave the state and reenter it again\&. .SS "SbBool ScXMLTransitionElt::isSelfReferencing (void ) const" Returns whether this transition is referencing its container or not\&. .PP If TRUE, this means you should end up in the same state as you started with when doing this transition\&. Note however that as opposed to a targetless transition, this transition should actually exit the state and then reenter it again\&. Executable content will be invoked after exiting the state, before reentering\&. .SS "SbBool ScXMLTransitionElt::isEventMatch (const \fBScXMLEvent\fP * eventobj) const\fR [virtual]\fP" This function returns TRUE if the transition matches the given \fIeventobj\fP object and FALSE otherwise\&. .SS "SbBool ScXMLTransitionElt::evaluateCondition (\fBScXMLStateMachine\fP * statemachine)\fR [virtual]\fP" This function uses the statemachine evaluator to evaluate its condition expression, and returns TRUE or FALSE based on the evaluation\&. .PP On expression error, error events are emit'ed to the SCXML state machine\&. .PP If the transition is conditionless, this function will return TRUE\&. .SS "void ScXMLTransitionElt::execute (\fBScXMLStateMachine\fP * statemachine) const\fR [virtual]\fP" Calls invoke on all the ScXMLInvoke children\&. .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.