| OpenASIP 2.2
    | 
#include <CostFunctionPluginDialog.hh>


| Public Member Functions | |
| CostFunctionPluginDialog (wxWindow *parent, wxWindowID id, HDB::HDBManager &hdb, int pluginID) | |
| virtual | ~CostFunctionPluginDialog () | 
| Private Types | |
| enum | { ID_LIST = 10000 , ID_NAME , ID_PATH , ID_TYPE , ID_BROWSE , ID_DESCRIPTION , ID_ADD , ID_MODIFY , ID_DELETE , ID_TEXT , ID_LINE } | 
| Widget ids.  More... | |
| Private Member Functions | |
| virtual bool | TransferDataToWindow () | 
| void | onBrowse (wxCommandEvent &event) | 
| void | onAdd (wxCommandEvent &event) | 
| void | onModify (wxCommandEvent &event) | 
| void | onDelete (wxCommandEvent &event) | 
| void | onOK (wxCommandEvent &event) | 
| void | onDataSelection (wxListEvent &event) | 
| int | selectedData () | 
| wxSizer * | createContents (wxWindow *parent, bool call_fit, bool set_sizer) | 
| Private Attributes | |
| wxListCtrl * | list_ | 
| Pointer to the data list widget. | |
| HDB::HDBManager & | hdb_ | 
| HDB containing the plugin. | |
| int | id_ | 
| Plugin id in the HDB. | |
| wxString | name_ | 
| Plugin name. | |
| wxString | path_ | 
| Plugin file path. | |
| wxString | description_ | 
| Plugin description string. | |
| wxChoice * | typeChoice_ | 
| Pointer to the type choice widget. | |
| Static Private Attributes | |
| static const wxString | TYPE_COST_FU | 
| FU Cost estimator string for the type choicer widget. | |
| static const wxString | TYPE_COST_RF | 
| RF Cost estimator string for the type choicer widget. | |
| static const wxString | TYPE_COST_DECOMP | 
| Decompressor cost estimator string for the type choicer widget. | |
| static const wxString | TYPE_COST_ICDEC | 
| IC&decoder Cost estimator string for the type choicer widget. | |
Dialog for modifying CostFunctionPlugins.
Definition at line 46 of file CostFunctionPluginDialog.hh.
| 
 | private | 
Widget ids.
| Enumerator | |
|---|---|
| ID_LIST | |
| ID_NAME | |
| ID_PATH | |
| ID_TYPE | |
| ID_BROWSE | |
| ID_DESCRIPTION | |
| ID_ADD | |
| ID_MODIFY | |
| ID_DELETE | |
| ID_TEXT | |
| ID_LINE | |
Definition at line 92 of file CostFunctionPluginDialog.hh.
| CostFunctionPluginDialog::CostFunctionPluginDialog | ( | wxWindow * | parent, | 
| wxWindowID | id, | ||
| HDB::HDBManager & | hdb, | ||
| int | pluginID | ||
| ) | 
The Constructor.
| parent | Parent window of the dialog. | 
| id | Dialog window ID. | 
| hdb | HDB containing the cost function plugin. | 
| pluginID | Row ID of the plugin in the HDB. | 
Definition at line 79 of file CostFunctionPluginDialog.cc.
References HDB::CostFunctionPlugin::COST_DECOMP, HDB::CostFunctionPlugin::COST_FU, HDB::CostFunctionPlugin::COST_ICDEC, HDB::CostFunctionPlugin::COST_RF, HDB::CostFunctionPlugin::description(), HDB::CostFunctionPlugin::name(), HDB::CostFunctionPlugin::pluginFilePath(), WxConversion::toWxString(), and HDB::CostFunctionPlugin::type().

| 
 | virtual | 
| 
 | private | 
Creates the dialog widgets.
| parent | Parent window of the dialog widgets. | 
Definition at line 302 of file CostFunctionPluginDialog.cc.
References ID_ADD, ID_BROWSE, ID_DELETE, ID_DESCRIPTION, ID_LINE, ID_LIST, ID_MODIFY, ID_NAME, ID_PATH, ID_TEXT, and ID_TYPE.
| 
 | private | 
Event handler for the add button.
Definition at line 224 of file CostFunctionPluginDialog.cc.
References hdb_, id_, and TransferDataToWindow().

| 
 | private | 
Event handler for the browse plugin file path button.
Definition at line 210 of file CostFunctionPluginDialog.cc.
References ID_PATH.
| 
 | private | 
Event handler for the plugin data list selection changes.
Updates the delete and modify button enabled/disabled states.
Definition at line 196 of file CostFunctionPluginDialog.cc.
References ID_DELETE, ID_MODIFY, and selectedData().

| 
 | private | 
Event handler for the Delete button.
Definition at line 251 of file CostFunctionPluginDialog.cc.
References hdb_, HDB::HDBManager::removeCostEstimationData(), selectedData(), and TransferDataToWindow().

| 
 | private | 
Event handler for the modify button.
Definition at line 237 of file CostFunctionPluginDialog.cc.
References hdb_, id_, selectedData(), and TransferDataToWindow().

| 
 | private | 
Event handler for the Close button.
Definition at line 264 of file CostFunctionPluginDialog.cc.
References assert, HDB::CostFunctionPlugin::COST_DECOMP, HDB::CostFunctionPlugin::COST_FU, HDB::CostFunctionPlugin::COST_ICDEC, HDB::CostFunctionPlugin::COST_RF, description_, hdb_, id_, HDB::HDBManager::modifyCostFunctionPlugin(), name_, path_, WxConversion::toString(), TYPE_COST_DECOMP, TYPE_COST_FU, TYPE_COST_ICDEC, TYPE_COST_RF, and typeChoice_.

| 
 | private | 
Returns RowID of the cost estimation data selected in the list.
Returns -1 if no data is selected.
Definition at line 180 of file CostFunctionPluginDialog.cc.
References list_.
Referenced by onDataSelection(), onDelete(), and onModify().
| 
 | privatevirtual | 
Transfers data to the dilaog widgets.
Definition at line 135 of file CostFunctionPluginDialog.cc.
References CostEstimationData::busReference(), HDB::HDBManager::costEstimationData(), HDB::HDBManager::costFunctionPluginDataIDs(), CostEstimationData::fuReference(), CostEstimationData::hasBusReference(), CostEstimationData::hasFUReference(), CostEstimationData::hasRFReference(), CostEstimationData::hasSocketReference(), hdb_, id_, list_, CostEstimationData::name(), CostEstimationData::rfReference(), CostEstimationData::socketReference(), DataObject::stringValue(), WxConversion::toWxString(), and CostEstimationData::value().
Referenced by onAdd(), onDelete(), and onModify().

| 
 | private | 
Plugin description string.
Definition at line 77 of file CostFunctionPluginDialog.hh.
Referenced by onOK().
| 
 | private | 
HDB containing the plugin.
Definition at line 69 of file CostFunctionPluginDialog.hh.
Referenced by onAdd(), onDelete(), onModify(), onOK(), and TransferDataToWindow().
| 
 | private | 
Plugin id in the HDB.
Definition at line 71 of file CostFunctionPluginDialog.hh.
Referenced by onAdd(), onModify(), onOK(), and TransferDataToWindow().
| 
 | private | 
Pointer to the data list widget.
Definition at line 66 of file CostFunctionPluginDialog.hh.
Referenced by selectedData(), and TransferDataToWindow().
| 
 | private | 
| 
 | private | 
| 
 | staticprivate | 
Decompressor cost estimator string for the type choicer widget.
Definition at line 87 of file CostFunctionPluginDialog.hh.
Referenced by onOK().
| 
 | staticprivate | 
FU Cost estimator string for the type choicer widget.
Definition at line 83 of file CostFunctionPluginDialog.hh.
Referenced by onOK().
| 
 | staticprivate | 
IC&decoder Cost estimator string for the type choicer widget.
Definition at line 89 of file CostFunctionPluginDialog.hh.
Referenced by onOK().
| 
 | staticprivate | 
RF Cost estimator string for the type choicer widget.
Definition at line 85 of file CostFunctionPluginDialog.hh.
Referenced by onOK().
| 
 | private | 
Pointer to the type choice widget.
Definition at line 80 of file CostFunctionPluginDialog.hh.
Referenced by onOK().