itom
Loading...
Searching...
No Matches
ito::AddInAlgo Class Reference

base class for all "algorithm" plugin classes More...

#include <addInInterface.h>

Inheritance diagram for ito::AddInAlgo:
ito::AddInBase

Classes

class  AlgoWidgetDef
 container for publishing widgets provided by any plugin More...
 
class  FilterDef
 container for publishing filters provided by any plugin More...
 
class  FilterDefExt
 extended FilterDef (derived from FilterDef) with a filterFunc of type f_filterExt instead of t_filter. This method has an additional argument of type FunctionCancellationAndObserver More...
 

Public Types

enum  tAlgoCategory { catNone = 0x0000 , catDiskIO = 0x0001 , catAnalyseDataObject = 0x0002 , catPlotDataObject = 0x0004 }
 
enum  tAlgoInterface {
  iNotSpecified = 0x0000 , iReadDataObject = 0x0001 , iWriteDataObject = 0x0002 , iReadPointCloud = 0x0004 ,
  iWritePointCloud = 0x0008 , iReadPolygonMesh = 0x0010 , iWritePolygonMesh = 0x0020 , iPlotSingleObject = 0x0040
}
 
typedef ito::RetVal(*) t_filter(QVector< ito::ParamBase > *paramsMand, QVector< ito::ParamBase > *paramsOpt, QVector< ito::ParamBase > *paramsOut)
 
typedef ito::RetVal(*) t_filterExt(QVector< ito::ParamBase > *paramsMand, QVector< ito::ParamBase > *paramsOpt, QVector< ito::ParamBase > *paramsOut, QSharedPointer< ito::FunctionCancellationAndObserver > observer)
 
typedef QWidget *(*) t_algoWidget(QVector< ito::ParamBase > *paramsMand, QVector< ito::ParamBase > *paramsOpt, ito::RetVal &retValue)
 
typedef ito::RetVal(*) t_filterParam(QVector< ito::Param > *paramsMand, QVector< ito::Param > *paramsOpt, QVector< ito::Param > *paramsOut)
 possible categories for filter or widget-methods
 

Public Slots

virtual ito::RetVal getParam (QSharedPointer< ito::Param >, ItomSharedSemaphore *=NULL)
 
virtual ito::RetVal setParam (QSharedPointer< ito::ParamBase >, ItomSharedSemaphore *=NULL)
 
- Public Slots inherited from ito::AddInBase
virtual ito::RetVal init (QVector< ito::ParamBase > *paramsMand, QVector< ito::ParamBase > *paramsOpt, ItomSharedSemaphore *waitCond=NULL)=0
 method for the initialisation of a new instance of the class (must be overwritten)
 
virtual ito::RetVal close (ItomSharedSemaphore *waitCond)=0
 method for closing an instance (must be overwritten)
 
virtual ito::RetVal getParam (QSharedPointer< ito::Param > val, ItomSharedSemaphore *waitCond=NULL)=0
 method for the retrieval of a parameter. The actual value is always passed as ito::Param (must be overwritten). See also setParam
 
virtual ito::RetVal setParam (QSharedPointer< ito::ParamBase > val, ItomSharedSemaphore *waitCond=NULL)=0
 method to set a parameter. The actual value is always passed as ito::ParamBase (must be overwritten). See also getParam
 
ito::RetVal setParamVector (const QVector< QSharedPointer< ito::ParamBase > > values, ItomSharedSemaphore *waitCond=NULL)
 method for setting various parameters (can be used instead of multiple calls to setParam, this can safe multiple invocations)
 
ito::RetVal getParamVector (const QVector< QSharedPointer< ito::Param > > values, ItomSharedSemaphore *waitCond=NULL)
 method for getting various parameters (can be used instead of multiple calls to getParam, this can safe multiple invocations)
 
virtual ito::RetVal execFunc (const QString funcName, QSharedPointer< QVector< ito::ParamBase > > paramsMand, QSharedPointer< QVector< ito::ParamBase > > paramsOpt, QSharedPointer< QVector< ito::ParamBase > > paramsOut, ItomSharedSemaphore *waitCond=NULL)
 overwrite this function if you registered exec funcs. Once the exec function is called, this method is executed.
 
ito::RetVal moveBackToApplicationThread (ItomSharedSemaphore *waitCond=NULL)
 method invoked by AddInManager if the plugin should be pulled back to the main thread of itom. (not for direct use in plugins)
 
void sendParameterRequest ()
 immediately emits the signal parametersChanged
 

Public Member Functions

ito::RetVal getFilterList (QHash< QString, FilterDef * > &fList) const
 
ito::RetVal getAlgoWidgetList (QHash< QString, AlgoWidgetDef * > &awList) const
 
ito::RetVal rejectFilter (const QString &name)
 
ito::RetVal rejectAlgoWidget (const QString &name)
 
- Public Member Functions inherited from ito::AddInBase
const Param getParamRec (const QString name, bool *nameCheckOk=NULL) const
 method to retrieve a parameter from the parameter map (m_params)
 
AddInInterfaceBasegetBasePlugin (void) const
 returns the interface of this instance.
 
ito::RetVal MoveToThread (void)
 creates new thread for the class instance and moves this instance to the new thread
 
const ito::RetVal getParamList (QMap< QString, Param > **paramNames)
 returns a map with the parameters of this plugin.
 
const ito::RetVal getExecFuncList (QMap< QString, ExecFuncParams > **funcs)
 returns list of registered additional functions
 
int getID () const
 retrieve the uniqueID of this instance
 
QString getIdentifier () const
 retrieve the unique identifier of this instance
 
virtual int hasConfDialog (void)
 determine if a configuration dialog is available
 
virtual const ito::RetVal showConfDialog (void)
 open configuration dialog
 
int createdByGUI () const
 returns true if this instance has firstly been created by the GUI
 
void setCreatedByGUI (int value)
 method to set whether this instance has been firstly created by the GUI (true) or by any other component (Python, C++, other plugin,..) (false)
 
int getRefCount (void) const
 Returns the reference counter of this instance.
 
bool hasDockWidget (void) const
 Returns true if this plugin provides a dock widget, that can be shown in the main window.
 
QDockWidget * getDockWidget (void) const
 Returns the reference to the dock widget of this plugin or NULL, if no dock widget is provided or if it is already deleted.
 
virtual void dockWidgetDefaultStyle (bool &floating, bool &visible, Qt::DockWidgetArea &defaultArea) const
 returns default style properties for dock-widget of plugin
 
int isAlive (void)
 returns the alive-flag of this plugin
 
void setAlive (void)
 sets the alive-flag to 1 ("still alive")
 
bool isInitialized (void) const
 returns in a thread-safe way the status of the m_initialized-member variable. This variable should be set to true at the end of the init-method.
 
void setInitialized (bool initialized)
 sets in a thread-safe way the status of the m_initialized-member
 
QVector< ito::AddInBase::AddInRef * > * getArgAddIns (void)
 returns vector of AddInRef instances.
 
QMutex & getUserMutex ()
 returns the user mutex of this plugin, that can be used for user-defined purposes.
 

Static Protected Member Functions

static ito::RetVal prepareParamVectors (QVector< ito::Param > *paramsMand, QVector< ito::Param > *paramsOpt, QVector< ito::Param > *paramsOut)
 small check and cleaning of all parameter vectors (can be used in filterParam methods)
 

Protected Attributes

QHash< QString, FilterDef * > m_filterList
 
QHash< QString, AlgoWidgetDef * > m_algoWidgetList
 
- Protected Attributes inherited from ito::AddInBase
QMap< QString, Paramm_params
 map of the available parameters
 
QString m_identifier
 unique identifier (serial number, com-port...)
 

Private Member Functions

 Q_DECLARE_PRIVATE (AddInAlgo)
 

Private Attributes

QScopedPointer< AddInAlgoPrivated_ptr
 

Additional Inherited Members

- Signals inherited from ito::AddInBase
void parametersChanged (QMap< QString, ito::Param > params)
 This signal usually is emitted if the vector m_params is changed.
 
- Static Public Member Functions inherited from ito::AddInBase
static int getMaximumThreadCount ()
 
static RetVal setMaximumThreadCount (int threadCount)
 
- Protected Member Functions inherited from ito::AddInBase
 AddInBase ()
 Constructor.
 
virtual ~AddInBase ()
 Destructor.
 
void setIdentifier (const QString &identifier)
 sets the identifier of the plugin. The slot AbstractAddInDockWidget::identifierChanged is invoked if a corresponding dock widget is available.
 
void createDockWidget (QString title, QDockWidget::DockWidgetFeatures features, Qt::DockWidgetAreas allowedAreas=Qt::AllDockWidgetAreas, QWidget *content=NULL)
 Creates the dock-widget for this plugin.
 
ito::RetVal registerExecFunc (const QString funcName, const QVector< ito::Param > &paramsMand, const QVector< ito::Param > &paramsOpt, const QVector< ito::Param > &paramsOut, const QString infoString)
 Registers an additional function with specific name and default parameters.
 
void setBasePlugin (AddInInterfaceBase *base)
 sets the interface of this instance to base.
 
bool hasGuiSupport ()
 check if we have gui support
 

Detailed Description

base class for all "algorithm" plugin classes

This class is one step further down the line from AddInBase. "Algorithm" plugins must be derived from this class which is derived from AddInBase. Compared to AddInDataIO and AddInActuator the AddInAlgo class is fairly simple. It does not have an init function or a close function. In the algo base class at the moment no further methods or variables are declared - it serves more as an organisation class, putting all actual plugins to the same level of inheritance.

Member Enumeration Documentation

◆ tAlgoCategory

Enumerator
catNone 

default: no category

catDiskIO 

category for saving or loading data from hard drive

catAnalyseDataObject 

category for methods analysing data objects

catPlotDataObject 

category for methods plotting data objects

◆ tAlgoInterface

Enumerator
iNotSpecified 

default: filter or widget does not fit to any interface

iReadDataObject 

interface for loading content of files into a data object

iWriteDataObject 

interface for saving data object to file

iReadPointCloud 

interface for loading content of files into a point cloud

iWritePointCloud 

interface for saving point cloud to file

iReadPolygonMesh 

interface for loading content of files into a polygon mesh

iWritePolygonMesh 

interface for saving polygon mesh to file

iPlotSingleObject 

interface for plotting dataObjects via the GUI

Member Function Documentation

◆ Q_DECLARE_PRIVATE()

ito::AddInAlgo::Q_DECLARE_PRIVATE ( AddInAlgo )
private

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


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