Panda3D
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
LoaderFileType Class Referenceabstract

This is the base class for a family of scene-graph file types that the Loader supports. More...

#include "loaderFileType.h"

Inheritance diagram for LoaderFileType:
TypedObject MemoryBase LoaderFileTypeAssimp LoaderFileTypeBam LoaderFileTypeEgg LoaderFileTypePandatool LoaderFileTypeSrt LoaderFileTypeStf

Public Member Functions

virtual TypeHandle force_init_type ()
 
virtual std::string get_additional_extensions () const
 Returns a space-separated list of extension, in addition to the one returned by get_extension(), that are recognized by this loader.
 
virtual bool get_allow_disk_cache (const LoaderOptions &options) const
 Returns true if the loader flags allow retrieving the model from the on- disk bam cache (if it is enabled), false otherwise.
 
virtual bool get_allow_ram_cache (const LoaderOptions &options) const
 Returns true if the loader flags allow retrieving the model from the in- memory ModelPool cache, false otherwise.
 
virtual std::string get_extension () const =0
 
virtual std::string get_name () const =0
 
virtual TypeHandle get_type () const
 
virtual PT (PandaNode) load_file(const Filename &path
 
virtual bool save_file (const Filename &path, const LoaderOptions &options, PandaNode *node) const
 
virtual bool supports_compressed () const
 Returns true if this file type can transparently load compressed files (with a .pz or .gz extension), false otherwise.
 
virtual bool supports_load () const
 Returns true if the file type can be used to load files, and load_file() is supported.
 
virtual bool supports_save () const
 Returns true if the file type can be used to save files, and save_file() is supported.
 
- Public Member Functions inherited from TypedObject
 TypedObject (const TypedObject &copy)=default
 
TypedObjectas_typed_object ()
 Returns the object, upcast (if necessary) to a TypedObject pointer.
 
const TypedObjectas_typed_object () const
 Returns the object, upcast (if necessary) to a TypedObject pointer.
 
int get_best_parent_from_Set (const std::set< int > &) const
 
int get_type_index () const
 Returns the internal index number associated with this object's TypeHandle, a unique number for each different type.
 
bool is_exact_type (TypeHandle handle) const
 Returns true if the current object is the indicated type exactly.
 
bool is_of_type (TypeHandle handle) const
 Returns true if the current object is or derives from the indicated type.
 
TypedObjectoperator= (const TypedObject &copy)=default
 
- Public Member Functions inherited from MemoryBase
void operator delete (void *, void *)
 
void operator delete (void *ptr)
 
void operator delete[] (void *, void *)
 
void operator delete[] (void *ptr)
 
void * operator new (size_t size)
 
void * operator new (size_t size, void *ptr)
 
void * operator new[] (size_t size)
 
void * operator new[] (size_t size, void *ptr)
 

Static Public Member Functions

static TypeHandle get_class_type ()
 
static void init_type ()
 
- Static Public Member Functions inherited from TypedObject
static TypeHandle get_class_type ()
 
static void init_type ()
 This function is declared non-inline to work around a compiler bug in g++ 2.96.
 

Public Attributes

virtual const LoaderOptions BamCacheRecord *record const
 
virtual const LoaderOptionsoptions
 
- Public Attributes inherited from TypedObject
 get_type
 

Detailed Description

This is the base class for a family of scene-graph file types that the Loader supports.

Each kind of loader that's available should define a corresponding LoaderFileType object and register itself.

Definition at line 33 of file loaderFileType.h.

Constructor & Destructor Documentation

◆ ~LoaderFileType()

LoaderFileType::~LoaderFileType ( )
virtual

Definition at line 36 of file loaderFileType.cxx.

Member Function Documentation

◆ force_init_type()

virtual TypeHandle LoaderFileType::force_init_type ( )
inlinevirtual

Implements TypedObject.

Definition at line 73 of file loaderFileType.h.

◆ get_additional_extensions()

std::string LoaderFileType::get_additional_extensions ( ) const
virtual

Returns a space-separated list of extension, in addition to the one returned by get_extension(), that are recognized by this loader.

Reimplemented in LoaderFileTypeAssimp, and LoaderFileTypePandatool.

Definition at line 44 of file loaderFileType.cxx.

Referenced by LoaderFileTypeRegistry::register_type(), LoaderFileTypeRegistry::unregister_type(), and LoaderFileTypeRegistry::write().

◆ get_allow_disk_cache()

bool LoaderFileType::get_allow_disk_cache ( const LoaderOptions & options) const
virtual

Returns true if the loader flags allow retrieving the model from the on- disk bam cache (if it is enabled), false otherwise.

Definition at line 62 of file loaderFileType.cxx.

◆ get_allow_ram_cache()

bool LoaderFileType::get_allow_ram_cache ( const LoaderOptions & options) const
virtual

Returns true if the loader flags allow retrieving the model from the in- memory ModelPool cache, false otherwise.

Definition at line 71 of file loaderFileType.cxx.

◆ get_class_type()

static TypeHandle LoaderFileType::get_class_type ( )
inlinestatic

Definition at line 62 of file loaderFileType.h.

◆ get_type()

virtual TypeHandle LoaderFileType::get_type ( ) const
inlinevirtual

Implements TypedObject.

Definition at line 70 of file loaderFileType.h.

◆ init_type()

static void LoaderFileType::init_type ( )
inlinestatic

Definition at line 65 of file loaderFileType.h.

◆ supports_compressed()

bool LoaderFileType::supports_compressed ( ) const
virtual

Returns true if this file type can transparently load compressed files (with a .pz or .gz extension), false otherwise.

Reimplemented in LoaderFileTypeEgg, LoaderFileTypeBam, LoaderFileTypeSrt, LoaderFileTypeStf, LoaderFileTypeAssimp, and LoaderFileTypePandatool.

Definition at line 53 of file loaderFileType.cxx.

◆ supports_load()

bool LoaderFileType::supports_load ( ) const
virtual

Returns true if the file type can be used to load files, and load_file() is supported.

Returns false if load_file() is unimplemented and will always fail.

Reimplemented in LoaderFileTypeEgg, LoaderFileTypeBam, and LoaderFileTypePandatool.

Definition at line 81 of file loaderFileType.cxx.

◆ supports_save()

bool LoaderFileType::supports_save ( ) const
virtual

Returns true if the file type can be used to save files, and save_file() is supported.

Returns false if save_file() is unimplemented and will always fail.

Reimplemented in LoaderFileTypeEgg, LoaderFileTypeBam, and LoaderFileTypePandatool.

Definition at line 91 of file loaderFileType.cxx.

Member Data Documentation

◆ const

virtual const LoaderOptions BamCacheRecord* record LoaderFileType::const

Definition at line 54 of file loaderFileType.h.

◆ options

virtual const LoaderOptions& LoaderFileType::options

Definition at line 53 of file loaderFileType.h.


The documentation for this class was generated from the following files: