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

The choice message is sent from an agent to the server to signal what turn the agent wants to take. More...

#include <tt/io/Choice.h>

Inheritance diagram for tt::Choice:
Collaboration diagram for tt::Choice:

Public Member Functions

 Choice (int index)
 Constructs a choice message for a given choice index.
std::string toString () const override
 Returns a string representation of this object.
std::string type () const override
 Type used for JSON deserialization.
Public Member Functions inherited from tt::Message
 Message ()
 Constructs a message.
const Client * getClient () const
 Returns the tt::Client who sent this message, or null if this message was sent by the server.
void setClient (const Client *client)
 Sets the tt::Client who sent this message.

Public Attributes

int index
 The index of a turn from the most recent status update sent to the agent, starting at 0.

Detailed Description

The choice message is sent from an agent to the server to signal what turn the agent wants to take.

Author
Gage Birchmeier

Constructor & Destructor Documentation

◆ Choice()

tt::Choice::Choice ( int index)

Constructs a choice message for a given choice index.

Parameters
indexthe index of the turn from the agent's most recent status update that the agent wants to take

Member Function Documentation

◆ toString()

std::string tt::Choice::toString ( ) const
overridevirtual

Returns a string representation of this object.

Returns
a string describing this object

Reimplemented from tt::Message.

◆ type()

std::string tt::Choice::type ( ) const
inlineoverridevirtual

Type used for JSON deserialization.

Implements tt::Message.


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