OpenASIP  2.0
Typedefs | Functions
AddFUFromHDBDialog.cc File Reference
#include <sstream>
#include <boost/format.hpp>
#include <wx/statline.h>
#include <wx/listctrl.h>
#include <wx/dir.h>
#include <wx/textctrl.h>
#include <wx/imaglist.h>
#include <wx/srchctrl.h>
#include "AddFUFromHDBDialog.hh"
#include "Model.hh"
#include "Machine.hh"
#include "WxConversion.hh"
#include "WidgetTools.hh"
#include "HDBManager.hh"
#include "FUArchitecture.hh"
#include "FunctionUnit.hh"
#include "HWOperation.hh"
#include "WarningDialog.hh"
#include "ErrorDialog.hh"
#include "MapTools.hh"
#include "Environment.hh"
#include "FileSystem.hh"
#include "FUPort.hh"
#include "ExecutionPipeline.hh"
#include "HDBRegistry.hh"
#include "ObjectState.hh"
#include "ProDeConstants.hh"
Include dependency graph for AddFUFromHDBDialog.cc:

Go to the source code of this file.

Typedefs

typedef long int wxIntPtr
 

Functions

int wxCALLBACK FUListCompareASC (wxIntPtr item1, wxIntPtr item2, wxIntPtr sortData)
 
int wxCALLBACK FUListCompareDESC (wxIntPtr item1, wxIntPtr item2, wxIntPtr sortData)
 

Detailed Description

Implementation of AddFUFromHDBDialog class.

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

Definition in file AddFUFromHDBDialog.cc.

Typedef Documentation

◆ wxIntPtr

typedef long int wxIntPtr

Definition at line 64 of file AddFUFromHDBDialog.cc.

Function Documentation

◆ FUListCompareASC()

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

Definition at line 86 of file AddFUFromHDBDialog.cc.

86  {
87 
88  ListItemData* lid1 = (ListItemData*)item1;
89  ListItemData* lid2 = (ListItemData*)item2;
90  int sortColumn = (int)sortData;
91 
92  if (sortColumn == 0) {
93  return lid1->latency - lid2->latency;
94  } else if (sortColumn == 1) {
95  return lid1->operations.Cmp(lid2->operations);
96  } else if (sortColumn == 3) {
97  return lid1->hdbId - lid2->hdbId;
98  } else if (sortColumn == 4) {
99  return lid1->path.Cmp(lid2->path);
100  }
101 
102  return 0;
103 }

References ListItemData::hdbId, ListItemData::latency, ListItemData::operations, and ListItemData::path.

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

◆ FUListCompareDESC()

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

Definition at line 106 of file AddFUFromHDBDialog.cc.

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

References ListItemData::hdbId, ListItemData::latency, ListItemData::operations, and ListItemData::path.

Referenced by AddFUFromHDBDialog::onColumnClick().

ListItemData::operations
wxString operations
Definition: AddFUFromHDBDialog.hh:50
ListItemData::latency
int latency
Definition: AddFUFromHDBDialog.hh:49
ListItemData
Definition: AddFUFromHDBDialog.hh:47
ListItemData::path
wxString path
Definition: AddFUFromHDBDialog.hh:52
ListItemData::hdbId
int hdbId
Definition: AddFUFromHDBDialog.hh:51