VICI  0.11.815
Visual Chart Interpreter
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Static Public Member Functions | List of all members
VICI::stub::Dispatcher Class Reference

Send events to registered objects. More...

#include <vici/libifstubs.h>

Public Member Functions

void registerEvent (csr useCase, csr event, Event *fn)
 Register a method to be called. More...
 
void sendEvent (csr useCase, csr event)
 Make a registered call. More...
 
void clearTrace ()
 Clear the trace data.
 
void enableTracing (bool x)
 Enable tracing. More...
 
void trace (csr x)
 Record a trace message. More...
 
std::vector< std::string > & getTrace ()
 Get the current trace data. More...
 

Static Public Member Functions

static Dispatcherinstance ()
 Get an instance of the singleton object. More...
 

Detailed Description

Send events to registered objects.

The Dispatcher enables us to make method calls on objects using strings to identify them, thus separating the caller from any dependency on the callee.

The Dispatcher also collects trace information so that the test harness can verify the correct sequence of method calls.

Member Function Documentation

void VICI::stub::Dispatcher::enableTracing ( bool  x)
inline

Enable tracing.

Parameters
xSet to true to enable tracing.
std::vector< std::string >& VICI::stub::Dispatcher::getTrace ( )
inline

Get the current trace data.

Returns
a reference to the trace data.
Dispatcher & Dispatcher::instance ( )
static

Get an instance of the singleton object.

Returns
A reference to the Dispatcher
void Dispatcher::registerEvent ( csr  useCase,
csr  event,
Event fn 
)

Register a method to be called.

Parameters
useCaseThe name of the use case.
eventThe name of the event within the use case.
fnThe function to call.
void Dispatcher::sendEvent ( csr  useCase,
csr  event 
)

Make a registered call.

Parameters
useCaseThe name of the use case.
eventthe name of the event within the use case.
void VICI::stub::Dispatcher::trace ( csr  x)
inline

Record a trace message.

Parameters
xThe message to record.

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