The basic unit of computation for the ZHP scripting language and framework.
Subclassed by zhetapi::Assignable, zhetapi::Functor, zhetapi::Indexable, zhetapi::lvalue, zhetapi::Module, zhetapi::MultiSet, zhetapi::node_differential, zhetapi::node_list, zhetapi::node_reference, zhetapi::Operand< T >, zhetapi::operation, zhetapi::operation_holder, zhetapi::rvalue, zhetapi::Set, zhetapi::variable_cluster, zhetapi::wildcard, zhetapi::Xvalue
Public Functions
-
Token()
Default Token constructor that does nothing. For inheritance purposes.
-
virtual void write(std::ostream&) const
Writes data to an output stream. Not pure virtual because not all Token classes need this.
- Parameters
os – the stream to be written to.
-
virtual Token *copy() const = 0
Returns a copy of the Token (with the same data: the resulting Token should equal the original with ==). Pure virtual because any Tokens used will be copied at some point.
-
class empty_io : public runtime_error
Thrown if the Token does not have a write function.
-
class unknown_attribute : public runtime_error
Thrown if the program requests a Token for an attribute or method it does not have.