Panda3D
attribNodeRegistry.I
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file attribNodeRegistry.I
10  * @author drose
11  * @date 2007-07-07
12  */
13 
14 /**
15  *
16  */
17 INLINE AttribNodeRegistry *AttribNodeRegistry::
18 get_global_ptr() {
19  if (_global_ptr == nullptr) {
20  make_global_ptr();
21  }
22  return _global_ptr;
23 }
24 
25 /**
26  *
27  */
28 INLINE AttribNodeRegistry::Entry::
29 Entry(const NodePath &node) :
30  _type(node.node()->get_type()),
31  _name(node.get_name()),
32  _node(node)
33 {
34 }
35 
36 /**
37  *
38  */
39 INLINE AttribNodeRegistry::Entry::
40 Entry(TypeHandle type, const std::string &name) :
41  _type(type),
42  _name(name)
43 {
44 }
45 
46 /**
47  *
48  */
49 INLINE bool AttribNodeRegistry::Entry::
50 operator < (const Entry &other) const {
51  if (_type != other._type) {
52  return _type < other._type;
53  }
54  return _name < other._name;
55 }
This global object records NodePaths that are referenced by scene graph attribs, such as ClipPlaneAtt...
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:81
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
Definition: nodePath.h:161