29 virtual bool toBool()
const;
53 virtual std::string
toString()
const;
61 virtual std::string_view
getType()
const;
63 bool operator==(
const Value& other)
const;
64 bool operator!=(
const Value& other)
const {
return !(*
this == other); }
An entity is an asset that represents a character, object, place, or idea in a story world.
Definition Entity.h:17
A value is a logical expression which evaluates to itself.
Definition Value.h:17
virtual bool equals(const Value &other) const =0
Used for polymorphic ==.
virtual std::string_view getType() const
Returns the type of value (either "Entity" or "Constant").
Definition Value.cpp:28
virtual ~Value()=default
Virtual destructor so Entity and Value can have their own.
virtual std::string toString() const
Returns a string representation of this object.
Definition Value.cpp:23
virtual bool toBool() const
If this value represents a Boolean, this method converts it into a bool; all other values are convert...
Definition Value.cpp:8
virtual const Entity * toEntity() const
If this value represents an tt::Entity, this method returns a pointer to that entity; all other value...
Definition Value.cpp:18
friend std::ostream & operator<<(std::ostream &os, const Value &obj)
Override stream insertion operator to allow printing the Value class.
virtual double toNumber() const
If this value represents a number, this method convert it into a double; all other values are convert...
Definition Value.cpp:13
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