#include <nodesystem.h>
GNodeBase is the base class of node references. The whole hierarchy is
See also usernodes_nodes for a class diagram and more details. It is important to understand that GNodeBase and its subclasses are not nodes themselves, but references to nodes. Such a reference consists of a reference to the node system and the node path to the g-node within the node system.
Public Member Functions | |
operator Bool () const | |
Bool | IsEmpty () const |
Bool | IsPopulated () const |
Bool | IsValid () const |
const NodeSystemInterface::ConstPtr & | GetNodeSystem () const |
const NodePath & | GetPath () const |
operator const NodePath & () const | |
const InternedId & | GetId () const |
NODE_KIND | GetKind () const |
GNODE_FLAGS | GetFlags () const |
Bool | operator== (const GNodeBase &other) const |
Bool | operator!= (const GNodeBase &other) const |
HashInt | GetHashCode () const |
UniqueHash | GetUniqueHashCode () const |
String | ToString (const FormatStatement *fs=nullptr) const |
Protected Member Functions | |
GNodeBase ()=default | |
GNodeBase (NodeSystemInterface *system, const GNodeHandle &node) | |
GNodeBase (NodeSystemInterface *system, GNodeHandle &&node) | |
void | SetNodeSystem (NodeSystemInterface *sys) |
Static Protected Member Functions | |
template<typename GNODE , typename PATH > | |
static Result< void > | PrivateInitFromPath (GNODE &node, typename GNODE::NodeSystemCtorParam system, PATH &&path, NODE_KIND check) |
Protected Attributes | |
NodeSystemInterface * | _system |
GNodeHandle | _node |
Private Types | |
using | NodeSystemCtorParam = NodeSystemInterface * |
Private Member Functions | |
const GNodeHandle & | GetHandle () const |
const ThreadReferencedError & | GetErrorStorage () const |
Static Private Attributes | |
static const Bool | MUTABLE |
static const NODE_KIND | KIND_MASK |
static constexpr Bool | HAS_ERROR |
Friends | |
class | NodeSystemImpl |
class | NodesLibImpl |
|
private |
|
protecteddefault |
|
protected |
|
protected |
|
explicit |
Checks if this is a non-null reference to a g-node in some node system.
Bool IsEmpty | ( | ) | const |
Checks if this g-node is empty and contains no reference.
Bool IsPopulated | ( | ) | const |
Checks if this is a non-null reference to a g-node in some node system.
Bool IsValid | ( | ) | const |
Checks if this is a non-null reference to a g-node in some node system. Same as IsPopulated().
const NodeSystemInterface::ConstPtr& GetNodeSystem | ( | ) | const |
Returns the node system of this node reference. For a null node a null reference is returned.
const NodePath& GetPath | ( | ) | const |
Returns the path of this node reference. A g-node is identified by its owning node system and the path within that node system.
operator const NodePath & | ( | ) | const |
Returns the path of this node reference. A g-node is identified by its owning node system and the path within that node system.
const InternedId& GetId | ( | ) | const |
Returns the identifier of this node reference. The identifier is the last element of the path, so it is only guaranteed to be unique among siblings of the referenced node, but not within the whole node system. For the root node (which has an empty path) the identifier is also empty.
|
private |
NODE_KIND GetKind | ( | ) | const |
Returns the node kind of this g-node (whether it's a true node, a port list or a port).
GNODE_FLAGS GetFlags | ( | ) | const |
Returns the GNODE_FLAGS of this g-node.
Checks if this g-node is the same as other.
[in] | other | Another g-node. |
Checks if this g-node and other denote different nodes.
[in] | other | Another g-node. |
HashInt GetHashCode | ( | ) | const |
Returns the hash code of this @CLASS.
UniqueHash GetUniqueHashCode | ( | ) | const |
Returns the 128-bit hash value of this @CLASS. The implementation ensures uniform distribution, so for practical purposes you can safely assume that two objects are equal if their hash values are equal.
String ToString | ( | const FormatStatement * | fs = nullptr | ) | const |
|
private |
|
protected |
|
staticprotected |
|
friend |
|
friend |
|
staticprivate |
|
staticprivate |
|
staticconstexprprivate |
|
protected |
|
protected |