Panda3D
 All Classes Functions Variables Enumerations
eggNamedObject.h
1 // Filename: eggNamedObject.h
2 // Created by: drose (16Jan99)
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 EGGNAMEDOBJECT_H
16 #define EGGNAMEDOBJECT_H
17 
18 #include "pandabase.h"
19 
20 #include "eggObject.h"
21 #include "namable.h"
22 #include "referenceCount.h"
23 
24 ////////////////////////////////////////////////////////////////////
25 // Class : EggNamedObject
26 // Description : This is a fairly low-level base class--any egg
27 // object that has a name.
28 ////////////////////////////////////////////////////////////////////
29 class EXPCL_PANDAEGG EggNamedObject : public EggObject, public Namable {
30 PUBLISHED:
31  INLINE EggNamedObject(const string &name = "");
32  INLINE EggNamedObject(const EggNamedObject &copy);
33  INLINE EggNamedObject &operator = (const EggNamedObject &copy);
34 
35  void output(ostream &out) const;
36 
37 public:
38  void write_header(ostream &out, int indent_level,
39  const char *egg_keyword) const;
40 
41 
42  static TypeHandle get_class_type() {
43  return _type_handle;
44  }
45  static void init_type() {
46  EggObject::init_type();
47  Namable::init_type();
48  register_type(_type_handle, "EggNamedObject",
49  EggObject::get_class_type(),
50  Namable::get_class_type());
51  }
52  virtual TypeHandle get_type() const {
53  return get_class_type();
54  }
55  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
56 
57 private:
58  static TypeHandle _type_handle;
59 };
60 
61 INLINE ostream &operator << (ostream &out, const EggNamedObject &n);
62 
63 #include "eggNamedObject.I"
64 
65 #endif
A base class for all things which can have a name.
Definition: namable.h:29
This is a fairly low-level base class–any egg object that has a name.
void output(ostream &out) const
Outputs the Namable.
Definition: namable.I:97
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85
The highest-level base class in the egg directory.
Definition: eggObject.h:31