Panda3D
displayRegionBase.h
1 // Filename: displayRegionBase.h
2 // Created by: drose (20Feb09)
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 DISPLAYREGIONBASE_H
16 #define DISPLAYREGIONBASE_H
17 
18 #include "pandabase.h"
19 
20 #include "typedReferenceCount.h"
21 
22 ////////////////////////////////////////////////////////////////////
23 // Class : DisplayRegionBase
24 // Description : An abstract base class for DisplayRegion, mainly so
25 // we can store DisplayRegion pointers in a Camera.
26 ////////////////////////////////////////////////////////////////////
27 class EXPCL_PANDA_GSGBASE DisplayRegionBase : public TypedReferenceCount {
28 protected:
29  INLINE DisplayRegionBase();
30 
31 public:
32  virtual ~DisplayRegionBase();
33 
34 PUBLISHED:
35  virtual void output(ostream &out) const=0;
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, "DisplayRegionBase",
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 INLINE ostream &operator << (ostream &out, const DisplayRegionBase &dr);
56 
57 #include "displayRegionBase.I"
58 
59 #endif
A base class for things which need to inherit from both TypedObject and from ReferenceCount.
An abstract base class for DisplayRegion, mainly so we can store DisplayRegion pointers in a Camera...
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85