Enzo
Loading...
Searching...
No Matches
NodeTypeTable.h
1#pragma once
2
3#include "Engine/Network/NodeAlias.h"
4#include "Engine/Network/NodeType.h"
5#include <boost/config.hpp>
6#include <deque>
7#include <string>
8
9namespace enzo::nt {
10
18class BOOST_SYMBOL_EXPORT NodeTypeTable
19{
20 public:
22 static const NodeType& addNodeType(NodeType nodeType);
23
26 static const NodeType* getNodeType(const std::string& fullName);
27
31 static const NodeType& requireNodeType(const std::string& fullName);
32
34 static const std::deque<NodeType>& getData();
35
38 static const NodeAlias& addNodeAlias(NodeAlias nodeAlias);
39
42 static const NodeAlias* getNodeAlias(const std::string& fullName);
43
45 static const std::deque<NodeAlias>& getNodeAliases();
46
47 private:
48 // A deque rather than a vector so growing the table never moves the types
49 // nodes hold references to.
50 static std::deque<NodeType> nodeTypeStore_;
51 static std::deque<NodeAlias> nodeAliasStore_;
52};
53
54} // namespace enzo::nt
The sole owner of every node type the application knows about.
Definition NodeTypeTable.h:19
A tab menu entry that creates a node of another type with its own starting values.
Definition NodeAlias.h:18
Everything every node of one kind shares.
Definition NodeType.h:40