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
void _MarkAsAliased(const Node &node)
bool IsAliased(const Node &node) const
Definition: nodeownership.h:25
NodeOwnership * m_pOwner
Definition: nodeownership.h:35
bool _IsAliased(const Node &node) const
NodeOwnership(NodeOwnership *pOwner=0)
void MarkAsAliased(const Node &node)
Definition: nodeownership.h:24
ptr_vector< Node > m_nodes
Definition: nodeownership.h:33
std::set< const Node * > m_aliasedNodes
Definition: nodeownership.h:34


libpointmatcher
Author(s):
autogenerated on Sat May 27 2023 02:38:02