OpenASIP 2.2
Loading...
Searching...
No Matches
HDBBrowserWindow.cc
Go to the documentation of this file.
1/*
2 Copyright (c) 2002-2009 Tampere University.
3
4 This file is part of TTA-Based Codesign Environment (TCE).
5
6 Permission is hereby granted, free of charge, to any person obtaining a
7 copy of this software and associated documentation files (the "Software"),
8 to deal in the Software without restriction, including without limitation
9 the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 and/or sell copies of the Software, and to permit persons to whom the
11 Software is furnished to do so, subject to the following conditions:
12
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 DEALINGS IN THE SOFTWARE.
23 */
24/**
25 * @file HDBBrowserWindow.cc
26 *
27 * Implementation of HDBBrowserWindow class.
28 *
29 * @author Veli-Pekka Jääskeläinen 2006 (vjaaskel-no.spam-cs.tut.fi)
30 * @note rating: red
31 */
32
33#include <set>
34#include <wx/splitter.h>
35#include <wx/progdlg.h>
36#include "HDBBrowserWindow.hh"
37#include "CachedHDBManager.hh"
38#include "WxConversion.hh"
39#include "FUImplementation.hh"
40#include "FUArchitecture.hh"
41#include "RFArchitecture.hh"
42#include "FunctionUnit.hh"
43#include "FUEntry.hh"
44#include "RFEntry.hh"
45#include "DBTypes.hh"
47#include "RFImplementation.hh"
48#include "MapTools.hh"
49#include "HDBEditorConstants.hh"
50#include "HWOperation.hh"
51#include "CostFunctionPlugin.hh"
52#include "HDBToHtml.hh"
53#include "Conversion.hh"
54
55using namespace HDB;
56using namespace TTAMachine;
57
58BEGIN_EVENT_TABLE(HDBBrowserWindow, wxPanel)
59 EVT_TREE_SEL_CHANGED(ID_TREE_VIEW, HDBBrowserWindow::onItemSelected)
60 EVT_TREE_ITEM_ACTIVATED(ID_TREE_VIEW, HDBBrowserWindow::onItemSelected)
61 EVT_TREE_ITEM_RIGHT_CLICK(ID_TREE_VIEW, HDBBrowserWindow::onRMBClick)
63
64/**
65 * The Constructor.
66 *
67 * @param parent Parent window of the browser panel.
68 * @param id Window identifier.
69 */
70HDBBrowserWindow::HDBBrowserWindow(wxWindow* parent, wxWindowID id) :
71 wxPanel(parent, id), manager_(NULL) {
72
73 wxSplitterWindow* splitter = new wxSplitterWindow(this, wxVERTICAL);
74
75 wxBoxSizer* sizer = new wxBoxSizer(wxVERTICAL);
76 tree_ = new wxTreeCtrl(splitter, ID_TREE_VIEW);
77 infoPanel_ = new HDBBrowserInfoPanel(splitter, -1);
78 splitter->SetMinimumPaneSize(150);
79 splitter->SplitVertically(tree_, infoPanel_);
80 sizer->Add(splitter, 1, wxGROW);
81 Fit();
82 SetSizer(sizer);
83}
84
85
86/**
87 * The destructor.
88 */
91
92
93/**
94 * Sets the HDB which is displayed in the browser.
95 *
96 * @param manager HDBManager managing the HDB to display.
97 */
98void
100 manager_ = &manager;
101 infoPanel_->setHDB(manager);
102 update();
103}
104
105/**
106 * Updates the treeview of the HDB.
107 */
108void
110
111 fuArchitectures_.clear();
112 rfArchitectures_.clear();
113 fuImplementations_.clear();
114 rfImplementations_.clear();
115 fuEntries_.clear();
116 rfEntries_.clear();
117 busEntries_.clear();
118 socketEntries_.clear();
119 costPlugins_.clear();
120
121 tree_->DeleteAllItems();
122 wxTreeItemId root = tree_->AddRoot(_T("HDB"));
123
124 wxTreeItemId fus = tree_->AppendItem(
126
127 wxTreeItemId rfs = tree_->AppendItem(
129
130 wxTreeItemId fuEntries = tree_->AppendItem(
132
133 wxTreeItemId rfEntries = tree_->AppendItem(
135
136 wxTreeItemId busEntries = tree_->AppendItem(
138
139 wxTreeItemId socketEntries = tree_->AppendItem(
141
142 wxTreeItemId costPlugins = tree_->AppendItem(
144
145 wxTreeItemId operationImplementations = tree_->AppendItem(
147
148 wxTreeItemId operationImplementationResources = tree_->AppendItem(
150
151 std::set<RowID>::iterator iter;
152
153
154 std::set<RowID> fuArchIds = manager_->fuArchitectureIDs();
155 std::set<RowID> rfArchIds = manager_->rfArchitectureIDs();
156 std::set<RowID> fuIDs = manager_->fuEntryIDs();
157 std::set<RowID> rfIDs = manager_->rfEntryIDs();
158 std::set<RowID> busIDs = manager_->busEntryIDs();
159 std::set<RowID> socketIDs = manager_->socketEntryIDs();
160 std::set<RowID> pluginIDs = manager_->costFunctionPluginIDs();
161 std::set<RowID> operationImplementationIDs = manager_->OperationImplementationIDs();
162 std::set<RowID> operationImplementationResourceIDs = manager_->OperationImplementationResourceIDs();
163
164 int entries = fuArchIds.size() + rfArchIds.size() + fuIDs.size() +
165 rfIDs.size() + busIDs.size() + socketIDs.size() + pluginIDs.size();
166
167 int c = 0;
168
169 wxProgressDialog dialog(
170 _T("Loading HDB"), _T("Loading HDB"), entries, this,
171 wxPD_APP_MODAL|wxPD_AUTO_HIDE);
172
173 dialog.SetSize(300,100);
174
175 int ids = fuArchIds.size();
176 int cur = 0;
177 wxString message;
178
179 // FU architectures
180 for (iter = fuArchIds.begin(); iter != fuArchIds.end(); iter++) {
181
182 const FUArchitecture& arch = manager_->fuArchitectureByIDConst(*iter);
183 const FunctionUnit& fu = arch.architecture();
184
185 wxTreeItemId id = tree_->AppendItem(fus, fuArchLabel(fu));
186 fuArchitectures_[*iter] = id;
187 c++;
188 cur++;
189 message.Printf(wxT("Loading FU Architectures... (%04d / %04d)"),cur,ids);
190 dialog.Update(c, message);
191 dialog.SetSize(300,100);
192 }
193 tree_->SortChildren(fus);
194
195 cur = 0;
196 ids = rfArchIds.size();
197 // RF architectures
198 for (iter = rfArchIds.begin(); iter != rfArchIds.end(); iter++) {
199 wxString archLabel = WxConversion::toWxString(*iter);
200 wxTreeItemId id = tree_->AppendItem(rfs, archLabel);
201 rfArchitectures_[*iter] = id;
202 c++;
203 cur++;
204 message.Printf(wxT("Loading RF Architectures... (%04d / %04d)"),cur,ids);
205 dialog.Update(c, message);
206 dialog.SetSize(300,100);
207 }
208
209 // FU Entries
210 cur = 0;
211 ids = fuIDs.size();
212 for (iter = fuIDs.begin(); iter != fuIDs.end(); iter++) {
213 const FUEntry* fuEntry = manager_->fuByEntryID(*iter);
214 wxString fuEntryLabel = WxConversion::toWxString(*iter);
215 wxTreeItemId entryTreeID = tree_->AppendItem(fuEntries, fuEntryLabel);
216 fuEntries_[*iter] = entryTreeID;
217
218 if (fuEntry->hasArchitecture()) {
219 const FUArchitecture& arch = fuEntry->architecture();
220
221 int archID = arch.id();
222 wxTreeItemId archTreeID = fuArchitectures_[archID];
223
224 if (fuEntry->hasImplementation()) {
225 const FUImplementation& imp = fuEntry->implementation();
226 wxString impName = WxConversion::toWxString(imp.moduleName());
227 wxTreeItemId id = tree_->AppendItem(archTreeID, impName);
228 fuImplementations_[imp.id()] = id;
229 }
230 }
231
232 delete fuEntry;
233 c++;
234 cur++;
235 message.Printf(wxT("Loading FU entries... (%04d / %04d)"),cur,ids);
236 dialog.Update(c, message);
237 dialog.SetSize(300,100);
238 }
239
240 // RF Entries
241 cur = 0;
242 ids = rfIDs.size();
243 for (iter = rfIDs.begin(); iter != rfIDs.end(); iter++) {
244 const RFEntry* rfEntry = manager_->rfByEntryID(*iter);
245 wxString rfEntryLabel = WxConversion::toWxString(*iter);
246 wxTreeItemId entryTreeID = tree_->AppendItem(rfEntries, rfEntryLabel);
247 rfEntries_[*iter] = entryTreeID;
248
249 if (rfEntry->hasArchitecture()) {
250 const RFArchitecture& arch = rfEntry->architecture();
251 int archID = arch.id();
252 wxTreeItemId archTreeID = rfArchitectures_[archID];
253
254 if (rfEntry->hasImplementation()) {
255 const RFImplementation& imp = rfEntry->implementation();
256 wxString impName = WxConversion::toWxString(imp.moduleName());
257 wxTreeItemId id = tree_->AppendItem(archTreeID, impName);
258 rfImplementations_[imp.id()] = id;
259 }
260 }
261 delete rfEntry;
262 c++;
263 cur++;
264 message.Printf(wxT("Loading RF entries... (%04d / %04d)"),cur,ids);
265 dialog.Update(c, message);
266 dialog.SetSize(300,100);
267 }
268
269 // Bus Entries
270 cur = 0;
271 ids = busIDs.size();
272 for (iter = busIDs.begin(); iter != busIDs.end(); iter++) {
273 wxString busEntryLabel = WxConversion::toWxString(*iter);
274 wxTreeItemId entryTreeID =
275 tree_->AppendItem(busEntries, busEntryLabel);
276
277 busEntries_[*iter] = entryTreeID;
278 c++;
279 cur++;
280 message.Printf(wxT("Loading bus entries... (%04d / %04d)"),cur,ids);
281 dialog.Update(c, message);
282 dialog.SetSize(300,100);
283 }
284
285 // Socket Entries
286 cur = 0;
287 ids = socketIDs.size();
288 for (iter = socketIDs.begin(); iter != socketIDs.end(); iter++) {
289 wxString socketEntryLabel = WxConversion::toWxString(*iter);
290 wxTreeItemId entryTreeID =
291 tree_->AppendItem(socketEntries, socketEntryLabel);
292
293 socketEntries_[*iter] = entryTreeID;
294 cur++;
295 message.Printf(wxT("Loading socket entries... (%04d / %04d)"),cur,ids);
296 dialog.Update(c, message);
297 dialog.SetSize(300,100);
298 }
299
300 // Cost estimation plugin data
301 cur = 0;
302 ids = pluginIDs.size();
303 for (iter = pluginIDs.begin(); iter != pluginIDs.end(); iter++) {
304
305 const CostFunctionPlugin* plugin =
307
308 wxString pluginName = WxConversion::toWxString(plugin->name());
309 wxTreeItemId id = tree_->AppendItem(costPlugins, pluginName);
310 costPlugins_[*iter] = id;
311 delete plugin;
312 c++;
313 cur++;
314 message.Printf(wxT("Loading cost estimation plugins... (%04d / %04d)"),cur,ids);
315 dialog.Update(c, message);
316 dialog.SetSize(300,100);
317 }
318
319 // fugenOperations
320 for (auto &id : operationImplementationIDs) {
322 std::string label = std::to_string(id) + " : " + op.name;
323 tree_->AppendItem(operationImplementations, label);
324 }
325
326 // fugenResources
327 for (auto &id : operationImplementationResourceIDs) {
329 std::string label = std::to_string(id) + " : " + res.name;
330 tree_->AppendItem(operationImplementationResources, label);
331 }
332
333 tree_->Expand(root);
334 infoPanel_->clear();
335}
336
337/**
338 * Function for checking if a FU architecture is selected in the tree view.
339 *
340 * @return True, if a FU architecture is selected.
341 */
342bool
346
347/**
348 * Function for checking if a RF architecture is selected in the tree view.
349 *
350 * @return True, if a RF architecture is selected.
351 */
352bool
356
357
358/**
359 * Function for checking if a FU implementation is selected in the tree view.
360 *
361 * @return True, if a FU implementation is selected.
362 */
363bool
368
369
370/**
371 * Function for checking if a RF implementation is selected in the tree view.
372 *
373 * @return True, if a RF implementation is selected.
374 */
375bool
380
381/**
382 * Function for checking if a FU entry is selected in the tree view.
383 *
384 * @return True, if a FU entry is selected.
385 */
386bool
390
391/**
392 * Function for checking if a RF entry is selected in the tree view.
393 *
394 * @return True, if a RF entry is selected.
395 */
396bool
400
401/**
402 * Function for checking if a Bus entry is selected in the tree view.
403 *
404 * @return True, if a bus entry is selected.
405 */
406bool
410
411/**
412 * Function for checking if a socket entry is selected in the tree view.
413 *
414 * @return True, if a socket entry is selected.
415 */
416bool
420
421/**
422 * Function for checking if a cost function plugin is selected in the tree
423 * view.
424 *
425 * @return True, if a cost function plugin is selected.
426 */
427bool
431
432/**
433 * Function for checking if a operation implementation resource
434 * is selected in the tree view.
435 *
436 * @return True, if selected.
437 */
438bool
440 std::string parent = tree_->GetItemParent(tree_->GetSelection()).IsOk() ?
441 tree_->GetItemText(tree_->GetItemParent(tree_->GetSelection()))
442 .ToStdString() : "none";
443 return parent == "Operation Implementation Resources";
444}
445
446/**
447 * Function for checking if a operation implementation
448 * is selected in the tree view.
449 *
450 * @return True, if selected.
451 */
452bool
454 std::string parent = tree_->GetItemParent(tree_->GetSelection()).IsOk() ?
455 tree_->GetItemText(tree_->GetItemParent(tree_->GetSelection()))
456 .ToStdString() : "none";
457 return parent == "Operation Implementations";
458}
459
460/**
461 * Returns rowID of the FU architecture selected in the treeview.
462 *
463 * @return ID of the selected FU architecture, or -1 if none is selected.
464 */
465RowID
468 return -1;
469 }
470
472 fuArchitectures_, tree_->GetSelection());
473
474 return id;
475}
476
477/**
478 * Returns rowID of the RF architecture selected in the treeview.
479 *
480 * @return ID of the selected RF architecture, or -1 if none is selected.
481 */
482RowID
485 return -1;
486 }
488 rfArchitectures_, tree_->GetSelection());
489
490 return id;
491}
492
493
494/**
495 * Returns rowID of the FU implementation selected in the treeview.
496 *
497 * @return ID of the selected FU implementation, or -1 if none is selected.
498 */
499RowID
502 return -1;
503 }
505 fuImplementations_, tree_->GetSelection());
506
507 return id;
508}
509
510
511/**
512 * Returns rowID of the RF implementation selected in the treeview.
513 *
514 * @return ID of the selected RF implementation, or -1 if none is selected.
515 */
516RowID
519 return -1;
520 }
522 rfImplementations_, tree_->GetSelection());
523
524 return id;
525}
526
527/**
528 * Returns rowID of the FU entry selected in the tree view.
529 *
530 * @return ID of the selected FU entry, or -1 if none is selected.
531 */
532RowID
534 if (!isFUEntrySelected()) {
535 return -1;
536 }
538 fuEntries_, tree_->GetSelection());
539
540 return id;
541}
542
543/**
544 * Returns rowID of the RF entry selected in the tree view.
545 *
546 * @return ID of the selected RF entry, or -1 if none is selected.
547 */
548RowID
550 if (!isRFEntrySelected()) {
551 return -1;
552 }
554 rfEntries_, tree_->GetSelection());
555
556 return id;
557}
558
559/**
560 * Returns rowID of the bus entry selected in the tree view.
561 *
562 * @return ID of the selected bus entry, or -1 if none is selected.
563 */
564RowID
566 if (!isBusEntrySelected()) {
567 return -1;
568 }
570 busEntries_, tree_->GetSelection());
571
572 return id;
573}
574
575/**
576 * Returns rowID of the socket entry selected in the tree view.
577 *
578 * @return ID of the selected socket entry, or -1 if none is selected.
579 */
580RowID
582 if (!isSocketEntrySelected()) {
583 return -1;
584 }
586 socketEntries_, tree_->GetSelection());
587
588 return id;
589}
590
591
592/**
593 * Returns rowID of the cost function plugin selected in the treeview.
594 *
595 * @return ID of the selected cost function plugin, or -1 if none is selected.
596 */
597RowID
600 return -1;
601 }
603 costPlugins_, tree_->GetSelection());
604
605 return id;
606}
607
608/**
609 * Returns rowID of the operation implementation selected in the treeview.
610 *
611 * @return ID of the selection, or -1 if none is selected.
612 */
613RowID
616 return -1;
617 }
618 std::istringstream iss(tree_->GetItemText(tree_->GetSelection())
619 .ToStdString());
620 RowID id;
621 iss >> id;
622 return id;
623}
624
625/**
626 * Returns rowID of the operation implementation resource
627 * selected in the treeview.
628 *
629 * @return ID of the selection, or -1 if none is selected.
630 */
631RowID
634 return -1;
635 }
636 std::istringstream iss(tree_->GetItemText(tree_->GetSelection())
637 .ToStdString());
638 RowID id;
639 iss >> id;
640 return id;
641}
642
643/**
644 * Selects the given FU Entry.
645 *
646 * @param id RowID of the
647 */
648void
650
652 return;
653 }
654
655 tree_->SelectItem(fuEntries_[id]);
656}
657
658/**
659 * Selects the given RF Entry.
660 *
661 * @param id RowID of the RF entry to select.
662 */
663void
665
667 return;
668 }
669
670 tree_->SelectItem(rfEntries_[id]);
671}
672
673/**
674 * Selects the given Bus Entry.
675 *
676 * @param id RowID of the bus entry to select.
677 */
678void
680
682 return;
683 }
684
685 tree_->SelectItem(busEntries_[id]);
686}
687
688/**
689 * Selects the given Socket Entry.
690 *
691 * @param id RowID of the socket entry to select.
692 */
693void
695
697 return;
698 }
699
700 tree_->SelectItem(socketEntries_[id]);
701}
702
703/**
704 * Selects the given FU architecture.
705 *
706 * @param id RowID of the
707 */
708void
710
712 return;
713 }
714
715 tree_->SelectItem(fuArchitectures_[id]);
716}
717
718/**
719 * Selects the given RF architecture.
720 *
721 * @param id RowID of the
722 */
723void
725
727 return;
728 }
729
730 tree_->SelectItem(rfArchitectures_[id]);
731}
732
733/**
734 * Selects the given FU implementation.
735 *
736 * @param id RowID of the FU implementation.
737 */
738void
740
742 return;
743 }
744
745 tree_->SelectItem(fuImplementations_[id]);
746}
747
748/**
749 * Selects the given RF implementation.
750 *
751 * @param id RowID of the RF implementation.
752 */
753void
755
757 return;
758 }
759
760 tree_->SelectItem(rfImplementations_[id]);
761}
762
763/**
764 * Selects the given cost function plugin.
765 *
766 * @param id RowID of the cost function plugin.
767 */
768void
770
772 return;
773 }
774
775 tree_->SelectItem(costPlugins_[id]);
776}
777
778/**
779 * Event handler for the tree-view selection changes.
780 */
781void
783
784 wxTreeCtrl* ctrl = new wxTreeCtrl();
785 std::string current = ctrl->GetItemText(e.GetItem().GetID()).ToStdString();
786 std::string parent = ctrl->GetItemParent(e.GetItem().GetID()).IsOk() ?
787 ctrl->GetItemText(ctrl->GetItemParent(e.GetItem().GetID())).ToStdString() :
788 "none";
789
790 infoPanel_->clear();
791
794 } else if (isRFArchitectureSelected()) {
796 } else if (isFUImplementationSelected()) {
798 } else if (isRFImplementationSelected()) {
800 } else if (isFUEntrySelected()) {
802 } else if (isRFEntrySelected()) {
804 } else if (isBusEntrySelected()) {
806 } else if (isSocketEntrySelected()) {
808 } else if (isCostFunctionPluginSelected()) {
810 } else if (parent == HDBToHtml::OPERATION_IMPLEMENTATIONS) {
811 std::istringstream iss(current);
812 int id;
813 iss >> id;
816 std::istringstream iss(current);
817 int id;
818 iss >> id;
820 }
821
822 delete ctrl;
823}
824
825
826/**
827 * Event handler for right mouse button clicks in the treeview.
828 *
829 * Pops up a context menu.
830 */
831void
832HDBBrowserWindow::onRMBClick(wxTreeEvent& event) {
833 tree_->SelectItem(event.GetItem());
834 wxMenu* popupMenu = new wxMenu();
836 popupMenu->Append(
838 _T("Add &Implementation..."));
839 }
841 popupMenu->Append(
843 _T("Add &Implementation..."));
844 }
846 popupMenu->Append(
848 _T("Set Cost Function Plugin"));
849 }
850
851 popupMenu->AppendSeparator();
852 popupMenu->Append(HDBEditorConstants::COMMAND_MODIFY, _T("&Modify..."));
853 popupMenu->Append(HDBEditorConstants::COMMAND_DELETE, _T("&Delete"));
854 PopupMenu(popupMenu, event.GetPoint());
855}
856
857/**
858 * Returns label string for an function unit architecture.
859 *
860 * @param fu Function unit object to create the label from.
861 * @return Label for the fu architecture.
862 */
863wxString
865
866 // Operation names are put in a set which sorts them alphbetically.
867 std::set<std::string> opNames;
868 for (int i = 0; i < fu.operationCount(); i++) {
869 const HWOperation* op = fu.operation(i);
870 std::string opName =
871 op->name() + "(" + Conversion::toString(op->latency()) + ")";
872
873 opNames.insert(opName);
874 }
875
876 wxString archName;
877 std::set<std::string>::const_iterator oIter = opNames.begin();
878 for (; oIter != opNames.end(); oIter++) {
879 archName.Append(WxConversion::toWxString(*oIter));
880 archName.Append(_T(" "));
881 }
882
883 return archName;
884}
885
886/**
887 * Opens a link generated by HDBToHtml in the browser window.
888 *
889 * @param link Link to open.
890 */
891void
892HDBBrowserWindow::openLink(const wxString& link) {
893
894 const wxString fuArchPrefix =
896 _T("/");
897
898 const wxString rfArchPrefix =
900 _T("/");
901
902 const wxString fuEntryPrefix =
904
905 const wxString rfEntryPrefix =
907
908 const wxString busEntryPrefix =
910
911 const wxString socketEntryPrefix =
913 _T("/");
914
915 const wxString fuImplPrefix =
917 _T("/");
918
919 const wxString rfImplPrefix =
921 _T("/");
922
923 const wxString costPluginPrefix =
925
926 wxString rest;
927 if (link.StartsWith(fuArchPrefix, &rest)) {
930 } else if (link.StartsWith(rfArchPrefix, &rest)) {
933 } else if (link.StartsWith(fuEntryPrefix, &rest)) {
935 selectFUEntry(id);
936 } else if (link.StartsWith(rfEntryPrefix, &rest)) {
938 selectRFEntry(id);
939 } else if (link.StartsWith(busEntryPrefix, &rest)) {
941 selectBusEntry(id);
942 } else if (link.StartsWith(socketEntryPrefix, &rest)) {
945 } else if (link.StartsWith(fuImplPrefix, &rest)) {
948 } else if (link.StartsWith(rfImplPrefix, &rest)) {
951 } else if (link.StartsWith(costPluginPrefix, &rest)) {
954 }
955}
END_EVENT_TABLE() using namespace IDF
int RowID
Type definition of row ID in relational databases.
Definition DBTypes.hh:37
static std::string toString(const T &source)
static int toInt(const T &source)
void displaySocketEntry(RowID id)
void setHDB(const HDB::HDBManager &hdb)
void displayRFArchitecture(RowID id)
void displayCostFunctionPlugin(RowID id)
void displayRFImplementation(RowID id)
void displayOperationImplementationResource(RowID id)
void displayFUImplementation(RowID id)
void displayFUArchitecture(RowID id)
void displayFUEntry(RowID id)
void displayOperationImplementation(RowID id)
void selectFUImplementation(int id)
std::map< RowID, wxTreeItemId > rfArchitectures_
Map of rf architecture RowIDs to tree item IDs.
bool isCostFunctionPluginSelected()
void selectBusEntry(int id)
std::map< RowID, wxTreeItemId > fuArchitectures_
Map of fu architecture RowIDs to tree item IDs.
void selectCostFunctionPlugin(int id)
wxTreeCtrl * tree_
Tree widget displayign the HDB hierarchy.
void selectRFEntry(int id)
std::map< RowID, wxTreeItemId > rfImplementations_
Map of rf implementation RowIDs to tree item IDs.
std::map< RowID, wxTreeItemId > costPlugins_
Map of cost function plugin RowIDs to tree item IDs.
std::map< RowID, wxTreeItemId > rfEntries_
Map of rf entry RowIDs to tree item IDs.
void selectSocketEntry(int id)
RowID selectedOperationImplementation()
bool isOperationImplementationResourceSelected()
void selectFUArchitecture(int id)
HDB::CachedHDBManager * manager_
HDB to display in the browser.
HDBBrowserInfoPanel * infoPanel_
Info panel widget for displaying the selected element information.
std::map< RowID, wxTreeItemId > fuEntries_
Map of fu entry RowIDs to tree item IDs.
void selectRFImplementation(int id)
void onItemSelected(wxTreeEvent &event)
void onRMBClick(wxTreeEvent &event)
void selectFUEntry(int id)
wxString fuArchLabel(const TTAMachine::FunctionUnit &fu) const
RowID selectedOperationImplementationResource()
void selectRFArchitecture(int id)
std::map< RowID, wxTreeItemId > fuImplementations_
Map of fu implementation RowIDs to tree item IDs.
virtual ~HDBBrowserWindow()
bool isOperationImplementationSelected()
void openLink(const wxString &link)
std::map< RowID, wxTreeItemId > socketEntries_
Map of socket entry RowIDs to tree item IDs.
std::map< RowID, wxTreeItemId > busEntries_
Map of bus entry RowIDs to tree item IDs.
RowID selectedCostFunctionPlugin()
void setHDBManager(HDB::CachedHDBManager &manager)
static const std::string OPERATION_IMPLEMENTATIONS
Definition HDBToHtml.hh:75
static const std::string RF_IMPLEMENTATIONS
Definition HDBToHtml.hh:73
static const std::string RF_IU_ENTRIES
Definition HDBToHtml.hh:67
static const std::string COST_PLUGINS
Definition HDBToHtml.hh:74
static const std::string FU_ENTRIES
Definition HDBToHtml.hh:65
static const std::string FU_ARCHITECTURES
Definition HDBToHtml.hh:70
static const std::string RF_ARCHITECTURES
Definition HDBToHtml.hh:71
static const std::string SOCKET_ENTRIES
Definition HDBToHtml.hh:69
static const std::string RF_ENTRIES
Definition HDBToHtml.hh:66
static const std::string OPERATION_IMPLEMENTATION_RESOURCES
Definition HDBToHtml.hh:76
static const std::string FU_IMPLEMENTATIONS
Definition HDBToHtml.hh:72
static const std::string BUS_ENTRIES
Definition HDBToHtml.hh:68
const FUArchitecture & fuArchitectureByIDConst(RowID id) const
TTAMachine::FunctionUnit & architecture() const
FUImplementation & implementation() const
Definition FUEntry.cc:86
virtual bool hasImplementation() const
Definition FUEntry.cc:74
FUArchitecture & architecture() const
Definition FUEntry.cc:129
virtual bool hasArchitecture() const
Definition FUEntry.cc:117
FUEntry * fuByEntryID(RowID id) const
std::set< RowID > rfArchitectureIDs() const
CostFunctionPlugin * costFunctionPluginByID(RowID pluginID) const
OperationImplementationResource OperationImplementationResourceByID(RowID id) const
std::set< RowID > OperationImplementationIDs() const
OperationImplementation OperationImplementationByID(RowID id) const
std::set< RowID > fuArchitectureIDs() const
std::set< RowID > socketEntryIDs() const
std::set< RowID > rfEntryIDs() const
std::set< RowID > costFunctionPluginIDs() const
std::set< RowID > busEntryIDs() const
RFEntry * rfByEntryID(RowID id) const
std::set< RowID > fuEntryIDs() const
std::set< RowID > OperationImplementationResourceIDs() const
virtual bool hasImplementation() const
Definition RFEntry.cc:74
RFArchitecture & architecture() const
Definition RFEntry.cc:145
virtual bool hasArchitecture() const
Definition RFEntry.cc:117
RFImplementation & implementation() const
Definition RFEntry.cc:102
static KeyType keyForValue(const MapType &aMap, const ValueType &aValue)
static bool containsKey(const MapType &aMap, const KeyType &aKey)
static bool containsValue(const MapType &aMap, const ValueType &aValue)
virtual HWOperation * operation(const std::string &name) const
virtual int operationCount() const
const std::string & name() const
static wxString toWxString(const std::string &source)
static std::string toString(const wxString &source)