- Main Page
- Modules
- Classes

- Search for |

# KNOB: Basics
[KNOB: Commandline Option Handling]

## Enumerations

enum | LEVEL_BASE::KNOB_MODE { KNOB_MODE_INVALID, LEVEL_BASE::KNOB_MODE_COMMENT, LEVEL_BASE::KNOB_MODE_WRITEONCE, LEVEL_BASE::KNOB_MODE_OVERWRITE,
LEVEL_BASE::KNOB_MODE_ACCUMULATE,
LEVEL_BASE::KNOB_MODE_APPEND,
KNOB_MODE_LAST
}

## Functions

| LEVEL_BASE::KNOB_BASE::KNOB_BASE (const string &myprefix, const string &myname, const string &myfamily, const string &mydefault, const string &mypurpose, KNOB_MODE mymode=KNOB_MODE_WRITEONCE)
int | LEVEL_BASE::KNOB_BASE::Compare (const KNOB_BASE &k2) const
STATIC VOID | LEVEL_BASE::KNOB_BASE::CheckAllKnobs (BOOL allowDashes=FALSE)
STATIC UINT32 | LEVEL_BASE::KNOB_BASE::NumberOfKnobs ()
STATIC VOID | LEVEL_BASE::KNOB_BASE::DisableKnobFamily (const string &myfamily)
STATIC VOID | LEVEL_BASE::KNOB_BASE::EnableKnobFamily (const string &myfamily)
STATIC VOID | LEVEL_BASE::KNOB_BASE::DisableKnob (const string &myname)
STATIC VOID | LEVEL_BASE::KNOB_BASE::EnableKnob (const string &myname)
STATIC KNOB_BASE * | LEVEL_BASE::KNOB_BASE::FindKnob (const string &name)
STATIC KNOB_BASE * | LEVEL_BASE::KNOB_BASE::FindFamily (const string &name)
STATIC KNOB_BASE * | LEVEL_BASE::KNOB_BASE::FindEnabledKnob (const string &name)
STATIC string | LEVEL_BASE::KNOB_BASE::StringKnobSummary ()

## Detailed Description

Availability:
  Mode: JIT & Probe
  O/S: Linux & Windows
  CPU: All

## Enumeration Type Documentation

enum LEVEL_BASE::KNOB_MODE

| Per knob mode - indicates how multiple appearances of the mode on the command line are handled

Enumerator:

  KNOB_MODE_COMMENT | comment for knob family
  KNOB_MODE_WRITEONCE | single value, single write
  KNOB_MODE_OVERWRITE | single value, overwrite
  KNOB_MODE_ACCUMULATE | single value, update
  KNOB_MODE_APPEND | list of values, append

## Function Documentation

VOID LEVEL_BASE::KNOB_BASE::CheckAllKnobs | ( | BOOL | allowDashes = `FALSE` | ) | `[inherited]`

| Check for duplicates amongst the declared knobs

int LEVEL_BASE::KNOB_BASE::Compare | ( | const KNOB_BASE & | k2 | ) | const`[inherited]`

Returns:
  TRUE if two knobs are identical.

VOID LEVEL_BASE::KNOB_BASE::DisableKnob | ( | const string & | myname | ) | `[inherited]`

| Disable a particular knob

Parameters:

  | myname | The particular knob to disable

VOID LEVEL_BASE::KNOB_BASE::DisableKnobFamily | ( | const string & | myfamily | ) | `[inherited]`

| Disable all options within a given family of knobs

Parameters:

  | myfamily | The family to disable

VOID LEVEL_BASE::KNOB_BASE::EnableKnob | ( | const string & | myname | ) | `[inherited]`

| Enable a particular knob

Parameters:

  | myname | The knob to enable

VOID LEVEL_BASE::KNOB_BASE::EnableKnobFamily | ( | const string & | myfamily | ) | `[inherited]`

| Enable all options within a given family of knobs

Parameters:

  | myfamily | The family to enable

KNOB_BASE * LEVEL_BASE::KNOB_BASE::FindEnabledKnob | ( | const string & | myname | ) | `[inherited]`

| Search for a knob that is currently not disabled

Parameters:

  | myname | The name of the knob to search which is currently enabled

KNOB_BASE * LEVEL_BASE::KNOB_BASE::FindFamily | ( | const string & | family | ) | `[inherited]`

| Search for a knob family

Parameters:

  | family | The family of knobs to locate

KNOB_BASE * LEVEL_BASE::KNOB_BASE::FindKnob | ( | const string & | myname | ) | `[inherited]`

| Locate a knob from the list of declared knobs

Parameters:

  | myname | The name of the knob to locate

LEVEL_BASE::KNOB_BASE::KNOB_BASE | ( | const string & | myprefix,
|  | const string & | myname,
|  | const string & | myfamily,
|  | const string & | mydefault,
|  | const string & | mypurpose,
|  | KNOB_MODE | mymode = `KNOB_MODE_WRITEONCE`
| ) | `[inherited]`

| Create a new knob

Parameters:

  | myname | Name of the knob
  | myfamily | Family to which the knob belongs to
  | mydefault | The default value to which the knob is initialized with
  | mypurpose | A string that explains the purpose of the knob
  | mymode | KNOB_MODE

UINT32 LEVEL_BASE::KNOB_BASE::NumberOfKnobs | ( |  | ) | `[inherited]`

Returns:
  The total number of knobs that have been declared

string LEVEL_BASE::KNOB_BASE::StringKnobSummary | ( |  | ) | `[inherited]`

| Print out a summary of all the knobs declared