OpenASIP  2.0
Static Public Member Functions | List of all members
SetHistorySize Class Reference
Collaboration diagram for SetHistorySize:
Collaboration graph

Static Public Member Functions

static bool execute (SimulatorInterpreter &interpreter, SimulatorFrontend &, unsigned int newValue)
 
static const DataObjectdefaultValue ()
 
static bool warnOnExistingProgramAndMachine ()
 

Detailed Description

Setting action that sets the command history file name.

Definition at line 531 of file SettingCommand.cc.

Member Function Documentation

◆ defaultValue()

static const DataObject& SetHistorySize::defaultValue ( )
inlinestatic

Returns the default value of this setting.

Returns
The default value.

Definition at line 554 of file SettingCommand.cc.

554  {
555  static const DataObject defaultValue_(DEFAULT_INPUT_HISTORY_SIZE);
556  return defaultValue_;
557  }

References DEFAULT_INPUT_HISTORY_SIZE.

◆ execute()

static bool SetHistorySize::execute ( SimulatorInterpreter interpreter,
SimulatorFrontend ,
unsigned int  newValue 
)
inlinestatic

Sets the command history maximum length.

Parameters
interpreterTo use to set the setting.
newValueValue to set.
Returns
True if setting was successful.

Definition at line 541 of file SettingCommand.cc.

544  {
545  interpreter.lineReader()->setInputHistoryLength(newValue);
546  return true;
547  }

References ScriptInterpreter::lineReader(), and LineReader::setInputHistoryLength().

Here is the call graph for this function:

◆ warnOnExistingProgramAndMachine()

static bool SetHistorySize::warnOnExistingProgramAndMachine ( )
inlinestatic

Should the action warn if program & machine exist and value was changed

Returns
boolean value on whether or not to warn

Definition at line 564 of file SettingCommand.cc.

564  {
565  return false;
566  }

The documentation for this class was generated from the following file:
DataObject
Definition: DataObject.hh:50
LineReader::setInputHistoryLength
virtual void setInputHistoryLength(std::size_t length)
Definition: LineReader.cc:140
ScriptInterpreter::lineReader
virtual LineReader * lineReader() const
Definition: ScriptInterpreter.cc:367
DEFAULT_INPUT_HISTORY_SIZE
#define DEFAULT_INPUT_HISTORY_SIZE
Definition: LineReader.hh:112