#include <AddFUArchFromADFCmd.hh>
Command for adding new FU architectures to HDB from an ADF file.
Definition at line 41 of file AddFUArchFromADFCmd.hh.
◆ AddFUArchFromADFCmd() [1/2]
AddFUArchFromADFCmd::AddFUArchFromADFCmd |
( |
| ) |
|
◆ ~AddFUArchFromADFCmd() [1/2]
AddFUArchFromADFCmd::~AddFUArchFromADFCmd |
( |
| ) |
|
|
virtual |
◆ AddFUArchFromADFCmd() [2/2]
AddFUArchFromADFCmd::AddFUArchFromADFCmd |
( |
| ) |
|
◆ ~AddFUArchFromADFCmd() [2/2]
virtual AddFUArchFromADFCmd::~AddFUArchFromADFCmd |
( |
| ) |
|
|
virtual |
◆ create() [1/2]
◆ create() [2/2]
◆ Do() [1/2]
bool AddFUArchFromADFCmd::Do |
( |
| ) |
|
|
virtual |
Executes the command.
- Returns
- True, if the command was succesfully executed.
Implements GUICommand.
Definition at line 72 of file AddFUArchFromADFCmd.cc.
75 if (manager == NULL) {
79 wxString wildcard = _T(
"Architecture Definition Files (*.adf)|*.adf");
80 wildcard.Append(_T(
"|All files|*.*"));
86 if (dialog.ShowModal() == wxID_CANCEL) {
90 wxString fileName = dialog.GetPath();
99 wxString message = _T(
"Error opening ");
100 message.Append(fileName);
101 message.Append(_T(
":\n\n"));
111 if (nav.
count() == 0) {
112 wxString message = _T(
"The file ");
113 message.Append(fileName);
114 message.Append(_T(
" doesn't contain any function units."));
123 for (
int i = 0; i < nav.
count(); i++) {
127 wxSingleChoiceDialog choicer(
128 parentWindow(), _T(
"Choose Function Unit"), _T(
"Choose Function Unit"),
131 if (choicer.ShowModal() != wxID_OK) {
145 if (paramDialog.ShowModal() != wxID_OK) {
153 wxString message = _T(
"Erroneous function unit architecture:\n\n");
160 wxGetApp().mainFrame().update();
161 wxGetApp().mainFrame().browser()->selectFUArchitecture(
id);
References HDB::HDBManager::addFUArchitecture(), TTAMachine::Machine::Navigator< ComponentType >::count(), Exception::errorMessage(), TTAMachine::Machine::functionUnitNavigator(), TTAMachine::Machine::Navigator< ComponentType >::item(), machine, GUICommand::parentWindow(), ADFSerializer::readMachine(), XMLSerializer::setSourceFile(), WxConversion::toString(), WxConversion::toWxString(), and TTAMachine::FunctionUnit::unsetMachine().
◆ Do() [2/2]
virtual bool AddFUArchFromADFCmd::Do |
( |
| ) |
|
|
virtual |
Executes the command.
- Returns
- True, if the command was succesfully executed, false otherwise.
Implements GUICommand.
◆ icon() [1/2]
std::string AddFUArchFromADFCmd::icon |
( |
| ) |
const |
|
virtual |
◆ icon() [2/2]
virtual std::string AddFUArchFromADFCmd::icon |
( |
| ) |
const |
|
virtual |
Returns name of the command icon file.
- Returns
- Name of the command icon file.
Implements GUICommand.
◆ id() [1/2]
virtual int AddFUArchFromADFCmd::id |
( |
| ) |
const |
|
virtual |
Returns the ID of the command.
- Returns
- The ID of the command.
Implements GUICommand.
◆ id() [2/2]
int AddFUArchFromADFCmd::id |
( |
| ) |
const |
|
virtual |
◆ isEnabled() [1/2]
virtual bool AddFUArchFromADFCmd::isEnabled |
( |
| ) |
|
|
virtual |
Returns true if the command is executable, false otherwise.
- Returns
- True, if the command is executable, false otherwise.
Implements GUICommand.
◆ isEnabled() [2/2]
bool AddFUArchFromADFCmd::isEnabled |
( |
| ) |
|
|
virtual |
Returns true if the command should be enabled in the menu/toolbar.
- Returns
- True, if the command is enabled, false if not.
Implements GUICommand.
Definition at line 204 of file AddFUArchFromADFCmd.cc.
207 if (manager == NULL) {
The documentation for this class was generated from the following files: