00001 // Filename: factoryParam.h 00002 // Created by: drose (08May00) 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 FACTORYPARAM_H 00020 #define FACTORYPARAM_H 00021 00022 #include <pandabase.h> 00023 00024 #include "typedReferenceCount.h" 00025 00026 #include "pvector.h" 00027 00028 //////////////////////////////////////////////////////////////////// 00029 // Class : FactoryParam 00030 // Description : The base class of any number of specific pieces of 00031 // parameter information that might be passed to a 00032 // Factory's CreateFunc to control what kind of instance 00033 // is created. This class is empty and contains no 00034 // data, but different kinds of factories may expect 00035 // parameters of various types that derive from 00036 // FactoryParam (and do contain data). 00037 //////////////////////////////////////////////////////////////////// 00038 class EXPCL_PANDA FactoryParam : public TypedReferenceCount { 00039 public: 00040 INLINE FactoryParam(); 00041 INLINE FactoryParam(const FactoryParam &other); 00042 INLINE void operator = (const FactoryParam &other); 00043 INLINE ~FactoryParam(); 00044 00045 public: 00046 virtual TypeHandle get_type() const { 00047 return get_class_type(); 00048 } 00049 virtual TypeHandle force_init_type() {init_type(); return get_class_type();} 00050 static TypeHandle get_class_type() { 00051 return _type_handle; 00052 } 00053 static void init_type() { 00054 TypedReferenceCount::init_type(); 00055 register_type(_type_handle, "FactoryParam", 00056 TypedReferenceCount::get_class_type()); 00057 } 00058 00059 private: 00060 static TypeHandle _type_handle; 00061 }; 00062 00063 #include "factoryParam.I" 00064 00065 #endif 00066