Panda3D
 All Classes Functions Variables Enumerations
eggUserData.h
1 // Filename: eggUserData.h
2 // Created by: drose (03Jun03)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef EGGUSERDATA_H
16 #define EGGUSERDATA_H
17 
18 #include "pandabase.h"
19 
20 #include "typedReferenceCount.h"
21 
22 ////////////////////////////////////////////////////////////////////
23 // Class : EggUserData
24 // Description : This is a base class for a user-defined data type to
25 // extend egg structures in processing code. The user
26 // of the egg library may derive from EggUserData to
27 // associate any arbitrary data with various egg
28 // objects.
29 //
30 // However, this data will not be written out to the
31 // disk when the egg file is written; it is an in-memory
32 // object only.
33 ////////////////////////////////////////////////////////////////////
34 class EXPCL_PANDAEGG EggUserData : public TypedReferenceCount {
35 PUBLISHED:
36  INLINE EggUserData();
37  INLINE EggUserData(const EggUserData &copy);
38  INLINE EggUserData &operator = (const EggUserData &copy);
39 
40  virtual ~EggUserData();
41 
42 public:
43  static TypeHandle get_class_type() {
44  return _type_handle;
45  }
46  static void init_type() {
47  TypedReferenceCount::init_type();
48  register_type(_type_handle, "EggUserData",
49  TypedReferenceCount::get_class_type());
50  }
51  virtual TypeHandle get_type() const {
52  return get_class_type();
53  }
54  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
55 
56 private:
57  static TypeHandle _type_handle;
58 };
59 
60 #include "eggUserData.I"
61 
62 #endif
63 
A base class for things which need to inherit from both TypedObject and from ReferenceCount.
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85
This is a base class for a user-defined data type to extend egg structures in processing code...
Definition: eggUserData.h:34