#include <SceneLoaderFactory.h>
Main class used to register scene file loaders. More...
Main class used to register scene file loaders.
It uses the Factory design pattern, where each class is registered in a map, and dynamically retrieved given the type name. Abstract interface of a scene loader
Classes | |
struct | Listener |
to be able to inform when a scene is loaded More... | |
Static Protected Attributes | |
static Listeners | s_listeners |
Public Member Functions | |
virtual | ~SceneLoader ()=default |
virtual bool | canLoadFileName (const char *filename) |
Pre-loading check. More... | |
virtual bool | canWriteFileName (const char *filename) |
Pre-saving check. More... | |
virtual bool | canLoadFileExtension (const char *extension)=0 |
virtual bool | canWriteFileExtension (const char *) |
sofa::simulation::NodeSPtr | load (const std::string &filename, bool reload=false, const std::vector< std::string > &sceneArgs=std::vector< std::string >(0)) |
load the file More... | |
virtual sofa::simulation::NodeSPtr | doLoad (const std::string &filename, const std::vector< std::string > &sceneArgs)=0 |
virtual void | write (sofa::simulation::Node *, const char *) |
write scene graph in the file More... | |
virtual std::string | getFileTypeDesc ()=0 |
get the file type description More... | |
virtual void | getExtensionList (ExtensionList *list)=0 |
get the list of file extensions More... | |
virtual bool | syntaxForAddingRequiredPlugin (const std::string &pluginName, const std::vector< std::string > &listComponents, std::ostream &ss, sofa::simulation::Node *nodeWhereAdded) |
Static Public Member Functions | |
static void | addListener (Listener *l) |
adding a listener More... | |
static void | removeListener (Listener *l) |
removing a listener More... | |
Static Protected Member Functions | |
static void | notifyLoadingSceneBefore (SceneLoader *sceneLoader) |
static void | notifyReloadingSceneBefore (SceneLoader *sceneLoader) |
static void | notifyLoadingSceneAfter (sofa::simulation::NodeSPtr node, SceneLoader *sceneLoader) |
static void | notifyReloadingSceneAfter (sofa::simulation::NodeSPtr node, SceneLoader *sceneLoader) |
|
staticprotected |
|
virtualdefault |
|
static |
adding a listener
|
pure virtual |
Implemented in sofa::simulation::SceneLoaderXML, and sofa::simulation::SceneLoaderPHP.
Pre-loading check.
Reimplemented in sofa::simulation::SceneLoaderXML.
Pre-saving check.
|
pure virtual |
Implemented in sofa::simulation::SceneLoaderXML, and sofa::simulation::SceneLoaderPHP.
|
pure virtual |
get the list of file extensions
Implemented in sofa::simulation::SceneLoaderXML, and sofa::simulation::SceneLoaderPHP.
|
pure virtual |
get the file type description
Implemented in sofa::simulation::SceneLoaderXML, and sofa::simulation::SceneLoaderPHP.
sofa::simulation::NodeSPtr sofa::simulation::SceneLoader::load | ( | const std::string & | filename, |
bool | reload = false , |
||
const std::vector< std::string > & | sceneArgs = std::vector<std::string>(0) |
||
) |
load the file
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
static |
removing a listener
|
virtual |
Write into a ostream the syntax to add a RequiredPlugin component in the scene file. The syntax depends on the file format, hence the SceneLoader. The function returns true if the derived SceneLoader implements this function, false otherwise.
Reimplemented in sofa::simulation::SceneLoaderXML.
|
inlinevirtual |
write scene graph in the file
Reimplemented in sofa::simulation::SceneLoaderXML.