00001 // Filename: eggNamedObject.h 00002 // Created by: drose (16Jan99) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved 00008 // 00009 // All use of this software is subject to the terms of the Panda 3d 00010 // Software license. You should have received a copy of this license 00011 // along with this source code; you will also find a current copy of 00012 // the license at http://www.panda3d.org/license.txt . 00013 // 00014 // To contact the maintainers of this program write to 00015 // panda3d@yahoogroups.com . 00016 // 00017 //////////////////////////////////////////////////////////////////// 00018 00019 #ifndef EGGNAMEDOBJECT_H 00020 #define EGGNAMEDOBJECT_H 00021 00022 #include "pandabase.h" 00023 00024 #include "eggObject.h" 00025 #include "namable.h" 00026 #include "referenceCount.h" 00027 00028 //////////////////////////////////////////////////////////////////// 00029 // Class : EggNamedObject 00030 // Description : This is a fairly high-level base class--any egg 00031 // object that has a name. 00032 //////////////////////////////////////////////////////////////////// 00033 class EXPCL_PANDAEGG EggNamedObject : public EggObject, public Namable { 00034 public: 00035 INLINE EggNamedObject(const string &name = ""); 00036 INLINE EggNamedObject(const EggNamedObject ©); 00037 INLINE EggNamedObject &operator = (const EggNamedObject ©); 00038 00039 void write_header(ostream &out, int indent_level, 00040 const char *egg_keyword) const; 00041 00042 00043 static TypeHandle get_class_type() { 00044 return _type_handle; 00045 } 00046 static void init_type() { 00047 EggObject::init_type(); 00048 Namable::init_type(); 00049 register_type(_type_handle, "EggNamedObject", 00050 EggObject::get_class_type(), 00051 Namable::get_class_type()); 00052 } 00053 virtual TypeHandle get_type() const { 00054 return get_class_type(); 00055 } 00056 virtual TypeHandle force_init_type() {init_type(); return get_class_type();} 00057 00058 private: 00059 static TypeHandle _type_handle; 00060 }; 00061 00062 #include "eggNamedObject.I" 00063 00064 #endif