Ocean
Ocean::CommandArguments::Parameter Class Reference

This class defines a named value with long and short name, with default parameter and description. More...

Public Member Functions

 Parameter (const std::string &longName, const std::string &shortName, const std::string &description, const Value &defaultValue)
 Creates a new parameter object. More...
 
const std::string & longName () const
 Returns the long name of this parameter. More...
 
const std::string & shortName () const
 Returns the short name of this parameter. More...
 
const std::string & description () const
 Returns the description of this parameter. More...
 
const ValuedefaultValue () const
 Returns the default value of this parameter. More...
 

Protected Attributes

std::string longName_
 The long name of the parameter. More...
 
std::string shortName_
 The short name of the parameter, can be empty. More...
 
std::string description_
 The description of this parameter, can be empty. More...
 
Value defaultValue_
 The default value of this parameter, can be invalid. More...
 

Detailed Description

This class defines a named value with long and short name, with default parameter and description.

Constructor & Destructor Documentation

◆ Parameter()

Ocean::CommandArguments::Parameter::Parameter ( const std::string &  longName,
const std::string &  shortName,
const std::string &  description,
const Value defaultValue 
)

Creates a new parameter object.

Parameters
longNameThe long name of the parameter, must be valid
shortNameThe short name of the parameter, can be empty
descriptionThe optional description of the parameter, can be empty
defaultValueThe optional default value, invalid otherwise

Member Function Documentation

◆ defaultValue()

const Value & Ocean::CommandArguments::Parameter::defaultValue ( ) const
inline

Returns the default value of this parameter.

Returns
The parameter's default name, can be invalid

◆ description()

const std::string & Ocean::CommandArguments::Parameter::description ( ) const
inline

Returns the description of this parameter.

Returns
The parameter's description

◆ longName()

const std::string & Ocean::CommandArguments::Parameter::longName ( ) const
inline

Returns the long name of this parameter.

Returns
The parameter's long name

◆ shortName()

const std::string & Ocean::CommandArguments::Parameter::shortName ( ) const
inline

Returns the short name of this parameter.

Returns
The parameter's short name, can be empty

Field Documentation

◆ defaultValue_

Value Ocean::CommandArguments::Parameter::defaultValue_
protected

The default value of this parameter, can be invalid.

◆ description_

std::string Ocean::CommandArguments::Parameter::description_
protected

The description of this parameter, can be empty.

◆ longName_

std::string Ocean::CommandArguments::Parameter::longName_
protected

The long name of the parameter.

◆ shortName_

std::string Ocean::CommandArguments::Parameter::shortName_
protected

The short name of the parameter, can be empty.


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