Changed loadLibrary so that it retusn a LoadStatus variable to enable calling

codes to differentiate between whether a library is already loaded, or is newly loaded
This commit is contained in:
Robert Osfield
2008-09-26 13:51:18 +00:00
parent 026314bf83
commit 0fdb54d8bb
2 changed files with 32 additions and 25 deletions

View File

@@ -108,8 +108,15 @@ 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);
enum LoadStatus {
NOT_LOADED = 0,
PREVIOUSLY_LOADED,
LOADED
};
/** find the library in the OSG_LIBRARY_PATH and load it.*/
bool loadLibrary(const std::string& fileName);
LoadStatus loadLibrary(const std::string& fileName);
/** close the attached library with specified name.*/
bool closeLibrary(const std::string& fileName);