Go to the documentation of this file.
14 #ifndef PYTHONLOADERFILETYPE_H
15 #define PYTHONLOADERFILETYPE_H
33 PythonLoaderFileType();
34 PythonLoaderFileType(std::string extension, PyObject *entry_point);
35 ~PythonLoaderFileType();
37 bool init(PyObject *loader);
38 bool ensure_loaded()
const;
40 virtual std::string get_name()
const override;
41 virtual std::string get_extension()
const override;
54 std::string _extension;
55 std::string _additional_extensions;
56 PyObject *_entry_point =
nullptr;
57 PyObject *_load_func =
nullptr;
58 PyObject *_save_func =
nullptr;
59 bool _supports_compressed =
false;
67 static void init_type() {
68 LoaderFileType::init_type();
70 LoaderFileType::get_class_type());
73 return get_class_type();
75 virtual TypeHandle force_init_type()
override {
77 return get_class_type();
An instance of this class is written to the front of a Bam or Txo file to make the file a cached inst...
This is the base class for a family of scene-graph file types that the Loader supports.
virtual std::string get_additional_extensions() const
Returns a space-separated list of extension, in addition to the one returned by get_extension(),...
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(),...
Specifies parameters that may be passed to the loader.
TypeHandle is the identifier used to differentiate C++ class types.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
The default class template does not define any methods.
This class maintains the set of all known LoaderFileTypes in the universe.
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_compressed() const
Returns true if this file type can transparently load compressed files (with a .pz or ....
virtual bool supports_save() const
Returns true if the file type can be used to save files, and save_file() is supported.
A basic node of the scene graph or data graph.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
The name of a file, such as a texture file or an Egg file.