Panda3D
 All Classes Functions Variables Enumerations
attribNodeRegistry.I
00001 // Filename: attribNodeRegistry.I
00002 // Created by:  drose (07Jul07)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 
00016 ////////////////////////////////////////////////////////////////////
00017 //     Function: AttribNodeRegistry::get_global_ptr
00018 //       Access: Published, Static
00019 //  Description: 
00020 ////////////////////////////////////////////////////////////////////
00021 INLINE AttribNodeRegistry *AttribNodeRegistry::
00022 get_global_ptr() {
00023   if (_global_ptr == (AttribNodeRegistry *)NULL) {
00024     make_global_ptr();
00025   }
00026   return _global_ptr;
00027 }
00028 
00029 ////////////////////////////////////////////////////////////////////
00030 //     Function: AttribNodeRegistry::Entry::Constructor
00031 //       Access: Public
00032 //  Description: 
00033 ////////////////////////////////////////////////////////////////////
00034 INLINE AttribNodeRegistry::Entry::
00035 Entry(const NodePath &node) :
00036   _type(node.node()->get_type()),
00037   _name(node.get_name()),
00038   _node(node)
00039 {
00040 }
00041 
00042 ////////////////////////////////////////////////////////////////////
00043 //     Function: AttribNodeRegistry::Entry::Constructor
00044 //       Access: Public
00045 //  Description: 
00046 ////////////////////////////////////////////////////////////////////
00047 INLINE AttribNodeRegistry::Entry::
00048 Entry(TypeHandle type, const string &name) :
00049   _type(type),
00050   _name(name)
00051 {
00052 }
00053 
00054 ////////////////////////////////////////////////////////////////////
00055 //     Function: AttribNodeRegistry::Entry::operator <
00056 //       Access: Public
00057 //  Description: 
00058 ////////////////////////////////////////////////////////////////////
00059 INLINE bool AttribNodeRegistry::Entry::
00060 operator < (const Entry &other) const {
00061   if (_type != other._type) {
00062     return _type < other._type;
00063   }
00064   return _name < other._name;
00065 }
 All Classes Functions Variables Enumerations