OpenASIP
2.0
|
#include <PasteComponentCmd.hh>
Public Member Functions | |
PasteComponentCmd () | |
virtual bool | Do () |
virtual int | id () const |
virtual PasteComponentCmd * | create () const |
virtual std::string | icon () const |
virtual bool | isEnabled () |
Public Member Functions inherited from EditorCommand | |
EditorCommand (std::string name, wxWindow *parent=NULL) | |
virtual | ~EditorCommand () |
void | setView (wxView *view) |
wxView * | view () const |
Public Member Functions inherited from GUICommand | |
GUICommand (std::string name, wxWindow *parent) | |
virtual | ~GUICommand () |
virtual bool | isChecked () const |
virtual std::string | shortName () const |
void | setParentWindow (wxWindow *view) |
wxWindow * | parentWindow () const |
std::string | name () const |
Private Member Functions | |
template<class ComponentNavigator > | |
void | paste (TTAMachine::Machine &machine, TTAMachine::Component *component, ComponentNavigator &navigator) |
bool | setMachine (TTAMachine::Component *component, TTAMachine::Machine *machine) |
Command for pasting components from the clipboard to the machine.
Definition at line 49 of file PasteComponentCmd.hh.
PasteComponentCmd::PasteComponentCmd | ( | ) |
|
virtual |
Creates and returns a new instance of this command.
Implements GUICommand.
Definition at line 221 of file PasteComponentCmd.cc.
References PasteComponentCmd().
|
virtual |
Executes the command.
Copies descriptor of a component from the clipboard and adds corresponding component to the machine
Implements GUICommand.
Definition at line 79 of file PasteComponentCmd.cc.
References TTAMachine::FunctionUnit::addressSpace(), assert, TTAMachine::Machine::busNavigator(), TTAMachine::Machine::controlUnit(), ProDeClipboard::copyContents(), TTAMachine::Guard::copyTo(), Exception::errorMessage(), TTAMachine::Machine::functionUnitNavigator(), Model::getMachine(), MDFDocument::getModel(), TTAMachine::Bus::guard(), TTAMachine::Bus::guardCount(), TTAMachine::FunctionUnit::hasAddressSpace(), TTAMachine::Machine::Navigator< ComponentType >::hasItem(), TTAMachine::Machine::immediateUnitNavigator(), ProDeClipboard::instance(), ProDeTextGenerator::instance(), TTAMachine::Machine::Navigator< ComponentType >::item(), TTAMachine::Socket::loadState(), machine, ProDeTextGenerator::MSG_ERROR_ONE_GCU, ObjectState::name(), TTAMachine::Component::name(), Model::notifyObservers(), GUICommand::parentWindow(), paste(), Model::popFromStack(), Model::pushToStack(), TTAMachine::Machine::registerFileNavigator(), TTAMachine::FunctionUnit::setAddressSpace(), ObjectState::setAttribute(), TTAMachine::ControlUnit::setMachine(), TTAMachine::Machine::socketNavigator(), ProDeClipboard::sourceMachine(), Texts::TextGenerator::text(), WxConversion::toWxString(), and EditorCommand::view().
|
virtual |
Returns path to the command's icon file.
Reimplemented from EditorCommand.
Definition at line 233 of file PasteComponentCmd.cc.
References ProDeConstants::CMD_ICON_PASTE.
|
virtual |
Returns command identifier of this command.
Implements GUICommand.
Definition at line 210 of file PasteComponentCmd.cc.
References ProDeConstants::COMMAND_PASTE.
|
virtual |
Returns true when the command is executable, false when not.
This command is executable when a document is open and the clipboard is not empty.
Reimplemented from EditorCommand.
Definition at line 248 of file PasteComponentCmd.cc.
References ProDeClipboard::instance(), and ProDeClipboard::isEmpty().
|
private |
Referenced by Do().
|
private |