Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

Kodu::LiteralGenerator Class Reference

#include <KoduGenerators.h>


Detailed Description

Definition at line 12 of file KoduGenerators.h.

List of all members.

Public Types

enum  ReturnOrder_t { RO_SEQUENTIAL = 0, RO_RANDOM }
 

A enumeration of ways a literal string can be returned.

More...

Public Member Functions

 LiteralGenerator (const std::string &kLiteralString, ReturnOrder_t returnOrder)
 Constructor #1.
 LiteralGenerator (const std::vector< std::string > &kLiteralStrVector, ReturnOrder_t returnOrder)
 Constructor #2.
 LiteralGenerator (const LiteralGenerator &kGenerator)
 Copy constructor.
 ~LiteralGenerator ()
 Destructor.
LiteralGeneratoroperator= (const LiteralGenerator &kGenerator)
 Assignment operator.
void addLiteralString (const std::string &)
 Adds a literal string.
const std::string & getLiteralString ()
 Returns a literal string.
void printAttrs () const
 Prints the attributes.
void setLiteralStrings (const std::vector< std::string > &)
 Sets the literal string vector.

Private Attributes

std::vector< std::string > literalStrings
 A vector of literal strings.
ReturnOrder_t order
 Used to control what order the strings will be returned in.
unsigned int vecIndex
 Used to return the "next" string (mostly used for sequential order).

Member Enumeration Documentation

A enumeration of ways a literal string can be returned.

Enumerator:
RO_SEQUENTIAL 
RO_RANDOM 

Definition at line 15 of file KoduGenerators.h.


Constructor & Destructor Documentation

Kodu::LiteralGenerator::LiteralGenerator ( const std::string &  kLiteralString,
ReturnOrder_t  returnOrder 
)

Constructor #1.

Definition at line 21 of file KoduGenerators.h.

Kodu::LiteralGenerator::LiteralGenerator ( const std::vector< std::string > &  kLiteralStrVector,
ReturnOrder_t  returnOrder 
)

Constructor #2.

Definition at line 31 of file KoduGenerators.h.

Kodu::LiteralGenerator::LiteralGenerator ( const LiteralGenerator kGenerator  ) 

Copy constructor.

Definition at line 38 of file KoduGenerators.h.

Kodu::LiteralGenerator::~LiteralGenerator (  ) 

Destructor.

Definition at line 45 of file KoduGenerators.h.


Member Function Documentation

void Kodu::LiteralGenerator::addLiteralString ( const std::string &   ) 

Adds a literal string.

const std::string & Kodu::LiteralGenerator::getLiteralString (  ) 

Returns a literal string.

Definition at line 5 of file KoduGenerators.cc.

Referenced by Kodu::KoduActionPlay::getSoundFile(), and Kodu::KoduActionSay::getStringToSpeak().

LiteralGenerator& Kodu::LiteralGenerator::operator= ( const LiteralGenerator kGenerator  ) 

Assignment operator.

Definition at line 50 of file KoduGenerators.h.

void Kodu::LiteralGenerator::printAttrs (  )  const

Prints the attributes.

Definition at line 18 of file KoduGenerators.cc.

Referenced by Kodu::KoduActionSay::printAttrs(), and Kodu::KoduActionPlay::printAttrs().

void Kodu::LiteralGenerator::setLiteralStrings ( const std::vector< std::string > &  kLiteralStrings  ) 

Sets the literal string vector.

Definition at line 36 of file KoduGenerators.cc.


Member Data Documentation

std::vector<std::string> Kodu::LiteralGenerator::literalStrings [private]

A vector of literal strings.

Definition at line 72 of file KoduGenerators.h.

Referenced by getLiteralString(), LiteralGenerator(), operator=(), printAttrs(), and setLiteralStrings().

Used to control what order the strings will be returned in.

Definition at line 73 of file KoduGenerators.h.

Referenced by getLiteralString(), operator=(), and printAttrs().

unsigned int Kodu::LiteralGenerator::vecIndex [private]

Used to return the "next" string (mostly used for sequential order).

Definition at line 74 of file KoduGenerators.h.

Referenced by getLiteralString(), operator=(), and setLiteralStrings().


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

Tekkotsu v5.1CVS
Generated Mon May 9 04:59:23 2016 by Doxygen 1.6.3