|
openMSX
|
#include <TclObject.hh>
Public Member Functions | |
| TclObject (Tcl_Interp *interp, Tcl_Obj *object) | |
| TclObject (Tcl_Interp *interp, string_ref value) | |
| TclObject (string_ref value) | |
| TclObject (Tcl_Interp *interp) | |
| TclObject (Interpreter &interp) | |
| TclObject (const TclObject &object) | |
| TclObject () | |
| ~TclObject () | |
| TclObject & | operator= (const TclObject &other) |
| Tcl_Interp * | getInterpreter () const |
| Tcl_Obj * | getTclObject () |
| void | setString (string_ref value) |
| void | setInt (int value) |
| void | setBoolean (bool value) |
| void | setDouble (double value) |
| void | setBinary (byte *buf, unsigned length) |
| void | addListElement (string_ref element) |
| void | addListElement (int value) |
| void | addListElement (double value) |
| void | addListElement (const TclObject &element) |
| template<typename ITER > | |
| void | addListElements (ITER begin, ITER end) |
| template<typename CONT > | |
| void | addListElements (const CONT &container) |
| string_ref | getString () const |
| int | getInt () const |
| bool | getBoolean () const |
| double | getDouble () const |
| const byte * | getBinary (unsigned &length) const |
| unsigned | getListLength () const |
| TclObject | getListIndex (unsigned index) const |
| bool | evalBool () const |
| void | checkExpression () const |
| Interpret the content of this TclObject as an expression and check for syntax errors. | |
| void | checkCommand () const |
| std::string | executeCommand (bool compile=false) |
| Interpret this TclObject as a command and execute it. | |
Definition at line 15 of file TclObject.hh.
| openmsx::TclObject::TclObject | ( | Tcl_Interp * | interp, |
| Tcl_Obj * | object | ||
| ) |
Definition at line 14 of file TclObject.cc.
| openmsx::TclObject::TclObject | ( | Tcl_Interp * | interp, |
| string_ref | value | ||
| ) |
Definition at line 20 of file TclObject.cc.
References string_ref::data(), and string_ref::size().
|
explicit |
Definition at line 26 of file TclObject.cc.
References string_ref::data(), and string_ref::size().
|
explicit |
Definition at line 32 of file TclObject.cc.
|
explicit |
Definition at line 38 of file TclObject.cc.
| openmsx::TclObject::TclObject | ( | const TclObject & | object | ) |
Definition at line 44 of file TclObject.cc.
| openmsx::TclObject::TclObject | ( | ) |
Definition at line 50 of file TclObject.cc.
Referenced by getListIndex().
| openmsx::TclObject::~TclObject | ( | ) |
Definition at line 62 of file TclObject.cc.
| void openmsx::TclObject::addListElement | ( | string_ref | element | ) |
Definition at line 149 of file TclObject.cc.
References string_ref::data(), and string_ref::size().
Referenced by openmsx::SettingRangePolicy< int >::additionalInfo(), openmsx::EnumSettingPolicyBase::additionalInfoBase(), addListElement(), addListElements(), openmsx::CPUCore< CPU_POLICY >::disasmCommand(), openmsx::RomInfoTopic::execute(), openmsx::HDCommand::execute(), openmsx::SettingInfo::execute(), openmsx::TclCallback::execute(), openmsx::CartCmd::execute(), openmsx::CDXCommand::execute(), openmsx::SoftwareInfoTopic::execute(), openmsx::SoundDeviceInfoTopic::execute(), openmsx::HelpCmd::execute(), openmsx::DiskCommand::execute(), openmsx::LaserdiscCommand::execute(), openmsx::BindCmd::execute(), openmsx::CartridgeSlotInfo::execute(), openmsx::PluggableInfo::execute(), openmsx::ConnectorInfo::execute(), openmsx::TapeCommand::execute(), openmsx::LSXCommand::execute(), openmsx::ConfigInfo::execute(), openmsx::ListExtCmd::execute(), openmsx::DeviceInfo::execute(), openmsx::MSXDevice::getDeviceInfo(), openmsx::MSXRom::getExtraDeviceInfo(), openmsx::MSXMultiIODevice::getNameList(), openmsx::MSXMultiMemDevice::getNameList(), openmsx::MSXDevice::getNameList(), openmsx::OSDText::getProperty(), openmsx::OSDWidget::getProperty(), openmsx::Setting::info(), openmsx::CassettePlayerCLI::parseFileType(), openmsx::ReplayCLI::parseFileType(), openmsx::SaveStateCLI::parseFileType(), openmsx::LaserdiscPlayerCLI::parseFileType(), openmsx::HDImageCLI::parseOption(), openmsx::CDImageCLI::parseOption(), openmsx::MouseButtonEvent::toStringHelper(), openmsx::JoystickEvent::toStringHelper(), openmsx::JoystickButtonEvent::toStringHelper(), openmsx::OsdControlEvent::toStringHelper(), openmsx::FinishFrameEvent::toStringImpl(), openmsx::CliCommandEvent::toStringImpl(), and openmsx::SimpleEvent::toStringImpl().
| void openmsx::TclObject::addListElement | ( | int | value | ) |
Definition at line 154 of file TclObject.cc.
References addListElement().
| void openmsx::TclObject::addListElement | ( | double | value | ) |
Definition at line 159 of file TclObject.cc.
References addListElement().
| void openmsx::TclObject::addListElement | ( | const TclObject & | element | ) |
Definition at line 164 of file TclObject.cc.
References addListElement().
| void openmsx::TclObject::addListElements | ( | ITER | begin, |
| ITER | end | ||
| ) |
Definition at line 90 of file TclObject.hh.
References addListElement().
Referenced by openmsx::EnumSettingPolicyBase::additionalInfoBase(), addListElements(), openmsx::RomInfoTopic::execute(), openmsx::ConnectionClassInfo::execute(), openmsx::ListMachinesCommand::execute(), and openmsx::ConfigInfo::execute().
| void openmsx::TclObject::addListElements | ( | const CONT & | container | ) |
Definition at line 98 of file TclObject.hh.
References addListElements().
| void openmsx::TclObject::checkCommand | ( | ) | const |
Definition at line 255 of file TclObject.cc.
References string_ref::data(), getString(), and string_ref::size().
| void openmsx::TclObject::checkExpression | ( | ) | const |
Interpret the content of this TclObject as an expression and check for syntax errors.
Throws CommandException in case of an error. Note: this method does not catch all errors (some are only found while evaluating the expression) but it's nice as a quick check for typos.
Definition at line 249 of file TclObject.cc.
References string_ref::data(), getString(), and string_ref::size().
| bool openmsx::TclObject::evalBool | ( | ) | const |
Definition at line 240 of file TclObject.cc.
| string openmsx::TclObject::executeCommand | ( | bool | compile = false | ) |
Interpret this TclObject as a command and execute it.
| compile | Should the command be compiled to bytecode? The bytecode is stored inside the TclObject can speed up future invocations of the same command. Only set this flag when the command will be executed more than once. TODO return TclObject instead of string? |
Definition at line 303 of file TclObject.cc.
Referenced by openmsx::BreakPointBase::checkAndExecute().
| const byte * openmsx::TclObject::getBinary | ( | unsigned & | length | ) | const |
Definition at line 215 of file TclObject.cc.
| bool openmsx::TclObject::getBoolean | ( | ) | const |
Definition at line 190 of file TclObject.cc.
Referenced by openmsx::OSDWidget::setProperty().
| double openmsx::TclObject::getDouble | ( | ) | const |
Definition at line 199 of file TclObject.cc.
Referenced by openmsx::OSDRectangle::setProperty(), openmsx::OSDText::setProperty(), openmsx::OSDImageBasedWidget::setProperty(), and openmsx::OSDWidget::setProperty().
| int openmsx::TclObject::getInt | ( | ) | const |
Definition at line 181 of file TclObject.cc.
Referenced by openmsx::OSDRectangle::setProperty(), and openmsx::OSDText::setProperty().
| Tcl_Interp * openmsx::TclObject::getInterpreter | ( | ) | const |
Definition at line 77 of file TclObject.cc.
Referenced by openmsx::SettingRangePolicy< int >::additionalInfo(), openmsx::EnumSettingPolicyBase::additionalInfoBase(), openmsx::HDCommand::execute(), openmsx::HelpCmd::execute(), openmsx::DiskCommand::execute(), and openmsx::BreakPointBase::getInterpreter().
| TclObject openmsx::TclObject::getListIndex | ( | unsigned | index | ) | const |
Definition at line 230 of file TclObject.cc.
References TclObject().
| unsigned openmsx::TclObject::getListLength | ( | ) | const |
Definition at line 221 of file TclObject.cc.
Referenced by openmsx::CartCmd::execute().
| string_ref openmsx::TclObject::getString | ( | ) | const |
Definition at line 208 of file TclObject.cc.
Referenced by checkCommand(), checkExpression(), openmsx::LaserdiscCommand::execute(), openmsx::BindCmd::execute(), openmsx::TapeCommand::execute(), openmsx::BreakPointBase::getCommand(), openmsx::BreakPointBase::getCondition(), openmsx::MSXMultiIODevice::getName(), openmsx::MSXMultiMemDevice::getName(), openmsx::Setting::notifyPropertyChange(), openmsx::OSDRectangle::setProperty(), openmsx::OSDText::setProperty(), and openmsx::Event::toString().
| Tcl_Obj * openmsx::TclObject::getTclObject | ( | ) |
Definition at line 82 of file TclObject.cc.
Definition at line 67 of file TclObject.cc.
| void openmsx::TclObject::setBinary | ( | byte * | buf, |
| unsigned | length | ||
| ) |
Definition at line 138 of file TclObject.cc.
| void openmsx::TclObject::setBoolean | ( | bool | value | ) |
Definition at line 116 of file TclObject.cc.
Referenced by openmsx::OSDWidget::getProperty().
| void openmsx::TclObject::setDouble | ( | double | value | ) |
Definition at line 127 of file TclObject.cc.
Referenced by openmsx::TimeInfoTopic::execute(), openmsx::FpsInfoTopic::execute(), openmsx::RealTimeInfo::execute(), openmsx::OSDText::getProperty(), openmsx::OSDRectangle::getProperty(), openmsx::OSDImageBasedWidget::getProperty(), and openmsx::OSDWidget::getProperty().
| void openmsx::TclObject::setInt | ( | int | value | ) |
Definition at line 105 of file TclObject.cc.
Referenced by openmsx::CPUFreqInfoTopic::execute(), openmsx::DebugCmd::execute(), openmsx::VDPInfo::execute(), openmsx::SubSlottedInfo::execute(), openmsx::ExternalSlotInfo::execute(), openmsx::OSDText::getProperty(), and openmsx::OSDRectangle::getProperty().
| void openmsx::TclObject::setString | ( | string_ref | value | ) |
Definition at line 94 of file TclObject.cc.
References string_ref::data(), and string_ref::size().
Referenced by openmsx::CDXCommand::execute(), openmsx::SoundDeviceInfoTopic::execute(), openmsx::HelpCmd::execute(), openmsx::DiskCommand::execute(), openmsx::Command::execute(), openmsx::TabCompletionCmd::execute(), openmsx::RecordedCommand::execute(), openmsx::PluggableInfo::execute(), openmsx::ConnectorInfo::execute(), openmsx::VersionInfo::execute(), openmsx::ConnectionClassInfo::execute(), openmsx::LSXCommand::execute(), openmsx::ReverseCmd::execute(), openmsx::IOInfo::execute(), openmsx::MachineNameInfo::execute(), openmsx::OSDRectangle::getProperty(), openmsx::OSDText::getProperty(), and openmsx::OSDWidget::getProperty().
1.8.1.2