Open CASCADE Technology 6.6.0
|
Provides an encapsulation of the TCL interpretor
to define Draw commands.
#include <Draw_Interpretor.hxx>
Public Member Functions | |
Draw_Interpretor () | |
void | Init () |
void | Add (const Standard_CString Command, const Standard_CString Help, const Draw_CommandFunction Function, const Standard_CString Group="User Commands") |
Creates a new command with name <Command>, help string <Help> in group <Group>. <Function> implement the function. | |
void | Add (const Standard_CString Command, const Standard_CString Help, const Standard_CString FileName, const Draw_CommandFunction Function, const Standard_CString Group="User Commands") |
Creates a new command with name <Command>, help string <Help> in group <Group>. <Function> implement the function. <FileName> is the name of the file that contains the implementation of the command | |
Standard_Boolean | Remove (const Standard_CString Command) |
Removes <Command>, returns true if success (the command existed). | |
Standard_CString | Result () const |
void | Reset () |
Resets the result to empty string | |
Draw_Interpretor & | Append (const Standard_CString Result) |
Appends to the result | |
Draw_Interpretor & | operator<< (const Standard_CString Result) |
Draw_Interpretor & | Append (const TCollection_AsciiString &Result) |
Appends to the result | |
Draw_Interpretor & | operator<< (const TCollection_AsciiString &Result) |
Draw_Interpretor & | Append (const TCollection_ExtendedString &Result) |
Appends to the result | |
Draw_Interpretor & | operator<< (const TCollection_ExtendedString &Result) |
Draw_Interpretor & | Append (const Standard_Integer Result) |
Appends to the result | |
Draw_Interpretor & | operator<< (const Standard_Integer Result) |
Draw_Interpretor & | Append (const Standard_Real Result) |
Appends to the result | |
Draw_Interpretor & | operator<< (const Standard_Real Result) |
Draw_Interpretor & | Append (const Standard_SStream &Result) |
Appends to the result | |
Draw_Interpretor & | operator<< (const Standard_SStream &Result) |
void | AppendElement (const Standard_CString Result) |
Appends to the result the string as a list element | |
Standard_Integer | Eval (const Standard_CString Script) |
Eval the script and returns OK = 0, ERROR = 1 | |
Standard_Integer | RecordAndEval (const Standard_CString Script, const Standard_Integer Flags=0) |
Eval the script and returns OK = 0, ERROR = 1 Store the script in the history record. | |
Standard_Integer | EvalFile (const Standard_CString FileName) |
Eval the content on the file and returns status | |
void | Destroy () |
~Draw_Interpretor () | |
Draw_Interpretor (const Draw_PInterp &anInterp) | |
void | Set (const Draw_PInterp &anInterp) |
Draw_PInterp | Interp () const |
void | SetDoLog (const Standard_Boolean doLog) |
Enables or disables logging of all commands and their results | |
void | SetDoEcho (const Standard_Boolean doEcho) |
Enables or disables eachoing of all commands and their results to cout | |
Standard_Boolean | GetDoLog () const |
Returns true if logging of commands is enabled | |
Standard_Boolean | GetDoEcho () const |
Returns true if echoing of commands is enabled | |
Standard_SStream & | Log () |
Returns log stream | |
Static Public Member Functions | |
static Standard_Boolean | Complete (const Standard_CString Script) |
Returns True if the script is complete, no pending closing braces. (}) |
Draw_Interpretor::Draw_Interpretor | ( | ) |
Draw_Interpretor::~Draw_Interpretor | ( | ) | [inline] |
Draw_Interpretor::Draw_Interpretor | ( | const Draw_PInterp & | anInterp | ) |
void Draw_Interpretor::Add | ( | const Standard_CString | Command, |
const Standard_CString | Help, | ||
const Draw_CommandFunction | Function, | ||
const Standard_CString | Group = "User Commands" |
||
) |
void Draw_Interpretor::Add | ( | const Standard_CString | Command, |
const Standard_CString | Help, | ||
const Standard_CString | FileName, | ||
const Draw_CommandFunction | Function, | ||
const Standard_CString | Group = "User Commands" |
||
) |
Draw_Interpretor& Draw_Interpretor::Append | ( | const TCollection_AsciiString & | Result | ) |
Draw_Interpretor& Draw_Interpretor::Append | ( | const Standard_SStream & | Result | ) |
Draw_Interpretor& Draw_Interpretor::Append | ( | const TCollection_ExtendedString & | Result | ) |
Draw_Interpretor& Draw_Interpretor::Append | ( | const Standard_Integer | Result | ) |
Draw_Interpretor& Draw_Interpretor::Append | ( | const Standard_CString | Result | ) |
Draw_Interpretor& Draw_Interpretor::Append | ( | const Standard_Real | Result | ) |
void Draw_Interpretor::AppendElement | ( | const Standard_CString | Result | ) |
static Standard_Boolean Draw_Interpretor::Complete | ( | const Standard_CString | Script | ) | [static] |
void Draw_Interpretor::Destroy | ( | ) |
Standard_Integer Draw_Interpretor::Eval | ( | const Standard_CString | Script | ) |
Standard_Integer Draw_Interpretor::EvalFile | ( | const Standard_CString | FileName | ) |
Standard_Boolean Draw_Interpretor::GetDoEcho | ( | ) | const |
Standard_Boolean Draw_Interpretor::GetDoLog | ( | ) | const |
void Draw_Interpretor::Init | ( | ) |
Draw_PInterp Draw_Interpretor::Interp | ( | ) | const |
Standard_SStream& Draw_Interpretor::Log | ( | ) |
Draw_Interpretor& Draw_Interpretor::operator<< | ( | const Standard_CString | Result | ) | [inline] |
Draw_Interpretor& Draw_Interpretor::operator<< | ( | const Standard_Real | Result | ) | [inline] |
Draw_Interpretor& Draw_Interpretor::operator<< | ( | const Standard_SStream & | Result | ) | [inline] |
Draw_Interpretor& Draw_Interpretor::operator<< | ( | const Standard_Integer | Result | ) | [inline] |
Draw_Interpretor& Draw_Interpretor::operator<< | ( | const TCollection_AsciiString & | Result | ) | [inline] |
Draw_Interpretor& Draw_Interpretor::operator<< | ( | const TCollection_ExtendedString & | Result | ) | [inline] |
Standard_Integer Draw_Interpretor::RecordAndEval | ( | const Standard_CString | Script, |
const Standard_Integer | Flags = 0 |
||
) |
Standard_Boolean Draw_Interpretor::Remove | ( | const Standard_CString | Command | ) |
void Draw_Interpretor::Reset | ( | ) |
Standard_CString Draw_Interpretor::Result | ( | ) | const |
void Draw_Interpretor::Set | ( | const Draw_PInterp & | anInterp | ) |
void Draw_Interpretor::SetDoEcho | ( | const Standard_Boolean | doEcho | ) |
void Draw_Interpretor::SetDoLog | ( | const Standard_Boolean | doLog | ) |