Panda3D
eggUserData.h
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 eggUserData.h
10  * @author drose
11  * @date 2003-06-03
12  */
13 
14 #ifndef EGGUSERDATA_H
15 #define EGGUSERDATA_H
16 
17 #include "pandabase.h"
18 
19 #include "typedReferenceCount.h"
20 
21 /**
22  * This is a base class for a user-defined data type to extend egg structures
23  * in processing code. The user of the egg library may derive from
24  * EggUserData to associate any arbitrary data with various egg objects.
25  *
26  * However, this data will not be written out to the disk when the egg file is
27  * written; it is an in-memory object only.
28  */
29 class EXPCL_PANDA_EGG EggUserData : public TypedReferenceCount {
30 PUBLISHED:
31  INLINE EggUserData();
32  INLINE EggUserData(const EggUserData &copy);
33  INLINE EggUserData &operator = (const EggUserData &copy);
34 
35  virtual ~EggUserData();
36 
37 public:
38  static TypeHandle get_class_type() {
39  return _type_handle;
40  }
41  static void init_type() {
42  TypedReferenceCount::init_type();
43  register_type(_type_handle, "EggUserData",
44  TypedReferenceCount::get_class_type());
45  }
46  virtual TypeHandle get_type() const {
47  return get_class_type();
48  }
49  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
50 
51 private:
52  static TypeHandle _type_handle;
53 };
54 
55 #include "eggUserData.I"
56 
57 #endif
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
Definition: register_type.I:22
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A base class for things which need to inherit from both TypedObject and from ReferenceCount.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:81
This is a base class for a user-defined data type to extend egg structures in processing code.
Definition: eggUserData.h:29