4#include <tt/world/Signature.h>
25 Ending():
id(0), signature(nullptr) {};
49 const std::string&
getCode()
const;
58 bool operator==(
const Ending& rhs)
const;
60 friend void from_json(
const nlohmann::json& j,
Ending& obj);
61 friend void to_json(nlohmann::json& j,
const Ending& obj);
62 friend std::ostream&
operator<<(std::ostream& os,
const Ending& a);
66 std::unique_ptr<Signature> signature;
70 std::string description;
73 void from_json(
const nlohmann::json& j,
Ending& obj);
74 void to_json(nlohmann::json& j,
const Ending& obj);
An ending is a signed asset that represents one of several possible ways a story can end.
Definition Ending.h:17
const std::string & getDescription() const
Returns a human-readable natural language description of the object.
Definition Ending.cpp:11
int id
This asset's ID number, which is unique among other assets of the same type.
Definition Ending.h:20
std::string name
This asset's name, which is unique among other assets of the same type.
Definition Ending.h:22
friend std::ostream & operator<<(std::ostream &os, const Ending &a)
Override stream insertion operator to allow printing the Ending class.
std::string toString() const
Returns a string representation of this object.
Definition Ending.cpp:6
const Signature * getSignature() const
Returns the signature of this object.
Definition Ending.cpp:21
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 ...
Definition Ending.cpp:16
A signature is a logical object that identifies a parameterized asset in a story world.
Definition Signature.h:22
Tandem Tales is a platform that enables short, paired storytelling exercises between two agents over ...
Definition Client.h:22
std::ostream & operator<<(std::ostream &os, const Client &a)
Override stream insertion operator to allow printing the Client class.
Definition Client.cpp:556