OpenASIP  2.0
Static Public Member Functions | List of all members
WxConversion Class Reference

#include <WxConversion.hh>

Collaboration diagram for WxConversion:
Collaboration graph

Static Public Member Functions

static char ** toCStringArray (size_t elements, wxChar **source)
 
static std::string toString (const wxString &source)
 
static wxString toWxString (const std::string &source)
 
static wxString toWxString (const int &source)
 
static wxString toWxString (const unsigned int &source)
 
static wxString toWxString (const ULongWord &source)
 
static wxString toWxString (const SLongWord &source)
 
static wxString toWxString (const float &source)
 
static wxString toWxString (const double &source)
 
static wxString toWxString (const char &source)
 

Detailed Description

Contains functions for converting between wxString and std::string.

Definition at line 43 of file WxConversion.hh.

Member Function Documentation

◆ toCStringArray()

char ** WxConversion::toCStringArray ( size_t  elements,
wxChar **  source 
)
static

Converts an wxChar* array (zero terminated strings) to a char* array.

Assumes the client frees the array after use.

Definition at line 123 of file WxConversion.cc.

123  {
124  char** cstringArray = new char*[elements];
125  for (size_t i = 0; i < elements; ++i) {
126  wxString wxStr(source[i]);
127  cstringArray[i] = new char[wxStr.size()];
128  cstringArray[i] = strndup((const char*)wxStr.mb_str(), wxStr.size());
129  }
130  return cstringArray;
131 }

Referenced by OSEd::OnInit(), HDBEditor::OnInit(), ProDe::OnInit(), and Proxim::OnInit().

◆ toString()

static std::string WxConversion::toString ( const wxString &  source)
static

Referenced by OSEdAboutDialog::createContents(), GUIOptions::createToolbar(), AddFUArchFromADFCmd::Do(), SetFUArchitectureCmd::Do(), SetRFArchitectureCmd::Do(), OpenHDBCmd::Do(), ProDeExportCmd::Do(), ProximExecuteFileCmd::Do(), ProximOpenMachineCmd::Do(), ProximOpenProgramCmd::Do(), CreateHDBCmd::Do(), ProximCDCmd::Do(), OSEdModifyBehaviorCmd::Do(), EPSDC::DoDrawText(), BlockImplementationDialog::doOK(), ProcessorImplementationWindow::doSaveIDF(), SimulateDialog::formattedValue(), OperationPropertyDialog::getSelectedItems(), WidgetTools::lcStringSelection(), AddModuleDialog::name(), OperationPropertyDialog::onAddAffectedBy(), OperationPropertyDialog::onAddAffects(), OTAFormatListDialog::onAddOTAFormat(), OperationDialog::onAddResource(), BusDialog::onAddSegment(), ImmediateSlotDialog::onAddSlot(), InputOperandDialog::onAddSwap(), TemplateListDialog::onAddTemplate(), AddWatchDialog::onASChoice(), OperationDialog::onBindOperand(), BlockImplementationFileDialog::onBrowse(), OSEdOptionsDialog::onBrowse(), GenerateProcessorDialog::onBrowseBEMLoad(), ProcessorImplementationWindow::onBrowseDecompressor(), ProcessorImplementationWindow::onBrowseICDecPlugin(), ProcessorImplementationWindow::onBrowseICHDB(), MDFView::OnChangeFilename(), ProximCmdHistoryWindow::onCommandDClick(), MemoryControl::onDataModeChanged(), InputOperandDialog::onDeleteSwap(), ProximMachineStateWindow::onExport(), AutoSelectImplementationsDialog::onFind(), AddWatchDialog::onFUChoice(), MemoryControl::onGoTo(), BlockImplementationDialog::onHDBSelection(), HDBEditor::OnInit(), ProDe::OnInit(), Proxim::OnInit(), BridgeDialog::onInputBus(), FindWindow::onInputText(), OptionsDialog::onInsertTool(), ProcessorImplementationWindow::onLoadIDF(), AddBreakpointDialog::onOK(), RFPortDialog::onOK(), WatchPropertiesDialog::onOK(), BlockImplementationFileDialog::onOK(), ImplementationParameterDialog::onOK(), AddWatchDialog::onOK(), IUPortDialog::onOK(), BreakpointPropertiesDialog::onOK(), RFPortImplementationDialog::onOK(), RFImplementationDialog::onOK(), RFDialog::onOK(), CostEstimationDataDialog::onOK(), FUPortDialog::onOK(), AddModuleDialog::onOk(), SimulatorSettingsDialog::onOK(), SRPortDialog::onOK(), SocketDialog::onOK(), RFGuardDialog::onOK(), CostFunctionPluginDialog::onOK(), FUExternalPortDialog::onOK(), RFExternalPortDialog::onOK(), EditParameterDialog::onOk(), FUDialog::onOK(), FUPortImplementationDialog::onOK(), BusDialog::onOK(), TemplateSlotDialog::onOK(), IUDialog::onOK(), AddressSpaceDialog::onOK(), FUImplementationDialog::onOK(), BridgeDialog::onOK(), GenerateProcessorDialog::onOK(), OperationDialog::onOK(), GCUDialog::onOK(), OperationPropertyDialog::onOpen(), MDFDocument::OnOpenDocument(), GCUDialog::onRAPortChoice(), OperationDialog::onResourceLClick(), AddWatchDialog::onRFChoice(), OSEdOptionsDialog::onSave(), ProximCmdHistoryWindow::onSave(), MDFDocument::OnSaveDocument(), OTAOperationDialog::onSelectOperation(), OpsetDialog::onSelectOperation(), CallExplorerPluginWindow::onSelectPlugin(), FUDialog::onSetAddressSpace(), ProcessorImplementationWindow::onSetParameterValue(), MemoryControl::onSizeModeChanged(), RFPortDialog::onSocketChoice(), FUPortDialog::onSocketChoice(), SRPortDialog::onSocketChoice(), NumberControl::onText(), MemoryControl::onWriteMemory(), HDBBrowserWindow::openLink(), OSEdMainFrame::OSEdMainFrame(), OperationPropertyDialog::saveOperation(), SocketDialog::segment(), AddressSpacesDialog::selectedAS(), FUGuardDialog::selectedFU(), OSEdTreeView::selectedOperation(), RFDialog::selectedPort(), IUDialog::selectedPort(), FUGuardDialog::selectedPort(), OperationDialog::selectedResource(), RFGuardDialog::selectedRF(), BusDialog::selectedSegment(), SimulateDialog::setInputValues(), AboutDialog::setTexts(), ConsoleWindow::textEntered(), OTAOperationDialog::TransferDataFromWindow(), OpsetDialog::TransferDataFromWindow(), AddIUFromHDBDialog::TransferDataToWindow(), AddFUFromHDBDialog::TransferDataToWindow(), OSEdTreeView::update(), BridgeDialog::updateBusChoices(), OperationPropertyDialog::updateOperation(), and MemoryControl::updateView().

◆ toWxString() [1/8]

wxString WxConversion::toWxString ( const char &  source)
static

Converts char to a wxString.

Parameters
sourcechar to convert.
Returns
The char as a wxString.

Definition at line 90 of file WxConversion.cc.

90  {
91  return wxString((Conversion::toString(source)).c_str(), *wxConvCurrent);
92 }

References Conversion::toString().

Here is the call graph for this function:

◆ toWxString() [2/8]

wxString WxConversion::toWxString ( const double &  source)
static

Converts a double precission floating point value to wxString.

Parameters
sourcedouble to convert.
Returns
The double value as a wxString.

Definition at line 113 of file WxConversion.cc.

113  {
114  return wxString((Conversion::toString(source)).c_str(), *wxConvCurrent);
115 }

References Conversion::toString().

Here is the call graph for this function:

◆ toWxString() [3/8]

wxString WxConversion::toWxString ( const float &  source)
static

Converts a floating point value to wxString.

Parameters
sourcefloat to convert.
Returns
The floating point value as a wxString.

Definition at line 102 of file WxConversion.cc.

102  {
103  return wxString((Conversion::toString(source)).c_str(), *wxConvCurrent);
104 }

References Conversion::toString().

Here is the call graph for this function:

◆ toWxString() [4/8]

wxString WxConversion::toWxString ( const int &  source)
static

Converts an int to a wxString.

Parameters
sourceint to convert.
Returns
The int as a wxString.

Definition at line 46 of file WxConversion.cc.

46  {
47  return wxString((Conversion::toString(source)).c_str(), *wxConvCurrent);
48 }

References Conversion::toString().

Here is the call graph for this function:

◆ toWxString() [5/8]

wxString WxConversion::toWxString ( const SLongWord source)
static

Converts an long to a wxString.

Parameters
sourceint to convert.
Returns
The int as a wxString.

Definition at line 68 of file WxConversion.cc.

68  {
69  return wxString((Conversion::toString(source)).c_str(), *wxConvCurrent);
70 }

References Conversion::toString().

Here is the call graph for this function:

◆ toWxString() [6/8]

static wxString WxConversion::toWxString ( const std::string &  source)
static

Referenced by AddFUFromHDBDialog::AddFUFromHDBDialog(), OSEdTreeView::addItem(), AddIUFromHDBDialog::AddIUFromHDBDialog(), AddRFFromHDBDialog::AddRFFromHDBDialog(), ProximMachineStateWindow::appendDetails(), ProximMachineStateWindow::appendUtilizationData(), UserManualCmd::askFromUser(), AutoSelectImplementationsDialog::AutoSelectImplementationsDialog(), BlockImplementationDialog::BlockImplementationDialog(), BlockImplementationFileDialog::BlockImplementationFileDialog(), BridgeDialog::BridgeDialog(), OSEdTreeView::changeText(), ProcessorImplementationWindow::checkImplementationFiles(), OSEdTreeView::constructTree(), CostFunctionPluginDialog::CostFunctionPluginDialog(), AboutDialog::createContents(), ProximAboutDialog::createContents(), OSEdAboutDialog::createContents(), RFFactory::createEditPart(), IUFactory::createEditPart(), FUFactory::createEditPart(), GCUFactory::createEditPart(), HDBEditorMainFrame::createHDB(), OpsetDialog::createOperation(), MainFrame::createToolbar(), ProximMainFrame::createToolbar(), GUIOptions::createToolbar(), HDBBrowserInfoPanel::displayBusEntry(), HDBBrowserInfoPanel::displayCostFunctionPlugin(), HDBBrowserInfoPanel::displayFUArchitecture(), HDBBrowserInfoPanel::displayFUEntry(), HDBBrowserInfoPanel::displayFUImplementation(), HDBBrowserInfoPanel::displayOperationImplementation(), HDBBrowserInfoPanel::displayOperationImplementationResource(), HDBBrowserInfoPanel::displayRFArchitecture(), HDBBrowserInfoPanel::displayRFEntry(), HDBBrowserInfoPanel::displayRFImplementation(), HDBBrowserInfoPanel::displaySocketEntry(), UserManualCmd::Do(), AddFUImplementationCmd::Do(), HDBEditorDeleteCmd::Do(), HDBEditorModifyCmd::Do(), QuitCmd::Do(), SetCostFunctionPluginCmd::Do(), SetFUArchitectureCmd::Do(), SetRFArchitectureCmd::Do(), AddFUArchFromADFCmd::Do(), AddRFImplementationCmd::Do(), SaveOptionsCmd::Do(), ProDeExportCmd::Do(), ProximQuitCmd::Do(), SetStatusTextCmd::Do(), AddGCUCmd::Do(), AddBridgeCmd::Do(), OSEdAddModuleCmd::Do(), OSEdAddOperationCmd::Do(), OSEdBuildAllCmd::Do(), OSEdBuildCmd::Do(), OSEdModifyBehaviorCmd::Do(), OSEdPropertiesCmd::Do(), OSEdRemoveModuleCmd::Do(), OSEdRemoveOperationCmd::Do(), OSEdUserManualCmd::Do(), PasteComponentCmd::Do(), ProcessorImplementationWindow::doSaveIDF(), BusFigure::drawSelf(), DropDownMenu::DropDownMenu(), HDBBrowserWindow::fuArchLabel(), FUImplementationDialog::FUImplementationDialog(), FUPortImplementationDialog::FUPortImplementationDialog(), MemoryGridTable::GetColLabelValue(), DisassemblyGridTable::GetColLabelValue(), MemoryGridTable::GetRowLabelValue(), DisassemblyGridTable::GetRowLabelValue(), ProximDisassemblyGridTable::GetValue(), MemoryGridTable::GetValue(), DisassemblyGridTable::GetValue(), HDBEditorAboutDialog::HDBEditorAboutDialog(), HelpBrowser::HelpBrowser(), ImplementationParameterDialog::ImplementationParameterDialog(), AddWatchDialog::initialize(), RFExternalPortDialog::initialize(), FUExternalPortDialog::initialize(), OSEdInfoView::insertOperationPropertyColumns(), AddIUFromHDBDialog::loadHDB(), AddRFFromHDBDialog::loadHDB(), AddFUFromHDBDialog::loadHDB(), GenerateProcessorDialog::loadICDecoderGeneratorPlugin(), ProcessorImplementationWindow::loadICDecoderPlugin(), ProximRegisterWindow::loadImmediateUnit(), ProximMemoryWindow::loadMemory(), ProximDebuggerWindow::loadProgram(), ProximMemoryWindow::loadProgramMemory(), ProximRegisterWindow::loadRegisterFile(), MemoryGridTable::memoryContents(), MemoryControl::MemoryControl(), MainFrame::menuAccelerator(), ProximMainFrame::menuAccelerator(), OSEdInfoView::moduleView(), AddFUFromHDBDialog::onAdd(), OperationPropertyDialog::onAddAffectedBy(), OperationPropertyDialog::onAddAffects(), BusDialog::onAddFUGuard(), OperationDialog::onAddOperand(), FUDialog::onAddOperationFromOpset(), OTAFormatListDialog::onAddOTAFormat(), RFImplementationDialog::onAddParameter(), FUImplementationDialog::onAddParameter(), OperationDialog::onAddResource(), BusDialog::onAddRFGuard(), BusDialog::onAddSegment(), ImmediateSlotDialog::onAddSlot(), TemplateListDialog::onAddSlot(), TemplateListDialog::onAddTemplate(), SimulateDialog::onAdvanceClock(), AddressSpacesDialog::onASRightClick(), SocketDialog::onAttach(), BlockImplementationFileDialog::onBrowse(), OSEdOptionsDialog::onBrowse(), BlockImplementationDialog::onBrowse(), AutoSelectImplementationsDialog::onBrowse(), GenerateProcessorDialog::onBrowseBEMLoad(), MDFView::OnChangeFilename(), OSEdMainFrame::onCommandEvent(), OperationDialog::onDeleteOperand(), OperationDialog::onDeleteResource(), SocketDialog::onDirection(), OSEdInfoView::onDropDownMenu(), OSEdTreeView::onDropDownMenu(), CostEstimationDataDialog::onEntryTypeSelection(), ConsoleWindow::onError(), ProximMachineStateWindow::onExport(), AutoSelectImplementationsDialog::onFind(), FindWindow::onFindNext(), FindWindow::onFindPrev(), AddWatchDialog::onFUChoice(), FUGuardDialog::onFUChoice(), BusDialog::onFUGuardRightClick(), ProcessorImplementationWindow::onGenerateProcessor(), MemoryControl::onGoTo(), BlockImplementationDialog::onHDBSelection(), Proxim::OnInit(), BridgeDialog::onInputBus(), ConsoleWindow::onInputKey(), FindWindow::onInputText(), OSEdTreeView::onItemSelected(), ProcessorImplementationWindow::onLoadIDF(), RFPortDialog::onOK(), BlockImplementationFileDialog::onOK(), IUPortDialog::onOK(), RFDialog::onOK(), SRPortDialog::onOK(), MemoryValueDialog::onOK(), FUPortDialog::onOK(), AddModuleDialog::onOk(), RFGuardDialog::onOK(), SocketDialog::onOK(), FUGuardDialog::onOK(), FUDialog::onOK(), IUDialog::onOK(), BusDialog::onOK(), BridgeDialog::onOK(), FUImplementationDialog::onOK(), AddressSpaceDialog::onOK(), GenerateProcessorDialog::onOK(), OperationDialog::onOK(), GCUDialog::onOK(), ResultDialog::onOpen(), OperationPropertyDialog::onOpen(), OperationDialog::onOperandLClick(), OperationDialog::onOperandSelection(), GCUDialog::onOperationRightClick(), FUDialog::onOperationRightClick(), RFDialog::onPortRightClick(), FUDialog::onPortRightClick(), GCUDialog::onPortRightClick(), SimulateDialog::onReset(), OperationDialog::onResourceLClick(), AddWatchDialog::onRFChoice(), RFGuardDialog::onRFChoice(), BusDialog::onRFGuardRightClick(), ProximDisassemblyWindow::onRightClick(), CallExplorerPluginWindow::onRun(), OSEdOptionsDialog::onSave(), MDFDocument::OnSaveDocument(), BusDialog::onSegmentDown(), BusDialog::onSegmentRightClick(), BusDialog::onSegmentUp(), OSEdInfoView::onSelection(), OpsetDialog::onSelectOperation(), CallExplorerPluginWindow::onSelectPlugin(), FUImplementationDialog::onSetOpcode(), ProximMainFrame::onSimulatorEvent(), ConsoleWindow::onSimulatorOutput(), SimulateDialog::onTrigger(), BusDialog::onUnconditionalGuard(), ProximStopDialog::onUpdate(), ValidateMachineDialog::onValidate(), MDFDocument::openADF(), MDFDocument::openCFG(), HDBBrowserWindow::openLink(), OSEdInfoView::operationPropertyView(), OSEdInfoView::operationView(), OSEdMainFrame::OSEdMainFrame(), OSEdInfoView::pathView(), ProximAboutDialog::ProximAboutDialog(), OptionsDialog::readOptions(), ProximBreakpointWindow::refreshStopPoints(), ProximPortWindow::reinitialize(), ProximRegisterWindow::reinitialize(), ResultDialog::ResultDialog(), RFImplementationDialog::RFImplementationDialog(), RFPortImplementationDialog::RFPortImplementationDialog(), MachineCanvas::savePNG(), HDBEditorMainFrame::setHDB(), GCUDialog::setLabels(), OperationDialog::setOperandType(), ProximMachineStateWindow::setStatusText(), AboutDialog::setTexts(), OSEdAboutDialog::setTexts(), OSEdOptionsDialog::setTexts(), IUPortDialog::setTexts(), AddModuleDialog::setTexts(), RFPortDialog::setTexts(), OperationDialog::setTexts(), BridgeDialog::setTexts(), ImmediateSlotDialog::setTexts(), RFGuardDialog::setTexts(), EditParameterDialog::setTexts(), FUPortDialog::setTexts(), OTAFormatListDialog::setTexts(), SRPortDialog::setTexts(), TemplateSlotDialog::setTexts(), SimulationInfoDialog::setTexts(), FUGuardDialog::setTexts(), AddressSpacesDialog::setTexts(), MemoryDialog::setTexts(), TemplateListDialog::setTexts(), RFDialog::setTexts(), OutputOperandDialog::setTexts(), SocketDialog::setTexts(), BusDialog::setTexts(), IUDialog::setTexts(), CallExplorerPluginWindow::setTexts(), InputOperandDialog::setTexts(), SimulateDialog::setTexts(), FUDialog::setTexts(), AddressSpaceDialog::setTexts(), OperationDAGDialog::setTexts(), OperationPropertyDialog::setTexts(), WidgetTools::setWidgetLabel(), ProximPortWindow::showFunctionUnit(), ProximRegisterWindow::showImmediateUnit(), SimulateDialog::showOrHideRegisters(), ProximRegisterWindow::showRegisterFile(), SimulateDialog::SimulateDialog(), SimulationInfoDialog::SimulationInfoDialog(), SocketDialog::SocketDialog(), MessageDialog::suppressLines(), ProximToolbox::testCondition(), ProximToolbox::testExpression(), KeyboardShortcutDialog::TransferDataToWindow(), SRPortDialog::TransferDataToWindow(), FUPortDialog::TransferDataToWindow(), RFPortDialog::TransferDataToWindow(), OTAFormatListDialog::TransferDataToWindow(), WatchPropertiesDialog::TransferDataToWindow(), OTAOperationDialog::TransferDataToWindow(), IUPortDialog::TransferDataToWindow(), ImmediateSlotDialog::TransferDataToWindow(), CostFunctionPluginDialog::TransferDataToWindow(), BreakpointPropertiesDialog::TransferDataToWindow(), RFGuardDialog::TransferDataToWindow(), GCUDialog::TransferDataToWindow(), OSEdOptionsDialog::TransferDataToWindow(), FUDialog::TransferDataToWindow(), FUGuardDialog::TransferDataToWindow(), SimulatorSettingsDialog::TransferDataToWindow(), CostEstimationDataDialog::TransferDataToWindow(), OperationDialog::TransferDataToWindow(), OpsetDialog::TransferDataToWindow(), TemplateListDialog::TransferDataToWindow(), FUPortImplementationDialog::TransferDataToWindow(), IUDialog::TransferDataToWindow(), AddressSpaceDialog::TransferDataToWindow(), TemplateSlotDialog::TransferDataToWindow(), BusDialog::TransferDataToWindow(), ResultDialog::TransferDataToWindow(), AddIUFromHDBDialog::TransferDataToWindow(), AddFUFromHDBDialog::TransferDataToWindow(), OperationPropertyDialog::TransferDataToWindow(), AddRFFromHDBDialog::TransferDataToWindow(), ProcessorImplementationWindow::TransferDataToWindow(), OptionsDialog::TransferDataToWindow(), FUArchitectureDialog::update(), RFImplementationDialog::update(), ProximPortWindow::update(), FUImplementationDialog::update(), HDBBrowserWindow::update(), DisasmExecCountFrame::update(), NumberControl::update(), GCUDialog::updateAddressSpaceChoice(), FUDialog::updateAddressSpaceChoice(), OperationPropertyDialog::updateAffected(), ProximDebuggerWindow::updateAnnotations(), AddressSpacesDialog::updateASList(), BridgeDialog::updateBusChoices(), ProDeBusOrderDialog::updateBusList(), ProximCmdHistoryWindow::updateCommandList(), SocketDialog::updateConnected(), OutputOperandDialog::updateElementCounts(), InputOperandDialog::updateElementCounts(), ProcessorImplementationWindow::updateFUList(), BusDialog::updateGuardLists(), AddressSpaceDialog::updateIdLists(), ProcessorImplementationWindow::updateImplementationLists(), OperationDAGDialog::updateIndex(), OperationDialog::updateLatency(), SimulationInfoDialog::updateList(), InputOperandDialog::updateList(), SimulateDialog::updateLists(), OperationDialog::updateOperandList(), OperationPropertyDialog::updateOperands(), OperationPropertyDialog::updateOperation(), OTAFormatListDialog::updateOperationList(), GCUDialog::updateOperationList(), FUDialog::updateOperationList(), CallExplorerPluginWindow::updateParameterList(), GCUDialog::updatePortList(), RFDialog::updatePortList(), IUDialog::updatePortList(), FUDialog::updatePortList(), GCUDialog::updateRAPortChoice(), OperationDialog::updateResourceGrid(), ProcessorImplementationWindow::updateRFList(), BusDialog::updateSegmentList(), ProximMainFrame::updateSimulationStatus(), TemplateListDialog::updateSlotList(), IUPortDialog::updateSocket(), FUPortDialog::updateSockets(), SRPortDialog::updateSockets(), RFPortDialog::updateSockets(), IUDialog::updateTemplateList(), OutputOperandDialog::updateTypes(), InputOperandDialog::updateTypes(), OperationDialog::updateUsageGrid(), RFDialog::updateWidgets(), OperationDialog::warnOnResourcesWithoutUsages(), ConsoleWindow::write(), and OSEdInfoView::writeStaticPropertiesOfOperation().

◆ toWxString() [7/8]

wxString WxConversion::toWxString ( const ULongWord source)
static

Converts an unsigned long to a wxString.

Parameters
sourceunsigned int to convert.
Returns
The unsigned int as a wxString.

Definition at line 79 of file WxConversion.cc.

79  {
80  return wxString((Conversion::toString(source)).c_str(), *wxConvCurrent);
81 }

References Conversion::toString().

Here is the call graph for this function:

◆ toWxString() [8/8]

wxString WxConversion::toWxString ( const unsigned int &  source)
static

Converts an unsigned int to a wxString.

Parameters
sourceunsigned int to convert.
Returns
The unsigned int as a wxString.

Definition at line 57 of file WxConversion.cc.

57  {
58  return wxString((Conversion::toString(source)).c_str(), *wxConvCurrent);
59 }

References Conversion::toString().

Here is the call graph for this function:

The documentation for this class was generated from the following files:
Conversion::toString
static std::string toString(const T &source)