00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef LOADERFILETYPE_H
00016 #define LOADERFILETYPE_H
00017
00018 #include "pandabase.h"
00019
00020 #include "typedObject.h"
00021 #include "filename.h"
00022 #include "pandaNode.h"
00023 #include "pointerTo.h"
00024 #include "dSearchPath.h"
00025
00026 class LoaderOptions;
00027 class BamCacheRecord;
00028
00029
00030
00031
00032
00033
00034
00035
00036 class EXPCL_PANDA_PGRAPH LoaderFileType : public TypedObject {
00037 protected:
00038 LoaderFileType();
00039
00040 public:
00041 virtual ~LoaderFileType();
00042
00043 PUBLISHED:
00044 virtual string get_name() const=0;
00045 virtual string get_extension() const=0;
00046 virtual string get_additional_extensions() const;
00047 virtual bool supports_compressed() const;
00048
00049 virtual bool get_allow_disk_cache(const LoaderOptions &options) const;
00050 virtual bool get_allow_ram_cache(const LoaderOptions &options) const;
00051
00052 public:
00053 virtual PT(PandaNode) load_file(const Filename &path, const LoaderOptions &options,
00054 BamCacheRecord *record) const;
00055
00056 protected:
00057 int _no_cache_flags;
00058
00059 public:
00060 static TypeHandle get_class_type() {
00061 return _type_handle;
00062 }
00063 static void init_type() {
00064 TypedObject::init_type();
00065 register_type(_type_handle, "LoaderFileType",
00066 TypedObject::get_class_type());
00067 }
00068 virtual TypeHandle get_type() const {
00069 return get_class_type();
00070 }
00071 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00072
00073 private:
00074 static TypeHandle _type_handle;
00075 };
00076
00077 #endif
00078