OpenASIP 2.2
|
#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. | |
wxTreeCtrl * | tree_ |
Tree widget displayign the HDB hierarchy. | |
std::map< RowID, wxTreeItemId > | rfArchitectures_ |
Map of rf architecture RowIDs to tree item IDs. | |
std::map< RowID, wxTreeItemId > | rfImplementations_ |
Map of rf implementation RowIDs to tree item IDs. | |
std::map< RowID, wxTreeItemId > | fuArchitectures_ |
Map of fu architecture RowIDs to tree item IDs. | |
std::map< RowID, wxTreeItemId > | fuImplementations_ |
Map of fu implementation RowIDs to tree item IDs. | |
std::map< RowID, wxTreeItemId > | fuEntries_ |
Map of fu entry RowIDs to tree item IDs. | |
std::map< RowID, wxTreeItemId > | rfEntries_ |
Map of rf entry RowIDs to tree item IDs. | |
std::map< RowID, wxTreeItemId > | busEntries_ |
Map of bus entry RowIDs to tree item IDs. | |
std::map< RowID, wxTreeItemId > | socketEntries_ |
Map of socket entry RowIDs to tree item IDs. | |
std::map< RowID, wxTreeItemId > | costPlugins_ |
Map of cost function plugin RowIDs to tree item IDs. | |
HDBBrowserInfoPanel * | infoPanel_ |
Info panel widget for displaying the selected element information. | |
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 |
Widget window IDs.
Enumerator | |
---|---|
ID_TREE_VIEW |
Definition at line 112 of file HDBBrowserWindow.hh.
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().
Referenced by update().
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 busEntries_, MapTools::containsValue(), and tree_.
Referenced by HDBEditorDeleteCmd::Do(), HDBEditorDeleteCmd::isEnabled(), onItemSelected(), and selectedBusEntry().
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(), costPlugins_, and tree_.
Referenced by HDBEditorDeleteCmd::Do(), HDBEditorModifyCmd::Do(), HDBEditorDeleteCmd::isEnabled(), HDBEditorModifyCmd::isEnabled(), onItemSelected(), and selectedCostFunctionPlugin().
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(), fuArchitectures_, and tree_.
Referenced by AddFUImplementationCmd::Do(), HDBEditorDeleteCmd::Do(), AddFUImplementationCmd::isEnabled(), HDBEditorDeleteCmd::isEnabled(), onItemSelected(), onRMBClick(), and selectedFUArchitecture().
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(), fuEntries_, and tree_.
Referenced by AddFUImplementationCmd::Do(), HDBEditorDeleteCmd::Do(), SetCostFunctionPluginCmd::Do(), AddFUImplementationCmd::isEnabled(), HDBEditorDeleteCmd::isEnabled(), SetCostFunctionPluginCmd::isEnabled(), SetFUArchitectureCmd::isEnabled(), onItemSelected(), onRMBClick(), and selectedFUEntry().
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(), fuImplementations_, and tree_.
Referenced by HDBEditorDeleteCmd::Do(), HDBEditorModifyCmd::Do(), HDBEditorDeleteCmd::isEnabled(), HDBEditorModifyCmd::isEnabled(), onItemSelected(), and selectedFUImplementation().
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.
References tree_.
Referenced by HDBEditorDeleteCmd::Do(), HDBEditorDeleteCmd::isEnabled(), and selectedOperationImplementationResource().
bool HDBBrowserWindow::isOperationImplementationSelected | ( | ) |
Function for checking if a operation implementation is selected in the tree view.
Definition at line 453 of file HDBBrowserWindow.cc.
References tree_.
Referenced by HDBEditorDeleteCmd::Do(), HDBEditorDeleteCmd::isEnabled(), and selectedOperationImplementation().
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(), rfArchitectures_, and tree_.
Referenced by AddRFImplementationCmd::Do(), HDBEditorDeleteCmd::Do(), AddRFImplementationCmd::isEnabled(), HDBEditorDeleteCmd::isEnabled(), onItemSelected(), onRMBClick(), and selectedRFArchitecture().
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(), rfEntries_, and tree_.
Referenced by AddRFImplementationCmd::Do(), HDBEditorDeleteCmd::Do(), SetCostFunctionPluginCmd::Do(), AddRFImplementationCmd::isEnabled(), HDBEditorDeleteCmd::isEnabled(), SetCostFunctionPluginCmd::isEnabled(), onItemSelected(), onRMBClick(), and selectedRFEntry().
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(), rfImplementations_, and tree_.
Referenced by HDBEditorDeleteCmd::Do(), HDBEditorModifyCmd::Do(), HDBEditorDeleteCmd::isEnabled(), HDBEditorModifyCmd::isEnabled(), onItemSelected(), and selectedRFImplementation().
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(), socketEntries_, and tree_.
Referenced by HDBEditorDeleteCmd::Do(), HDBEditorDeleteCmd::isEnabled(), onItemSelected(), and selectedSocketEntry().
|
private |
Event handler for the tree-view selection changes.
Definition at line 782 of file HDBBrowserWindow.cc.
References HDBBrowserInfoPanel::clear(), HDBBrowserInfoPanel::displayBusEntry(), HDBBrowserInfoPanel::displayCostFunctionPlugin(), HDBBrowserInfoPanel::displayFUArchitecture(), HDBBrowserInfoPanel::displayFUEntry(), HDBBrowserInfoPanel::displayFUImplementation(), HDBBrowserInfoPanel::displayOperationImplementation(), HDBBrowserInfoPanel::displayOperationImplementationResource(), HDBBrowserInfoPanel::displayRFArchitecture(), HDBBrowserInfoPanel::displayRFEntry(), HDBBrowserInfoPanel::displayRFImplementation(), HDBBrowserInfoPanel::displaySocketEntry(), infoPanel_, isBusEntrySelected(), isCostFunctionPluginSelected(), isFUArchitectureSelected(), isFUEntrySelected(), isFUImplementationSelected(), isRFArchitectureSelected(), isRFEntrySelected(), isRFImplementationSelected(), isSocketEntrySelected(), HDBToHtml::OPERATION_IMPLEMENTATION_RESOURCES, HDBToHtml::OPERATION_IMPLEMENTATIONS, selectedBusEntry(), selectedCostFunctionPlugin(), selectedFUArchitecture(), selectedFUEntry(), selectedFUImplementation(), selectedRFArchitecture(), selectedRFEntry(), selectedRFImplementation(), and selectedSocketEntry().
|
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, HDBEditorConstants::COMMAND_SET_COST_PLUGIN, isFUArchitectureSelected(), isFUEntrySelected(), isRFArchitectureSelected(), isRFEntrySelected(), and tree_.
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, selectBusEntry(), selectCostFunctionPlugin(), selectFUArchitecture(), selectFUEntry(), selectFUImplementation(), selectRFArchitecture(), selectRFEntry(), selectRFImplementation(), selectSocketEntry(), 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 busEntries_, MapTools::containsKey(), and tree_.
Referenced by openLink().
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(), costPlugins_, and tree_.
Referenced by openLink().
RowID HDBBrowserWindow::selectedBusEntry | ( | ) |
Returns rowID of the bus entry selected in the tree view.
Definition at line 565 of file HDBBrowserWindow.cc.
References busEntries_, isBusEntrySelected(), MapTools::keyForValue(), and tree_.
Referenced by HDBEditorDeleteCmd::Do(), and onItemSelected().
RowID HDBBrowserWindow::selectedCostFunctionPlugin | ( | ) |
Returns rowID of the cost function plugin selected in the treeview.
Definition at line 598 of file HDBBrowserWindow.cc.
References costPlugins_, isCostFunctionPluginSelected(), MapTools::keyForValue(), and tree_.
Referenced by HDBEditorDeleteCmd::Do(), HDBEditorModifyCmd::Do(), and onItemSelected().
RowID HDBBrowserWindow::selectedFUArchitecture | ( | ) |
Returns rowID of the FU architecture selected in the treeview.
Definition at line 466 of file HDBBrowserWindow.cc.
References fuArchitectures_, isFUArchitectureSelected(), MapTools::keyForValue(), and tree_.
Referenced by AddFUImplementationCmd::Do(), HDBEditorDeleteCmd::Do(), and onItemSelected().
RowID HDBBrowserWindow::selectedFUEntry | ( | ) |
Returns rowID of the FU entry selected in the tree view.
Definition at line 533 of file HDBBrowserWindow.cc.
References fuEntries_, isFUEntrySelected(), MapTools::keyForValue(), and tree_.
Referenced by AddFUImplementationCmd::Do(), HDBEditorDeleteCmd::Do(), SetCostFunctionPluginCmd::Do(), AddFUImplementationCmd::isEnabled(), SetFUArchitectureCmd::isEnabled(), and onItemSelected().
RowID HDBBrowserWindow::selectedFUImplementation | ( | ) |
Returns rowID of the FU implementation selected in the treeview.
Definition at line 500 of file HDBBrowserWindow.cc.
References fuImplementations_, isFUImplementationSelected(), MapTools::keyForValue(), and tree_.
Referenced by HDBEditorDeleteCmd::Do(), HDBEditorModifyCmd::Do(), and onItemSelected().
RowID HDBBrowserWindow::selectedOperationImplementation | ( | ) |
Returns rowID of the operation implementation selected in the treeview.
Definition at line 614 of file HDBBrowserWindow.cc.
References isOperationImplementationSelected(), and tree_.
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.
References isOperationImplementationResourceSelected(), and tree_.
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.
References isRFArchitectureSelected(), MapTools::keyForValue(), rfArchitectures_, and tree_.
Referenced by AddRFImplementationCmd::Do(), HDBEditorDeleteCmd::Do(), and onItemSelected().
RowID HDBBrowserWindow::selectedRFEntry | ( | ) |
Returns rowID of the RF entry selected in the tree view.
Definition at line 549 of file HDBBrowserWindow.cc.
References isRFEntrySelected(), MapTools::keyForValue(), rfEntries_, and tree_.
Referenced by AddRFImplementationCmd::Do(), HDBEditorDeleteCmd::Do(), SetCostFunctionPluginCmd::Do(), AddRFImplementationCmd::isEnabled(), and onItemSelected().
RowID HDBBrowserWindow::selectedRFImplementation | ( | ) |
Returns rowID of the RF implementation selected in the treeview.
Definition at line 517 of file HDBBrowserWindow.cc.
References isRFImplementationSelected(), MapTools::keyForValue(), rfImplementations_, and tree_.
Referenced by HDBEditorDeleteCmd::Do(), HDBEditorModifyCmd::Do(), and onItemSelected().
RowID HDBBrowserWindow::selectedSocketEntry | ( | ) |
Returns rowID of the socket entry selected in the tree view.
Definition at line 581 of file HDBBrowserWindow.cc.
References isSocketEntrySelected(), MapTools::keyForValue(), socketEntries_, and tree_.
Referenced by HDBEditorDeleteCmd::Do(), and onItemSelected().
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(), fuArchitectures_, and tree_.
Referenced by openLink().
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(), fuEntries_, and tree_.
Referenced by SetCostFunctionPluginCmd::Do(), and openLink().
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(), fuImplementations_, and tree_.
Referenced by openLink().
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(), rfArchitectures_, and tree_.
Referenced by openLink().
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(), rfEntries_, and tree_.
Referenced by SetCostFunctionPluginCmd::Do(), and openLink().
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(), rfImplementations_, and tree_.
Referenced by openLink().
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(), socketEntries_, and tree_.
Referenced by openLink().
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.
References infoPanel_, manager_, HDBBrowserInfoPanel::setHDB(), and update().
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::FUArchitecture::architecture(), HDB::FUEntry::architecture(), HDB::RFEntry::architecture(), HDBToHtml::BUS_ENTRIES, busEntries_, HDB::HDBManager::busEntryIDs(), HDBBrowserInfoPanel::clear(), HDBToHtml::COST_PLUGINS, HDB::HDBManager::costFunctionPluginByID(), HDB::HDBManager::costFunctionPluginIDs(), costPlugins_, HDBToHtml::FU_ARCHITECTURES, HDBToHtml::FU_ENTRIES, HDB::CachedHDBManager::fuArchitectureByIDConst(), HDB::HDBManager::fuArchitectureIDs(), fuArchitectures_, fuArchLabel(), HDB::HDBManager::fuByEntryID(), fuEntries_, HDB::HDBManager::fuEntryIDs(), fuImplementations_, HDB::FUEntry::hasArchitecture(), HDB::RFEntry::hasArchitecture(), HDB::FUEntry::hasImplementation(), HDB::RFEntry::hasImplementation(), HWBlockArchitecture::id(), HDB::HWBlockImplementation::id(), HDB::FUEntry::implementation(), HDB::RFEntry::implementation(), infoPanel_, manager_, HDB::HWBlockImplementation::moduleName(), HDB::CostFunctionPlugin::name(), HDB::OperationImplementation::name, HDB::OperationImplementationResource::name, HDBToHtml::OPERATION_IMPLEMENTATION_RESOURCES, HDBToHtml::OPERATION_IMPLEMENTATIONS, HDB::HDBManager::OperationImplementationByID(), HDB::HDBManager::OperationImplementationIDs(), HDB::HDBManager::OperationImplementationResourceByID(), HDB::HDBManager::OperationImplementationResourceIDs(), HDBToHtml::RF_ARCHITECTURES, HDBToHtml::RF_IU_ENTRIES, HDB::HDBManager::rfArchitectureIDs(), rfArchitectures_, HDB::HDBManager::rfByEntryID(), rfEntries_, HDB::HDBManager::rfEntryIDs(), rfImplementations_, HDBToHtml::SOCKET_ENTRIES, socketEntries_, HDB::HDBManager::socketEntryIDs(), WxConversion::toWxString(), and tree_.
Referenced by setHDBManager(), and HDBEditorMainFrame::update().
|
private |
Map of bus entry RowIDs to tree item IDs.
Definition at line 129 of file HDBBrowserWindow.hh.
Referenced by isBusEntrySelected(), selectBusEntry(), selectedBusEntry(), and update().
|
private |
Map of cost function plugin RowIDs to tree item IDs.
Definition at line 133 of file HDBBrowserWindow.hh.
Referenced by isCostFunctionPluginSelected(), selectCostFunctionPlugin(), selectedCostFunctionPlugin(), and update().
|
private |
Map of fu architecture RowIDs to tree item IDs.
Definition at line 121 of file HDBBrowserWindow.hh.
Referenced by isFUArchitectureSelected(), selectedFUArchitecture(), selectFUArchitecture(), and update().
|
private |
Map of fu entry RowIDs to tree item IDs.
Definition at line 125 of file HDBBrowserWindow.hh.
Referenced by isFUEntrySelected(), selectedFUEntry(), selectFUEntry(), and update().
|
private |
Map of fu implementation RowIDs to tree item IDs.
Definition at line 123 of file HDBBrowserWindow.hh.
Referenced by isFUImplementationSelected(), selectedFUImplementation(), selectFUImplementation(), and update().
|
private |
Info panel widget for displaying the selected element information.
Definition at line 136 of file HDBBrowserWindow.hh.
Referenced by onItemSelected(), setHDBManager(), and update().
|
private |
HDB to display in the browser.
Definition at line 103 of file HDBBrowserWindow.hh.
Referenced by setHDBManager(), and update().
|
private |
Map of rf architecture RowIDs to tree item IDs.
Definition at line 117 of file HDBBrowserWindow.hh.
Referenced by isRFArchitectureSelected(), selectedRFArchitecture(), selectRFArchitecture(), and update().
|
private |
Map of rf entry RowIDs to tree item IDs.
Definition at line 127 of file HDBBrowserWindow.hh.
Referenced by isRFEntrySelected(), selectedRFEntry(), selectRFEntry(), and update().
|
private |
Map of rf implementation RowIDs to tree item IDs.
Definition at line 119 of file HDBBrowserWindow.hh.
Referenced by isRFImplementationSelected(), selectedRFImplementation(), selectRFImplementation(), and update().
|
private |
Map of socket entry RowIDs to tree item IDs.
Definition at line 131 of file HDBBrowserWindow.hh.
Referenced by isSocketEntrySelected(), selectedSocketEntry(), selectSocketEntry(), and update().
|
private |
Tree widget displayign the HDB hierarchy.
Definition at line 105 of file HDBBrowserWindow.hh.
Referenced by isBusEntrySelected(), isCostFunctionPluginSelected(), isFUArchitectureSelected(), isFUEntrySelected(), isFUImplementationSelected(), isOperationImplementationResourceSelected(), isOperationImplementationSelected(), isRFArchitectureSelected(), isRFEntrySelected(), isRFImplementationSelected(), isSocketEntrySelected(), onRMBClick(), selectBusEntry(), selectCostFunctionPlugin(), selectedBusEntry(), selectedCostFunctionPlugin(), selectedFUArchitecture(), selectedFUEntry(), selectedFUImplementation(), selectedOperationImplementation(), selectedOperationImplementationResource(), selectedRFArchitecture(), selectedRFEntry(), selectedRFImplementation(), selectedSocketEntry(), selectFUArchitecture(), selectFUEntry(), selectFUImplementation(), selectRFArchitecture(), selectRFEntry(), selectRFImplementation(), selectSocketEntry(), and update().