OpenASIP 2.2
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
SetHistoryFilename Class Reference
Collaboration diagram for SetHistoryFilename:
Collaboration graph

Static Public Member Functions

static bool execute (SimulatorInterpreter &interpreter, SimulatorFrontend &, const std::string &newValue)
 
static const DataObjectdefaultValue ()
 
static bool warnOnExistingProgramAndMachine ()
 

Detailed Description

Setting action that sets the command history file name.

Definition at line 442 of file SettingCommand.cc.

Member Function Documentation

◆ defaultValue()

static const DataObject & SetHistoryFilename::defaultValue ( )
inlinestatic

Returns the default value of this setting.

Returns
The default value.

Definition at line 472 of file SettingCommand.cc.

472 {
473 static const DataObject defaultValue_(SIM_DEFAULT_COMMAND_LOG);
474 return defaultValue_;
475 }
#define SIM_DEFAULT_COMMAND_LOG
The default command log file name.

References SIM_DEFAULT_COMMAND_LOG.

◆ execute()

static bool SetHistoryFilename::execute ( SimulatorInterpreter interpreter,
SimulatorFrontend ,
const std::string &  newValue 
)
inlinestatic

Sets the command history file name.

Parameters
interpreterTo set the history file name for.
newValueValue to set.
Returns
True if setting was successful.

Definition at line 452 of file SettingCommand.cc.

455 {
456 if (!(FileSystem::fileIsCreatable(newValue) ||
457 FileSystem::fileIsWritable(newValue)) ||
458 FileSystem::fileIsDirectory(newValue)) {
459 interpreter.lineReader()->outputStream()
460 << "Could not open file for writing." << std::endl;
461 return false;
462 }
463 interpreter.lineReader()->setInputHistoryLog(newValue);
464 return true;
465 }
static bool fileIsDirectory(const std::string fileName)
static bool fileIsWritable(const std::string fileName)
static bool fileIsCreatable(const std::string fileName)
virtual void setInputHistoryLog(const std::string &historyFilename)
virtual std::ostream & outputStream()
virtual LineReader * lineReader() const

References FileSystem::fileIsCreatable(), FileSystem::fileIsDirectory(), FileSystem::fileIsWritable(), ScriptInterpreter::lineReader(), LineReader::outputStream(), and LineReader::setInputHistoryLog().

Here is the call graph for this function:

◆ warnOnExistingProgramAndMachine()

static bool SetHistoryFilename::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 482 of file SettingCommand.cc.

482 {
483 return false;
484 }

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