00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef MODELLOADREQUEST
00016 #define MODELLOADREQUEST
00017
00018 #include "pandabase.h"
00019
00020 #include "asyncTask.h"
00021 #include "filename.h"
00022 #include "loaderOptions.h"
00023 #include "pandaNode.h"
00024 #include "pointerTo.h"
00025 #include "loader.h"
00026
00027
00028
00029
00030
00031
00032
00033
00034 class EXPCL_PANDA_PGRAPH ModelLoadRequest : public AsyncTask {
00035 public:
00036 ALLOC_DELETED_CHAIN(ModelLoadRequest);
00037
00038 PUBLISHED:
00039 ModelLoadRequest(const string &name,
00040 const Filename &filename,
00041 const LoaderOptions &options,
00042 Loader *loader);
00043
00044 INLINE const Filename &get_filename() const;
00045 INLINE const LoaderOptions &get_options() const;
00046 INLINE Loader *get_loader() const;
00047
00048 INLINE bool is_ready() const;
00049 INLINE PandaNode *get_model() const;
00050
00051 protected:
00052 virtual DoneStatus do_task();
00053
00054 private:
00055 Filename _filename;
00056 LoaderOptions _options;
00057 PT(Loader) _loader;
00058 bool _is_ready;
00059 PT(PandaNode) _model;
00060
00061 public:
00062 static TypeHandle get_class_type() {
00063 return _type_handle;
00064 }
00065 static void init_type() {
00066 AsyncTask::init_type();
00067 register_type(_type_handle, "ModelLoadRequest",
00068 AsyncTask::get_class_type());
00069 }
00070 virtual TypeHandle get_type() const {
00071 return get_class_type();
00072 }
00073 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00074
00075 private:
00076 static TypeHandle _type_handle;
00077 };
00078
00079 #include "modelLoadRequest.I"
00080
00081 #endif