LibCT 2.0
Public Types | Public Member Functions | Private Attributes

LibCT::DecisionNode Class Reference

A DecisionNode represents a hub where the conversation can go in one of two ways. More...

#include <DecisionNode.h>

Inheritance diagram for LibCT::DecisionNode:
LibCT::Node

List of all members.

Public Types

enum  Events { EventsOnEnter, EventsOnExit, EventsOnTrue, EventsOnFalse }
enum  Connections { ConnectionsFalse, ConnectionsTrue }
enum  Variables { VariablesLeft, VariablesRight, VariablesCount }

Public Member Functions

 DecisionNode (Node *pParent, const std::string &text)
 Constructor.
 ~DecisionNode ()
 Destructor.
bool SerialiseImpl (InputStream *pInput)
bool SerialiseImpl (OutputStream *pOutput)
void SetVariable (VariableInterface *pVar, Variables index)
 Set a variable.
void SetOperator (VariableOperator oper)
 Set the operator.
VariableInterfaceGetVariable (Variables index) const
VariableOperator GetOperator () const
NodeGetNext ()

Private Attributes

VariableInterfacem_pVariables [VariablesCount]
 Variables.
VariableOperator m_Operator
 Operator.

Detailed Description

A DecisionNode represents a hub where the conversation can go in one of two ways.


Member Enumeration Documentation

Enumerator:
ConnectionsFalse 

Index for the 'false' connection.

ConnectionsTrue 

Index for the 'true' connection.

Enumerator:
EventsOnEnter 

Event to fire when the decision starts.

EventsOnExit 

Event to fire when the decision exits.

EventsOnTrue 

Event to fire when conditions is evaluated to true.

EventsOnFalse 

Event to fire when conditions is evaluated to false.

Enumerator:
VariablesLeft 

Index fot the 'left' variable.

VariablesRight 

Index for the 'right' variable.

VariablesCount 

Number of total variables.


Constructor & Destructor Documentation

LibCT::DecisionNode::DecisionNode ( Node pParent,
const std::string &  text 
) [explicit]

Constructor.

LibCT::DecisionNode::~DecisionNode ( )

Destructor.


Member Function Documentation

Node* LibCT::DecisionNode::GetNext ( ) [virtual]

Get active connection

Returns:
The node this one is actively connected to

Reimplemented from LibCT::Node.

VariableOperator LibCT::DecisionNode::GetOperator ( ) const

Get the operator

Returns:
The operator
VariableInterface* LibCT::DecisionNode::GetVariable ( Variables  index) const

Get a variable

Returns:
The corresponding variable from the m_pVariables array
Parameters:
indexIndex of the m_pVariables array to get
bool LibCT::DecisionNode::SerialiseImpl ( OutputStream pOutput) [virtual]

Implementation of serialisation

Returns:
True if successful

Reimplemented from LibCT::Node.

bool LibCT::DecisionNode::SerialiseImpl ( InputStream pInput) [virtual]

Implementation of serialisation

Returns:
True if successful

Reimplemented from LibCT::Node.

void LibCT::DecisionNode::SetOperator ( VariableOperator  oper)

Set the operator.

Parameters:
operOperator to set
void LibCT::DecisionNode::SetVariable ( VariableInterface pVar,
Variables  index 
)

Set a variable.

Parameters:
pVarVariable to set
indexIndex of the m_pVariables array to set

Member Data Documentation

Operator.

Variables.


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