forked from kovacsv/VisualScriptEngineWeb
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNE_NodeList.hpp
More file actions
38 lines (27 loc) · 731 Bytes
/
NE_NodeList.hpp
File metadata and controls
38 lines (27 loc) · 731 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef NE_NODELIST_HPP
#define NE_NODELIST_HPP
#include "NE_Node.hpp"
#include "NE_OrderedMap.hpp"
namespace NE
{
class NodeList
{
public:
NodeList ();
~NodeList ();
bool IsEmpty () const;
size_t Count () const;
bool ContainsNode (const NodeId& nodeId) const;
NodePtr GetNode (const NodeId& nodeId);
NodeConstPtr GetNode (const NodeId& nodeId) const;
bool AddNode (const NodeId& nodeId, const NodePtr& nodePtr);
bool DeleteNode (const NodeId& nodeId);
void MakeSorted ();
void Clear ();
void Enumerate (const std::function<bool (NodePtr)>& processor);
void Enumerate (const std::function<bool (NodeConstPtr)>& processor) const;
private:
OrderedMap<NodeId, NodePtr> nodes;
};
}
#endif