An invoker for other SCXML instances.

#include <USCXMLInvoker.h>

Inheritance diagram for uscxml::USCXMLInvoker:
[legend]
Collaboration diagram for uscxml::USCXMLInvoker:
[legend]

Classes

class  ParentQueueImpl
 

Public Member Functions

virtual std::shared_ptr< InvokerImplcreate (InvokerCallbacks *callbacks)
 Factory demands a new instance. More...
 
virtual void deserialize (const Data &encodedState)
 Load a state from a Data object. More...
 
virtual void eventFromSCXML (const Event &event)
 Invoker received an event from the SCXML Interpreter.
 
virtual Data getDataModelVariables ()
 Export a Data object for the `_x['name']` data-model namespace. More...
 
virtual std::list< std::string > getNames ()
 Return a list of names for types we implement.
 
virtual void invoke (const std::string &source, const Event &invokeEvent)
 Invoker's parent state became active at the end of a macro-step. More...
 
virtual Data serialize ()
 Save our state into a Data object.
 
virtual void uninvoke ()
 The invokers's parent state was left at the end of a macro-step.
 
- Public Member Functions inherited from uscxml::InvokerImpl
virtual void setInvokeId (const std::string &invokeId)
 Set the invocation identifier as required when returning events. More...
 

Protected Member Functions

void start ()
 
void stop ()
 
- Protected Member Functions inherited from uscxml::InvokerImpl
void eventToSCXML (Event &event, const std::string &type, const std::string &invokeId, bool internal=false)
 Return an event to the SCXML Interpreter instance. More...
 

Static Protected Member Functions

static void run (void *instance)
 

Protected Attributes

std::condition_variable_any _cond
 
Interpreter _invokedInterpreter
 
bool _isActive
 
bool _isStarted
 
std::recursive_mutex _mutex
 
EventQueue _parentQueue
 
std::thread * _thread
 
- Protected Attributes inherited from uscxml::InvokerImpl
InvokerCallbacks_callbacks
 
std::string _invokeId
 

Member Function Documentation

std::shared_ptr< InvokerImpl > uscxml::USCXMLInvoker::create ( InvokerCallbacks callbacks)
virtual
Parameters
callbacksAn object implementing the invoker callbacks.

Implements uscxml::InvokerImpl.

void uscxml::USCXMLInvoker::deserialize ( const Data encodedState)
virtual
Parameters
encodedStateThe state we returned somewhen else via serialize.

Reimplemented from uscxml::InvokerImpl.

Data uscxml::USCXMLInvoker::getDataModelVariables ( )
virtual
Returns
An object to be represented at `_x['name']`

Implements uscxml::EventHandlerImpl.

void uscxml::USCXMLInvoker::invoke ( const std::string &  source,
const Event invokeEvent 
)
virtual
Parameters
sourceThe content of the invoke's src or evaluated srcexpr attribute
invokeEventThe invocation with all its data as an event

Implements uscxml::InvokerImpl.

void uscxml::USCXMLInvoker::stop ( )
protected

We cannot join the invoked thread if it is blocking at an external receive. Cancel will finalize and unblock.


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