OpenASIP 2.2
Loading...
Searching...
No Matches
Typedefs | Functions
AddIUFromHDBDialog.cc File Reference
#include <boost/format.hpp>
#include <wx/statline.h>
#include <wx/listctrl.h>
#include <wx/dir.h>
#include <wx/imaglist.h>
#include "AddIUFromHDBDialog.hh"
#include "Model.hh"
#include "Machine.hh"
#include "WxConversion.hh"
#include "WidgetTools.hh"
#include "HDBManager.hh"
#include "HDBRegistry.hh"
#include "RFArchitecture.hh"
#include "WarningDialog.hh"
#include "MapTools.hh"
#include "Environment.hh"
#include "FileSystem.hh"
#include "Conversion.hh"
#include "ProDeConstants.hh"
Include dependency graph for AddIUFromHDBDialog.cc:

Go to the source code of this file.

Typedefs

typedef long int wxIntPtr
 

Functions

int wxCALLBACK IUListCompareASC (wxIntPtr item1, wxIntPtr item2, wxIntPtr sortData)
 
int wxCALLBACK IUListCompareDESC (wxIntPtr item1, wxIntPtr item2, wxIntPtr sortData)
 

Detailed Description

Implementation of AddIUFromHDBDialog class.

Author
Veli-Pekka Jääskeläinen 2006 (vjaaskel-no.spam-cs.tut.fi)
Note
rating: red

Definition in file AddIUFromHDBDialog.cc.

Typedef Documentation

◆ wxIntPtr

typedef long int wxIntPtr

Definition at line 55 of file AddIUFromHDBDialog.cc.

Function Documentation

◆ IUListCompareASC()

int wxCALLBACK IUListCompareASC ( wxIntPtr  item1,
wxIntPtr  item2,
wxIntPtr  sortData 
)

Definition at line 80 of file AddIUFromHDBDialog.cc.

80 {
81
82 ListItemData* lid1 = (ListItemData*)item1;
83 ListItemData* lid2 = (ListItemData*)item2;
84 int sortColumn = (int)sortData;
85
86 if (sortColumn == 0) {
87 return lid1->width - lid2->width;
88 } else if (sortColumn == 1) {
89 return lid1->size - lid2->size;
90 } else if (sortColumn == 2) {
91 return lid1->readPorts - lid2->readPorts;
92 } else if (sortColumn == 3) {
93 return lid1->latency - lid2->latency;
94 } else if (sortColumn == 4) {
95 return lid1->hdbId - lid2->hdbId;
96 } else if (sortColumn == 5) {
97 return lid1->path.Cmp(lid2->path);
98 }
99
100 return 0;
101}

References ListItemData::hdbId, ListItemData::latency, ListItemData::path, ListItemData::readPorts, ListItemData::size, and ListItemData::width.

Referenced by AddIUFromHDBDialog::loadHDB(), and AddIUFromHDBDialog::onColumnClick().

◆ IUListCompareDESC()

int wxCALLBACK IUListCompareDESC ( wxIntPtr  item1,
wxIntPtr  item2,
wxIntPtr  sortData 
)

Definition at line 104 of file AddIUFromHDBDialog.cc.

104 {
105
106 ListItemData* lid1 = (ListItemData*)item1;
107 ListItemData* lid2 = (ListItemData*)item2;
108 int sortColumn = (int)sortData;
109
110 if (sortColumn == 0) {
111 return lid2->width - lid1->width;
112 } else if (sortColumn == 1) {
113 return lid2->size - lid1->size;
114 } else if (sortColumn == 2) {
115 return lid2->readPorts - lid1->readPorts;
116 } else if (sortColumn == 3) {
117 return lid2->latency - lid1->latency;
118 } else if (sortColumn == 4) {
119 return lid2->hdbId - lid1->hdbId;
120 } else if (sortColumn == 5) {
121 return lid2->path.Cmp(lid1->path);
122 }
123
124 return 0;
125}

References ListItemData::hdbId, ListItemData::latency, ListItemData::path, ListItemData::readPorts, ListItemData::size, and ListItemData::width.

Referenced by AddIUFromHDBDialog::onColumnClick().