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:

Ogre::Resource List of all members.

Public Methods

 DynLib (const String &name)
 Default constructor - used by DynLibManager. More...

 ~DynLib ()
 Default destructor. More...

virtual void load ()
 Generic load - called by DynLibManager. More...

virtual void unload ()
 Generic unload - called by DynLibManager. More...

virtual void * getSymbol (const String &strName) const throw ()
 Returns the adress of the given symbol from the loaded library. More...

virtual size_t getSize (void)
 Retrieves info about the size of the resource. More...

void touch (void)
 'Touches' the resource to indicate it has been used. More...

time_t getLastAccess (void) const
 Gets the last time the resource was 'touched'. More...

const String & getName (void) const
 Gets resource name. More...

bool isLoaded (void) const
 Returns true if the Resource has been loaded, false otherwise. More...

virtual void destroy ()
 A method to make the resource delete itself. More...


Protected Attributes

DYNLIB_HANDLE m_hInst
 Handle to the loaded library. More...

String mName
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


Constructor & Destructor Documentation

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

Default constructor - used by DynLibManager.

Warning:
Do not call directly

Ogre::DynLib::~DynLib (    ) 
 

Default destructor.


Member Function Documentation

virtual void Ogre::Resource::destroy (  void    )  [inline, 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.

time_t Ogre::Resource::getLastAccess (  void    )  const [inline, inherited]
 

Gets the last time the resource was 'touched'.

const String& Ogre::Resource::getName (  void    )  const [inline, inherited]
 

Gets resource name.

Reimplemented in Ogre::Material.

virtual size_t Ogre::Resource::getSize (  void    )  [inline, virtual, inherited]
 

Retrieves info about the size of the resource.

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.

bool Ogre::Resource::isLoaded (  void    )  const [inline, inherited]
 

Returns true if the Resource has been loaded, false otherwise.

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

Generic load - called by DynLibManager.

See also:
Resource::load

Implements Ogre::Resource.

void Ogre::Resource::touch (  void    )  [inline, inherited]
 

'Touches' the resource to indicate it has been used.

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

Generic unload - called by DynLibManager.

See also:
Resource::unload

Reimplemented from Ogre::Resource.


Member Data Documentation

DYNLIB_HANDLE Ogre::DynLib::m_hInst [protected]
 

Handle to the loaded library.

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

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

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

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

Copyright © 2002 by The OGRE Team