Added better handling of writeNode operations that arn't successful.

This commit is contained in:
Robert Osfield
2006-11-07 17:00:56 +00:00
parent ac9a28051f
commit 530e9e08d4
4 changed files with 65 additions and 3 deletions

View File

@@ -164,6 +164,7 @@ class OSGDB_EXPORT ReaderWriter : public osg::Object
osg::Node* takeNode();
osgDB::Archive* takeArchive();
std::string& message() { return _message; }
const std::string& message() const { return _message; }
ReadStatus status() const { return _status; }
@@ -197,6 +198,7 @@ class OSGDB_EXPORT ReaderWriter : public osg::Object
WriteResult(const WriteResult& rr):_status(rr._status),_message(rr._message) {}
WriteResult& operator = (const WriteResult& rr) { if (this==&rr) return *this; _status=rr._status; _message=rr._message; return *this; }
std::string& message() { return _message; }
const std::string& message() const { return _message; }
WriteStatus status() const { return _status; }

View File

@@ -96,10 +96,12 @@ class OSGDB_EXPORT Registry : public osg::Referenced
/** create the platform specific library name associated with nodekit library name.*/
std::string createLibraryNameForNodeKit(const std::string& name);
/** find the library in the SG_LIBRARY_PATH and load it.*/
/** find the library in the OSG_LIBRARY_PATH and load it.*/
bool loadLibrary(const std::string& fileName);
/** close the attached library with specified name.*/
bool closeLibrary(const std::string& fileName);
/** close all libraries.*/
void closeAllLibraries();