Pin
Public Member Functions | List of all members
LEVEL_BASE::KNOB< TYPE > Class Template Reference

Public Member Functions

 KNOB (KNOB_MODE mymode, const std::string &myfamily, const std::string &myname, const std::string &mydefault, const std::string &mypurpose, const std::string &myprefix="")
 
BOOL AddValue (const std::string &valstring)
 
const std::string Type ()
 
const TYPE & Value () const
 
const std::string & ValueString () const
 
 operator TYPE () const
 
const TYPE & Value (const UINT32 index)
 
const std::string & ValueString (const UINT32 index) const
 
UINT32 NumberOfValues () const
 
- Public Member Functions inherited from LEVEL_BASE::KNOB_BASE
 KNOB_BASE (const std::string &myprefix, const std::string &myname, const std::string &myfamily, const std::string &mydefault, const std::string &mypurpose, KNOB_MODE mymode=KNOB_MODE_WRITEONCE)
 
KNOB_MODE Mode () const
 
const std::string & Family () const
 
const std::string & Name () const
 
std::string Cmd () const
 
BOOL Enabled () const
 
STATIC VOID CheckAllKnobs (BOOL allowDashes=FALSE)
 
STATIC UINT32 NumberOfKnobs ()
 
STATIC VOID DisableKnobFamily (const std::string &myfamily)
 
STATIC VOID EnableKnobFamily (const std::string &myfamily)
 
STATIC VOID SetDeveloperFlagsEnabled ()
 
STATIC BOOL WasDeveloperFlagsEnabled ()
 
STATIC VOID DisableKnob (const std::string &myname)
 
STATIC VOID EnableKnob (const std::string &myname)
 
STATIC std::string StringKnobSummary ()
 
STATIC std::string StringLongAll ()
 
STATIC KNOB_BASEFindKnob (const std::string &name)
 
STATIC KNOB_BASEFindFamily (const std::string &name)
 
STATIC KNOB_BASEFindEnabledKnob (const std::string &name)
 
STATIC VOID SetParsingDone ()
 
STATIC BOOL WasParsingDone ()
 
int Compare (const KNOB_BASE &k2) const
 
BOOL SetByUser () const
 

Additional Inherited Members

- Protected Attributes inherited from LEVEL_BASE::KNOB_BASE
KNOB_BASE_next
 
const std::string _family
 
const std::string _name
 
const std::string _purpose
 
const std::string _default_value
 
const KNOB_MODE _mode
 
BOOL _disabled
 
INT32 _nreads
 
INT32 _nwrites
 

Detailed Description

template<class TYPE>
class LEVEL_BASE::KNOB< TYPE >

typed knob

Member Function Documentation

◆ AddValue()

template<class TYPE>
BOOL LEVEL_BASE::KNOB< TYPE >::AddValue ( const std::string &  valstring)
inlinevirtual

The function operate differently based on the knob's mode:

KNOB_MODE_WRITEONCE - Set knob's value with the specified value. If the knob was already given a value, exit with PIN_ERROR. unless knob was initialized from command line (knobs which are....) KNOB_MODE_OVERWRITE - Overwrite knob's value with the specified value unless knob was initialized from command line (knobs which were initialized with a value in the command line by the user are not permitted to be changed). KNOB_MODE_ACCUMULATE - Add the value to the knob's former value. If the knob wasn't given a value before, make it the knob's value. KNOB_MODE_APPEND - Concatenate the value to the knob's value list.

Returns
TRUE if the value of the knob got changed, False otherwise.

Implements LEVEL_BASE::KNOB_BASE.


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