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

# Ogre::DynLib Class Reference

Resource holding data about a dynamic library. More...

`#include <OgreDynLib.h>`

Inheritance diagram for Ogre::DynLib:

[legend]
List of all members.

## Public Methods

| DynLib (const String &name)
| Default constructor - used by DynLibManager.
| ~DynLib ()
| Default destructor.
virtual void | load ()
| Generic load - called by DynLibManager.
virtual void | unload ()
| Generic unload - called by DynLibManager.
virtual void * | getSymbol (const String &strName) const throw ()
| Returns the adress of the given symbol from the loaded library.
virtual size_t | getSize (void) const
| Retrieves info about the size of the resource.
virtual void | touch (void)
| 'Touches' the resource to indicate it has been used.
time_t | getLastAccess (void) const
| Gets the last time the resource was 'touched'.
const String & | getName (void) const
| Gets resource name.
ResourceHandle | getHandle (void) const
bool | isLoaded (void) const
| Returns true if the Resource has been loaded, false otherwise.
virtual void | destroy ()
| A method to make the resource delete itself.

## Protected Attributes

DYNLIB_HANDLE | m_hInst
| Handle to the loaded library.
String | mName
ResourceHandle | mHandle
bool | mIsLoaded
time_t | mLastAccess
size_t | mSize

## Detailed Description

Resource holding data about a dynamic library.

Remarks:
  This class holds the data required to get symbols from libraries loaded at run-time (i.e. from DLL's for so's)

Author:
  Adrian Cearnău (cearny@cearny.ro)

Since:
  27 January 2002

See also:
  Resource

Definition at line 70 of file OgreDynLib.h.

## Constructor & Destructor Documentation

Ogre::DynLib::DynLib | ( | const String & | name | ) |

Default constructor - used by DynLibManager.

Warning:
  Do not call directly

Definition at line 45 of file OgreDynLib.cpp.

References m_hInst, Ogre::Resource::mIsLoaded, Ogre::Resource::mName, OgreGuard, OgreUnguard, and Ogre::String.

Ogre::DynLib::~DynLib | ( |  | ) |

| Default destructor. Definition at line 62 of file OgreDynLib.cpp. References unload().

## Member Function Documentation

virtual void Ogre::Resource::destroy | ( | void |  | ) | `[virtual, inherited]`

A method to make the resource delete itself.

Note:
  This exists because Resource objects could be created in other processes, and they need to be destroyed in the process that created them.

Definition at line 137 of file OgreResource.h.

ResourceHandle Ogre::Resource::getHandle | ( | void |  | ) | const`[inherited]`

| Definition at line 120 of file OgreResource.h. References Ogre::ResourceHandle. Referenced by Ogre::Material::clone(), Ogre::BspLevel::loadQuake3Level(), and Ogre::ResourceManager::unload().

time_t Ogre::Resource::getLastAccess | ( | void |  | ) | const`[inherited]`

| Gets the last time the resource was 'touched'. Definition at line 108 of file OgreResource.h.

const String& Ogre::Resource::getName | ( | void |  | ) | const`[inherited]`

Gets resource name.

Reimplemented in Ogre::Material, and Ogre::Overlay.

Definition at line 115 of file OgreResource.h.

References Ogre::String.

Referenced by Ogre::D3D9Texture::_loadCubeTex(), Ogre::Mesh::_notifySkeleton(), Ogre::ResourceManager::add(), Ogre::PopupMenuGuiElement::addListItem(), Ogre::ListGuiElement::addListItem(), Ogre::PopupMenuGuiElement::addMenuItem(), Ogre::MeshManager::createPrefabPlane(), Ogre::TTYGuiElement::getFontName(), Ogre::TextAreaGuiElement::getFontName(), Ogre::PopupMenuGuiElement::getListItemName(), Ogre::ListGuiElement::getListItemName(), Ogre::GpuProgramUsage::getProgramName(), Ogre::MeshSerializer::importMesh(), Ogre::GLTexture::load(), Ogre::TextureManager::loadImage(), Ogre::TextureManager::loadRawData(), Ogre::FontManager::logBadAttrib(), Ogre::MeshSerializerImpl::readMeshLodInfo(), Ogre::MeshSerializerImpl::readMeshLodUsageGenerated(), Ogre::MeshSerializerImpl::readMeshLodUsageManual(), Ogre::PopupMenuGuiElement::removeListItem(), Ogre::ListGuiElement::removeListItem(), Ogre::SceneManager::setSkyBox(), Ogre::SceneManager::setSkyDome(), and Ogre::ResourceManager::unload().

virtual size_t Ogre::Resource::getSize | ( | void |  | ) | const`[virtual, inherited]`

| Retrieves info about the size of the resource. Definition at line 93 of file OgreResource.h. Referenced by Ogre::ResourceManager::unload().

void * Ogre::DynLib::getSymbol | ( | const String & | strName | ) | const throw ()`[virtual]`

Returns the adress of the given symbol from the loaded library.

Parameters:

  strName | The name of the symbol to search for

Returns:
  If the function succeeds, the returned value is a handle to the symbol.

  If the function fails, the returned value is NULL.

Definition at line 113 of file OgreDynLib.cpp.

References DYNLIB_GETSYM, and Ogre::String.

Referenced by Ogre::Root::loadPlugin(), and Ogre::PlatformManager::PlatformManager().

bool Ogre::Resource::isLoaded | ( | void |  | ) | const`[inherited]`

| Returns true if the Resource has been loaded, false otherwise. Definition at line 127 of file OgreResource.h. Referenced by Ogre::GpuProgramUsage::_load(), Ogre::SceneManager::deriveShadowCasterPass(), Ogre::SceneManager::deriveShadowReceiverPass(), Ogre::Technique::isLoaded(), Ogre::D3D9Texture::load(), Ogre::D3D9Texture::unload(), and Ogre::D3D9Texture::~D3D9Texture().

void Ogre::DynLib::load | ( |  | ) | `[virtual]`

Generic load - called by DynLibManager.

See also:
  Resource::load

Implements Ogre::Resource.

Definition at line 69 of file OgreDynLib.cpp.

References DYNLIB_ERROR, DYNLIB_LOAD, Except, m_hInst, Ogre::Resource::mIsLoaded, Ogre::Resource::mName, OgreGuard, and OgreUnguard.

virtual void Ogre::Resource::touch | ( | void |  | ) | `[virtual, inherited]`

| 'Touches' the resource to indicate it has been used. Reimplemented in Ogre::Material. Definition at line 100 of file OgreResource.h. Referenced by Ogre::Mesh::clone(), Ogre::MeshManager::createCurvedIllusionPlane(), Ogre::MeshManager::createCurvedPlane(), Ogre::MeshManager::createPlane(), and Ogre::ResourceManager::load().

void Ogre::DynLib::unload | ( |  | ) | `[virtual]`

Generic unload - called by DynLibManager.

See also:
  Resource::unload

Reimplemented from Ogre::Resource.

Definition at line 91 of file OgreDynLib.cpp.

References DYNLIB_ERROR, DYNLIB_UNLOAD, Except, m_hInst, Ogre::Resource::mIsLoaded, Ogre::Resource::mName, OgreGuard, and OgreUnguard.

Referenced by ~DynLib().

## Member Data Documentation

DYNLIB_HANDLE Ogre::DynLib::m_hInst`[protected]`

| Handle to the loaded library. Definition at line 110 of file OgreDynLib.h. Referenced by DynLib(), load(), and unload().

ResourceHandle Ogre::Resource::mHandle`[protected, inherited]`

| Definition at line 57 of file OgreResource.h. Referenced by Ogre::ResourceManager::add(), Ogre::Material::clone(), Ogre::Material::copyDetailsTo(), and Ogre::Material::operator=().

bool Ogre::Resource::mIsLoaded`[protected, inherited]`

Definition at line 58 of file OgreResource.h.

Referenced by Ogre::D3D9Texture::_initMembers(), Ogre::D3D9Texture::_loadCubeTex(), Ogre::D3D9Texture::_loadNormTex(), Ogre::D3D9Texture::_loadVolumeTex(), Ogre::Material::_notifyNeedsRecompile(), Ogre::Material::clone(), Ogre::D3DTexture::createSurface2D(), Ogre::D3DTexture::createSurface3D(), Ogre::D3D9Texture::D3D9Texture(), Ogre::D3DTexture::D3DTexture(), DynLib(), Ogre::Zip::load(), Ogre::SkeletonInstance::load(), Ogre::Skeleton::load(), Ogre::PatchMesh::load(), Ogre::Mesh::load(), Ogre::Material::load(), Ogre::HighLevelGpuProgram::load(), Ogre::GpuProgram::load(), Ogre::GLTexture::load(), Ogre::GLSLGpuProgram::load(), Ogre::Font::load(), load(), Ogre::D3D9Texture::load(), Ogre::D3D9GpuProgram::load(), Ogre::D3DTexture::load(), Ogre::BspLevel::load(), Ogre::D3D9Texture::loadImage(), Ogre::D3DTexture::loadImage(), Ogre::D3DTexture::loadImage3D(), Ogre::GLTexture::loadImages(), Ogre::Material::Material(), Ogre::Material::operator=(), Ogre::Skeleton::unload(), Ogre::Mesh::unload(), Ogre::Material::unload(), Ogre::HighLevelGpuProgram::unload(), Ogre::GLTexture::unload(), Ogre::Font::unload(), unload(), Ogre::D3D9Texture::unload(), Ogre::D3DTexture::unload(), and Ogre::BspLevel::~BspLevel().

time_t Ogre::Resource::mLastAccess`[protected, inherited]`

| Definition at line 59 of file OgreResource.h. Referenced by Ogre::Material::operator=().

String Ogre::Resource::mName`[protected, inherited]`

Definition at line 56 of file OgreResource.h.

Referenced by Ogre::Skeleton::_dumpContents(), Ogre::Mesh::_rationaliseBoneAssignments(), Ogre::GLSLProgram::attachToProgramObject(), Ogre::BspLevel::BspLevel(), Ogre::Mesh::buildEdgeList(), Ogre::Mesh::buildTangentVectors(), Ogre::Material::clone(), Ogre::Material::compile(), Ogre::GLSLProgram::compile(), Ogre::Material::copyDetailsTo(), Ogre::Quake3Shader::createAsMaterial(), Ogre::D3D9HLSLProgram::createLowLevelImpl(), Ogre::CgProgram::createLowLevelImpl(), Ogre::Font::createTextureFromFont(), Ogre::D3D9Texture::D3D9Texture(), Ogre::D3DTexture::D3DTexture(), DynLib(), Ogre::Font::Font(), Ogre::Mesh::generateLodLevels(), Ogre::Material::getBestTechnique(), Ogre::Overlay::getName(), Ogre::Material::getName(), Ogre::GLTexture::GLTexture(), Ogre::GpuProgram::GpuProgram(), Ogre::Zip::load(), Ogre::Skeleton::load(), Ogre::Mesh::load(), Ogre::GLTexture::load(), Ogre::Font::load(), load(), Ogre::D3DTexture::load(), Ogre::BspLevel::load(), Ogre::D3D9GpuFragmentProgram::loadFromMicrocode(), Ogre::D3D9GpuVertexProgram::loadFromMicrocode(), Ogre::GLSLProgram::loadFromSource(), Ogre::GLArbGpuProgram::loadFromSource(), Ogre::D3D9HLSLProgram::loadFromSource(), Ogre::D3D9GpuProgram::loadFromSource(), Ogre::CgProgram::loadFromSource(), Ogre::GLTexture::loadImages(), Ogre::Material::Material(), Ogre::Mesh::Mesh(), Ogre::Material::operator=(), Ogre::Overlay::Overlay(), Ogre::Quake3Shader::Quake3Shader(), Ogre::CgProgram::selectProfile(), Ogre::Mesh::setSkeletonName(), Ogre::Skeleton::Skeleton(), Ogre::StringResource::StringResource(), Ogre::Texture::Texture(), Ogre::Zip::unload(), unload(), Ogre::CgProgram::unloadImpl(), and Ogre::Zip::Zip().

size_t Ogre::Resource::mSize`[protected, inherited]`

| Definition at line 60 of file OgreResource.h. Referenced by Ogre::D3D9Texture::_setFinalAttributes(), Ogre::D3DTexture::loadImage(), Ogre::D3DTexture::loadImage3D(), Ogre::GLTexture::loadImages(), and Ogre::Material::operator=().

The documentation for this class was generated from the following files:

- OgreDynLib.h
- OgreDynLib.cpp

Copyright © 2002-2003 by The OGRE Team
Last modified Sun Nov 28 19:50:53 2004