00001 // Filename: loaderFileTypePandatool.h 00002 // Created by: drose (20Jun00) 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 LOADERFILETYPEPANDATOOL_H 00020 #define LOADERFILETYPEPANDATOOL_H 00021 00022 #include "pandatoolbase.h" 00023 00024 #include "loaderFileType.h" 00025 00026 class SomethingToEggConverter; 00027 00028 //////////////////////////////////////////////////////////////////// 00029 // Class : LoaderFileTypePandatool 00030 // Description : This defines the Loader interface to files whose 00031 // converters are defined within the Pandatool package 00032 // and inherit from SomethingToEggConverter, like 00033 // FltToEggConverter and LwoToEggConverter. 00034 //////////////////////////////////////////////////////////////////// 00035 class EXPCL_PTLOADER LoaderFileTypePandatool : public LoaderFileType { 00036 public: 00037 LoaderFileTypePandatool(SomethingToEggConverter *converter); 00038 virtual ~LoaderFileTypePandatool(); 00039 00040 virtual string get_name() const; 00041 virtual string get_extension() const; 00042 00043 virtual void resolve_filename(Filename &path) const; 00044 virtual PT(PandaNode) load_file(const Filename &path, bool report_errors) const; 00045 00046 private: 00047 SomethingToEggConverter *_converter; 00048 00049 public: 00050 static TypeHandle get_class_type() { 00051 return _type_handle; 00052 } 00053 static void init_type() { 00054 LoaderFileType::init_type(); 00055 register_type(_type_handle, "LoaderFileTypePandatool", 00056 LoaderFileType::get_class_type()); 00057 } 00058 virtual TypeHandle get_type() const { 00059 return get_class_type(); 00060 } 00061 virtual TypeHandle force_init_type() {init_type(); return get_class_type();} 00062 00063 private: 00064 static TypeHandle _type_handle; 00065 }; 00066 00067 #endif 00068