Public Types | Public Member Functions | Protected Member Functions | Private Attributes
urdf2inventor::FileIO< MeshFormat > Class Template Reference

Reads and writes URDF and GraspIt! files to disk. More...

#include <FileIO.h>

List of all members.

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

Detailed Description

template<typename MeshFormat = std::string>
class urdf2inventor::FileIO< MeshFormat >

Reads and writes URDF and GraspIt! files to disk.

Parameter MeshFormat: Datatype to use for the meshes (e.g. a string for XML).

Author:
Jennifer Buehler
Date:
March 2016

Definition at line 61 of file FileIO.h.


Member Typedef Documentation

template<typename MeshFormat = std::string>
typedef baselib_binding::shared_ptr<ConversionResultT>::type urdf2inventor::FileIO< MeshFormat >::ConversionResultPtr

Definition at line 65 of file FileIO.h.

template<typename MeshFormat = std::string>
typedef ConversionResult<MeshFormat> urdf2inventor::FileIO< MeshFormat >::ConversionResultT

Definition at line 64 of file FileIO.h.


Constructor & Destructor Documentation

template<typename MeshFormat = std::string>
urdf2inventor::FileIO< MeshFormat >::FileIO ( const std::string &  _outputDir) [inline, explicit]
Parameters:
_outputDirdirectory where to save the files.

Definition at line 70 of file FileIO.h.

template<typename MeshFormat = std::string>
virtual urdf2inventor::FileIO< MeshFormat >::~FileIO ( ) [inline, virtual]

Definition at line 73 of file FileIO.h.


Member Function Documentation

template<typename MeshFormat = std::string>
const std::string& urdf2inventor::FileIO< MeshFormat >::getOutputDirectory ( ) const [inline, protected]

Definition at line 114 of file FileIO.h.

template<typename MeshFormat >
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.

template<typename MeshFormat = std::string>
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.

Definition at line 99 of file FileIO.h.

template<typename MeshFormat >
bool urdf2inventor::FileIO< MeshFormat >::write ( const ConversionResultPtr data) const

Initializes the directory, then writes the meshes.

Definition at line 74 of file FileIO.hpp.

template<typename MeshFormat = std::string>
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.

Definition at line 109 of file FileIO.h.

template<typename MeshFormat >
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.


Member Data Documentation

template<typename MeshFormat = std::string>
std::string urdf2inventor::FileIO< MeshFormat >::outputDir [private]

Definition at line 119 of file FileIO.h.


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


urdf2inventor
Author(s): Jennifer Buehler
autogenerated on Fri Mar 1 2019 03:38:11