|
| Graph (std::string name, ID id) |
| Construct a new graph.
|
|
ID | id () const |
| Return the graph type ID.
|
|
bool | IsComponent () const |
| Return true if this graph is a component, false otherwise.
|
|
bool | IsInstance () const |
| Return true if this graph is an instance, false otherwise.
|
|
virtual Graph & | Add (const std::shared_ptr< Object > &object) |
| Add an object to the component.
|
|
virtual Graph & | Add (const std::vector< std::shared_ptr< Object >> &objects) |
| Add a list of objects to the component.
|
|
virtual Graph & | Remove (Object *obj) |
| Remove an object from the component.
|
|
template<typename T > |
std::vector< T * > | GetAll () const |
| Get all objects of a specific type.
|
|
template<typename T > |
T * | Get (const std::string &name) const |
| Get one object of a specific type.
|
|
std::optional< Node * > | FindNode (const std::string &node_name) const |
| Find a node with a specific name.
|
|
Node * | GetNode (const std::string &node_name) const |
| Get a Node of a specific type with a specific name.
|
|
Node * | operator() (const std::string &node_name) const |
| Obtain a node by name.
|
|
std::vector< Node * > | GetNodesOfTypes (std::initializer_list< Node::NodeID > ids) const |
| Obtain all nodes which ids are in a list of Node::IDs.
|
|
size_t | CountNodes (Node::NodeID id) const |
| Count nodes of a specific node type.
|
|
size_t | CountArrays (Node::NodeID id) const |
| Count nodes of a specific array type.
|
|
std::vector< Node * > | GetNodes () const |
| Get all nodes.
|
|
std::vector< Node * > | GetNodesOfType (Node::NodeID id) const |
| Get all nodes of a specific type.
|
|
std::vector< NodeArray * > | GetArraysOfType (Node::NodeID id) const |
| Get all arrays of a specific type.
|
|
std::vector< Node * > | GetImplicitNodes () const |
| Return all graph nodes that do not explicitly belong to the graph.
|
|
PortArray * | prt_arr (const std::string &name) const |
| Shorthand to Get<PortArray>(...)
|
|
SignalArray * | sig_arr (const std::string &name) const |
| Shorthand to Get<SignalArray>(...)
|
|
Port * | prt (const std::string &name) const |
| Shorthand to Get<Port>(...)
|
|
Signal * | sig (const std::string &name) const |
| Shorthand to Get<Signal>(...)
|
|
Parameter * | par (const std::string &name) const |
| Shorthand to Get<Parameter>(...)
|
|
Parameter * | par (const Parameter ¶m) const |
| Get a parameter by supplying another parameter. Lookup is done according to the name of the supplied param.
|
|
Parameter * | par (const std::shared_ptr< Parameter > ¶m) const |
| Get a parameter by supplying another parameter. Lookup is done according to the name of the supplied param.
|
|
std::unordered_map< std::string, std::string > | meta () const |
| Return a copy of the metadata.
|
|
std::vector< Object * > | objects () const |
| Get all objects.
|
|
bool | Has (const std::string &name) |
| Return true if object with name already exists on graph.
|
|
Graph & | SetMeta (const std::string &key, std::string value) |
| Set metadata.
|
|
std::string | ToString () const |
| Return a human-readable representation.
|
|
std::string | ToStringAllOjects () const |
| Return a comma separated list of object names.
|
|
| 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.
|
|
A graph representing a hardware structure.
Definition at line 37 of file graph.h.