13 #ifndef ML_OBJ_LOADER_FRAME_H
14 #define ML_OBJ_LOADER_FRAME_H
20 #include "MLObjLoaderSystem.h"
29 #define ML_PRINT_CONDITIONAL_ERROR(a,b,c,d) \
31 ML_PRINT_ERROR(b,c,d); \
49 void storeInfoFilePath(
const std::string &infoFile);
85 inline bool sawErrors()
const {
return _sawErrors; }
92 virtual bool isValidHeader(
const char *header,
const size_t length) = 0;
103 virtual const std::string
getName()
const = 0;
106 virtual const std::string
miscInfo() {
return _miscInfo; }
130 operator const char *()
const {
131 return _fullPath.c_str();
135 std::string _fullPath;
This is a simple class that lets us do easy prepending of the info file's directory to a given relati...
olFullPath(const olSpecializedLoader &sl, const std::string &relPath)
Constructor.
olFullPath(const olSpecializedLoader &sl, const char *relPath)
Constructor.
Base class for all loader-plugins.
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 containe...
virtual const std::string getName() const =0
Returns a string with the name of the loader (e.g. ObjDump)
bool _sawErrors
_sawErrors is set if any errors occurred, and is queryable via the sawErrors() method.
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.
bool sawErrors() const
Returns 'true' if an error occurred.
bool _suppressErrorLog
Error messages to console should be suppressed if _suppressErrorLog is 'true'.
void resetErrors()
Reset error flag.
std::string _miscInfo
Loader-specific misc.
olSpecializedLoader()
Constructor.
virtual ~olSpecializedLoader()
Destructor.
std::string _infoFileDirectory
Stores the info file directory which is used by olFullPath to construct paths to files that are locat...
virtual const std::string miscInfo()
Returns loader-specific information that has been stored in the _miscInfo class member.
bool suppressErrorLog() const
Suppress error messages to console if 'true'.
void setSuppressErrorLog(bool trueOrFalse)
Suppress error messages to console if 'true'.
Database (object container) - manages all objects.
#define SLASH
This file declares the ObjLoader specialized data loader.
#define ML_ABSTRACT_ROOT_CLASS_HEADER(className)