asl::Parameter< T > Class Template Reference
Library Design Issues

`#include <aslParametersManager.h>`

Inheritance diagram for asl::Parameter< T >:
[legend]

## Public Member Functions

| Parameter (const char *key_, const char *description_, const char *units_="")
| Parameter (T defaultValue, const char *key_, const char *description_, const char *units_="")
const T & | v () const
T & | v ()
std::shared_ptr< T > | p ()
| Parameter (const char *key_, const char *description_, const char *units_="")
| Parameter (T defaultValue, const char *key_, const char *description_, const char *units_="")
const T & | v () const
T & | v ()
std::shared_ptr< T > | p ()

## Detailed Description

### template<typename T>
class asl::Parameter< T >

This class stores parameter's value and the information needed to extract it from command line and/or parameters file. Important: declare Parameters only after declaring ParametersManager or ApplicationParametersManager instance and before calling ParametersManager::load() because each Parameter adds itself to the instance automatically!

Examples
  bus_wind.cc, compressor.cc, cubeGravity.cc, cubeIncompressibleGravity.cc, cubePoroelasticGravity.cc, jumpingBox.cc, levelSetBasic.cc, levelSetFacetedGrowth.cc, levelSetNormalGrowth.cc, locomotive.cc, locomotive_laminar.cc, locomotive_stability.cc, and poroelastic.cc.

Definition at line 44 of file aslParametersManager.h.

## Constructor & Destructor Documentation

## Parameter() [1/4]

template<typename T >

asl::Parameter< T >::Parameter | ( | const char * | key_,
|  | const char * | description_,
|  | const char * | units_ = `""`
| ) |  |

`key_` - option key; is used to specify this parameter through command line and/or parameters file. `description_` is used in the help output and as comment on parameters file generation. `units_` - parameter units; is used to complement the option description mentioned above. Might be used for automatic unit conversion in future (to this end it is recommended to use the notation of the Boost::Units library). Since no default value is specified, the parameter is required to be specified in the parameters file or command line. Use "" to provide a vector asl::AVec<T> through command line, e.g.: –size "30 20 50"

## Parameter() [2/4]

template<typename T >

asl::Parameter< T >::Parameter | ( | T | defaultValue,
|  | const char * | key_,
|  | const char * | description_,
|  | const char * | units_ = `""`
| ) |  |

`defaultValue` - default parameter value. Since a default value is specified, the parameter is not required to be specified in the parameters file or command line. `key_` - option key; is used to specify this parameter through command line and/or parameters file. `description_` is used in the help output and as comment on parameters file generation. `units_` - parameter units; is used to complement the option description mentioned above. Might be used for automatic unit conversion in future (to this end it is recommended to use the notation of the Boost::Units library).

## Parameter() [3/4]

template<typename T >

asl::Parameter< T >::Parameter | ( | const char * | key_,
|  | const char * | description_,
|  | const char * | units_ = `""`
| ) |  |

`key_` - option key; is used to specify this parameter through command line and/or parameters file. `description_` is used in the help output and as comment on parameters file generation. `units_` - parameter units; is used to complement the option description mentioned above. Might be used for automatic unit conversion in future (to this end it is recommended to use the notation of the Boost::Units library). Since no default value is specified, the parameter is required to be specified in the parameters file or command line. Use "" to provide a vector asl::AVec<T> through command line, e.g.: –size "30 20 50"

## Parameter() [4/4]

template<typename T >

asl::Parameter< T >::Parameter | ( | T | defaultValue,
|  | const char * | key_,
|  | const char * | description_,
|  | const char * | units_ = `""`
| ) |  |

`defaultValue` - default parameter value. Since a default value is specified, the parameter is not required to be specified in the parameters file or command line. `key_` - option key; is used to specify this parameter through command line and/or parameters file. `description_` is used in the help output and as comment on parameters file generation. `units_` - parameter units; is used to complement the option description mentioned above. Might be used for automatic unit conversion in future (to this end it is recommended to use the notation of the Boost::Units library).

## Member Function Documentation

## p() [1/2]

template<typename T >

std::shared_ptr< T > asl::Parameter< T >::p

inline

Definition at line 190 of file aslParametersManager.h.

## p() [2/2]

template<typename T >

std::shared_ptr<T> asl::Parameter< T >::p | ( |  | ) |

inline

## v() [1/4]

template<typename T >

T & asl::Parameter< T >::v

inline

Definition at line 185 of file aslParametersManager.h.

## v() [2/4]

template<typename T >

T& asl::Parameter< T >::v | ( |  | ) |

inline

## v() [3/4]

template<typename T >

const T & asl::Parameter< T >::v

inline

Examples
  bus_wind.cc, cubeGravity.cc, cubeIncompressibleGravity.cc, cubePoroelasticGravity.cc, jumpingBox.cc, and poroelastic.cc.

Definition at line 179 of file aslParametersManager.h.

## v() [4/4]

template<typename T >

const T& asl::Parameter< T >::v | ( |  | ) | const

inline

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

- /build/asl-1Fw6fH/asl-0.1.7/debian/tmp/usr/include/ASL/utilities/aslParametersManager.h