LibCT 2.0
|
Classes | |
class | ConversationNode |
A ConversationNode is the root node of a conversation. More... | |
class | DecisionNode |
A DecisionNode represents a hub where the conversation can go in one of two ways. More... | |
class | DoubleValue |
A DoubleValue is a specialised TemplateVariable for holding double values. More... | |
class | EventData |
EventData is a container for arbritaty data that can be sent with an event. More... | |
class | EventListener |
EventListener is a base class that all classes wishing to recieve events should derive from. More... | |
class | EventManager |
EventManager holds all the currently used events. More... | |
class | EventOccurance |
An EventOccurance is passed to all listening classes when an event occurs. More... | |
class | EventType |
EventType represents a specific event and stores all the listeners for that event. More... | |
class | Exception |
A base class for all LibCT exceptions. More... | |
struct | ExceptionCodeType |
Template struct which creates a distinct type for each exception code. More... | |
class | IOException |
A class representing an IO exception. More... | |
class | VariableException |
A class representing a Variable exception. More... | |
class | ExceptionFactory |
A class impementing dispatch methods. More... | |
class | FloatValue |
A FloatValue is a specialised TemplateVariable for holding float values. More... | |
class | Functor |
Functor is a base class used to store function pointers. More... | |
class | GlobalVars |
GlobalVars is a singleton variable container for holding global variables. More... | |
struct | CnvHeader |
CnvHeader is the layout for the binary header. More... | |
class | InputStream |
InputStream is a base class for reading binary data. More... | |
class | IntValue |
A IntValue is a specialised TemplateVariable for holding int values. More... | |
class | Logger |
A logger to allow the code to log messages. More... | |
class | Node |
A Node is a class used as the base for all conversation tree items. More... | |
class | OutputStream |
OutputStream is a base class for writing binary data. More... | |
class | PhaseNode |
A PhaseNode contains text that is presented to the user, and a list of ChoiceNodes for the user to choose from. More... | |
class | StringValue |
A StringValue is a specialised TemplateVariable for holding string values. More... | |
class | TemplateFunctor |
TemplateFunctor is a class that allows storing pointers to member functions. More... | |
class | TemplateVariable |
A TemplateVariable is a general container for holding values. More... | |
class | VariableContainer |
VariableContainer is a class to hold an access user-defnied variables. More... | |
class | VariableInterface |
VariableInterface provides a general interface for all user-defined variables. More... | |
Typedefs | |
typedef std::list < EventOccurance * > | EventOccuranceList |
Typedef. | |
typedef std::list< ListenerHandle > | ListenerHandleList |
typedef std::map< std::string, EventType * > | EventList |
List of event types and string identifiers. | |
typedef std::pair< std::string, EventType * > | EventPair |
Pair consisting of a event type and string identifier. | |
typedef std::pair < EventListener *, Functor * > | ListenerPair |
Typedefs. | |
typedef std::set< ListenerPair > | ListenerList |
typedef std::pair< EventType *, ListenerPair > | ListenerHandle |
typedef int | NodeId |
All nodes had a unique NodeId. | |
typedef std::vector< Node * > | NodeList |
Nodes will be stored in lists. | |
typedef std::map< std::string, VariableInterface * > | VariableList |
Typedefs. | |
typedef std::pair< std::string, VariableInterface * > | VariablePair |
Enumerations | |
enum | EventListenerMode { EventListenerModeBuffered, EventListenerModeImmediate } |
Listener mode. More... | |
enum | ExceptionCode { ExceptionCodeIO, ExceptionCodeVariable, ExceptionCodeProject } |
The code for an exception. More... | |
enum | LogLevel { LogLevelCritical, LogLevelWarning, LogLevelPedantic } |
The severity of the message being logged. More... | |
enum | NodeType { NodeTypeConversation, NodeTypePhase, NodeTypeChoice, NodeTypeDecision, NodeTypeUnknown } |
List of the different types of node. More... | |
enum | VariableType { VariableTypeInt, VariableTypeFloat, VariableTypeDouble, VariableTypeString, VariableTypeBool, VariableTypeCount, VariableTypeUnknown } |
List of all valid variable types. More... | |
enum | VariableScope { VariableScopeGlobal, VariableScopeLocal, VariableScopeUnknown } |
enum | VariableOperator { VariableOperatorEq, VariableOperatorNe, VariableOperatorLt, VariableOperatorLtEq, VariableOperatorGt, VariableOperatorGtEq, VariableOperatorUnknown } |
Functions | |
C | ChoiceNode (Node *pParent, const std::string &text) |
Constructor. | |
~ChoiceNode () | |
Destructor. | |
Node * | GetNext () |
~FileInputStream () | |
Destructor. | |
virtual size_t | Read (void *pData, size_t size) |
virtual | ~FileOutputStream () |
Destructor. | |
virtual size_t | Write (const void *pData, size_t size) |
template<unsigned int size> | |
static std::string | FormatString (const char *pFormat,...) |
Basically performs a sprintf but into a std::string. | |
bool | SerialiseVariableContainer (VariableContainer *pContainer, OutputStream *pOutput) |
bool | SerialiseVariableContainer (VariableContainer *pContainer, InputStream *pInput) |
Variables | |
C | __pad0__ |
Event to fire when the choice is selected. | |
C const std::string & | name |
std::ifstream | m_Stream |
Stream. |
This file is part of the LibCT project (http://libct.actstudios.co.uk)
Copyright (c) 2010 - 2011 Andrew Thorpe
This software is licensed under the MIT license
For more information, see LICENSE.TXT, or http://www.opensource.org/licenses/mit-license.php
typedef std::map<std::string, EventType*> LibCT::EventList |
List of event types and string identifiers.
typedef std::list<EventOccurance*> LibCT::EventOccuranceList |
Typedef.
typedef std::pair<std::string, EventType*> LibCT::EventPair |
Pair consisting of a event type and string identifier.
typedef std::pair<EventType*, ListenerPair> LibCT::ListenerHandle |
typedef std::list<ListenerHandle> LibCT::ListenerHandleList |
typedef std::set<ListenerPair> LibCT::ListenerList |
typedef std::pair<EventListener*, Functor*> LibCT::ListenerPair |
Typedefs.
typedef int LibCT::NodeId |
All nodes had a unique NodeId.
typedef std::vector<Node*> LibCT::NodeList |
Nodes will be stored in lists.
typedef std::map<std::string, VariableInterface*> LibCT::VariableList |
Typedefs.
typedef std::pair<std::string, VariableInterface*> LibCT::VariablePair |
enum LibCT::ExceptionCode |
enum LibCT::LogLevel |
enum LibCT::NodeType |
enum LibCT::VariableScope |
enum LibCT::VariableType |
List of all valid variable types.
C LibCT::ChoiceNode | ( | Node * | pParent, |
const std::string & | text | ||
) | [explicit] |
Constructor.
static std::string LibCT::FormatString | ( | const char * | pFormat, |
... | |||
) | [static] |
Basically performs a sprintf but into a std::string.
pFormat | Formating string |
Node* LibCT::GetNext | ( | ) |
Get active connection
virtual size_t LibCT::Read | ( | void * | pData, |
size_t | size | ||
) | [protected, virtual] |
Read the data from the stream
pData | Data to write |
size | Size of pData |
bool LibCT::SerialiseVariableContainer | ( | VariableContainer * | pContainer, |
OutputStream * | pOutput | ||
) |
Serialise a VariableContainer to a stream
bool LibCT::SerialiseVariableContainer | ( | VariableContainer * | pContainer, |
InputStream * | pInput | ||
) |
Serialise a VariableContainer from a stream
virtual size_t LibCT::Write | ( | const void * | pData, |
size_t | size | ||
) | [protected, virtual] |
Write the data to the stream
pData | Data to write |
size | Size of pData |
LibCT::~ChoiceNode | ( | ) |
Destructor.
LibCT::~FileInputStream | ( | ) |
Destructor.
virtual LibCT::~FileOutputStream | ( | ) | [virtual] |
Destructor.
Event to fire when the choice is selected.
std::ofstream LibCT::m_Stream |
Stream.
C const std::string& LibCT::name |