Yate
Public Member Functions
Plugin Class Reference

Plugin support. More...

#include <yatengine.h>

Inheritance diagram for Plugin:
GenObject DebugEnabler Module ChanAssistList Driver ClientDriver

List of all members.

Public Member Functions

 Plugin (const char *name, bool earlyInit=false)
virtual ~Plugin ()
virtual const String & toString () const
virtual void * getObject (const String &name) const
virtual void initialize ()=0
virtual bool isBusy () const
const String & name () const
bool earlyInit () const

Detailed Description

Plugin support.

Initialization and information about plugins. Plugins are located in shared libraries that are loaded at runtime.

 // Create static Plugin object by using the provided macro
 INIT_PLUGIN(Plugin);
 *

Constructor & Destructor Documentation

Plugin ( const char *  name,
bool  earlyInit = false 
) [explicit]

Creates a new Plugin container.

Parameters:
namethe undecorated name of the library that contains the plugin
earlyInitTrue to initialize the plugin early
virtual ~Plugin ( ) [virtual]

Destroys the plugin. The destructor must never be called directly - the Loader will do it when the shared object's reference count reaches zero.


Member Function Documentation

bool earlyInit ( ) const [inline]

Check if the module is to be initialized early

Returns:
True if the module should be initialized before regular ones
virtual void* getObject ( const String &  name) const [virtual]

Get a pointer to a derived class given that class name

Parameters:
nameName of the class we are asking for
Returns:
Pointer to the requested class or NULL if this object doesn't implement it

Reimplemented from GenObject.

Reimplemented in Driver, and Module.

virtual void initialize ( ) [pure virtual]

Initialize the plugin after it was loaded and registered.

Implemented in Driver, ClientDriver, Module, and ChanAssistList.

virtual bool isBusy ( ) const [inline, virtual]

Check if the module is actively used.

Returns:
True if the plugin is in use, false if should be ok to restart

Reimplemented in Driver.

const String& name ( ) const [inline]

Retrieve the name of the plugin

Returns:
The plugin's name as String
virtual const String& toString ( ) const [inline, virtual]

Get a string representation of this object

Returns:
Name of the plugin

Reimplemented from GenObject.


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