Open CASCADE Technology  6.5.4
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions
Draw_Interpretor Class Reference

Provides an encapsulation of the TCL interpretor
to define Draw commands.

#include <Draw_Interpretor.hxx>

Public Member Functions

DEFINE_STANDARD_ALLOC 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_InterpretorAppend (const Standard_CString Result)
 Appends to the result

Draw_Interpretoroperator<< (const Standard_CString Result)
Draw_InterpretorAppend (const TCollection_AsciiString &Result)
 Appends to the result

Draw_Interpretoroperator<< (const TCollection_AsciiString &Result)
Draw_InterpretorAppend (const TCollection_ExtendedString &Result)
 Appends to the result

Draw_Interpretoroperator<< (const TCollection_ExtendedString &Result)
Draw_InterpretorAppend (const Standard_Integer Result)
 Appends to the result

Draw_Interpretoroperator<< (const Standard_Integer Result)
Draw_InterpretorAppend (const Standard_Real Result)
 Appends to the result

Draw_Interpretoroperator<< (const Standard_Real Result)
Draw_InterpretorAppend (const Standard_SStream &Result)
 Appends to the result

Draw_Interpretoroperator<< (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_SStreamLog ()
 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. (})


Constructor & Destructor Documentation


Member Function Documentation

Draw_Interpretor& Draw_Interpretor::operator<< ( const Standard_CString  Result) [inline]
Draw_Interpretor& Draw_Interpretor::operator<< ( const TCollection_AsciiString Result) [inline]
Draw_Interpretor& Draw_Interpretor::operator<< ( const TCollection_ExtendedString Result) [inline]
Draw_Interpretor& Draw_Interpretor::operator<< ( const Standard_Integer  Result) [inline]
Draw_Interpretor& Draw_Interpretor::operator<< ( const Standard_Real  Result) [inline]
Draw_Interpretor& Draw_Interpretor::operator<< ( const Standard_SStream Result) [inline]

The documentation for this class was generated from the following file: