- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# KnapParams Class Reference

`#include <KnapParams.h>`

Inheritance diagram for KnapParams:

[legend]
Collaboration diagram for KnapParams:

[legend]
List of all members.

## Public Types
| chrDummy
| endOfChrParams
| intDummy
| endOfIntParams
| dblDummy
| endOfDblParams
| strDummy
| endOfStrParams
| strArrayDummy
| endOfStrArrayParams
enum | chrParams { chrDummy, endOfChrParams }
| Character parameters. More...
enum | intParams { intDummy, endOfIntParams }
| Integer paramters. More...
enum | dblParams { dblDummy, endOfDblParams }
| Double parameters. More...
enum | strParams { strDummy, endOfStrParams }
| String parameters. More...
enum | strArrayParams { strArrayDummy, endOfStrArrayParams }
| There are no string array parameters. More...
## Public Member Functions
virtual void | createKeywordList ()
| Method for creating the list of keyword looked for in the parameter file.
virtual void | setDefaultEntries ()
| Method for setting the default values for the parameters.
void | setEntry (const chrParams key, const char *val)
| char* is true(1) or false(0), not used
void | setEntry (const chrParams key, const char val)
| char is true(1) or false(0), not used
void | setEntry (const chrParams key, const bool val)
| This method is the one that ever been used.
void | setEntry (const intParams key, const char *val)
void | setEntry (const intParams key, const int val)
void | setEntry (const dblParams key, const char *val)
void | setEntry (const dblParams key, const double val)
void | setEntry (const strParams key, const char *val)
void | setEntry (const strArrayParams key, const char *val)
Constructors.
| KnapParams ()
| The default constructor creates a parameter set with from the template argument structure.
Query methods
The members of the parameter set can be queried for using the overloaded entry() method. Using the example in the class documentation the user can get a parameter with the "<code>param.entry(USER_par::parameter_name)</code>" expression.
char | entry (const chrParams key) const
int | entry (const intParams key) const
double | entry (const dblParams key) const
const std::string & | entry (const strParams key) const
const std::vector< std::string > & | entry (const strArrayParams key) const
Packing/unpacking methods
void | pack (AlpsEncoded &buf)
| Pack the parameter set into the buffer (AlpsEncoded is used as buffer Here).
void | unpack (AlpsEncoded &buf)
| Unpack the parameter set from the buffer.

## Detailed Description

Definition at line 26 of file KnapParams.h.

## Member Enumeration Documentation

enum KnapParams::chrParams

Character parameters.

All of these variable are used as booleans (ture = 1, false = 0).

Enumerator:

  chrDummy |
  endOfChrParams |

Definition at line 30 of file KnapParams.h.

enum KnapParams::intParams

Integer paramters.

Enumerator:

  intDummy |
  endOfIntParams |

Definition at line 38 of file KnapParams.h.

enum KnapParams::dblParams

Double parameters.

Enumerator:

  dblDummy |
  endOfDblParams |

Definition at line 45 of file KnapParams.h.

enum KnapParams::strParams

String parameters.

Enumerator:

  strDummy |
  endOfStrParams |

Definition at line 52 of file KnapParams.h.

enum KnapParams::strArrayParams

There are no string array parameters.

Enumerator:

  strArrayDummy |
  endOfStrArrayParams |

Definition at line 59 of file KnapParams.h.

## Constructor & Destructor Documentation

KnapParams::KnapParams | ( |  | ) | `[inline]`

The default constructor creates a parameter set with from the template argument structure.

The keyword list is created and the defaults are set.

Definition at line 71 of file KnapParams.h.

References createKeywordList(), and setDefaultEntries().

## Member Function Documentation

virtual void KnapParams::createKeywordList | ( |  | ) | `[virtual]`

Method for creating the list of keyword looked for in the parameter file.

Implements AlpsParameterSet.

Referenced by KnapParams().

virtual void KnapParams::setDefaultEntries | ( |  | ) | `[virtual]`

Method for setting the default values for the parameters.

Implements AlpsParameterSet.

Referenced by KnapParams().

char KnapParams::entry | ( | const chrParams | key | ) | const`[inline]`

Definition at line 115 of file KnapParams.h.

References AlpsParameterSet::bpar_.

int KnapParams::entry | ( | const intParams | key | ) | const`[inline]`

Definition at line 118 of file KnapParams.h.

References AlpsParameterSet::ipar_.

double KnapParams::entry | ( | const dblParams | key | ) | const`[inline]`

Definition at line 121 of file KnapParams.h.

References AlpsParameterSet::dpar_.

const std::string& KnapParams::entry | ( | const strParams | key | ) | const`[inline]`

Definition at line 124 of file KnapParams.h.

References AlpsParameterSet::spar_.

const std::vector<std::string>& KnapParams::entry | ( | const strArrayParams | key | ) | const`[inline]`

Definition at line 127 of file KnapParams.h.

References AlpsParameterSet::sapar_.

void KnapParams::setEntry | ( | const chrParams | key,
|  | const char * | val |
| ) |  |  | `[inline]`

char* is true(1) or false(0), not used

Definition at line 132 of file KnapParams.h.

References AlpsParameterSet::bpar_.

void KnapParams::setEntry | ( | const chrParams | key,
|  | const char | val |
| ) |  |  | `[inline]`

char is true(1) or false(0), not used

Definition at line 135 of file KnapParams.h.

References AlpsParameterSet::bpar_.

void KnapParams::setEntry | ( | const chrParams | key,
|  | const bool | val |
| ) |  |  | `[inline]`

This method is the one that ever been used.

Definition at line 138 of file KnapParams.h.

References AlpsParameterSet::bpar_.

void KnapParams::setEntry | ( | const intParams | key,
|  | const char * | val |
| ) |  |  | `[inline]`

Definition at line 141 of file KnapParams.h.

References AlpsParameterSet::ipar_.

void KnapParams::setEntry | ( | const intParams | key,
|  | const int | val |
| ) |  |  | `[inline]`

Definition at line 144 of file KnapParams.h.

References AlpsParameterSet::ipar_.

void KnapParams::setEntry | ( | const dblParams | key,
|  | const char * | val |
| ) |  |  | `[inline]`

Definition at line 147 of file KnapParams.h.

References AlpsParameterSet::dpar_.

void KnapParams::setEntry | ( | const dblParams | key,
|  | const double | val |
| ) |  |  | `[inline]`

Definition at line 150 of file KnapParams.h.

References AlpsParameterSet::dpar_.

void KnapParams::setEntry | ( | const strParams | key,
|  | const char * | val |
| ) |  |  | `[inline]`

Definition at line 153 of file KnapParams.h.

References AlpsParameterSet::spar_.

void KnapParams::setEntry | ( | const strArrayParams | key,
|  | const char * | val |
| ) |  |  | `[inline]`

Definition at line 156 of file KnapParams.h.

References AlpsParameterSet::sapar_.

void KnapParams::pack | ( | AlpsEncoded & | buf | ) | `[inline, virtual]`

Pack the parameter set into the buffer (AlpsEncoded is used as buffer Here).

Reimplemented from AlpsParameterSet.

Definition at line 165 of file KnapParams.h.

References AlpsParameterSet::bpar_, AlpsParameterSet::dpar_, endOfChrParams, endOfDblParams, endOfIntParams, endOfStrArrayParams, endOfStrParams, AlpsParameterSet::ipar_, AlpsParameterSet::sapar_, AlpsParameterSet::spar_, and AlpsEncoded::writeRep().

void KnapParams::unpack | ( | AlpsEncoded & | buf | ) | `[inline, virtual]`

Unpack the parameter set from the buffer.

Reimplemented from AlpsParameterSet.

Definition at line 178 of file KnapParams.h.

References AlpsParameterSet::bpar_, AlpsParameterSet::dpar_, endOfChrParams, endOfDblParams, endOfIntParams, endOfStrArrayParams, endOfStrParams, AlpsParameterSet::ipar_, AlpsEncoded::readRep(), AlpsParameterSet::sapar_, and AlpsParameterSet::spar_.

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

- /home/coin/SVN-release/Blis-0.91.0/Alps/examples/Knap/KnapParams.h