The class that holds template strings and formats them.
Template strings are added with addText function by giving the text id and the template string. Formatted string are achieved by calling text() with text id and parameters. For example text(TXT_HELLO_WORLD, "all") returns "Hello all world".
Definition at line 79 of file TextGenerator.hh.
format Texts::TextGenerator::text |
( |
int |
textId | ) |
|
|
virtual |
Returns a format object that contains the template string.
- Parameters
-
textId | Numeric code that identifies the template string. |
- Returns
- format object that contains the template string.
- Exceptions
-
KeyNotFound | If textId doesn't identify any template string. |
Definition at line 94 of file TextGenerator.cc.
96 string method =
"TextGenerator::text()";
97 string message(
"Requested message (code ");
99 throw KeyNotFound(__FILE__, __LINE__, method, message);
103 const string& templateString = *((*mt).second);
105 return format(templateString);
References MapTools::containsKey(), and Conversion::toString().
Referenced by CodeCompressorPlugin::addBitsForGuardField(), CodeCompressorPlugin::addBitsForICField(), CodeCompressorPlugin::addBitsForImmediateSlot(), CodeCompressorPlugin::addBitsForMoveSlot(), TTAMachine::AddressSpace::AddressSpace(), TTAMachine::Bus::adjustSegmentChain(), MachineStateBuilder::bindPortsToOperands(), TTAMachine::Bridge::Bridge(), MachineTestReporter::bridgingError(), CompiledSimSettingCommand::CompiledSimSettingCommand(), TTAMachine::Component::Component(), AddGCUCmd::Do(), AddBridgeCmd::Do(), OSEdBuildCmd::Do(), OSEdModifyBehaviorCmd::Do(), OSEdPropertiesCmd::Do(), OSEdRemoveModuleCmd::Do(), OSEdRemoveOperationCmd::Do(), OSEdUserManualCmd::Do(), OSEdAddModuleCmd::Do(), OSEdBuildAllCmd::Do(), PasteComponentCmd::Do(), DropDownMenu::DropDownMenu(), CodeCompressorPlugin::encodeFUTerminal(), CodeCompressorPlugin::encodeImmediateTerminal(), CodeCompressorPlugin::encodeIUTerminal(), CodeCompressorPlugin::encodeNOP(), CodeCompressorPlugin::encodeRFTerminal(), HelpCommand::execute(), ProgCommand::execute(), ConfCommand::execute(), MachCommand::execute(), InfoProgramCommand::execute(), ProDeBridgeEditPolicy::getCommand(), ProDeBusEditPolicy::getCommand(), ProDeFUEditPolicy::getCommand(), ProDeIUEditPolicy::getCommand(), ProDePortEditPolicy::getCommand(), ProDeSegmentEditPolicy::getCommand(), ProDeSocketEditPolicy::getCommand(), ProDeGCUEditPolicy::getCommand(), ProDeRFEditPolicy::getCommand(), HelpCommand::helpText(), ProgCommand::helpText(), QuitCommand::helpText(), ConfCommand::helpText(), KillCommand::helpText(), MachCommand::helpText(), IgnoreCommand::helpText(), CommandsCommand::helpText(), ResumeCommand::helpText(), ConditionCommand::helpText(), RunCommand::helpText(), DeleteBPCommand::helpText(), DisableBPCommand::helpText(), StepiCommand::helpText(), TBPCommand::helpText(), UntilCommand::helpText(), WatchCommand::helpText(), EnableBPCommand::helpText(), MemDumpCommand::helpText(), NextiCommand::helpText(), BPCommand::helpText(), InfoCommand::helpText(), DisassembleCommand::helpText(), MemWriteCommand::helpText(), SettingCommand::helpText(), TTAMachine::HWOperation::HWOperation(), TTAMachine::ImmediateSlot::ImmediateSlot(), ADFSerializer::immediateUnitToMachine(), SimulatorFrontend::initializeDataMemories(), OSEdInfoView::insertOperationPropertyColumns(), TTAMachine::InstructionTemplate::InstructionTemplate(), CodeCompressorPlugin::instructionTemplate(), ADFSerializer::instructionTemplateToMachine(), SimulatorFrontend::loadMachine(), SimulatorFrontend::loadProcessorConfiguration(), SimulatorFrontend::loadProgram(), TTAMachine::Bridge::loadState(), TTAMachine::Port::loadState(), TTAMachine::HWOperation::loadState(), TTAMachine::InstructionTemplate::loadState(), TTAMachine::ExecutionPipeline::loadState(), TTAMachine::Socket::loadState(), TTAMachine::FunctionUnit::loadState(), TTAMachine::PortGuard::loadState(), TTAMachine::Component::loadState(), TTAMachine::RegisterGuard::loadState(), TTAMachine::FUPort::loadStateWithoutReferences(), TTAMachine::Bus::loadStateWithoutReferences(), main(), OSEdInfoView::moduleView(), OperationPropertyDialog::onAddAffectedBy(), OperationPropertyDialog::onAddAffects(), BusDialog::onAddFUGuard(), OperationDialog::onAddOperand(), OTAFormatListDialog::onAddOTAFormat(), OperationDialog::onAddResource(), BusDialog::onAddRFGuard(), BusDialog::onAddSegment(), ImmediateSlotDialog::onAddSlot(), TemplateListDialog::onAddSlot(), TemplateListDialog::onAddTemplate(), AddressSpacesDialog::onASRightClick(), OSEdMainFrame::onCommandEvent(), OperationDialog::onDeleteOperand(), OperationDialog::onDeleteResource(), OSEdInfoView::onDropDownMenu(), OSEdTreeView::onDropDownMenu(), BusDialog::onFUGuardRightClick(), OSEd::OnInit(), OSEdTreeView::onItemSelected(), RFPortDialog::onOK(), IUPortDialog::onOK(), RFDialog::onOK(), AddModuleDialog::onOk(), SRPortDialog::onOK(), FUPortDialog::onOK(), RFGuardDialog::onOK(), SocketDialog::onOK(), FUGuardDialog::onOK(), FUDialog::onOK(), IUDialog::onOK(), BusDialog::onOK(), AddressSpaceDialog::onOK(), BridgeDialog::onOK(), OperationDialog::onOK(), GCUDialog::onOK(), ResultDialog::onOpen(), OperationPropertyDialog::onOpen(), OperationDialog::onOperandLClick(), GCUDialog::onOperationRightClick(), FUDialog::onOperationRightClick(), RFDialog::onPortRightClick(), FUDialog::onPortRightClick(), GCUDialog::onPortRightClick(), OperationDialog::onResourceLClick(), RFGuardDialog::onRFChoice(), BusDialog::onRFGuardRightClick(), OSEdOptionsDialog::onSave(), BusDialog::onSegmentRightClick(), OSEdInfoView::onSelection(), BusDialog::onUnconditionalGuard(), MDFDocument::openADF(), OSEdInfoView::operationPropertyView(), TTAMachine::OperationTriggeredFormat::OperationTriggeredFormat(), OSEdInfoView::operationView(), OSEdMainFrame::OSEdMainFrame(), OSEdInfoView::pathView(), TTAMachine::Port::Port(), TTAMachine::PortGuard::PortGuard(), SimulatorCmdLineOptions::printHelp(), SimControlLanguageCommand::printStopReasons(), PIGCmdLineOptions::printUsage(), BEMGeneratorCmdLineOptions::printVersion(), PIGCmdLineOptions::printVersion(), SimProgramBuilder::processBidirTerminal(), TTAMachine::RegisterGuard::RegisterGuard(), TTAMachine::Socket::setDirection(), TTAMachine::ControlUnit::setGlobalGuardLatency(), SourceField::setImmediateEncoding(), WidgetTools::setLabel(), GCUDialog::setLabels(), TTAMachine::HWOperation::setName(), TTAMachine::Component::setName(), AboutDialog::setTexts(), OSEdOptionsDialog::setTexts(), OSEdAboutDialog::setTexts(), AddModuleDialog::setTexts(), IUPortDialog::setTexts(), RFPortDialog::setTexts(), OperationDialog::setTexts(), BridgeDialog::setTexts(), ImmediateSlotDialog::setTexts(), FUPortDialog::setTexts(), EditParameterDialog::setTexts(), SRPortDialog::setTexts(), RFGuardDialog::setTexts(), OTAFormatListDialog::setTexts(), TemplateSlotDialog::setTexts(), AddressSpacesDialog::setTexts(), FUGuardDialog::setTexts(), SimulationInfoDialog::setTexts(), MemoryDialog::setTexts(), TemplateListDialog::setTexts(), RFDialog::setTexts(), OutputOperandDialog::setTexts(), SocketDialog::setTexts(), BusDialog::setTexts(), CallExplorerPluginWindow::setTexts(), IUDialog::setTexts(), InputOperandDialog::setTexts(), SimulateDialog::setTexts(), FUDialog::setTexts(), AddressSpaceDialog::setTexts(), OperationDAGDialog::setTexts(), OperationPropertyDialog::setTexts(), SettingCommand::SettingCommand(), SimulateDialog::showOrHideRegisters(), SimulationInfoDialog::SimulationInfoDialog(), MachineTestReporter::socketDirectionSettingError(), MachineTestReporter::socketPortConnectionError(), MachineTestReporter::socketSegmentConnectionError(), RFGuardDialog::TransferDataToWindow(), TTAMachine::UnconditionalGuard::UnconditionalGuard(), OperationPropertyDialog::updateOperation(), OperationDialog::warnOnResourcesWithoutUsages(), and OSEdInfoView::writeStaticPropertiesOfOperation().