Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Friends

XAP_Module Class Reference

#include <xap_Module.h>

Inheritance diagram for XAP_Module:
XAP_CocoaModule XAP_QtModule XAP_UnixModule XAP_Win32Module

List of all members.

Public Member Functions

bool setSymbols (XAP_Plugin_Registration fnRegister, XAP_Plugin_Registration fnDeregister, XAP_Plugin_VersionCheck fnSupportsVersion)
bool registered ()
virtual bool resolveSymbol (const char *symbol_name, void **symbol)=0
virtual bool getModuleName (char **dest) const =0
virtual bool getErrorMsg (char **dest) const =0
XAP_ModuleManagergetCreator () const
const XAP_ModuleInfogetModuleInfo (void) const

Protected Member Functions

 XAP_Module ()
virtual ~XAP_Module (void)
virtual bool load (const char *name)=0
virtual bool unload (void)=0

Private Member Functions

bool registerPending ()
bool registerThySelf ()
bool unregisterThySelf ()
bool supportsAbiVersion (UT_uint32 major, UT_uint32 minor, UT_uint32 release)
void setCreator (XAP_ModuleManager *creator)
void setLoaded (bool bLoaded)

Private Attributes

XAP_Plugin_Registration m_fnRegister
XAP_Plugin_Registration m_fnDeregister
XAP_Plugin_VersionCheck m_fnSupportsVersion
bool m_bLoaded
bool m_bRegistered
int m_iStatus
const char * m_szSPI
XAP_ModuleInfo m_info


class XAP_ModuleManager

Constructor & Destructor Documentation

XAP_Module::XAP_Module (  )  [protected]

Protected constructor

References m_info.

XAP_Module::~XAP_Module ( void   )  [protected, virtual]

Protected destructor

Member Function Documentation

XAP_ModuleManager* XAP_Module::getCreator (  )  const [inline]
virtual bool XAP_Module::getErrorMsg ( char **  dest  )  const [pure virtual]
virtual bool XAP_Module::getModuleName ( char **  dest  )  const [pure virtual]
virtual bool XAP_Module::load ( const char *  name  )  [protected, pure virtual]
bool XAP_Module::registered (  ) 

Whether the plugin is registered

true if registered, false otherwise

References m_bLoaded, m_bRegistered, and m_iStatus.

Referenced by unregisterThySelf().

bool XAP_Module::registerPending (  )  [private]
bool XAP_Module::registerThySelf (  )  [private]

After loading a module, call this function to register the plugin with AbiWord

true on success, false on failure

References int(), m_bLoaded, m_bRegistered, m_fnRegister, m_info, m_iStatus, resolveSymbol(), and UT_ASSERT.

Referenced by XAP_ModuleManager::loadModule(), and XAP_ModuleManager::loadPreloaded().

virtual bool XAP_Module::resolveSymbol ( const char *  symbol_name,
void **  symbol 
) [pure virtual]
void XAP_Module::setCreator ( XAP_ModuleManager creator  )  [inline, private]
void XAP_Module::setLoaded ( bool  bLoaded  )  [inline, private]
bool XAP_Module::setSymbols ( XAP_Plugin_Registration  fnRegister,
XAP_Plugin_Registration  fnDeregister,
XAP_Plugin_VersionCheck  fnSupportsVersion 

marks the module as loaded; returns false if module is already loaded

References m_bLoaded, m_fnDeregister, m_fnRegister, m_fnSupportsVersion, and UT_ASSERT.

Referenced by XAP_ModuleManager::loadPreloaded().

bool XAP_Module::supportsAbiVersion ( UT_uint32  major,
UT_uint32  minor,
UT_uint32  release 
) [private]

Query if this plugin supports the requested AbiWord version

major - "1"
minor - "9"
release - "4"
true if it supports the requested version, false otherwise

References int(), m_bLoaded, m_bRegistered, m_fnSupportsVersion, resolveSymbol(), and UT_ASSERT.

virtual bool XAP_Module::unload ( void   )  [protected, pure virtual]
bool XAP_Module::unregisterThySelf (  )  [private]

Before unloading a module, call this function to unregister the plugin, so that it might g_free resources, de-init itself, etc...

true on success, false on failure

References int(), m_bLoaded, m_bRegistered, m_fnDeregister, m_info, m_iStatus, m_szSPI, registered(), resolveSymbol(), and UT_ASSERT.

Referenced by XAP_ModuleManager::loadModule(), XAP_ModuleManager::loadPreloaded(), and XAP_ModuleManager::unloadModule().

Friends And Related Function Documentation

friend class XAP_ModuleManager [friend]

Member Data Documentation

const char* XAP_Module::m_szSPI [private]

Referenced by unregisterThySelf().

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