This class maintains the set of all known LoaderFileTypes in the universe. More...
#include "loaderFileTypeRegistry.h"
Public Member Functions | |
int | get_num_types () const |
LoaderFileType * | get_type (int n) const |
LoaderFileType * | get_type_from_extension (const std::string &extension) |
Determines the type of the file based on the indicated extension (without a leading dot). More... | |
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. More... | |
void | register_type (LoaderFileType *type) |
Defines a new LoaderFileType in the universe. More... | |
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. More... | |
Static Public Member Functions | |
static LoaderFileTypeRegistry * | get_global_ptr () |
Returns a pointer to the global LoaderFileTypeRegistry object. More... | |
Public Attributes | |
get_num_types | |
Returns the total number of types registered. More... | |
get_type | |
Returns the nth type registered. More... | |
This class maintains the set of all known LoaderFileTypes in the universe.
Definition at line 28 of file loaderFileTypeRegistry.h.
|
static |
Returns a pointer to the global LoaderFileTypeRegistry object.
Definition at line 235 of file loaderFileTypeRegistry.cxx.
Referenced by init_libassimp(), init_libegg2pg(), init_libmayaloader(), init_libpgraph(), init_libptloader(), and init_libspeedtree().
LoaderFileType * LoaderFileTypeRegistry::get_type_from_extension | ( | const std::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 138 of file loaderFileTypeRegistry.cxx.
References downcase().
void LoaderFileTypeRegistry::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.
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 78 of file loaderFileTypeRegistry.cxx.
References downcase().
Referenced by init_libptloader().
void LoaderFileTypeRegistry::register_type | ( | LoaderFileType * | type | ) |
Defines a new LoaderFileType in the universe.
Definition at line 46 of file loaderFileTypeRegistry.cxx.
References extract_words(), and LoaderFileType::get_additional_extensions().
Referenced by init_libassimp(), init_libegg2pg(), init_libmayaloader(), init_libpgraph(), init_libptloader(), and init_libspeedtree().
void LoaderFileTypeRegistry::write | ( | std::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 188 of file loaderFileTypeRegistry.cxx.
References extract_words(), LoaderFileType::get_additional_extensions(), and indent().
int LoaderFileTypeRegistry::get_num_types |
Returns the total number of types registered.
Definition at line 41 of file loaderFileTypeRegistry.h.
LoaderFileType * LoaderFileTypeRegistry::get_type |
Returns the nth type registered.
Definition at line 41 of file loaderFileTypeRegistry.h.