TT Client Library 1.0.0
C++ library for Tandem Tales clients.
Loading...
Searching...
No Matches
tt::Ending Class Reference

An ending is a signed asset that represents one of several possible ways a story can end. More...

#include <tt/world/Ending.h>

Public Member Functions

std::string toString () const
 Returns a string representation of this object.
const std::string & getDescription () const
 Returns a human-readable natural language description of the object.
const std::string & getCode () const
 Returns a string of 1's and 0's that uniquely represents this object among other objects of the same type in the same story world.
const Signature * getSignature () const
 Returns the signature of this object.

Public Attributes

int id
 This asset's ID number, which is unique among other assets of the same type.
std::string name
 This asset's name, which is unique among other assets of the same type.

Friends

std::ostream & operator<< (std::ostream &os, const Ending &a)
 Override stream insertion operator to allow printing the Ending class.

Detailed Description

An ending is a signed asset that represents one of several possible ways a story can end.

Author
Gage Birchmeier

Member Function Documentation

◆ getCode()

const std::string & tt::Ending::getCode ( ) const

Returns a string of 1's and 0's that uniquely represents this object among other objects of the same type in the same story world.

Every encoded object of the same type should return a string of the same length, even if it must be padded with 0's.

Returns
a string of 1's and 0's

◆ getDescription()

const std::string & tt::Ending::getDescription ( ) const

Returns a human-readable natural language description of the object.

Returns
a human-readable natural language description of the object

◆ getSignature()

const Signature * tt::Ending::getSignature ( ) const

Returns the signature of this object.

Returns
a pointer to the signature of this Ending.

◆ toString()

std::string tt::Ending::toString ( ) const

Returns a string representation of this object.

Returns
a string describing this object

◆ operator<<

std::ostream & operator<< ( std::ostream & os,
const Ending & a )
friend

Override stream insertion operator to allow printing the Ending class.

Parameters
osan output stream to insert into
aa reference to an ending object
Returns
the output stream referenced

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