![]()  | 
  
    Tulip
    4.4.0
    
   Better Visualization Through Research 
   | 
 
#include <WithParameter.h>
Public Member Functions | |
| template<typename T > | |
| void | add (const std::string ¶meterName, const std::string &help, const std::string &defaultValue, bool isMandatory=true, ParameterDirection direction=IN_PARAM) | 
| void | buildDefaultDataSet (DataSet &ioDataSet, Graph *inG=NULL) const | 
| bool | empty () const | 
| const std::string & | getDefaultValue (const std::string ¶meterName) const | 
| tlp::Iterator < ParameterDescription > *  | getParameters () const | 
| bool | isMandatory (const std::string ¶meterName) const | 
| void | setDefaultValue (const std::string ¶meterName, const std::string &value) | 
| void | setDirection (const std::string ¶meterName, ParameterDirection direction) | 
| unsigned int | size () const | 
This class describes parameters taken by a plugin.
It is used by WithParameter to store parameters. Each parameter is identified by a name, has a default value, a value, a help string, and a boolean indicating whether it is mandatory or optional.
Definition at line 139 of file WithParameter.h.
      
  | 
  inline | 
Adds a new parameter of type T to the list.
| parameterName | The name of the parameter. | 
| help | The help string of this parameter. Defaults to std::string(). | 
| defaultValue | The default value of this parameter. Defaults to std::string(). | 
| isMandatory | Whether this parameter is mandatory or optional. Defaults to true. | 
| direction | The parameter's direction (see tlp::ParameterDirection for details) | 
Definition at line 153 of file WithParameter.h.
| void tlp::ParameterDescriptionList::buildDefaultDataSet | ( | DataSet & | ioDataSet, | 
| Graph * | inG = NULL  | 
        ||
| ) | const | 
Builds a DataSet containing the default values for each parameter. If the DataSet has a key which is equal to a parameter's name, the existing value is kept.
| ioDataSet | The input dataset on which the parameters names will be associated with their default values. | 
| inG | A graph on which to create properties if any parameter is of a property type. Defaults to 0. | 
      
  | 
  inline | 
Test if the list is empty.
Definition at line 242 of file WithParameter.h.
| const std::string& tlp::ParameterDescriptionList::getDefaultValue | ( | const std::string & | parameterName | ) | const | 
retrieves the default value of a parameter.
| parameterName | The name of the parameter to retrieve the default value of. | 
| tlp::Iterator<ParameterDescription>* tlp::ParameterDescriptionList::getParameters | ( | ) | const | 
Retrieves an Iterator on the parameters.
| bool tlp::ParameterDescriptionList::isMandatory | ( | const std::string & | parameterName | ) | const | 
Retrieves whether a parameter is mandatory or optional.
| parameterName | The name of the parameter for which to check if it is mandatory or optional. | 
| void tlp::ParameterDescriptionList::setDefaultValue | ( | const std::string & | parameterName, | 
| const std::string & | value | ||
| ) | 
Sets the default value of a parameter.
| parameterName | The name of the parameter to set the value of. | 
| value | The new value for this parameter. | 
| void tlp::ParameterDescriptionList::setDirection | ( | const std::string & | parameterName, | 
| ParameterDirection | direction | ||
| ) | 
Sets the direction of a parameter.
| parameterName | The name of the parameter to set the value of. | 
| dir | The new direction for this parameter. | 
      
  | 
  inline | 
Returns the number of parameters.
Definition at line 233 of file WithParameter.h.