OpenASIP
2.0
|
#include <HDBBrowserWindow.hh>
Private Types | |
enum | { ID_TREE_VIEW = 20000 } |
Widget window IDs. More... | |
Private Member Functions | |
void | onItemSelected (wxTreeEvent &event) |
void | onRMBClick (wxTreeEvent &event) |
wxString | fuArchLabel (const TTAMachine::FunctionUnit &fu) const |
Private Attributes | |
HDB::CachedHDBManager * | manager_ |
HDB to display in the browser. More... | |
wxTreeCtrl * | tree_ |
Tree widget displayign the HDB hierarchy. More... | |
std::map< RowID, wxTreeItemId > | rfArchitectures_ |
Map of rf architecture RowIDs to tree item IDs. More... | |
std::map< RowID, wxTreeItemId > | rfImplementations_ |
Map of rf implementation RowIDs to tree item IDs. More... | |
std::map< RowID, wxTreeItemId > | fuArchitectures_ |
Map of fu architecture RowIDs to tree item IDs. More... | |
std::map< RowID, wxTreeItemId > | fuImplementations_ |
Map of fu implementation RowIDs to tree item IDs. More... | |
std::map< RowID, wxTreeItemId > | fuEntries_ |
Map of fu entry RowIDs to tree item IDs. More... | |
std::map< RowID, wxTreeItemId > | rfEntries_ |
Map of rf entry RowIDs to tree item IDs. More... | |
std::map< RowID, wxTreeItemId > | busEntries_ |
Map of bus entry RowIDs to tree item IDs. More... | |
std::map< RowID, wxTreeItemId > | socketEntries_ |
Map of socket entry RowIDs to tree item IDs. More... | |
std::map< RowID, wxTreeItemId > | costPlugins_ |
Map of cost function plugin RowIDs to tree item IDs. More... | |
HDBBrowserInfoPanel * | infoPanel_ |
Info panel widget for displaying the selected element information. More... | |
Window for browsing an HDB.
Displays a tree-view of the HDB, and an info panel which shows details of the element selected in the tree-view.
Definition at line 59 of file HDBBrowserWindow.hh.
|
private |
HDBBrowserWindow::HDBBrowserWindow | ( | wxWindow * | parent, |
wxWindowID | id | ||
) |
The Constructor.
parent | Parent window of the browser panel. |
id | Window identifier. |
Definition at line 70 of file HDBBrowserWindow.cc.
|
virtual |
|
private |
Returns label string for an function unit architecture.
fu | Function unit object to create the label from. |
Definition at line 864 of file HDBBrowserWindow.cc.
References TTAMachine::HWOperation::latency(), TTAMachine::HWOperation::name(), TTAMachine::FunctionUnit::operation(), TTAMachine::FunctionUnit::operationCount(), Conversion::toString(), and WxConversion::toWxString().
bool HDBBrowserWindow::isBusEntrySelected | ( | ) |
Function for checking if a Bus entry is selected in the tree view.
Definition at line 407 of file HDBBrowserWindow.cc.
References MapTools::containsValue().
Referenced by HDBEditorDeleteCmd::Do(), and HDBEditorDeleteCmd::isEnabled().
bool HDBBrowserWindow::isCostFunctionPluginSelected | ( | ) |
Function for checking if a cost function plugin is selected in the tree view.
Definition at line 428 of file HDBBrowserWindow.cc.
References MapTools::containsValue().
Referenced by HDBEditorDeleteCmd::Do(), HDBEditorModifyCmd::Do(), HDBEditorModifyCmd::isEnabled(), and HDBEditorDeleteCmd::isEnabled().
bool HDBBrowserWindow::isFUArchitectureSelected | ( | ) |
Function for checking if a FU architecture is selected in the tree view.
Definition at line 343 of file HDBBrowserWindow.cc.
References MapTools::containsValue().
Referenced by AddFUImplementationCmd::Do(), HDBEditorDeleteCmd::Do(), HDBEditorDeleteCmd::isEnabled(), and AddFUImplementationCmd::isEnabled().
bool HDBBrowserWindow::isFUEntrySelected | ( | ) |
Function for checking if a FU entry is selected in the tree view.
Definition at line 387 of file HDBBrowserWindow.cc.
References MapTools::containsValue().
Referenced by AddFUImplementationCmd::Do(), SetCostFunctionPluginCmd::Do(), HDBEditorDeleteCmd::Do(), AddFUImplementationCmd::isEnabled(), HDBEditorDeleteCmd::isEnabled(), SetCostFunctionPluginCmd::isEnabled(), and SetFUArchitectureCmd::isEnabled().
bool HDBBrowserWindow::isFUImplementationSelected | ( | ) |
Function for checking if a FU implementation is selected in the tree view.
Definition at line 364 of file HDBBrowserWindow.cc.
References MapTools::containsValue().
Referenced by HDBEditorDeleteCmd::Do(), HDBEditorModifyCmd::Do(), HDBEditorModifyCmd::isEnabled(), and HDBEditorDeleteCmd::isEnabled().
bool HDBBrowserWindow::isOperationImplementationResourceSelected | ( | ) |
Function for checking if a operation implementation resource is selected in the tree view.
Definition at line 439 of file HDBBrowserWindow.cc.
Referenced by HDBEditorDeleteCmd::Do(), and HDBEditorDeleteCmd::isEnabled().
bool HDBBrowserWindow::isOperationImplementationSelected | ( | ) |
Function for checking if a operation implementation is selected in the tree view.
Definition at line 453 of file HDBBrowserWindow.cc.
Referenced by HDBEditorDeleteCmd::Do(), and HDBEditorDeleteCmd::isEnabled().
bool HDBBrowserWindow::isRFArchitectureSelected | ( | ) |
Function for checking if a RF architecture is selected in the tree view.
Definition at line 353 of file HDBBrowserWindow.cc.
References MapTools::containsValue().
Referenced by AddRFImplementationCmd::Do(), HDBEditorDeleteCmd::Do(), HDBEditorDeleteCmd::isEnabled(), and AddRFImplementationCmd::isEnabled().
bool HDBBrowserWindow::isRFEntrySelected | ( | ) |
Function for checking if a RF entry is selected in the tree view.
Definition at line 397 of file HDBBrowserWindow.cc.
References MapTools::containsValue().
Referenced by AddRFImplementationCmd::Do(), SetCostFunctionPluginCmd::Do(), HDBEditorDeleteCmd::Do(), HDBEditorDeleteCmd::isEnabled(), AddRFImplementationCmd::isEnabled(), and SetCostFunctionPluginCmd::isEnabled().
bool HDBBrowserWindow::isRFImplementationSelected | ( | ) |
Function for checking if a RF implementation is selected in the tree view.
Definition at line 376 of file HDBBrowserWindow.cc.
References MapTools::containsValue().
Referenced by HDBEditorDeleteCmd::Do(), HDBEditorModifyCmd::Do(), HDBEditorModifyCmd::isEnabled(), and HDBEditorDeleteCmd::isEnabled().
bool HDBBrowserWindow::isSocketEntrySelected | ( | ) |
Function for checking if a socket entry is selected in the tree view.
Definition at line 417 of file HDBBrowserWindow.cc.
References MapTools::containsValue().
Referenced by HDBEditorDeleteCmd::Do(), and HDBEditorDeleteCmd::isEnabled().
|
private |
Event handler for the tree-view selection changes.
Definition at line 782 of file HDBBrowserWindow.cc.
References HDBToHtml::OPERATION_IMPLEMENTATION_RESOURCES, and HDBToHtml::OPERATION_IMPLEMENTATIONS.
|
private |
Event handler for right mouse button clicks in the treeview.
Pops up a context menu.
Definition at line 832 of file HDBBrowserWindow.cc.
References HDBEditorConstants::COMMAND_ADD_FU_IMPLEMENTATION, HDBEditorConstants::COMMAND_ADD_RF_IMPLEMENTATION, HDBEditorConstants::COMMAND_DELETE, HDBEditorConstants::COMMAND_MODIFY, and HDBEditorConstants::COMMAND_SET_COST_PLUGIN.
void HDBBrowserWindow::openLink | ( | const wxString & | link | ) |
Opens a link generated by HDBToHtml in the browser window.
link | Link to open. |
Definition at line 892 of file HDBBrowserWindow.cc.
References HDBToHtml::BUS_ENTRIES, HDBToHtml::COST_PLUGINS, HDBToHtml::FU_ARCHITECTURES, HDBToHtml::FU_ENTRIES, HDBToHtml::FU_IMPLEMENTATIONS, HDBToHtml::RF_ARCHITECTURES, HDBToHtml::RF_ENTRIES, HDBToHtml::RF_IMPLEMENTATIONS, HDBToHtml::SOCKET_ENTRIES, Conversion::toInt(), WxConversion::toString(), and WxConversion::toWxString().
void HDBBrowserWindow::selectBusEntry | ( | int | id | ) |
Selects the given Bus Entry.
id | RowID of the bus entry to select. |
Definition at line 679 of file HDBBrowserWindow.cc.
References MapTools::containsKey().
void HDBBrowserWindow::selectCostFunctionPlugin | ( | int | id | ) |
Selects the given cost function plugin.
id | RowID of the cost function plugin. |
Definition at line 769 of file HDBBrowserWindow.cc.
References MapTools::containsKey().
RowID HDBBrowserWindow::selectedBusEntry | ( | ) |
Returns rowID of the bus entry selected in the tree view.
Definition at line 565 of file HDBBrowserWindow.cc.
Referenced by HDBEditorDeleteCmd::Do().
RowID HDBBrowserWindow::selectedCostFunctionPlugin | ( | ) |
Returns rowID of the cost function plugin selected in the treeview.
Definition at line 598 of file HDBBrowserWindow.cc.
Referenced by HDBEditorDeleteCmd::Do(), and HDBEditorModifyCmd::Do().
RowID HDBBrowserWindow::selectedFUArchitecture | ( | ) |
Returns rowID of the FU architecture selected in the treeview.
Definition at line 466 of file HDBBrowserWindow.cc.
Referenced by AddFUImplementationCmd::Do(), and HDBEditorDeleteCmd::Do().
RowID HDBBrowserWindow::selectedFUEntry | ( | ) |
Returns rowID of the FU entry selected in the tree view.
Definition at line 533 of file HDBBrowserWindow.cc.
Referenced by AddFUImplementationCmd::Do(), SetCostFunctionPluginCmd::Do(), HDBEditorDeleteCmd::Do(), AddFUImplementationCmd::isEnabled(), and SetFUArchitectureCmd::isEnabled().
RowID HDBBrowserWindow::selectedFUImplementation | ( | ) |
Returns rowID of the FU implementation selected in the treeview.
Definition at line 500 of file HDBBrowserWindow.cc.
Referenced by HDBEditorDeleteCmd::Do(), and HDBEditorModifyCmd::Do().
RowID HDBBrowserWindow::selectedOperationImplementation | ( | ) |
Returns rowID of the operation implementation selected in the treeview.
Definition at line 614 of file HDBBrowserWindow.cc.
Referenced by HDBEditorDeleteCmd::Do().
RowID HDBBrowserWindow::selectedOperationImplementationResource | ( | ) |
Returns rowID of the operation implementation resource selected in the treeview.
Definition at line 632 of file HDBBrowserWindow.cc.
Referenced by HDBEditorDeleteCmd::Do().
RowID HDBBrowserWindow::selectedRFArchitecture | ( | ) |
Returns rowID of the RF architecture selected in the treeview.
Definition at line 483 of file HDBBrowserWindow.cc.
Referenced by AddRFImplementationCmd::Do(), and HDBEditorDeleteCmd::Do().
RowID HDBBrowserWindow::selectedRFEntry | ( | ) |
Returns rowID of the RF entry selected in the tree view.
Definition at line 549 of file HDBBrowserWindow.cc.
Referenced by AddRFImplementationCmd::Do(), SetCostFunctionPluginCmd::Do(), HDBEditorDeleteCmd::Do(), and AddRFImplementationCmd::isEnabled().
RowID HDBBrowserWindow::selectedRFImplementation | ( | ) |
Returns rowID of the RF implementation selected in the treeview.
Definition at line 517 of file HDBBrowserWindow.cc.
Referenced by HDBEditorDeleteCmd::Do(), and HDBEditorModifyCmd::Do().
RowID HDBBrowserWindow::selectedSocketEntry | ( | ) |
Returns rowID of the socket entry selected in the tree view.
Definition at line 581 of file HDBBrowserWindow.cc.
Referenced by HDBEditorDeleteCmd::Do().
void HDBBrowserWindow::selectFUArchitecture | ( | int | id | ) |
Selects the given FU architecture.
id | RowID of the |
Definition at line 709 of file HDBBrowserWindow.cc.
References MapTools::containsKey().
void HDBBrowserWindow::selectFUEntry | ( | int | id | ) |
Selects the given FU Entry.
id | RowID of the |
Definition at line 649 of file HDBBrowserWindow.cc.
References MapTools::containsKey().
Referenced by SetCostFunctionPluginCmd::Do().
void HDBBrowserWindow::selectFUImplementation | ( | int | id | ) |
Selects the given FU implementation.
id | RowID of the FU implementation. |
Definition at line 739 of file HDBBrowserWindow.cc.
References MapTools::containsKey().
void HDBBrowserWindow::selectRFArchitecture | ( | int | id | ) |
Selects the given RF architecture.
id | RowID of the |
Definition at line 724 of file HDBBrowserWindow.cc.
References MapTools::containsKey().
void HDBBrowserWindow::selectRFEntry | ( | int | id | ) |
Selects the given RF Entry.
id | RowID of the RF entry to select. |
Definition at line 664 of file HDBBrowserWindow.cc.
References MapTools::containsKey().
Referenced by SetCostFunctionPluginCmd::Do().
void HDBBrowserWindow::selectRFImplementation | ( | int | id | ) |
Selects the given RF implementation.
id | RowID of the RF implementation. |
Definition at line 754 of file HDBBrowserWindow.cc.
References MapTools::containsKey().
void HDBBrowserWindow::selectSocketEntry | ( | int | id | ) |
Selects the given Socket Entry.
id | RowID of the socket entry to select. |
Definition at line 694 of file HDBBrowserWindow.cc.
References MapTools::containsKey().
void HDBBrowserWindow::setHDBManager | ( | HDB::CachedHDBManager & | manager | ) |
Sets the HDB which is displayed in the browser.
manager | HDBManager managing the HDB to display. |
Definition at line 99 of file HDBBrowserWindow.cc.
Referenced by HDBEditorMainFrame::createHDB(), and HDBEditorMainFrame::setHDB().
void HDBBrowserWindow::update | ( | ) |
Updates the treeview of the HDB.
Definition at line 109 of file HDBBrowserWindow.cc.
References HDB::RFEntry::architecture(), HDB::FUEntry::architecture(), HDB::FUArchitecture::architecture(), HDBToHtml::BUS_ENTRIES, HDBToHtml::COST_PLUGINS, HDBToHtml::FU_ARCHITECTURES, HDBToHtml::FU_ENTRIES, HDB::RFEntry::hasArchitecture(), HDB::FUEntry::hasArchitecture(), HDB::RFEntry::hasImplementation(), HDB::FUEntry::hasImplementation(), HWBlockArchitecture::id(), HDB::HWBlockImplementation::id(), HDB::RFEntry::implementation(), HDB::FUEntry::implementation(), HDB::HWBlockImplementation::moduleName(), HDB::CostFunctionPlugin::name(), HDBToHtml::OPERATION_IMPLEMENTATION_RESOURCES, HDBToHtml::OPERATION_IMPLEMENTATIONS, HDBToHtml::RF_ARCHITECTURES, HDBToHtml::RF_IU_ENTRIES, HDBToHtml::SOCKET_ENTRIES, and WxConversion::toWxString().
Referenced by HDBEditorMainFrame::update().
|
private |
Map of bus entry RowIDs to tree item IDs.
Definition at line 129 of file HDBBrowserWindow.hh.
|
private |
Map of cost function plugin RowIDs to tree item IDs.
Definition at line 133 of file HDBBrowserWindow.hh.
|
private |
Map of fu architecture RowIDs to tree item IDs.
Definition at line 121 of file HDBBrowserWindow.hh.
|
private |
Map of fu entry RowIDs to tree item IDs.
Definition at line 125 of file HDBBrowserWindow.hh.
|
private |
Map of fu implementation RowIDs to tree item IDs.
Definition at line 123 of file HDBBrowserWindow.hh.
|
private |
Info panel widget for displaying the selected element information.
Definition at line 136 of file HDBBrowserWindow.hh.
|
private |
HDB to display in the browser.
Definition at line 103 of file HDBBrowserWindow.hh.
|
private |
Map of rf architecture RowIDs to tree item IDs.
Definition at line 117 of file HDBBrowserWindow.hh.
|
private |
Map of rf entry RowIDs to tree item IDs.
Definition at line 127 of file HDBBrowserWindow.hh.
|
private |
Map of rf implementation RowIDs to tree item IDs.
Definition at line 119 of file HDBBrowserWindow.hh.
|
private |
Map of socket entry RowIDs to tree item IDs.
Definition at line 131 of file HDBBrowserWindow.hh.
|
private |
Tree widget displayign the HDB hierarchy.
Definition at line 105 of file HDBBrowserWindow.hh.