OpenASIP 2.2
Loading...
Searching...
No Matches
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(), Proxim::OnInit(), HDBEditor::OnInit(), and ProDe::OnInit().

◆ toString()

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

Referenced by OSEdAboutDialog::createContents(), GUIOptions::createToolbar(), OSEdModifyBehaviorCmd::Do(), ProximCDCmd::Do(), ProximExecuteFileCmd::Do(), ProximOpenMachineCmd::Do(), ProximOpenProgramCmd::Do(), AddFUArchFromADFCmd::Do(), CreateHDBCmd::Do(), OpenHDBCmd::Do(), SetFUArchitectureCmd::Do(), SetRFArchitectureCmd::Do(), ProDeExportCmd::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(), OSEdOptionsDialog::onBrowse(), BlockImplementationFileDialog::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(), Proxim::OnInit(), HDBEditor::OnInit(), ProDe::OnInit(), BridgeDialog::onInputBus(), FindWindow::onInputText(), OptionsDialog::onInsertTool(), ProcessorImplementationWindow::onLoadIDF(), BridgeDialog::onOK(), BusDialog::onOK(), SocketDialog::onOK(), AddModuleDialog::onOk(), AddBreakpointDialog::onOK(), AddWatchDialog::onOK(), BreakpointPropertiesDialog::onOK(), SimulatorSettingsDialog::onOK(), WatchPropertiesDialog::onOK(), BlockImplementationFileDialog::onOK(), CostEstimationDataDialog::onOK(), CostFunctionPluginDialog::onOK(), FUExternalPortDialog::onOK(), FUImplementationDialog::onOK(), FUPortImplementationDialog::onOK(), ImplementationParameterDialog::onOK(), RFExternalPortDialog::onOK(), RFImplementationDialog::onOK(), RFPortImplementationDialog::onOK(), AddressSpaceDialog::onOK(), EditParameterDialog::onOk(), FUDialog::onOK(), FUPortDialog::onOK(), GCUDialog::onOK(), GenerateProcessorDialog::onOK(), IUDialog::onOK(), IUPortDialog::onOK(), OperationDialog::onOK(), RFDialog::onOK(), RFGuardDialog::onOK(), RFPortDialog::onOK(), SRPortDialog::onOK(), TemplateSlotDialog::onOK(), OperationPropertyDialog::onOpen(), MDFDocument::OnOpenDocument(), GCUDialog::onRAPortChoice(), OperationDialog::onResourceLClick(), AddWatchDialog::onRFChoice(), OSEdOptionsDialog::onSave(), ProximCmdHistoryWindow::onSave(), MDFDocument::OnSaveDocument(), OpsetDialog::onSelectOperation(), OTAOperationDialog::onSelectOperation(), CallExplorerPluginWindow::onSelectPlugin(), FUDialog::onSetAddressSpace(), ProcessorImplementationWindow::onSetParameterValue(), MemoryControl::onSizeModeChanged(), FUPortDialog::onSocketChoice(), RFPortDialog::onSocketChoice(), SRPortDialog::onSocketChoice(), NumberControl::onText(), MemoryControl::onWriteMemory(), HDBBrowserWindow::openLink(), OSEdMainFrame::OSEdMainFrame(), OperationPropertyDialog::saveOperation(), SocketDialog::segment(), AddressSpacesDialog::selectedAS(), FUGuardDialog::selectedFU(), OSEdTreeView::selectedOperation(), FUGuardDialog::selectedPort(), IUDialog::selectedPort(), RFDialog::selectedPort(), OperationDialog::selectedResource(), RFGuardDialog::selectedRF(), BusDialog::selectedSegment(), SimulateDialog::setInputValues(), AboutDialog::setTexts(), ConsoleWindow::textEntered(), OpsetDialog::TransferDataFromWindow(), OTAOperationDialog::TransferDataFromWindow(), AddFUFromHDBDialog::TransferDataToWindow(), AddIUFromHDBDialog::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}
static std::string toString(const T &source)

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(), OSEdAboutDialog::createContents(), ProximAboutDialog::createContents(), AboutDialog::createContents(), FUFactory::createEditPart(), GCUFactory::createEditPart(), IUFactory::createEditPart(), RFFactory::createEditPart(), HDBEditorMainFrame::createHDB(), OpsetDialog::createOperation(), ProximMainFrame::createToolbar(), MainFrame::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(), OSEdAddModuleCmd::Do(), OSEdAddOperationCmd::Do(), OSEdBuildAllCmd::Do(), OSEdBuildCmd::Do(), OSEdModifyBehaviorCmd::Do(), OSEdPropertiesCmd::Do(), OSEdRemoveModuleCmd::Do(), OSEdRemoveOperationCmd::Do(), OSEdUserManualCmd::Do(), ProximQuitCmd::Do(), AddFUArchFromADFCmd::Do(), AddFUImplementationCmd::Do(), AddRFImplementationCmd::Do(), HDBEditorDeleteCmd::Do(), HDBEditorModifyCmd::Do(), SetCostFunctionPluginCmd::Do(), SetFUArchitectureCmd::Do(), SetRFArchitectureCmd::Do(), AddBridgeCmd::Do(), AddGCUCmd::Do(), PasteComponentCmd::Do(), ProDeExportCmd::Do(), QuitCmd::Do(), SaveOptionsCmd::Do(), SetStatusTextCmd::Do(), ProcessorImplementationWindow::doSaveIDF(), BusFigure::drawSelf(), DropDownMenu::DropDownMenu(), HDBBrowserWindow::fuArchLabel(), FUImplementationDialog::FUImplementationDialog(), FUPortImplementationDialog::FUPortImplementationDialog(), MemoryGridTable::GetColLabelValue(), DisassemblyGridTable::GetColLabelValue(), MemoryGridTable::GetRowLabelValue(), DisassemblyGridTable::GetRowLabelValue(), MemoryGridTable::GetValue(), DisassemblyGridTable::GetValue(), ProximDisassemblyGridTable::GetValue(), HDBEditorAboutDialog::HDBEditorAboutDialog(), HelpBrowser::HelpBrowser(), ImplementationParameterDialog::ImplementationParameterDialog(), AddWatchDialog::initialize(), FUExternalPortDialog::initialize(), RFExternalPortDialog::initialize(), OSEdInfoView::insertOperationPropertyColumns(), AddFUFromHDBDialog::loadHDB(), AddRFFromHDBDialog::loadHDB(), AddIUFromHDBDialog::loadHDB(), GenerateProcessorDialog::loadICDecoderGeneratorPlugin(), ProcessorImplementationWindow::loadICDecoderPlugin(), ProximRegisterWindow::loadImmediateUnit(), ProximMemoryWindow::loadMemory(), ProximDebuggerWindow::loadProgram(), ProximMemoryWindow::loadProgramMemory(), ProximRegisterWindow::loadRegisterFile(), MemoryGridTable::memoryContents(), MemoryControl::MemoryControl(), ProximMainFrame::menuAccelerator(), MainFrame::menuAccelerator(), OSEdInfoView::moduleView(), AddFUFromHDBDialog::onAdd(), OperationPropertyDialog::onAddAffectedBy(), OperationPropertyDialog::onAddAffects(), BusDialog::onAddFUGuard(), OperationDialog::onAddOperand(), FUDialog::onAddOperationFromOpset(), OTAFormatListDialog::onAddOTAFormat(), FUImplementationDialog::onAddParameter(), RFImplementationDialog::onAddParameter(), OperationDialog::onAddResource(), BusDialog::onAddRFGuard(), BusDialog::onAddSegment(), ImmediateSlotDialog::onAddSlot(), TemplateListDialog::onAddSlot(), TemplateListDialog::onAddTemplate(), SimulateDialog::onAdvanceClock(), AddressSpacesDialog::onASRightClick(), SocketDialog::onAttach(), OSEdOptionsDialog::onBrowse(), BlockImplementationFileDialog::onBrowse(), AutoSelectImplementationsDialog::onBrowse(), BlockImplementationDialog::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(), BridgeDialog::onOK(), BusDialog::onOK(), SocketDialog::onOK(), MemoryValueDialog::onOK(), AddModuleDialog::onOk(), BlockImplementationFileDialog::onOK(), FUImplementationDialog::onOK(), AddressSpaceDialog::onOK(), FUDialog::onOK(), FUGuardDialog::onOK(), FUPortDialog::onOK(), GCUDialog::onOK(), GenerateProcessorDialog::onOK(), IUDialog::onOK(), IUPortDialog::onOK(), OperationDialog::onOK(), RFDialog::onOK(), RFGuardDialog::onOK(), RFPortDialog::onOK(), SRPortDialog::onOK(), OperationPropertyDialog::onOpen(), ResultDialog::onOpen(), OperationDialog::onOperandLClick(), OperationDialog::onOperandSelection(), FUDialog::onOperationRightClick(), GCUDialog::onOperationRightClick(), FUDialog::onPortRightClick(), GCUDialog::onPortRightClick(), RFDialog::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(), AddModuleDialog::setTexts(), InputOperandDialog::setTexts(), MemoryDialog::setTexts(), OperationDAGDialog::setTexts(), OperationPropertyDialog::setTexts(), OSEdAboutDialog::setTexts(), OSEdOptionsDialog::setTexts(), OutputOperandDialog::setTexts(), SimulateDialog::setTexts(), SimulationInfoDialog::setTexts(), AboutDialog::setTexts(), AddressSpaceDialog::setTexts(), AddressSpacesDialog::setTexts(), BridgeDialog::setTexts(), BusDialog::setTexts(), CallExplorerPluginWindow::setTexts(), EditParameterDialog::setTexts(), FUDialog::setTexts(), FUGuardDialog::setTexts(), FUPortDialog::setTexts(), ImmediateSlotDialog::setTexts(), IUDialog::setTexts(), IUPortDialog::setTexts(), OperationDialog::setTexts(), OTAFormatListDialog::setTexts(), RFDialog::setTexts(), RFGuardDialog::setTexts(), RFPortDialog::setTexts(), SocketDialog::setTexts(), SRPortDialog::setTexts(), TemplateListDialog::setTexts(), TemplateSlotDialog::setTexts(), WidgetTools::setWidgetLabel(), WidgetTools::setWidgetLabel(), ProximPortWindow::showFunctionUnit(), ProximRegisterWindow::showImmediateUnit(), SimulateDialog::showOrHideRegisters(), ProximRegisterWindow::showRegisterFile(), SimulateDialog::SimulateDialog(), SimulationInfoDialog::SimulationInfoDialog(), SocketDialog::SocketDialog(), MessageDialog::suppressLines(), ProximToolbox::testCondition(), ProximToolbox::testExpression(), KeyboardShortcutDialog::TransferDataToWindow(), OptionsDialog::TransferDataToWindow(), OperationPropertyDialog::TransferDataToWindow(), OSEdOptionsDialog::TransferDataToWindow(), ResultDialog::TransferDataToWindow(), BreakpointPropertiesDialog::TransferDataToWindow(), SimulatorSettingsDialog::TransferDataToWindow(), WatchPropertiesDialog::TransferDataToWindow(), CostEstimationDataDialog::TransferDataToWindow(), CostFunctionPluginDialog::TransferDataToWindow(), FUPortImplementationDialog::TransferDataToWindow(), AddFUFromHDBDialog::TransferDataToWindow(), AddIUFromHDBDialog::TransferDataToWindow(), AddressSpaceDialog::TransferDataToWindow(), AddRFFromHDBDialog::TransferDataToWindow(), BusDialog::TransferDataToWindow(), FUDialog::TransferDataToWindow(), FUGuardDialog::TransferDataToWindow(), FUPortDialog::TransferDataToWindow(), GCUDialog::TransferDataToWindow(), ImmediateSlotDialog::TransferDataToWindow(), IUDialog::TransferDataToWindow(), IUPortDialog::TransferDataToWindow(), OperationDialog::TransferDataToWindow(), OpsetDialog::TransferDataToWindow(), OTAFormatListDialog::TransferDataToWindow(), OTAOperationDialog::TransferDataToWindow(), ProcessorImplementationWindow::TransferDataToWindow(), RFGuardDialog::TransferDataToWindow(), RFPortDialog::TransferDataToWindow(), SRPortDialog::TransferDataToWindow(), TemplateListDialog::TransferDataToWindow(), TemplateSlotDialog::TransferDataToWindow(), NumberControl::update(), DisasmExecCountFrame::update(), ProximPortWindow::update(), FUArchitectureDialog::update(), HDBBrowserWindow::update(), RFImplementationDialog::update(), FUImplementationDialog::update(), FUDialog::updateAddressSpaceChoice(), GCUDialog::updateAddressSpaceChoice(), OperationPropertyDialog::updateAffected(), ProximDebuggerWindow::updateAnnotations(), AddressSpacesDialog::updateASList(), BridgeDialog::updateBusChoices(), ProDeBusOrderDialog::updateBusList(), ProximCmdHistoryWindow::updateCommandList(), SocketDialog::updateConnected(), InputOperandDialog::updateElementCounts(), OutputOperandDialog::updateElementCounts(), ProcessorImplementationWindow::updateFUList(), BusDialog::updateGuardLists(), AddressSpaceDialog::updateIdLists(), ProcessorImplementationWindow::updateImplementationLists(), OperationDAGDialog::updateIndex(), OperationDialog::updateLatency(), InputOperandDialog::updateList(), SimulationInfoDialog::updateList(), SimulateDialog::updateLists(), OperationDialog::updateOperandList(), OperationPropertyDialog::updateOperands(), OperationPropertyDialog::updateOperation(), FUDialog::updateOperationList(), GCUDialog::updateOperationList(), OTAFormatListDialog::updateOperationList(), CallExplorerPluginWindow::updateParameterList(), FUDialog::updatePortList(), GCUDialog::updatePortList(), IUDialog::updatePortList(), RFDialog::updatePortList(), GCUDialog::updateRAPortChoice(), OperationDialog::updateResourceGrid(), ProcessorImplementationWindow::updateRFList(), BusDialog::updateSegmentList(), ProximMainFrame::updateSimulationStatus(), TemplateListDialog::updateSlotList(), IUPortDialog::updateSocket(), FUPortDialog::updateSockets(), RFPortDialog::updateSockets(), SRPortDialog::updateSockets(), IUDialog::updateTemplateList(), InputOperandDialog::updateTypes(), OutputOperandDialog::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: