itom  4.1.0
ito::AddInInterfaceBase Class Referenceabstract

forward declaration to private container class of AddInAlog More...

#include <addInInterface.h>

Inheritance diagram for ito::AddInInterfaceBase:

Public Member Functions

virtual ~AddInInterfaceBase ()
 destructor
 
 AddInInterfaceBase ()
 default constructor
 
virtual int getAddInInterfaceVersion () const =0
 pure virtual function that returns the addin interface version of the plugin
 
int getType (void) const
 returns addIn type
 
int getVersion (void) const
 returns addIn version
 
int getMinItomVer (void) const
 returns minimum required version of main program
 
int getMaxItomVer (void) const
 returns maximum supported version of main program
 
bool getCallInitInNewThread (void) const
 returns whether init-method should be called in new thread (default) or still in main thread
 
tAutoLoadPolicy getAutoLoadPolicy (void) const
 returns true if the plugin allows his own parameter load to be autoloaded by addin manager
 
tAutoSavePolicy getAutoSavePolicy (void) const
 returns true if the plugin allows his own parameter save to be autoloaded by addin manager
 
const QString getAuthor (void) const
 returns plugin author
 
const QString getDescription (void) const
 returns a brief description of the plugin
 
const QString getDetailDescription (void) const
 returns a detailed description of the plugin
 
const QString getLicenseInfo (void) const
 returns a detailed description of the plugin license
 
const QString getAboutInfo (void) const
 returns a detailed description of the plugin compile informations
 
const QString getFilename (void) const
 returns the plugin's filename
 
const ito::RetVal setFilename (const QString &name)
 
QList< ito::AddInBase * > getInstList (void)
 returns a list of the actual intantiated classes from this plugin
 
const QList< ito::AddInBase * > getInstList (void) const
 
ito::RetVal closeInst (ito::AddInBase **addInInst)
 method for closing an instance
 
virtual QVector< ito::Param > * getInitParamsMand (void)
 returns a vector with the mandatory initialisation parameters
 
virtual QVector< ito::Param > * getInitParamsOpt (void)
 returns a vector with the optional initialisation parameters
 
virtual ito::RetVal getAddInInst (ito::AddInBase **addInInst)=0
 method to instantiate a new class of the plugin
 
void incRef (ito::AddInBase *addIn)
 increment use reference
 
void decRef (ito::AddInBase *addIn)
 decrement use reference
 
int getRef (ito::AddInBase *addIn)
 get reference counter
 
int getInstCount ()
 get number instantiated plugins
 
void setApiFunctions (void **apiFunctions)
 set api function pointer
 
void setApiFunctionsGraph (void **apiFunctionsGraph)
 
void setLoader (QPluginLoader *loader)
 
QPluginLoader * getLoader (void) const
 
bool event (QEvent *e)
 

Public Attributes

void ** m_apiFunctionsBasePtr
 
void ** m_apiFunctionsGraphBasePtr
 

Protected Member Functions

virtual void importItomApi (void **apiPtr)=0
 
virtual void importItomApiGraph (void **apiPtr)=0
 
bool hasGuiSupport ()
 

check if we have gui support


 

Protected Attributes

int m_type
 plugin type
 
int m_version
 plugin version
 
QString m_filename
 plugin (library) filename on the disc
 
int m_maxItomVer
 minimum required version of the main program
 
int m_minItomVer
 maximum supported version of the main program
 
QString m_author
 the plugin author
 
QString m_description
 a brief descrition of the plugin
 
QString m_detaildescription
 a detail descrition of the plugin
 
QString m_license
 a short license string for the plugin, default value is "LGPL with ITO itom-exception"
 
QString m_aboutThis
 
QList< ito::AddInBase * > m_InstList
 vector holding a list of the actual instantiated classes of the plugin
 
QVector< ito::Paramm_initParamsMand
 vector with the mandatory initialisation parameters, please only read this vector within the init-method of AddInBase (afterwards it might have been changed)
 
QVector< ito::Paramm_initParamsOpt
 vector with the optional initialisation parameters, please only read this vector within the init-method of AddInBase (afterwards it might have been changed)
 
tAutoLoadPolicy m_autoLoadPolicy
 
tAutoSavePolicy m_autoSavePolicy
 
bool m_callInitInNewThread
 

Private Member Functions

virtual ito::RetVal closeThisInst (ito::AddInBase **addInInst)=0
 < internal function used within the closing process
 
 Q_DECLARE_PRIVATE (AddInInterfaceBase)
 

self-managed pointer to the private class container (deletes itself if d_ptr is destroyed)


 

Private Attributes

QScopedPointer< AddInInterfaceBasePrivated_ptr
 

Detailed Description

forward declaration to private container class of AddInAlog

class of the AddIn - Library (DLL) - Interface

The measurement program can (and should) be expanded with additional functionality by "plugins". The aim of separating part of the program into plugins is to speed up developement and to reduce complexity for plugin developers. The main program holds the necessary functionality to load and use plugins with either the integrated python interpreter or within c/c++ functions. All plugins are divded into two parts:

The Interface is a small light weight class which is used when loading the dll into the main program. It holds information about the plugin itself, e.g. name, version, parameters and so on. When loading the plugin is tested for compability with the current version of the main program based on the information in the interface class. The AddInXXX class provides the plugin functionality. Instances of this class are only created when the plugin "is used" either by python or within other functions. For a description about the loading, using and unloading process see AddInBase, AddInActuator, AddInDataIO and AddInAlgo. The instantiation of an AddIn class is a two step process. At first the necessary and optional parameter values as well as the plugin's reference number are retrieved from the AddInManager using the getInitParams getInitParams method. Then a new instance is obtained using one of the initAddIn initAddIn methods. Which first create a new instance, move the instance to a new thread and at last call the classes init method

Member Data Documentation

tAutoLoadPolicy ito::AddInInterfaceBase::m_autoLoadPolicy
protected

defines the auto-load policy for automatic loading of parameters from xml-file at startup of any instance

tAutoSavePolicy ito::AddInInterfaceBase::m_autoSavePolicy
protected

defines the auto-save policy for automatic saving of parameters in xml-file at shutdown of any instance

bool ito::AddInInterfaceBase::m_callInitInNewThread
protected

true (default): the init-method of addIn will be called after that the plugin-instance has been moved to new thread (my addInManager). false: the init-method is called in main(gui)-thread, and will be moved to new thread afterwards (this should only be chosen, if not otherwise feasible)


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