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

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.
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.
Knoboperator= (const T &val)
 Assignment operator.
Knoboperator+= (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]nameUnique identifier of the Knob
[in]initValueThe initial value of the Knob. If this is a vector-value Knob, 'initValue' will be the first element in the vector of values.
[in]helpMsgDescription of the Knob in the help message
[in]flagsA combination of KNOB_FLAG properties
[in]symIdA 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