TT Client Library 1.0.0
C++ library for Tandem Tales clients.
Loading...
Searching...
No Matches
Signature.h
1#pragma once
2
3#include <variant>
4#include <tt/world/Constant.h>
5#include <tt/world/Entity.h>
6#include <tt/util/JsonUtil.h>
7
8#ifndef SIGNATURE_H
9#define SIGNATURE_H
10
11namespace tt {
22 class Signature {
23 public:
25 std::string name;
26
27 Signature() {};
28
29 bool operator==(const Signature& s) const;
30
37 const std::vector<const Value *>& getArguments() const;
38
44 std::string toString() const;
45
46 friend std::ostream& operator<<(std::ostream& os, const Signature& a);
47 friend void from_json(const nlohmann::json& j, Signature& obj);
48 friend void to_json(nlohmann::json& j, const Signature& obj);
49
50 private:
52 std::vector<std::unique_ptr<Value>> arguments;
54 mutable std::vector<const Value *> argumentsPtrs;
55 };
56
57 void from_json(const nlohmann::json& j, Signature& obj);
58 void to_json(nlohmann::json& j, const Signature& obj);
59
67 std::ostream& operator<<(std::ostream& os, const Signature& a);
68}
69
70#endif
A signature is a logical object that identifies a parameterized asset in a story world.
Definition Signature.h:22
std::string name
The signature's name.
Definition Signature.h:25
const std::vector< const Value * > & getArguments() const
Returns an unmodifiable list of all arguments defined in this story world ordered by the ID numbers.
Definition Signature.cpp:19
std::string toString() const
Returns a string representation of this object.
Definition Signature.cpp:31
friend std::ostream & operator<<(std::ostream &os, const Signature &a)
Override stream insertion operator to allow printing the Signature class.
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