A Cerata Object on a graph.
More...
#include <object.h>
|
| Object (std::string name, ID id) |
| Cerata object constructor. More...
|
|
ID | obj_id () const |
| Return the object ID of this object.
|
|
bool | IsNode () const |
| Return true if this object is a node.
|
|
bool | IsArray () const |
| Return true if this object is an array.
|
|
virtual void | SetParent (Graph *parent) |
| Set the parent graph of this object.
|
|
virtual std::optional< Graph * > | parent () const |
| Return the parent graph of this object, if any. Returns empty option otherwise.
|
|
virtual std::shared_ptr< Object > | Copy () const =0 |
| Deep-copy the object.
|
|
virtual void | AppendReferences (std::vector< Object * > *out) const =0 |
| Append all objects that this object owns to the output.
|
|
| Named (std::string name) |
| Named constructor.
|
|
std::string | name () const |
| Return the name of the object.
|
|
void | SetName (std::string name) |
| Change the name of the object.
|
|
virtual | ~Named ()=default |
| Destructor.
|
|
|
std::unordered_map< std::string, std::string > | meta |
| KV storage for metadata of tools or specific backend implementations.
|
|
A Cerata Object on a graph.
Definition at line 34 of file object.h.
◆ ID
Object type ID to conveniently cast the object during run-time.
Enumerator |
---|
NODE | Node object.
|
ARRAY | Array object.
|
Definition at line 37 of file object.h.
◆ Object()
cerata::Object::Object |
( |
std::string |
name, |
|
|
ID |
id |
|
) |
| |
|
inlineexplicit |
Cerata object constructor.
- Parameters
-
name | The name of the object. |
id | The type ID of the object. |
Definition at line 47 of file object.h.
The documentation for this class was generated from the following files: