LibCT 2.0
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes

LibCT::ConversationNode Class Reference

A ConversationNode is the root node of a conversation. More...

#include <ConversationNode.h>

Inheritance diagram for LibCT::ConversationNode:
LibCT::Node LibCT::VariableContainer

List of all members.

Public Types

enum  Events { EventsOnEnter, EventsOnExit }

Public Member Functions

 ConversationNode (Node *pParent, const std::string &text)
 Constructor.
 ~ConversationNode ()
 Destructor.
bool SerialiseImpl (InputStream *pInput)
bool SerialiseImpl (OutputStream *pOutput)
PhaseNodeGetInitialPhase () const
NodeGetNext ()
void Activate ()
 Called when the conversation is activated.
void Deactivate ()
 Called when the conversation is deactivated.

Static Public Member Functions

static ConversationNodeLoad (InputStream *pInput)
static void Save (ConversationNode *pConversation, OutputStream *pOutput)

Private Attributes

std::vector< std::string > m_Events
 A list of all events this conversation registered.

Detailed Description

A ConversationNode is the root node of a conversation.


Member Enumeration Documentation

Enumerator:
EventsOnEnter 

Event to fire when the conversation starts.

EventsOnExit 

Event to fire when the conversation exits.


Constructor & Destructor Documentation

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

Constructor.

LibCT::ConversationNode::~ConversationNode ( )

Destructor.


Member Function Documentation

void LibCT::ConversationNode::Activate ( )

Called when the conversation is activated.

void LibCT::ConversationNode::Deactivate ( )

Called when the conversation is deactivated.

PhaseNode* LibCT::ConversationNode::GetInitialPhase ( ) const

Get the initial phase node, which is the first 'proper' node Although we may have had to pass through a few decisions to find it

Returns:
The first node from the path beginning at m_pInitialNode that's a phase
Node* LibCT::ConversationNode::GetNext ( ) [virtual]

Get active connection

Returns:
The node this one is actively connected to

Reimplemented from LibCT::Node.

static ConversationNode* LibCT::ConversationNode::Load ( InputStream pInput) [static]

Load a conversation from a file

Returns:
A pointer to the loaded Project (calling code owns pointer)
Exceptions:
IOExceptionif unable to load
Parameters:
pInputOutputStream to load from
static void LibCT::ConversationNode::Save ( ConversationNode pConversation,
OutputStream pOutput 
) [static]

Save a conversation to a file

Exceptions:
IOExceptionif unable to save
Parameters:
pConversationConversation to save
pOutputInputStream to save to
bool LibCT::ConversationNode::SerialiseImpl ( InputStream pInput) [virtual]

Implementation of serialisation

Returns:
True if successful

Reimplemented from LibCT::Node.

bool LibCT::ConversationNode::SerialiseImpl ( OutputStream pOutput) [virtual]

Implementation of serialisation

Returns:
True if successful

Reimplemented from LibCT::Node.


Member Data Documentation

std::vector<std::string> LibCT::ConversationNode::m_Events [private]

A list of all events this conversation registered.


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