DynamicLibrary
Go to the documentation of this file.
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
#ifndef OSGDB_DYNAMICLIBRARY
#define OSGDB_DYNAMICLIBRARY 1
#include <osg/Referenced>
#include <osgDB/Export>
#include <string>
namespace osgDB {
class OSGDB_EXPORT DynamicLibrary : public osg::Referenced
{
public:
typedef void* HANDLE;
typedef void* PROC_ADDRESS;
static DynamicLibrary* loadLibrary(const std::string& libraryName);
const std::string& getName() const { return _name; }
const std::string& getFullName() const { return _fullName; }
HANDLE getHandle() const { return _handle; }
PROC_ADDRESS getProcAddress(const std::string& procName);
protected:
static HANDLE getLibraryHandle( const std::string& libraryName);
DynamicLibrary():osg::Referenced() {}
DynamicLibrary(const DynamicLibrary&):osg::Referenced() {}
DynamicLibrary& operator = (const DynamicLibrary&) { return *this; }
DynamicLibrary(const std::string& name,HANDLE handle);
~DynamicLibrary();
HANDLE _handle;
std::string _name;
std::string _fullName;
};
}
#endif // __DYNAMIC_LIBRARY_H
Referenced
osgDB::DynamicLibrary::~DynamicLibrary
~DynamicLibrary()
osgDB::DynamicLibrary::getName
const std::string & getName() const
Definition DynamicLibrary:41
osgDB::DynamicLibrary::_handle
HANDLE _handle
Definition DynamicLibrary:71
osgDB::DynamicLibrary::getHandle
HANDLE getHandle() const
Definition DynamicLibrary:47
osgDB::DynamicLibrary::getLibraryHandle
static HANDLE getLibraryHandle(const std::string &libraryName)
osgDB::DynamicLibrary::loadLibrary
static DynamicLibrary * loadLibrary(const std::string &libraryName)
osgDB::DynamicLibrary::PROC_ADDRESS
void * PROC_ADDRESS
Definition DynamicLibrary:33
osgDB::DynamicLibrary::HANDLE
void * HANDLE
Definition DynamicLibrary:32
osgDB::DynamicLibrary::DynamicLibrary
DynamicLibrary()
Definition DynamicLibrary:58
osgDB::DynamicLibrary::getProcAddress
PROC_ADDRESS getProcAddress(const std::string &procName)
osgDB::DynamicLibrary::getFullName
const std::string & getFullName() const
Definition DynamicLibrary:44
osgDB::DynamicLibrary::DynamicLibrary
DynamicLibrary(const std::string &name, HANDLE handle)
osgDB::DynamicLibrary::_name
std::string _name
Definition DynamicLibrary:72
osgDB::DynamicLibrary::_fullName
std::string _fullName
Definition DynamicLibrary:73
osgDB::DynamicLibrary::DynamicLibrary
DynamicLibrary(const DynamicLibrary &)
Definition DynamicLibrary:60
osg::Referenced
Definition Referenced:44
osg::Referenced::Referenced
Referenced()
osgDB
Definition Archive:24
osg
Definition AlphaFunc:19
Export
OSGDB_EXPORT
#define OSGDB_EXPORT
Definition osgDB/Export:39