GTPin: gtpin::Knob< T > Class Template Reference

GTPin

- Main Page
- Related Pages
- Modules
- Data Structures

- Data Structures
- Data Structure Index
- Class Hierarchy
- Data Fields

Public Member Functions
gtpin::Knob< T > Class Template Reference
GTPin: Configuration

Template class that provides interface to Knob argument of a type 'T'. More...

`#include <gt_knob.h>`

Inherited by gtpin::KnobVector< T >.

## Public Member Functions
| Knob (const std::string &name, const T &initValue, const std::string &helpMsg="", uint32_t flags=KNOB_FLAG_NONE, char symId=0)
| Construct a new Knob argument, and register it in the Knob database.
| Knob (GTPinKnob knob)
| Construct Knob object for the specified Knob handle.
void | AddValue (const T &val)
| Assign new value to this Knob.
T | GetValue (uint32_t idx=0) const
| Get the Knob's value element at position 'idx'.
void | Reset ()
| Clear the vector of Knob values.
uint32_t | NumValues () const
| Get the number of the Knob value elements.
| operator T () const
| Conversion operator.
Knob & | operator= (const T &val)
| Assignment operator.
Knob & | operator+= (const T &val)
| Addition assignment operator.

## Detailed Description

### template<typename T>
class gtpin::Knob< T >

Template class that provides interface to Knob argument of a type 'T'.

## Constructor & Destructor Documentation

template<typename T >

gtpin::Knob< T >::Knob | ( | const std::string & | name,
|  | const T & | initValue,
|  | const std::string & | helpMsg = `""`,
|  | uint32_t | flags = `KNOB_FLAG_NONE`,
|  | char | symId = `0`
| ) |  | `[inline]`

Construct a new Knob argument, and register it in the Knob database.

Parameters:

  [in] | name | Unique identifier of the Knob
  [in] | initValue | The initial value of the Knob. If this is a vector-value Knob, 'initValue' will be the first element in the vector of values.
  [in] | helpMsg | Description of the Knob in the help message
  [in] | flags | A combination of KNOB_FLAG properties
  [in] | symId | A single-symbol identifier of the Knob in the command line, or \0 character if such identifier does not exist

All Data Structures Functions Variables Typedefs Enumerations Enumerator

      Copyright (C) 2013-2025 Intel Corporation

      SPDX-License-Identifier: MIT