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

Go to the source code of this file.

Typedefs

typedef long int wxIntPtr
 

Functions

int wxCALLBACK RFListCompareASC (wxIntPtr item1, wxIntPtr item2, wxIntPtr sortData)
 
int wxCALLBACK RFListCompareDESC (wxIntPtr item1, wxIntPtr item2, wxIntPtr sortData)
 

Detailed Description

Implementation of AddRFFromHDBDialog class.

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

Definition in file AddRFFromHDBDialog.cc.

Typedef Documentation

◆ wxIntPtr

typedef long int wxIntPtr

Definition at line 55 of file AddRFFromHDBDialog.cc.

Function Documentation

◆ RFListCompareASC()

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

Definition at line 77 of file AddRFFromHDBDialog.cc.

77  {
78 
79  ListItemData* lid1 = (ListItemData*)item1;
80  ListItemData* lid2 = (ListItemData*)item2;
81  int sortColumn = (int)sortData;
82 
83  if (sortColumn == 0) {
84  return lid1->width - lid2->width;
85  } else if (sortColumn == 1) {
86  return lid1->size - lid2->size;
87  } else if (sortColumn == 2) {
88  return lid1->readPorts - lid2->readPorts;
89  } else if (sortColumn == 3) {
90  return lid1->writePorts - lid2->writePorts;
91  } else if (sortColumn == 4) {
92  return lid1->bidirPorts - lid2->bidirPorts;
93  } else if (sortColumn == 5) {
94  return lid1->maxReads - lid2->maxReads;
95  } else if (sortColumn == 6) {
96  return lid1->maxWrites - lid2->maxWrites;
97  } else if (sortColumn == 7) {
98  return lid1->hdbId - lid2->hdbId;
99  } else if (sortColumn == 8) {
100  return lid1->path.Cmp(lid2->path);
101  }
102 
103  return 0;
104 }

References ListItemData::bidirPorts, ListItemData::hdbId, ListItemData::maxReads, ListItemData::maxWrites, ListItemData::path, ListItemData::readPorts, ListItemData::size, ListItemData::width, and ListItemData::writePorts.

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

◆ RFListCompareDESC()

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

Definition at line 107 of file AddRFFromHDBDialog.cc.

107  {
108 
109  ListItemData* lid1 = (ListItemData*)item1;
110  ListItemData* lid2 = (ListItemData*)item2;
111  int sortColumn = (int)sortData;
112 
113  if (sortColumn == 0) {
114  return lid2->width - lid1->width;
115  } else if (sortColumn == 1) {
116  return lid2->size - lid1->size;
117  } else if (sortColumn == 2) {
118  return lid2->readPorts - lid1->readPorts;
119  } else if (sortColumn == 3) {
120  return lid2->writePorts - lid1->writePorts;
121  } else if (sortColumn == 4) {
122  return lid2->bidirPorts - lid1->bidirPorts;
123  } else if (sortColumn == 5) {
124  return lid2->maxReads - lid1->maxReads;
125  } else if (sortColumn == 6) {
126  return lid2->maxWrites - lid1->maxWrites;
127  } else if (sortColumn == 7) {
128  return lid2->hdbId - lid1->hdbId;
129  } else if (sortColumn == 8) {
130  return lid2->path.Cmp(lid1->path);
131  }
132 
133  return 0;
134 }

References ListItemData::bidirPorts, ListItemData::hdbId, ListItemData::maxReads, ListItemData::maxWrites, ListItemData::path, ListItemData::readPorts, ListItemData::size, ListItemData::width, and ListItemData::writePorts.

Referenced by AddRFFromHDBDialog::onColumnClick().

ListItemData::size
int size
Definition: AddIUFromHDBDialog.hh:46
ListItemData::readPorts
int readPorts
Definition: AddIUFromHDBDialog.hh:47
ListItemData::bidirPorts
int bidirPorts
Definition: AddRFFromHDBDialog.hh:48
ListItemData::maxReads
int maxReads
Definition: AddRFFromHDBDialog.hh:49
ListItemData
Definition: AddFUFromHDBDialog.hh:47
ListItemData::writePorts
int writePorts
Definition: AddRFFromHDBDialog.hh:47
ListItemData::maxWrites
int maxWrites
Definition: AddRFFromHDBDialog.hh:50
ListItemData::width
int width
Definition: AddIUFromHDBDialog.hh:45
ListItemData::path
wxString path
Definition: AddFUFromHDBDialog.hh:52
ListItemData::hdbId
int hdbId
Definition: AddFUFromHDBDialog.hh:51