From Jannik Heller and Robert Osfield, introduced ReadResult/WriteResult::statusMessage() method that creates a std::string from the stutus value and message string.
This commit is contained in:
@@ -161,6 +161,9 @@ class OSGDB_EXPORT ReaderWriter : public osg::Object
|
||||
std::string& message() { return _message; }
|
||||
const std::string& message() const { return _message; }
|
||||
|
||||
/// report the ReadResult's status, and message (if any). Useful for reporting of errors to users.
|
||||
std::string statusMessage() const;
|
||||
|
||||
ReadStatus status() const { return _status; }
|
||||
bool success() const { return _status==FILE_LOADED || _status==FILE_LOADED_FROM_CACHE ; }
|
||||
bool loadedFromCache() const { return _status==FILE_LOADED_FROM_CACHE; }
|
||||
@@ -200,6 +203,9 @@ class OSGDB_EXPORT ReaderWriter : public osg::Object
|
||||
std::string& message() { return _message; }
|
||||
const std::string& message() const { return _message; }
|
||||
|
||||
/// Report the WriteResult's status, and message (if any). Useful for reporting of errors to users.
|
||||
std::string statusMessage() const;
|
||||
|
||||
WriteStatus status() const { return _status; }
|
||||
bool success() const { return _status==FILE_SAVED; }
|
||||
bool error() const { return _status==ERROR_IN_WRITING_FILE; }
|
||||
|
||||
Reference in New Issue
Block a user