Main Page   Packages   Class Hierarchy   Alphabetical List   Data Structures   File List   Namespace Members   Data Fields   Globals  

clawsoft.Plugin Class Reference

#include <Plugin.h>

Inheritance diagram for clawsoft.Plugin:

Inheritance graph
[legend]
Collaboration diagram for clawsoft.Plugin:

Collaboration graph
[legend]

Detailed Description

This is the plugin class, it adds an interface for loading dynamic shared objects to your program.

Definition at line 15 of file Plugin.h.

Public Methods

 Plugin ()
 Default constructor this one does nothing but a few initializations on the handle and loaded variables.

 Plugin (String plName)
 This constructor initializes on the handle and loaded variables, also it initializes the name of the dso.

void load ()
 Loads the dso into memory, this method requires the use of the second constructor, not the default one if you've used the default then you shold probably use the another load method.

void load (String plName)
 Loads the dso defined by plName and updates the contents of the dso variable name.

void unload ()
 Unloads the dso from memory.

void * getSymbol (String sym)
 Use this method whenever you want to obtain a symbol from the dso.

StringgetDSOName ()
 This method returns the name of the dso itself.

char * getClassName ()
 Returns the name of the current class.


Protected Methods

void setClassName (char *n)
 Call this method when you need to set the name of the class you're creating, typically int it's constructor, remeber that you must set the classname for every clas you create, that way you can have more information while being in a debuging process.


Protected Attributes

String dso
 Holds the filename of the shared object itself.

bool loaded
 Tells if the object is loaded or not.

void * handle
 This is the handle value as returned by the dlopen function.


Constructor & Destructor Documentation

clawsoft.Plugin::Plugin  
 

Default constructor this one does nothing but a few initializations on the handle and loaded variables.

Definition at line 9 of file Plugin.cpp.

References clawsoft.Plugin.dso, clawsoft.Plugin.handle, clawsoft.Plugin.loaded, and clawsoft.Object.setClassName().

clawsoft.Plugin::Plugin String    plName
 

This constructor initializes on the handle and loaded variables, also it initializes the name of the dso.

Definition at line 16 of file Plugin.cpp.

References clawsoft.Plugin.dso, clawsoft.Plugin.handle, clawsoft.Plugin.loaded, and clawsoft.Object.setClassName().


Member Function Documentation

char * clawsoft.Object::getClassName   [inherited]
 

Returns the name of the current class.

Definition at line 18 of file Object.cpp.

References clawsoft.Object.__cls_name.

String& clawsoft.Plugin.getDSOName  
 

This method returns the name of the dso itself.

void * clawsoft.Plugin::getSymbol String    sym
 

Use this method whenever you want to obtain a symbol from the dso.

Definition at line 44 of file Plugin.cpp.

References clawsoft.Plugin.handle, and clawsoft.String.toCharPtr().

void clawsoft.Plugin::load String    plName
 

Loads the dso defined by plName and updates the contents of the dso variable name.

Definition at line 30 of file Plugin.cpp.

References clawsoft.Plugin.dso, and clawsoft.Plugin.load().

void clawsoft.Plugin::load  
 

Loads the dso into memory, this method requires the use of the second constructor, not the default one if you've used the default then you shold probably use the another load method.

Definition at line 23 of file Plugin.cpp.

References clawsoft.Plugin.dso, clawsoft.Plugin.handle, and clawsoft.String.toCharPtr().

Referenced by clawsoft.Plugin.load().

void clawsoft.Object::setClassName char *    n [protected, inherited]
 

Call this method when you need to set the name of the class you're creating, typically int it's constructor, remeber that you must set the classname for every clas you create, that way you can have more information while being in a debuging process.

Definition at line 14 of file Object.cpp.

References clawsoft.Object.__cls_name.

Referenced by clawsoft.ArrayOutOfBoundsException.ArrayOutOfBoundsException(), clawsoft.BrokenPipeException.BrokenPipeException(), clawsoft.Dialog.CancelButton.CancelButton(), clawsoft.CantLoadDSOException.CantLoadDSOException(), clawsoft.CantUnloadDSOException.CantUnloadDSOException(), clawsoft.ConnectionRefusedException.ConnectionRefusedException(), clawsoft.ConnectionTimeoutException.ConnectionTimeoutException(), clawsoft.Dialog.Dialog(), clawsoft.DSOException.DSOException(), clawsoft.DSOSymbolException.DSOSymbolException(), clawsoft.ElementNotFoundException.ElementNotFoundException(), clawsoft.Font.Font(), clawsoft.GameSelector.GameSelector(), clawsoft.Dialog.HelpButton.HelpButton(), clawsoft.IOException.IOException(), clawsoft.KeyboardEvent.KeyboardEvent(), clawsoft.LoginDialog.LoginDialog(), clawsoft.Mutex.Mutex(), clawsoft.MutexException.MutexException(), clawsoft.NetworkException.NetworkException(), clawsoft.NetworkUnreachableException.NetworkUnreachableException(), clawsoft.NoMoreTokensException.NoMoreTokensException(), clawsoft.NullPointerException.NullPointerException(), clawsoft.NumberException.NumberException(), clawsoft.Object.Object(), clawsoft.Dialog.OKButton.OKButton(), clawsoft.Plugin.Plugin(), clawsoft.ProcOutOfFileDescriptorsException.ProcOutOfFileDescriptorsException(), Random.Random(), clawsoft.ServerSocket.ServerSocket(), clawsoft.Socket.Socket(), clawsoft.SocketAlreadyBoundedException.SocketAlreadyBoundedException(), clawsoft.SocketAlreadyUsedException.SocketAlreadyUsedException(), clawsoft.SocketUnableToReadException.SocketUnableToReadException(), clawsoft.SocketUnableToWriteException.SocketUnableToWriteException(), clawsoft.SysOutOfFileDescriptorsException.SysOutOfFileDescriptorsException(), clawsoft.TextBox.TextBox(), clawsoft.TextButton.TextButton(), clawsoft.TextField.TextField(), clawsoft.Thread.Thread(), clawsoft.UnableToLockMutexException.UnableToLockMutexException(), clawsoft.UnableToUnlockMutexException.UnableToUnlockMutexException(), and clawsoft.Window.Window().

void clawsoft.Plugin::unload  
 

Unloads the dso from memory.

Definition at line 35 of file Plugin.cpp.

References clawsoft.Plugin.handle.


Field Documentation

String clawsoft.Plugin.dso [protected]
 

Holds the filename of the shared object itself.

Definition at line 20 of file Plugin.h.

Referenced by clawsoft.Plugin.load(), and clawsoft.Plugin.Plugin().

void* clawsoft.Plugin.handle [protected]
 

This is the handle value as returned by the dlopen function.

Definition at line 29 of file Plugin.h.

Referenced by clawsoft.Plugin.getSymbol(), clawsoft.Plugin.load(), clawsoft.Plugin.Plugin(), and clawsoft.Plugin.unload().

bool clawsoft.Plugin.loaded [protected]
 

Tells if the object is loaded or not.

Definition at line 24 of file Plugin.h.

Referenced by clawsoft.Plugin.Plugin().


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

Powered by:

SourceForge Logo