80 bool ParseFilenames(
string templateMachine,
int filenameCount,
char *filenames[]);
180 return m_interrupting;
254 bool ModifyStep(int64_t oldStep, int64_t newStep);
273 void Execute(
const int longestTotalRun = 100000);
298 bool CreateEmulationFromTemplateMachine(
const string& templateName);
303 void PrintUsage()
const;
310 void SetStep(uint64_t step);
320 static void RunUnitTests(
int& nSucceeded,
int& nFailures);
327 vector<string> m_onResetCommands;
332 uint64_t m_nrOfSingleStepsLeft;
335 struct timeval m_lastOutputTime;
336 uint64_t m_lastOutputStep;
339 string m_emulationFileName;
343 bool m_snapshottingEnabled;
void SetRunState(RunState newState)
Sets the RunState.
void SetEmulationFilename(const string &filename)
Sets the current emulation setup's filename.
GXemul()
Creates a GXemul instance.
string GetRunStateAsString() const
Gets the current RunState as a string.
RunState GetRunState() const
Gets the current RunState.
bool Reset()
Resets the emulation.
bool GetQuietMode() const
Gets the current quiet mode setting.
void Interrupt()
Interrupts emulation.
uint64_t GetStep() const
Gets the current step of the emulation.
static void ListTemplates()
Dump a list to stdout with all available machine templates.
void SetSnapshottingEnabled(bool enabled)
Sets whether or not to use snapshots.
void SetNrOfSingleStepsInARow(uint64_t steps)
Sets the nr of single-steps to perform in a row.
An interactive command interpreter, which run Commands.
bool ModifyStep(int64_t oldStep, int64_t newStep)
Change step either forwards or backwards.
static string Version()
Returns the GXemul version string.
CommandInterpreter & GetCommandInterpreter()
Gets a reference to the CommandInterpreter.
const string & GetEmulationFilename() const
Gets the current emulation setup's filename.
static void DumpMachineAsHTML(const string &machineName)
bool IsInterrupting() const
Returns whether or not the current emulation is being interrupted.
bool GetSnapshottingEnabled() const
Checks whether snapshots are currently enabled or not.
void ClearEmulation()
Discards the current emulation, and starts anew with just an empty root component.
void SetRootComponent(refcount_ptr< Component > newRootComponent)
Sets the root component, discarding the previous one.
void InitUI()
Initializes the UI.
bool IsTemplateMachine(const string &templateName) const
static void RunUnitTests(int &nSucceeded, int &nFailures)
refcount_ptr< Component > GetRootComponent()
Gets a pointer to the root configuration component.
int Run()
Runs GXemul's main loop.
static void GenerateHTMLListOfComponents(bool machines)
UI * GetUI()
Gets a pointer to the GXemul instance' active UI.
Base class for a User Interface.
void SetQuietMode(bool quietMode)
Sets whether or not to run in quiet mode.
void Execute(const int longestTotalRun=100000)
Run the emulation for "a while".
bool ParseFilenames(string templateMachine, int filenameCount, char *filenames[])
Parses command line arguments (file names).