Panda3D
Public Member Functions | Static Public Member Functions
LoaderFileTypeRegistry Class Reference

This class maintains the set of all known LoaderFileTypes in the universe. More...

#include "loaderFileTypeRegistry.h"

List of all members.

Public Member Functions

int get_num_types () const
 Returns the total number of types registered.
LoaderFileTypeget_type (int n) const
 Returns the nth type registered.
LoaderFileTypeget_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 LoaderFileTypeRegistryget_global_ptr ()
 Returns a pointer to the global LoaderFileTypeRegistry object.

Detailed Description

This class maintains the set of all known LoaderFileTypes in the universe.

Definition at line 31 of file loaderFileTypeRegistry.h.


Member Function Documentation

Returns a pointer to the global LoaderFileTypeRegistry object.

Definition at line 254 of file loaderFileTypeRegistry.cxx.

Returns the total number of types registered.

Definition at line 131 of file loaderFileTypeRegistry.cxx.

Returns the nth type registered.

Definition at line 141 of file loaderFileTypeRegistry.cxx.

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.

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().


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations