Public Member Functions | Protected Attributes | List of all members
LEVEL_BASE::KNOB_BASE Class Referenceabstract

Public Member Functions

 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)
virtual const std::string Type ()=0
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
virtual const std::string & ValueString (const UINT32 index) const =0
virtual UINT32 NumberOfValues () const =0
virtual BOOL AddValue (const std::string &valstring)=0
BOOL SetByUser () const

Protected Attributes

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

keeps maintenance information that is independent of knob type

Member Function Documentation

◆ AddValue()

virtual BOOL LEVEL_BASE::KNOB_BASE::AddValue ( const std::string &  valstring)
pure virtual

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. 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.

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

Implemented in LEVEL_BASE::KNOB< TYPE >, and LEVEL_BASE::KNOB< BOOL >.

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