Reads and writes URDF and GraspIt! files to disk. More...
#include <FileIO.h>
Public Types | |
typedef baselib_binding::shared_ptr < ConversionResultT >::type | ConversionResultPtr |
typedef ConversionResult < MeshFormat > | ConversionResultT |
Public Member Functions | |
FileIO (const std::string &_outputDir) | |
bool | initOutputDir (const std::string &robotName) const |
bool | write (const ConversionResultPtr &data) const |
virtual | ~FileIO () |
Protected Member Functions | |
const std::string & | getOutputDirectory () const |
virtual bool | initOutputDirImpl (const std::string &robotName) const |
virtual bool | writeImpl (const ConversionResultPtr &data) const |
bool | writeMeshFiles (const std::map< std::string, MeshFormat > &meshes, const std::string &MESH_OUTPUT_EXTENSION, const std::string &MESH_OUTPUT_DIRECTORY_NAME) const |
Private Attributes | |
std::string | outputDir |
Reads and writes URDF and GraspIt! files to disk.
Parameter MeshFormat: Datatype to use for the meshes (e.g. a string for XML).
typedef baselib_binding::shared_ptr<ConversionResultT>::type urdf2inventor::FileIO< MeshFormat >::ConversionResultPtr |
typedef ConversionResult<MeshFormat> urdf2inventor::FileIO< MeshFormat >::ConversionResultT |
urdf2inventor::FileIO< MeshFormat >::FileIO | ( | const std::string & | _outputDir | ) | [inline, explicit] |
virtual urdf2inventor::FileIO< MeshFormat >::~FileIO | ( | ) | [inline, virtual] |
const std::string& urdf2inventor::FileIO< MeshFormat >::getOutputDirectory | ( | ) | const [inline, protected] |
bool urdf2inventor::FileIO< MeshFormat >::initOutputDir | ( | const std::string & | robotName | ) | const |
Initializes the output directory and does implementation-specific initialization depending on the robot name robotName. This method is called from write(), so it should only be used if write() is not called as well.
Definition at line 25 of file FileIO.hpp.
virtual bool urdf2inventor::FileIO< MeshFormat >::initOutputDirImpl | ( | const std::string & | robotName | ) | const [inline, protected, virtual] |
Called from initOutputDir(), can be used by subclassees Will be called after creating the directory outputDir.
bool urdf2inventor::FileIO< MeshFormat >::write | ( | const ConversionResultPtr & | data | ) | const |
Initializes the directory, then writes the meshes.
Definition at line 74 of file FileIO.hpp.
virtual bool urdf2inventor::FileIO< MeshFormat >::writeImpl | ( | const ConversionResultPtr & | data | ) | const [inline, protected, virtual] |
Called from write(ConversionResultPtr&), after initOutputDir() has been called and the meshes (in base class of data) has been written with writeMeshFiles(). Can be used by subclasses to write other things belonging to the result.
bool urdf2inventor::FileIO< MeshFormat >::writeMeshFiles | ( | const std::map< std::string, MeshFormat > & | meshes, |
const std::string & | MESH_OUTPUT_EXTENSION, | ||
const std::string & | MESH_OUTPUT_DIRECTORY_NAME | ||
) | const [protected] |
Definition at line 32 of file FileIO.hpp.
std::string urdf2inventor::FileIO< MeshFormat >::outputDir [private] |