nodeownership.h
Go to the documentation of this file.
1 #ifndef NODE_OWNERSHIP_H_62B23520_7C8E_11DE_8A39_0800200C9A66_PM
2 #define NODE_OWNERSHIP_H_62B23520_7C8E_11DE_8A39_0800200C9A66_PM
3 
4 #if defined(_MSC_VER) || (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4
5 #pragma once
6 #endif
7 
8 
10 #include "ptr_vector.h"
11 #include <set>
12 
13 namespace YAML_PM
14 {
15  class Node;
16 
17  class NodeOwnership: private noncopyable
18  {
19  public:
20  explicit NodeOwnership(NodeOwnership *pOwner = 0);
22 
23  Node& Create() { return m_pOwner->_Create(); }
24  void MarkAsAliased(const Node& node) { m_pOwner->_MarkAsAliased(node); }
25  bool IsAliased(const Node& node) const { return m_pOwner->_IsAliased(node); }
26 
27  private:
28  Node& _Create();
29  void _MarkAsAliased(const Node& node);
30  bool _IsAliased(const Node& node) const;
31 
32  private:
34  std::set<const Node *> m_aliasedNodes;
36  };
37 }
38 
39 #endif // NODE_OWNERSHIP_H_62B23520_7C8E_11DE_8A39_0800200C9A66_PM
YAML_PM::NodeOwnership::IsAliased
bool IsAliased(const Node &node) const
Definition: nodeownership.h:25
YAML_PM::NodeOwnership
Definition: nodeownership.h:17
YAML_PM
Definition: aliasmanager.h:11
YAML_PM::NodeOwnership::Create
Node & Create()
Definition: nodeownership.h:23
YAML_PM::NodeOwnership::NodeOwnership
NodeOwnership(NodeOwnership *pOwner=0)
Definition: nodeownership.cpp:6
YAML_PM::NodeOwnership::m_nodes
ptr_vector< Node > m_nodes
Definition: nodeownership.h:33
YAML_PM::NodeOwnership::_IsAliased
bool _IsAliased(const Node &node) const
Definition: nodeownership.cpp:27
YAML_PM::NodeOwnership::m_aliasedNodes
std::set< const Node * > m_aliasedNodes
Definition: nodeownership.h:34
YAML_PM::NodeOwnership::MarkAsAliased
void MarkAsAliased(const Node &node)
Definition: nodeownership.h:24
ptr_vector.h
YAML_PM::NodeOwnership::_MarkAsAliased
void _MarkAsAliased(const Node &node)
Definition: nodeownership.cpp:22
YAML_PM::Node
Definition: node.h:33
noncopyable.h
YAML_PM::ptr_vector
Definition: ptr_vector.h:17
YAML_PM::NodeOwnership::m_pOwner
NodeOwnership * m_pOwner
Definition: nodeownership.h:35
YAML_PM::NodeOwnership::~NodeOwnership
~NodeOwnership()
Definition: nodeownership.cpp:12
YAML_PM::NodeOwnership::_Create
Node & _Create()
Definition: nodeownership.cpp:16
YAML_PM::noncopyable
Definition: noncopyable.h:13


mp2p_icp
Author(s):
autogenerated on Fri Dec 20 2024 03:45:59