.TH "State Chart XML Classes" 3 "Wed May 23 2012" "Version 3.1.3" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME State Chart XML Classes \- .SS "Classes" .in +1c .ti -1c .RI "class \fBScXML\fP" .br .RI "\fINamespace for static ScXML-related functions\&. \fP" .ti -1c .RI "class \fBScXMLEvent\fP" .br .RI "\fIBase class for events sent to SCXML state machines\&. \fP" .ti -1c .RI "class \fBScXMLInvoke\fP" .br .RI "\fIImplementation of the SCXML element\&. \fP" .ti -1c .RI "class \fBScXMLObject\fP" .br .RI "\fIBase class for all SCXML objects\&. \fP" .ti -1c .RI "class \fBScXMLStateMachine\fP" .br .RI "\fIManager for processing events and setting states in SCXML structures\&. \fP" .ti -1c .RI "class \fBSoScXMLEvent\fP" .br .RI "\fIAdds an \fBSoEvent\fP holder to the \fBScXMLEvent\fP base\&. \fP" .ti -1c .RI "class \fBSoScXMLStateMachine\fP" .br .RI "\fIIntegration level for using Coin events with SCXML-based state machines\&. \fP" .in -1c .SH "Detailed Description" .PP This set of classes is a basic implementation of State Chart XML\&. It is not complete, nor is it necessary conformant to those parts it implements\&. It is however a decent start, and there are plans for implementing more parts of the specification\&. .PP Currently Coin uses SCXML for managing 3D viewer user interaction (the non-model-interaction part) - the examiner navigation mode in layman terms - but with a more complete implementation of SCXML, the potential for more uses should be quite huge\&. .PP The Draft Specification for SCXML is at http://www.w3.org/TR/scxml/\&. .PP \fBSince:\fP .RS 4 Coin 3\&.0 .RE .PP State Chart XML The \fBScXML\fP part of Coin is a basic, non-conformant, partial implementation of State Chart XML, based on the W3C Working Draft 21 February 2007 of SCXML http://www.w3.org/TR/2007/WD-scxml-20070221/\&. Read that document for a basic understanding how SCXML documents should be constructed\&. .PP NOTE: A new version of the draft has just been released (May 2008)\&. The code here does not reflect any changes done to the draft SCXML specification yet\&. .PP Coin uses it for its navigation system, to be able to remove hardcoded logic for user navigation and externalize it into XML files\&. It is hoped that this technology will prove to be a useful addition to Coin and get broader use as this subsystem matures\&. The dragger and manipulator user interaction logic is likely one area where \fBScXML\fP might be employed later\&. Attaching state machines to interactive parts of the scene graph could be another interesting idea for the future\&. .PP For now, the \fBScXML\fP system is not employed in any pre-established Coin usage patterns, and you will need to employ new features to touch base with it\&. The most obvious are where \fBScXML\fP will be used is if you use Quarter 1\&.0 over Coin 3\&.0, as you manipulate the camera movements around the 3D models through mouse and keyboard interaction\&. .PP The Coin type system makes it possible to override the default types to have the state chart description instantiated using customized objects\&. A design choice made in that regard was to both use the type overriding system in Coin, and also to use the 'xmlns' (XML Namespace) attribute to make \fBScXML\fP types available and to prioritize which classtypes to instantiate objects from\&. The xmlns attribute is currently only checked at the document level, but the plan is to let any state have this attribute, and to simulate static scoping rules for namespace prioritization\&. .PP Partially Supported Items: .PP .IP "\(bu" 2 At the moment, the Coin \fBScXML\fP module only supports 'Executable Content' through the element, using the \fBScXMLInvoke\fP class interface and having the Executable Content written in C++ in subclasses of the \fBScXMLInvoke\fP class\&. ECMAScript and XPath is not supported yet\&. .PP .PP Unsupported Items: .PP .IP "\(bu" 2 External document referencing through the / 'src' attribute is not yet handled, but should be easy to implement so it will likely be one of the first things that will be fixed\&. .PP .PP .IP "\(bu" 2 The element is not supported as intended with parallel states\&. Coin will just treat it as an ordinary element for now\&. Parallel states is not high up on the priority list, so expect this to be handled after a lot of other functionality is in place\&. .PP .PP .IP "\(bu" 2 The -related part of the specification is not supported\&. .PP .PP .IP "\(bu" 2 The condition attribute in the element is not supported, so the only condition you can set is on the event type in the event attribute\&. The ScXMLTransition class has a virtual method SbBool evaluateCondition() which is used in the state machine logic, and should be all that is needed to overload to implement this in subclasses yourself\&. .PP .PP .IP "\(bu" 2 The 'target' attribute in the element can only identify a single state currently, not multiple as you would have to when having support for elements (which we don't have)\&. .PP .PP .IP "\(bu" 2 The virtual state elements like and are just implemented as dummy states for now and do not do anything in relation to what they should actually do\&. .PP .PP .IP "\(bu" 2 There are no mechanisms for inter-statemachine event passing yet\&. .PP .PP For learning more about how \fBScXML\fP is implemented and used in Coin, take a look at $COINDIR/scxml/navigation/examiner\&.xml (or in the Coin source directory, data/scxml/navigation/examiner\&.xml) for an example of how an SCXML system for camera navigation looks, and look at the ScXML* source files in src/navigation/ for the C++ counterparts to the same SCXML navigation system\&. .PP With support for , -conditions, and inline executable content in the XML file in some scripting language, the C++ parts could probably have been greatly simplified, if not more or less eliminated\&. This will hopefully evolve for future versions of Coin\&. .PP \fBSince:\fP .RS 4 Coin 3\&.0 .RE .PP .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.