Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

qgar::QgarAppParamDescr Class Reference
[Application coding]

#include <qgarlib/QgarAppParamDescr.H>

List of all members.


Detailed Description

Memory representation of an application parameter description.

See also:
QgarAppDescr
Author:
Jan Rendek
Date:
May 15, 2003 10:26
Since:
Qgar 2.1.1

Definition at line 67 of file QgarAppParamDescr.H.

Public Types

enum  ParamPassing {
  QGE_IN,
  QGE_OUT,
  QGE_INOUT
}
 The parameters passing methods. More...
enum  ParamType {
  QGE_UNKNOWN_TYPE,
  QGE_NUM,
  QGE_IMAGE
}
 The parameters types. More...
enum  ParamFormat {
  QGE_UNKNOWN_FORMAT,
  QGE_PBM,
  QGE_PPM,
  QGE_PGM,
  QGE_DXF,
  QGE_SVG,
  QGE_INT,
  QGE_REAL
}
 The parameters formats. More...

Public Member Functions

Constructors
 QgarAppParamDescr ()
 Builds an empty parameter description.
 QgarAppParamDescr (const std::string &name, const std::string &flag, bool required, ParamPassing passingMode, ParamType type, ParamFormat format, const std::string &briefDoc, const std::string &longDoc, const std::string &defaultValue="", const std::string &minValue="", const std::string &maxValue="")
 Creates a parameter description from a full set of parameter data.
 QgarAppParamDescr (const QgarAppParamDescr &)
 Copy constructor.
Destructors
virtual ~QgarAppParamDescr ()
 Destructor.
Access
std::string name () const
 Retrieve the name of the parameter.
std::string flag () const
 Retrieve the flag introducing the parameter on the command line.
bool required () const
 Query if the parameter is required.
ParamPassing passingMode () const
 Retrieve the parameter passing mode.
ParamType type () const
 Retrieve the parameter type.
ParamFormat format () const
 Retrieve the parameter format.
std::string defaultValue () const
 Retrieve the parameter default value.
std::string minValue () const
 Retrieve the parameter minimum value.
std::string maxValue () const
 Retrieve the parameter maximum value.
std::string briefDoc () const
 Retrieve the parameter brief documentation.
std::string longDoc () const
 Retrieve the parameter detailed documentation.
Transformation
void setName (const std::string &name)
 Sets the parameter name.
void setFlag (const std::string &flag)
 Sets the parameter introducing flag.
void setRequired (bool required)
 Sets if the parameter is mandatory.
void setPassingMode (ParamPassing passingMode)
 Sets the parameter passing mode.
void setType (ParamType type)
 Sets the parameter type.
void setFormat (ParamFormat format)
 Sets the parameter format.
void setDefaultValue (const std::string &val)
 Sets the parameter default value.
void setMinValue (const std::string &val)
 Sets the parameter minimum value.
void setMaxValue (const std::string &val)
 Sets the parameter maximum value.
void setBriefDoc (const std::string &briefDoc)
 Sets the brief documentation for the parameter.
void setLongDoc (const std::string &longDoc)
 Sets the detailed documentation for the parameter.
Operators
QgarAppParamDescroperator= (const QgarAppParamDescr &)
 Assignment operator.

Protected Attributes

std::string _name
 The name of the parameter.
std::string _flag
 The flag introducing this parameter on the command line invoking the application.
bool _required
 Flag indicating if the parameter is required or optional.
ParamPassing _passingMode
 The passing mode for this parameter.
ParamType _type
 The type of this parameter.
ParamFormat _format
 The format of this parameter.
std::string _briefDoc
 The brief documentation for this parameter.
std::string _longDoc
 The long documentation for this parameter.
std::string _defaultValue
 The default value for this parameter (if any).
std::string _minValue
 The minimum value for this parameter (if any).
std::string _maxValue
 The max value for this parameter (if any).


Member Enumeration Documentation

enum qgar::QgarAppParamDescr::ParamFormat
 

The parameters formats.

Enumerator:
QGE_UNKNOWN_FORMAT  The format of the parameter is either unknown, or is not recognized as a basic parameter format.
QGE_PBM  The parameter is an image in PBM format.
QGE_PPM  The parameter is an image in PPM format.
QGE_PGM  The parameter is an image in PGM format.
QGE_DXF  The parameter is an image in DXF format.
QGE_SVG  The parameter is an image in SVG format.
QGE_INT  The parameter is an integer number.
QGE_REAL  The parameter is a real number.

Definition at line 130 of file QgarAppParamDescr.H.

enum qgar::QgarAppParamDescr::ParamPassing
 

The parameters passing methods.

Enumerator:
QGE_IN  The parameter is an input of the application and will not be modified by its execution.
QGE_OUT  The parameter is an output of the application and will be created by its execution.
QGE_INOUT  The parameter is used by the application as both input and output. The parameter will be modified by the execution of the application.

Definition at line 78 of file QgarAppParamDescr.H.

enum qgar::QgarAppParamDescr::ParamType
 

The parameters types.

Enumerator:
QGE_UNKNOWN_TYPE  The type of the parameter is either unknown, or is not recognized as a basic parameter type.
QGE_NUM  The parameter is a number.
QGE_IMAGE  The parameter is an image.

Definition at line 106 of file QgarAppParamDescr.H.


Constructor & Destructor Documentation

qgar::QgarAppParamDescr::QgarAppParamDescr  ) 
 

Builds an empty parameter description.

The created description cannot be used as is. Its members must be updated using the class setters.

Definition at line 62 of file QgarAppParamDescr.C.

qgar::QgarAppParamDescr::QgarAppParamDescr const std::string &  name,
const std::string &  flag,
bool  required,
ParamPassing  passingMode,
ParamType  type,
ParamFormat  format,
const std::string &  briefDoc,
const std::string &  longDoc,
const std::string &  defaultValue = "",
const std::string &  minValue = "",
const std::string &  maxValue = ""
 

Creates a parameter description from a full set of parameter data.

Parameters:
name The name of the parameter.
flag The flag introducing the parameter on the command line.
required Whether the parameter is mandatory.
passingMode The passing mode of the parameter.
type The type of the parameter.
format The format of the parameter.
briefDoc The brief documentation of the parameter.
longDoc The detailed documentation of the parameter.
defaultValue The default value for this parameter (if any).
minValue The minimum value for this parameter (if any).
maxValue The maximum value for this parameter (if any).

qgar::QgarAppParamDescr::QgarAppParamDescr const QgarAppParamDescr  ) 
 

Copy constructor.

Definition at line 107 of file QgarAppParamDescr.C.

qgar::QgarAppParamDescr::~QgarAppParamDescr  )  [virtual]
 

Destructor.

Definition at line 130 of file QgarAppParamDescr.C.


Member Function Documentation

string qgar::QgarAppParamDescr::briefDoc  )  const
 

Retrieve the parameter brief documentation.

Returns:
The parameter brief documentation.

Definition at line 189 of file QgarAppParamDescr.C.

References _briefDoc.

string qgar::QgarAppParamDescr::defaultValue  )  const
 

Retrieve the parameter default value.

Returns:
The default value serialized as a string, or an empty string if none was provided

Definition at line 205 of file QgarAppParamDescr.C.

References _defaultValue.

string qgar::QgarAppParamDescr::flag  )  const
 

Retrieve the flag introducing the parameter on the command line.

Returns:
The flag introducing the parameter on the command line.

Definition at line 149 of file QgarAppParamDescr.C.

References _flag.

QgarAppParamDescr::ParamFormat qgar::QgarAppParamDescr::format  )  const
 

Retrieve the parameter format.

Returns:
The parameter format.

Definition at line 181 of file QgarAppParamDescr.C.

References _format.

string qgar::QgarAppParamDescr::longDoc  )  const
 

Retrieve the parameter detailed documentation.

Returns:
The parameter detailed documentation.

Definition at line 197 of file QgarAppParamDescr.C.

References _longDoc.

string qgar::QgarAppParamDescr::maxValue  )  const
 

Retrieve the parameter maximum value.

Returns:
The maximum value serialized as a string, or an empty string if none was provided

Definition at line 221 of file QgarAppParamDescr.C.

References _maxValue.

string qgar::QgarAppParamDescr::minValue  )  const
 

Retrieve the parameter minimum value.

Returns:
The minimum value serialized as a string, or an empty string if none was provided

Definition at line 213 of file QgarAppParamDescr.C.

References _minValue.

string qgar::QgarAppParamDescr::name  )  const
 

Retrieve the name of the parameter.

Returns:
The name of the parameter.

Definition at line 141 of file QgarAppParamDescr.C.

References _name.

QgarAppParamDescr & qgar::QgarAppParamDescr::operator= const QgarAppParamDescr  ) 
 

Assignment operator.

Definition at line 323 of file QgarAppParamDescr.C.

References _briefDoc, _flag, _format, _longDoc, _name, _passingMode, _required, and _type.

QgarAppParamDescr::ParamPassing qgar::QgarAppParamDescr::passingMode  )  const
 

Retrieve the parameter passing mode.

Returns:
The parameter passing mode.

Definition at line 165 of file QgarAppParamDescr.C.

References _passingMode.

bool qgar::QgarAppParamDescr::required  )  const
 

Query if the parameter is required.

Returns:
True if the parameter is required, false if it is optional

Definition at line 157 of file QgarAppParamDescr.C.

References _required.

void qgar::QgarAppParamDescr::setBriefDoc const std::string &  briefDoc  ) 
 

Sets the brief documentation for the parameter.

Parameters:
briefDoc The new brief documentation for the parameter.

void qgar::QgarAppParamDescr::setDefaultValue const std::string &  val  ) 
 

Sets the parameter default value.

Parameters:
val The new default value for the parameter serialized as a string.

void qgar::QgarAppParamDescr::setFlag const std::string &  flag  ) 
 

Sets the parameter introducing flag.

Parameters:
flag The new flag for the parameter.

void qgar::QgarAppParamDescr::setFormat ParamFormat  format  ) 
 

Sets the parameter format.

Parameters:
format The new parameter format.

Definition at line 271 of file QgarAppParamDescr.C.

References _format.

void qgar::QgarAppParamDescr::setLongDoc const std::string &  longDoc  ) 
 

Sets the detailed documentation for the parameter.

Parameters:
longDoc The new detailed documentation for the parameter.

void qgar::QgarAppParamDescr::setMaxValue const std::string &  val  ) 
 

Sets the parameter maximum value.

Parameters:
val The new maximum value for the parameter serialized as a string.

void qgar::QgarAppParamDescr::setMinValue const std::string &  val  ) 
 

Sets the parameter minimum value.

Parameters:
val The new minimum value for the parameter serialized as a string.

void qgar::QgarAppParamDescr::setName const std::string &  name  ) 
 

Sets the parameter name.

Parameters:
name The new name of the parameter.

void qgar::QgarAppParamDescr::setPassingMode ParamPassing  passingMode  ) 
 

Sets the parameter passing mode.

Parameters:
passingMode The new parameter passing mode.

Definition at line 255 of file QgarAppParamDescr.C.

References _passingMode.

void qgar::QgarAppParamDescr::setRequired bool  required  ) 
 

Sets if the parameter is mandatory.

Parameters:
required True if the parameter is required, false otherwise.

Definition at line 247 of file QgarAppParamDescr.C.

References _required.

void qgar::QgarAppParamDescr::setType ParamType  type  ) 
 

Sets the parameter type.

Parameters:
type The new parameter type.

Definition at line 263 of file QgarAppParamDescr.C.

References _type.

QgarAppParamDescr::ParamType qgar::QgarAppParamDescr::type  )  const
 

Retrieve the parameter type.

Returns:
The parameter type.

Definition at line 173 of file QgarAppParamDescr.C.

References _type.


Member Data Documentation

std::string qgar::QgarAppParamDescr::_briefDoc [protected]
 

The brief documentation for this parameter.

Definition at line 446 of file QgarAppParamDescr.H.

Referenced by briefDoc(), and operator=().

std::string qgar::QgarAppParamDescr::_defaultValue [protected]
 

The default value for this parameter (if any).

Definition at line 452 of file QgarAppParamDescr.H.

Referenced by defaultValue().

std::string qgar::QgarAppParamDescr::_flag [protected]
 

The flag introducing this parameter on the command line invoking the application.

Definition at line 431 of file QgarAppParamDescr.H.

Referenced by flag(), and operator=().

ParamFormat qgar::QgarAppParamDescr::_format [protected]
 

The format of this parameter.

Definition at line 443 of file QgarAppParamDescr.H.

Referenced by format(), operator=(), and setFormat().

std::string qgar::QgarAppParamDescr::_longDoc [protected]
 

The long documentation for this parameter.

Definition at line 449 of file QgarAppParamDescr.H.

Referenced by longDoc(), and operator=().

std::string qgar::QgarAppParamDescr::_maxValue [protected]
 

The max value for this parameter (if any).

Definition at line 458 of file QgarAppParamDescr.H.

Referenced by maxValue().

std::string qgar::QgarAppParamDescr::_minValue [protected]
 

The minimum value for this parameter (if any).

Definition at line 455 of file QgarAppParamDescr.H.

Referenced by minValue().

std::string qgar::QgarAppParamDescr::_name [protected]
 

The name of the parameter.

Definition at line 425 of file QgarAppParamDescr.H.

Referenced by name(), and operator=().

ParamPassing qgar::QgarAppParamDescr::_passingMode [protected]
 

The passing mode for this parameter.

Definition at line 437 of file QgarAppParamDescr.H.

Referenced by operator=(), passingMode(), and setPassingMode().

bool qgar::QgarAppParamDescr::_required [protected]
 

Flag indicating if the parameter is required or optional.

Definition at line 434 of file QgarAppParamDescr.H.

Referenced by operator=(), required(), and setRequired().

ParamType qgar::QgarAppParamDescr::_type [protected]
 

The type of this parameter.

Definition at line 440 of file QgarAppParamDescr.H.

Referenced by operator=(), setType(), and type().


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