TT Client Library 1.0.0
C++ library for Tandem Tales clients.
Loading...
Searching...
No Matches
Choice.h
1#pragma once
2
3#include <tt/io/Message.h>
4
5#ifndef CHOICE_H
6#define CHOICE_H
7
8namespace tt {
16 class Choice : public Message {
17 public:
22 int index;
23
30 Choice(int index);
31
32 Choice(): index(0) {}
33
34 std::string toString() const override;
35
36 std::string type() const override {
37 return "Choice";
38 }
39 };
40
41 void from_json(const nlohmann::json& j, Choice& msg);
42 void to_json(nlohmann::json& j, const Choice& msg);
43
44}
45
46#endif
int index
The index of a turn from the most recent status update sent to the agent, starting at 0.
Definition Choice.h:22
std::string type() const override
Type used for JSON deserialization.
Definition Choice.h:36
Choice(int index)
Constructs a choice message for a given choice index.
Definition Choice.cpp:6
std::string toString() const override
Returns a string representation of this object.
Definition Choice.cpp:11
Message()
Constructs a message.
Definition Message.h:32
Tandem Tales is a platform that enables short, paired storytelling exercises between two agents over ...
Definition Client.h:22