Enzo
Loading...
Searching...
No Matches
enzo::nt::NodeTypeTable Class Reference

The sole owner of every node type the application knows about. More...

#include <NodeTypeTable.h>

Static Public Member Functions

static const NodeTypeaddNodeType (NodeType nodeType)
 Takes ownership of a node type and returns the stored copy.
 
static const NodeTypegetNodeType (const std::string &fullName)
 Returns the type registered under a full name, such as "enzo::grid".
 
static const NodeTyperequireNodeType (const std::string &fullName)
 Returns the type registered under a full name, for callers that cannot go on without it.
 
static const std::deque< NodeType > & getData ()
 Returns every registered type, in the order they were added.
 

Detailed Description

The sole owner of every node type the application knows about.

The nt::NodeLoader fills the table at startup and nodes hold references into it, so a type exists once no matter how many nodes are built from it. Entries are never removed, which is what keeps those references valid.

Member Function Documentation

◆ getNodeType()

const NodeType * enzo::nt::NodeTypeTable::getNodeType ( const std::string & fullName)
static

Returns the type registered under a full name, such as "enzo::grid".

Returns
The type, or nullptr when nothing carries that name.

◆ requireNodeType()

const NodeType & enzo::nt::NodeTypeTable::requireNodeType ( const std::string & fullName)
static

Returns the type registered under a full name, for callers that cannot go on without it.

Note
Throws std::runtime_error when nothing carries that name.

The documentation for this class was generated from the following files: