MeVisLab Toolbox Reference
ml::olSpecializedLoader Class Referenceabstract

Base class for all loader-plugins. More...

#include <ObjLoader/mlObjLoaderFrame.h>

Public Member Functions

virtual ~olSpecializedLoader ()
 Destructor. More...
 
bool suppressErrorLog () const
 Suppress error messages to console if 'true'. More...
 
void setSuppressErrorLog (bool trueOrFalse)
 Suppress error messages to console if 'true'. More...
 
bool sawErrors () const
 Returns 'true' if an error occurred. More...
 
void resetErrors ()
 Reset error flag. More...
 
virtual bool isValidHeader (const char *header, const size_t length)=0
 This member is called with a pointer (header) to the first length bytes of the file to be loaded. More...
 
virtual void readDoc (const std::string &infoFile, omObjectContainer &oc, bool accumulate)
 readDoc() is called with the filename of the file to be loaded and a reference to the object container. More...
 
virtual const std::string getName () const =0
 Returns a string with the name of the loader (e.g. ObjDump) More...
 
virtual const std::string miscInfo ()
 Returns loader-specific information that has been stored in the _miscInfo class member. More...
 

Protected Member Functions

 olSpecializedLoader ()
 Constructor. More...
 

Protected Attributes

bool _suppressErrorLog
 Error messages to console should be suppressed if _suppressErrorLog is 'true'. More...
 
bool _sawErrors
 _sawErrors is set if any errors occurred, and is queryable via the sawErrors() method. More...
 
std::string _infoFileDirectory
 Stores the info file directory which is used by olFullPath to construct paths to files that are located beneath the infofiles directory in the directory structure. More...
 
std::string _miscInfo
 Loader-specific misc. More...
 

Friends

class olFullPath
 

Detailed Description

Base class for all loader-plugins.

Definition at line 41 of file mlObjLoaderFrame.h.

Constructor & Destructor Documentation

◆ olSpecializedLoader()

ml::olSpecializedLoader::olSpecializedLoader ( )
protected

Constructor.

◆ ~olSpecializedLoader()

virtual ml::olSpecializedLoader::~olSpecializedLoader ( )
virtual

Destructor.

Member Function Documentation

◆ getName()

virtual const std::string ml::olSpecializedLoader::getName ( ) const
pure virtual

Returns a string with the name of the loader (e.g. ObjDump)

◆ isValidHeader()

virtual bool ml::olSpecializedLoader::isValidHeader ( const char *  header,
const size_t  length 
)
pure virtual

This member is called with a pointer (header) to the first length bytes of the file to be loaded.

It returns true if the file type is known an can be interpreted by the loader. Otherwise false is returned and the next loader is called.

◆ miscInfo()

virtual const std::string ml::olSpecializedLoader::miscInfo ( )
inlinevirtual

Returns loader-specific information that has been stored in the _miscInfo class member.

Definition at line 106 of file mlObjLoaderFrame.h.

◆ readDoc()

virtual void ml::olSpecializedLoader::readDoc ( const std::string &  infoFile,
omObjectContainer oc,
bool  accumulate 
)
virtual

readDoc() is called with the filename of the file to be loaded and a reference to the object container.

The member is responsible for the object container. If it fails for whatever reason, the object container must be left in a consistent state. If the accumulate parameter is true, the main loader has not cleared the object container. Inherited classes must call its parent implementation of readDoc() in front.

◆ resetErrors()

void ml::olSpecializedLoader::resetErrors ( )
inline

Reset error flag.

Definition at line 87 of file mlObjLoaderFrame.h.

◆ sawErrors()

bool ml::olSpecializedLoader::sawErrors ( ) const
inline

Returns 'true' if an error occurred.

Definition at line 85 of file mlObjLoaderFrame.h.

◆ setSuppressErrorLog()

void ml::olSpecializedLoader::setSuppressErrorLog ( bool  trueOrFalse)
inline

Suppress error messages to console if 'true'.

Definition at line 82 of file mlObjLoaderFrame.h.

◆ suppressErrorLog()

bool ml::olSpecializedLoader::suppressErrorLog ( ) const
inline

Suppress error messages to console if 'true'.

Definition at line 80 of file mlObjLoaderFrame.h.

Friends And Related Function Documentation

◆ olFullPath

friend class olFullPath
friend

Definition at line 45 of file mlObjLoaderFrame.h.

Member Data Documentation

◆ _infoFileDirectory

std::string ml::olSpecializedLoader::_infoFileDirectory
protected

Stores the info file directory which is used by olFullPath to construct paths to files that are located beneath the infofiles directory in the directory structure.

Definition at line 65 of file mlObjLoaderFrame.h.

Referenced by ml::olFullPath::olFullPath().

◆ _miscInfo

std::string ml::olSpecializedLoader::_miscInfo
protected

Loader-specific misc.

information (e.g. the name of the application that wrote the info file) This information must be provided by the specialized loader.

Definition at line 69 of file mlObjLoaderFrame.h.

◆ _sawErrors

bool ml::olSpecializedLoader::_sawErrors
protected

_sawErrors is set if any errors occurred, and is queryable via the sawErrors() method.

Definition at line 60 of file mlObjLoaderFrame.h.

◆ _suppressErrorLog

bool ml::olSpecializedLoader::_suppressErrorLog
protected

Error messages to console should be suppressed if _suppressErrorLog is 'true'.

_suppressErrorLog can be set via setSuppressErrorLog() and queried via the suppressErrorLog() method.

Definition at line 56 of file mlObjLoaderFrame.h.


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