Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

osgDB::DynamicLibrary Class Reference

DynamicLibrary - encapsulates the loading and unloading of dynamic libraries, typically used for loading ReaderWriter plug-ins. More...

Inheritance diagram for osgDB::DynamicLibrary:

Inheritance graph
[legend]
List of all members.

Public Types

typedef void * HANDLE
typedef void * PROC_ADDRESS

Public Methods

const std::string & getName () const
 return name of library stripped of path.

const std::string & getFullName () const
 return name of library including full path to it.

HANDLE getHandle () const
 return handle to .dso/.dll dynamic library itself.

PROC_ADDRESS getProcAddress (const std::string &procName)
 return address of function located in library.


Static Public Methods

DynamicLibrary * loadLibrary (const std::string &libraryName)
 returns a pointer to a DynamicLibrary object on successfully opening of library returns NULL on failure.


Protected Methods

 DynamicLibrary ()
 disallow default constructor.

 DynamicLibrary (const DynamicLibrary &)
 disallow copy constructor.

DynamicLibrary & operator== (const DynamicLibrary &)
 disallow copy operator.

 DynamicLibrary (const std::string &name, HANDLE handle)
 Disallow public construction so that users have to go through loadLibrary() above which returns NULL on failure, a valid DynamicLibrary object on success.

 ~DynamicLibrary ()

Protected Attributes

HANDLE _handle
std::string _name
std::string _fullName

Detailed Description

DynamicLibrary - encapsulates the loading and unloading of dynamic libraries, typically used for loading ReaderWriter plug-ins.


Member Typedef Documentation

typedef void* osgDB::DynamicLibrary::HANDLE
 

typedef void* osgDB::DynamicLibrary::PROC_ADDRESS
 


Constructor & Destructor Documentation

osgDB::DynamicLibrary::DynamicLibrary   [inline, protected]
 

disallow default constructor.

osgDB::DynamicLibrary::DynamicLibrary const DynamicLibrary &    [inline, protected]
 

disallow copy constructor.

osgDB::DynamicLibrary::DynamicLibrary const std::string &    name,
HANDLE    handle
[protected]
 

Disallow public construction so that users have to go through loadLibrary() above which returns NULL on failure, a valid DynamicLibrary object on success.

osgDB::DynamicLibrary::~DynamicLibrary   [protected]
 


Member Function Documentation

const std::string& osgDB::DynamicLibrary::getFullName   const [inline]
 

return name of library including full path to it.

HANDLE osgDB::DynamicLibrary::getHandle   const [inline]
 

return handle to .dso/.dll dynamic library itself.

const std::string& osgDB::DynamicLibrary::getName   const [inline]
 

return name of library stripped of path.

PROC_ADDRESS osgDB::DynamicLibrary::getProcAddress const std::string &    procName
 

return address of function located in library.

DynamicLibrary* osgDB::DynamicLibrary::loadLibrary const std::string &    libraryName [static]
 

returns a pointer to a DynamicLibrary object on successfully opening of library returns NULL on failure.

DynamicLibrary& osgDB::DynamicLibrary::operator== const DynamicLibrary &    [inline, protected]
 

disallow copy operator.


Member Data Documentation

std::string osgDB::DynamicLibrary::_fullName [protected]
 

HANDLE osgDB::DynamicLibrary::_handle [protected]
 

std::string osgDB::DynamicLibrary::_name [protected]
 


The documentation for this class was generated from the following file:
Generated at Wed Sep 18 13:55:47 2002 for the Open Scene Graph by doxygen 1.2.16.