16class InterpreterOutput;
30 void init(
const char* programName)
const;
56 [[nodiscard]]
bool validCommand(std::string_view command);
61 [[noreturn]]
void wrongNumArgs(
unsigned argc, std::span<const TclObject> tokens,
const char* message);
64 static int outputProc(ClientData clientData,
const char* buf,
65 int toWrite,
int* errorCodePtr);
66 static int commandProc(ClientData clientData, Tcl_Interp* interp,
67 int objc, Tcl_Obj*
const* objv);
68 static char* traceProc(ClientData clientData, Tcl_Interp* interp,
69 const char* part1,
const char* part2,
int flags);
71 static Tcl_ChannelType channelType;
void unsetVariable(const char *name)
TclObject execute(zstring_view command)
TclObject getCommandNames()
void init(const char *programName) const
Interpreter(Interpreter &&)=delete
void wrongNumArgs(unsigned argc, std::span< const TclObject > tokens, const char *message)
Interpreter & operator=(Interpreter &&)=delete
Interpreter & operator=(const Interpreter &)=delete
void deleteNamespace(const std::string &name)
Delete the global namespace with given name.
bool validCommand(std::string_view command)
bool validExpression(std::string_view expression)
void registerSetting(BaseSetting &variable)
void setOutput(InterpreterOutput *output_)
void createNamespace(const std::string &name)
Create the global namespace with given name.
void unregisterCommand(Command &command)
void setVariable(const TclObject &name, const TclObject &value)
Interpreter(const Interpreter &)=delete
TclParser parse(std::string_view command)
TclObject executeFile(zstring_view filename)
bool isComplete(zstring_view command) const
void unregisterSetting(BaseSetting &variable)
bool hasCommand(zstring_view name) const
void registerCommand(zstring_view name, Command &command)
Like std::string_view, but with the extra guarantee that it refers to a zero-terminated string.
This file implemented 3 utility functions: