Tulip  4.4.0
Better Visualization Through Research
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Groups Pages
tlp::WithParameter Struct Reference

#include <WithParameter.h>

Inherited by tlp::Plugin.

Public Member Functions

template<typename T >
void addInOutParameter (const std::string &name, const std::string &help=std::string(), const std::string &defaultValue=std::string(), bool isMandatory=true)
 
template<typename T >
void addInParameter (const std::string &name, const std::string &help, const std::string &defaultValue, bool isMandatory=true)
 
template<typename T >
void addOutParameter (const std::string &name, const std::string &help=std::string(), const std::string &defaultValue=std::string(), bool isMandatory=true)
 
template<typename T >
void addParameter (const std::string &name, const std::string &help=std::string(), const std::string &defaultValue=std::string(), bool isMandatory=true)
 
const
tlp::ParameterDescriptionList
getParameters () const
 
bool inputRequired () const
 

Protected Attributes

ParameterDescriptionList parameters
 

Detailed Description

This class describes parameters on a plug-in.

These parameters can be of any type, and are used to generate a GUI that will be shown when the plug-in in invoked by the user. It is mainly used by algorithms to display options to the user, e.g. a clustering algorithm can let the user choose which measure to use.

Definition at line 271 of file WithParameter.h.

Member Function Documentation

template<typename T >
void tlp::WithParameter::addInOutParameter ( const std::string &  name,
const std::string &  help = std::string(),
const std::string &  defaultValue = std::string(),
bool  isMandatory = true 
)
inline

Adds an INOUT parameter to the plug-in.

Parameters
nameThe name of the parameter to add.
helpA description of the parameter, that will be displayed to the user. Defaults to "".
defaultValueThe default value the parameter should take, to be the initial value in the GUI. Defaults to "".
isMandatoryWhether this parameter requires a value or not. Defaults to true.
Returns
void

Definition at line 324 of file WithParameter.h.

template<typename T >
void tlp::WithParameter::addInParameter ( const std::string &  name,
const std::string &  help,
const std::string &  defaultValue,
bool  isMandatory = true 
)
inline

Adds an IN parameter to the plug-in.

Parameters
nameThe name of the parameter to add.
helpA description of the parameter, that will be displayed to the user. Defaults to "".
defaultValueThe default value the parameter should take, to be the initial value in the GUI. Defaults to "".
isMandatoryWhether this parameter requires a value or not. Defaults to true.
Returns
void

Definition at line 290 of file WithParameter.h.

template<typename T >
void tlp::WithParameter::addOutParameter ( const std::string &  name,
const std::string &  help = std::string(),
const std::string &  defaultValue = std::string(),
bool  isMandatory = true 
)
inline

Adds an OUT parameter to the plug-in.

Parameters
nameThe name of the parameter to add.
helpA description of the parameter, that will be displayed to the user. Defaults to "".
defaultValueThe default value the parameter should take, to be the initial value in the GUI. Defaults to "".
isMandatoryWhether this parameter requires a value or not. Defaults to true.
Returns
void

Definition at line 307 of file WithParameter.h.

template<typename T >
void tlp::WithParameter::addParameter ( const std::string &  name,
const std::string &  help = std::string(),
const std::string &  defaultValue = std::string(),
bool  isMandatory = true 
)
inline

Adds an IN parameter to the plug-in (deprecated)

See Also
addInParameter()
addOutParameter()
Parameters
nameThe name of the parameter to add.
helpA description of the parameter, that will de displayed to the user. Defaults to 0.
defaultValueThe default value the parameter should take, to be the initial value in the GUI. Defaults to 0.
isMandatoryWhether this parameter requires a value or not. Defaults to true.
Returns
void

Definition at line 344 of file WithParameter.h.

const tlp::ParameterDescriptionList& tlp::WithParameter::getParameters ( ) const

Retrieves the parameters.

Returns
:ParameterDescriptionList the parameters of the plug-in.
bool tlp::WithParameter::inputRequired ( ) const

indicates whether the embedded parameters require some user input

Returns
true if an input parameter or a property output parameter exists

Member Data Documentation

ParameterDescriptionList tlp::WithParameter::parameters
protected

The internal structure storing the parameters.

Definition at line 363 of file WithParameter.h.