SOFA API  014b24ea
Open source framework for multi-physics simuation
sofa::simulation::SceneLoaderXML Class Reference

#include <SceneLoaderXML.h>

Inheritance diagram for sofa::simulation::SceneLoaderXML:

Static Public Attributes

static bool loadSucceed = true

Public Member Functions

bool canLoadFileExtension (const char *extension) override
 Pre-loading check. More...
bool canWriteFileExtension (const char *extension) override
 Pre-saving check. More...
virtual sofa::simulation::Node::SPtr doLoad (const std::string &filename, const std::vector< std::string > &sceneArgs) override
 load the file More...
void write (sofa::simulation::Node *node, const char *filename) override
 write the file More...
virtual std::string getFileTypeDesc () override
 get the file type description More...
void getExtensionList (ExtensionList *list) override
 get the list of file extensions More...
- Public Member Functions inherited from sofa::simulation::SceneLoader
virtual bool canLoadFileName (const char *filename)
 Pre-loading check. More...
virtual bool canWriteFileName (const char *filename)
 Pre-saving check. More...
sofa::simulation::Node::SPtr load (const std::string &filename, bool reload=false, const std::vector< std::string > &sceneArgs=std::vector< std::string >(0))
 load the file More...

Static Public Member Functions

static Node::SPtr processXML (xml::BaseElement *xml, const char *filename)
 generic function to process xml tree (after loading the xml structure) More...
static Node::SPtr loadFromMemory (const char *filename, const char *data, unsigned int size)
 load a scene from memory (typically : an xml into a string) More...
- Static Public Member Functions inherited from sofa::simulation::SceneLoader
static void addListener (Listener *l)
 adding a listener More...
static void removeListener (Listener *l)
 removing a listener More...

Additional Inherited Members

- Static Protected Attributes inherited from sofa::simulation::SceneLoader
static Listeners s_listeners
- Static Protected Member Functions inherited from sofa::simulation::SceneLoader
static void notifyLoadingSceneBefore ()
static void notifyReloadingSceneBefore ()
static void notifyLoadingSceneAfter (sofa::simulation::Node::SPtr node)
static void notifyReloadingSceneAfter (sofa::simulation::Node::SPtr node)

Attribute details

bool sofa::simulation::SceneLoaderXML::loadSucceed = true

Function details

bool sofa::simulation::SceneLoaderXML::canLoadFileExtension ( const char *  extension)

Pre-loading check.

Implements sofa::simulation::SceneLoader.

bool sofa::simulation::SceneLoaderXML::canWriteFileExtension ( const char *  extension)

Pre-saving check.

Reimplemented from sofa::simulation::SceneLoader.

sofa::simulation::Node::SPtr sofa::simulation::SceneLoaderXML::doLoad ( const std::string &  filename,
const std::vector< std::string > &  sceneArgs 

load the file

Implements sofa::simulation::SceneLoader.

void sofa::simulation::SceneLoaderXML::getExtensionList ( ExtensionList list)

get the list of file extensions

Implements sofa::simulation::SceneLoader.

std::string sofa::simulation::SceneLoaderXML::getFileTypeDesc ( )

get the file type description

Implements sofa::simulation::SceneLoader.

Node::SPtr sofa::simulation::SceneLoaderXML::loadFromMemory ( const char *  filename,
const char *  data,
unsigned int  size 

load a scene from memory (typically : an xml into a string)

Load from a string in memory.

Node::SPtr sofa::simulation::SceneLoaderXML::processXML ( xml::BaseElement xml,
const char *  filename 

generic function to process xml tree (after loading the xml structure)

Load a scene from a file.

void sofa::simulation::SceneLoaderXML::write ( sofa::simulation::Node node,
const char *  filename 

write the file

Reimplemented from sofa::simulation::SceneLoader.