OpenASIP
2.0
|
#include <Proxim.hh>
Public Member Functions | |
Proxim () | |
virtual | ~Proxim () |
virtual bool | OnInit () |
virtual int | OnExit () |
ProximSimulationThread * | simulation () |
CommandRegistry & | commandRegistry () |
GUIOptions & | options () |
Private Member Functions | |
void | loadOptions () |
void | createDefaultOptions () |
Private Attributes | |
ProximMainFrame * | mainFrame_ |
The application main frame. More... | |
CommandRegistry * | commandRegistry_ |
The application command registry. More... | |
ProximSimulationThread * | simulation_ |
The simulation thread running the simulator backend. More... | |
GUIOptions * | options_ |
Options defining toolbar, keyboard shortcuts etc. More... | |
Static Private Attributes | |
static const std::string | CONFIG_FILE_NAME = "Proxim.conf" |
Name of the config file. More... | |
static const std::string | SCHEMA_FILE_NAME = "confschema.xsd" |
Name of the xml-schema file. More... | |
Represents the Proxim application.
This is the top level class of the application. Derived from the wxApp class, which does the low level initialization of wxWidgets. This class is responsible for the application initialization and termination.
|
virtual |
CommandRegistry & Proxim::commandRegistry | ( | ) |
Returns reference to the application command registry.
The command registry stores all commands available for execution in the main fram menubar and toolbar.
Definition at line 216 of file Proxim.cc.
References commandRegistry_.
|
private |
Creates a default set of options if the configuration file is erroneous or not found.
Definition at line 270 of file Proxim.cc.
References GUIOptions::addKeyboardShortcut(), GUIOptions::addSeparator(), GUIOptions::addToolbarButton(), ProximConstants::COMMAND_NAME_FIND, ProximConstants::COMMAND_NAME_KILL, ProximConstants::COMMAND_NAME_NEXTI, ProximConstants::COMMAND_NAME_OPEN_MACHINE, ProximConstants::COMMAND_NAME_OPEN_PROGRAM, ProximConstants::COMMAND_NAME_RESUME, ProximConstants::COMMAND_NAME_RUN, ProximConstants::COMMAND_NAME_STEPI, CONFIG_FILE_NAME, ProximConstants::CONFIGURATION_NAME, options_, GUIOptions::setFileName(), GUIOptions::setToolbarLayout(), GUIOptions::setToolbarVisibility(), GUIOptions::TEXT, and Environment::userConfPath().
Referenced by loadOptions().
|
private |
Loads GUIOptions for Proxim from the configuration file.
If the configuration file is erroneous or not found, default options will be used.
Definition at line 227 of file Proxim.cc.
References GUIOptions::clearModified(), CONFIG_FILE_NAME, ProximConstants::CONFIGURATION_NAME, Environment::confPath(), createDefaultOptions(), Environment::dataDirPath(), FileSystem::DIRECTORY_SEPARATOR, Exception::errorMessage(), options_, GUIOptionsSerializer::readState(), SCHEMA_FILE_NAME, GUIOptions::setFileName(), XMLSerializer::setSchemaFile(), XMLSerializer::setSourceFile(), XMLSerializer::setUseSchema(), and GUIOptions::validate().
Referenced by OnInit().
|
virtual |
Deletes the simulation thread when the application exits.
Definition at line 188 of file Proxim.cc.
References simulation_.
|
virtual |
Initializes the application.
Creates command registry, application main frame and a simulation thread. The main frame console linereader is set as the linereader for the simulator thread.
Definition at line 92 of file Proxim.cc.
References commandRegistry_, ProximSimulationThread::initialize(), Application::initialize(), TclInterpreter::interpret(), ProximSimulationThread::interpreter(), loadOptions(), mainFrame_, options_, ProximConstants::PROXIM_TITLE, ScriptInterpreter::result(), ProximConstants::SCL_LOAD_MACHINE, ProximConstants::SCL_LOAD_PROGRAM, simulation_, Application::TCEVersionString(), WxConversion::toCStringArray(), WxConversion::toString(), and WxConversion::toWxString().
GUIOptions & Proxim::options | ( | ) |
Returns references to the application options.
Definition at line 347 of file Proxim.cc.
References options_.
ProximSimulationThread * Proxim::simulation | ( | ) |
Returns pointer to the simulation thread.
Definition at line 202 of file Proxim.cc.
References simulation_.
|
private |
The application command registry.
Definition at line 70 of file Proxim.hh.
Referenced by commandRegistry(), OnInit(), and ~Proxim().
|
staticprivate |
Name of the config file.
Definition at line 77 of file Proxim.hh.
Referenced by createDefaultOptions(), and loadOptions().
|
private |
|
private |
Options defining toolbar, keyboard shortcuts etc.
Definition at line 74 of file Proxim.hh.
Referenced by createDefaultOptions(), loadOptions(), OnInit(), and options().
|
staticprivate |
|
private |
The simulation thread running the simulator backend.
Definition at line 72 of file Proxim.hh.
Referenced by OnExit(), OnInit(), and simulation().