21 INLINE Loader::Results::
30 INLINE Loader::Results::
41 INLINE
void Loader::Results::
51 INLINE Loader::Results::
82 nassertr(n >= 0 && n < (
int)_files.size(), _files[0]._path);
83 return _files[n]._path;
94 nassertr(n >= 0 && n < (
int)_files.size(), NULL);
95 return _files[n]._type;
108 _files.push_back(cf);
120 _task_manager = task_manager;
131 return _task_manager;
143 _task_chain = task_chain;
164 PT(
AsyncTaskChain) chain = _task_manager->find_task_chain(_task_chain);
166 chain->stop_threads();
178 return _task_manager->remove(task);
193 if (!_file_types_loaded) {
196 return load_file(filename, options);
218 _task_manager->add(request);
230 if (!_file_types_loaded) {
233 return save_file(filename, options, node);
257 _task_manager->add(request);
268 if (_global_ptr == (
Loader *)NULL) {
A basic node of the scene graph or data graph.
A class to manage a loose queue of isolated tasks, which can be performed either synchronously (in th...
Specifies parameters that may be passed to the loader.
bool remove(AsyncTask *task)
Removes a pending asynchronous load request.
A convenient class for loading models from disk, in bam or egg format (or any of a number of other fo...
void set_task_manager(AsyncTaskManager *task_manager)
Specifies the task manager that is used for asynchronous loads.
static Loader * get_global_ptr()
Returns a pointer to the global Loader.
LoaderFileType * get_file_type(int n) const
Returns the file type of the nth file on the result list.
const Filename & get_file(int n) const
Returns the nth file on the result list.
The name of a file, such as a texture file or an Egg file.
const string & get_task_chain() const
Returns the task chain that is used for asynchronous loads.
void load_async(AsyncTask *request)
Begins an asynchronous load request.
The AsyncTaskChain is a subset of the AsyncTaskManager.
void save_async(AsyncTask *request)
Begins an asynchronous save request.
void clear()
Removes all the files from the list.
void set_task_chain(const string &chain_name)
Specifies the AsyncTaskChain on which this task will be running.
void add_file(const Filename &file, LoaderFileType *type)
Adds a new file to the result list.
AsyncTaskManager * get_task_manager() const
Returns the task manager that is used for asynchronous loads.
This class represents a concrete task performed by an AsyncManager.
void stop_threads()
Stop any threads used for asynchronous loads.
This is the base class for a family of scene-graph file types that the Loader supports.
bool save_sync(const Filename &filename, const LoaderOptions &options, PandaNode *node) const
Saves the file immediately, waiting for it to complete.
void set_task_chain(const string &task_chain)
Specifies the task chain that is used for asynchronous loads.
int get_num_files() const
Returns the number of files on the result list.