OpenMS
Loading...
Searching...
No Matches
ParameterInformation Struct Reference

Struct that captures all information of a command line parameter. More...

#include <OpenMS/APPLICATIONS/ParameterInformation.h>

Collaboration diagram for ParameterInformation:
[legend]

Public Types

enum  ParameterTypes {
  NONE = 0 , STRING , INPUT_FILE , OUTPUT_FILE ,
  OUTPUT_PREFIX , OUTPUT_DIR , DOUBLE , INT ,
  STRINGLIST , INTLIST , DOUBLELIST , INPUT_FILE_LIST ,
  OUTPUT_FILE_LIST , FLAG , TEXT , NEWLINE
}
 Parameter types. More...
 

Public Attributes

std::string name
 name of the parameter (internal and external)
 
ParameterTypes type
 type of the parameter
 
ParamValue default_value
 default value of the parameter stored as string
 
std::string description
 description of the parameter
 
std::string argument
 argument in the description
 
bool required
 flag that indicates if this parameter is required i.e. it must differ from the default value
 
bool advanced
 flag the indicates that the parameter is advanced (this is used for writing the INI file only)
 
StringList tags
 StringList for special tags.
 

Restrictions for different parameter types

StringList valid_strings
 
Int min_int
 
Int max_int
 
double min_float
 
double max_float
 
 ParameterInformation (const std::string &n, ParameterTypes t, const std::string &arg, const ParamValue &def, const std::string &desc, bool req, bool adv, const StringList &tag_values=StringList())
 Constructor that takes all members in declaration order.
 
 ParameterInformation ()
 
 ParameterInformation (const ParameterInformation &rhs)=default
 
ParameterInformationoperator= (const ParameterInformation &rhs)
 

Detailed Description

Struct that captures all information of a command line parameter.

Member Enumeration Documentation

◆ ParameterTypes

Parameter types.

Enumerator
NONE 

Undefined type.

STRING 

std::string parameter

INPUT_FILE 

std::string parameter that denotes an input file

OUTPUT_FILE 

std::string parameter that denotes an output file

OUTPUT_PREFIX 

std::string parameter that denotes an output file prefix

OUTPUT_DIR 

std::string parameter that denotes an output directory

DOUBLE 

Floating point number parameter.

INT 

Integer parameter.

STRINGLIST 

More than one std::string Parameter.

INTLIST 

More than one Integer Parameter.

DOUBLELIST 

More than one std::string Parameter.

INPUT_FILE_LIST 

More than one std::string Parameter that denotes input files.

OUTPUT_FILE_LIST 

More than one std::string Parameter that denotes output files.

FLAG 

Parameter without argument.

TEXT 

Left aligned text, see addText_.

NEWLINE 

An empty line, see addEmptyLine_.

Constructor & Destructor Documentation

◆ ParameterInformation() [1/3]

ParameterInformation ( const std::string &  n,
ParameterTypes  t,
const std::string &  arg,
const ParamValue def,
const std::string &  desc,
bool  req,
bool  adv,
const StringList tag_values = StringList() 
)

Constructor that takes all members in declaration order.

◆ ParameterInformation() [2/3]

◆ ParameterInformation() [3/3]

ParameterInformation ( const ParameterInformation rhs)
default

Member Function Documentation

◆ operator=()

ParameterInformation & operator= ( const ParameterInformation rhs)

Member Data Documentation

◆ advanced

bool advanced

flag the indicates that the parameter is advanced (this is used for writing the INI file only)

◆ argument

std::string argument

argument in the description

◆ default_value

ParamValue default_value

default value of the parameter stored as string

◆ description

std::string description

description of the parameter

◆ max_float

double max_float

◆ max_int

Int max_int

◆ min_float

double min_float

◆ min_int

Int min_int

◆ name

std::string name

name of the parameter (internal and external)

◆ required

bool required

flag that indicates if this parameter is required i.e. it must differ from the default value

◆ tags

StringList tags

StringList for special tags.

◆ type

type of the parameter

◆ valid_strings

StringList valid_strings