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

The update message is sent from the server to a client each time a turn is taken and the state of the story world changes. More...

#include <tt/io/Update.h>

Inheritance diagram for tt::Update:
Collaboration diagram for tt::Update:

Public Member Functions

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

std::unique_ptr< Status > status
 An object describing the history of the story so far, the current state of the story world, and what turns are available for the agent to take, if any.

Detailed Description

The update message is sent from the server to a client each time a turn is taken and the state of the story world changes.

An update is also sent immediately after a session starts to give the story world's initial state.

Author
Gage Birchmeier

Member Function Documentation

◆ toString()

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

Returns a string representation of this object.

Returns
a string describing this object

Reimplemented from tt::Message.

◆ type()

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

Type used for JSON deserialization.

Implements tt::Message.

Member Data Documentation

◆ status

std::unique_ptr<Status> tt::Update::status

An object describing the history of the story so far, the current state of the story world, and what turns are available for the agent to take, if any.

Note that this is an exposed unique_ptr. This is because the tt::Client will take ownership of the Status object after it is received. This pointer will be invalid after the Client moves its value.


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