14#ifndef LOADERFILETYPEREGISTRY_H
15#define LOADERFILETYPEREGISTRY_H
28class EXPCL_PANDA_PGRAPH LoaderFileTypeRegistry {
30 LoaderFileTypeRegistry();
33 ~LoaderFileTypeRegistry();
52 void write(std::ostream &out,
int indent_level = 0)
const;
56 EXTENSION(PyObject *__reduce__()
const);
59 void record_extension(
const std::string &extension,
LoaderFileType *type);
62 typedef pvector<LoaderFileType *> Types;
65 typedef pmap<std::string, LoaderFileType *> Extensions;
66 Extensions _extensions;
68 typedef pmap<std::string, std::string> DeferredTypes;
69 DeferredTypes _deferred_types;
71 static LoaderFileTypeRegistry *_global_ptr;
The name of a file, such as a texture file or an Egg file.
get_num_types
Returns the total number of types registered.
get_type
Returns the nth type registered.
void write(std::ostream &out, int indent_level=0) const
Writes a list of supported file types to the indicated output stream, one per line.
static LoaderFileTypeRegistry * get_global_ptr()
Returns a pointer to the global LoaderFileTypeRegistry object.
void unregister_type(LoaderFileType *type)
Removes a type previously registered using register_type.
LoaderFileType * get_type_from_extension(const std::string &extension)
Determines the type of the file based on the indicated extension (without a leading dot).
void register_deferred_type(const std::string &extension, const std::string &library)
Records a type associated with a particular extension to be loaded in the future.
This is the base class for a family of scene-graph file types that the Loader supports.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...