Panda3D
|
This class maintains the set of all known LoaderFileTypes in the universe. More...
#include "loaderFileTypeRegistry.h"
Public Member Functions | |
int | get_num_types () const |
Returns the total number of types registered. | |
LoaderFileType * | get_type (int n) const |
Returns the nth type registered. | |
LoaderFileType * | get_type_from_extension (const string &extension) |
Determines the type of the file based on the indicated extension (without a leading dot). | |
MAKE_SEQ (get_types, get_num_types, get_type) | |
void | register_deferred_type (const string &extension, const string &library) |
Records a type associated with a particular extension to be loaded in the future. | |
void | register_type (LoaderFileType *type) |
Defines a new LoaderFileType in the universe. | |
void | write (ostream &out, int indent_level=0) const |
Writes a list of supported file types to the indicated output stream, one per line. | |
Static Public Member Functions | |
static LoaderFileTypeRegistry * | get_global_ptr () |
Returns a pointer to the global LoaderFileTypeRegistry object. |
This class maintains the set of all known LoaderFileTypes in the universe.
Definition at line 31 of file loaderFileTypeRegistry.h.
LoaderFileTypeRegistry * LoaderFileTypeRegistry::get_global_ptr | ( | ) | [static] |
Returns a pointer to the global LoaderFileTypeRegistry object.
Definition at line 254 of file loaderFileTypeRegistry.cxx.
int LoaderFileTypeRegistry::get_num_types | ( | ) | const |
Returns the total number of types registered.
Definition at line 131 of file loaderFileTypeRegistry.cxx.
LoaderFileType * LoaderFileTypeRegistry::get_type | ( | int | n | ) | const |
Returns the nth type registered.
Definition at line 141 of file loaderFileTypeRegistry.cxx.
LoaderFileType * LoaderFileTypeRegistry::get_type_from_extension | ( | const string & | extension | ) |
Determines the type of the file based on the indicated extension (without a leading dot).
Returns NULL if the extension matches no known file types.
Definition at line 154 of file loaderFileTypeRegistry.cxx.
void LoaderFileTypeRegistry::register_deferred_type | ( | const string & | extension, |
const string & | library | ||
) |
Records a type associated with a particular extension to be loaded in the future.
The named library will be dynamically loaded the first time files of this extension are loaded; presumably this library will call register_type() when it initializes, thus making the extension loadable.
Definition at line 87 of file loaderFileTypeRegistry.cxx.
void LoaderFileTypeRegistry::register_type | ( | LoaderFileType * | type | ) |
Defines a new LoaderFileType in the universe.
Definition at line 51 of file loaderFileTypeRegistry.cxx.
References LoaderFileType::get_additional_extensions().
void LoaderFileTypeRegistry::write | ( | ostream & | out, |
int | indent_level = 0 |
||
) | const |
Writes a list of supported file types to the indicated output stream, one per line.
Definition at line 204 of file loaderFileTypeRegistry.cxx.
References LoaderFileType::get_additional_extensions().