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

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

#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.
More...
 
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 <br>
     string   <Help>   in   group  <Group>.  <Function> <br>
     implement the function. <br>
      <FileName> is the name of the file that contains <br>
      the implementation of the command <br>


More...

 
Standard_Boolean Remove (const Standard_CString Command)
 Removes <Command>, returns true if success (the
command existed).
More...
 
Standard_CString Result () const
 
void Reset ()
 Resets the result to empty string
More...
 
Draw_InterpretorAppend (const Standard_CString Result)
 Appends to the result
More...
 
Draw_Interpretoroperator<< (const Standard_CString Result)
 
Draw_InterpretorAppend (const TCollection_AsciiString &Result)
 Appends to the result
More...
 
Draw_Interpretoroperator<< (const TCollection_AsciiString &Result)
 
Draw_InterpretorAppend (const TCollection_ExtendedString &Result)
 Appends to the result
More...
 
Draw_Interpretoroperator<< (const TCollection_ExtendedString &Result)
 
Draw_InterpretorAppend (const Standard_Integer Result)
 Appends to the result
More...
 
Draw_Interpretoroperator<< (const Standard_Integer Result)
 
Draw_InterpretorAppend (const Standard_Real Result)
 Appends to the result
More...
 
Draw_Interpretoroperator<< (const Standard_Real Result)
 
Draw_InterpretorAppend (const Standard_SStream &Result)
 Appends to the result
More...
 
Draw_Interpretoroperator<< (const Standard_SStream &Result)
 
void AppendElement (const Standard_CString Result)
 Appends to the result the string as a list element
More...
 
Standard_Integer Eval (const Standard_CString Script)
 Eval the script and returns OK = 0, ERROR = 1
More...
 
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.
More...
 
Standard_Integer EvalFile (const Standard_CString FileName)
 Eval the content on the file and returns status
More...
 
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 <br>

results
More...

 
void SetDoEcho (const Standard_Boolean doEcho)
 
 Enables or disables eachoing of all commands and their <br>

results to cout
More...

 
Standard_Boolean GetDoLog () const
 Returns true if logging of commands is enabled
More...
 
Standard_Boolean GetDoEcho () const
 Returns true if echoing of commands is enabled
More...
 
Standard_SStreamLog ()
 Returns log stream
More...
 

Static Public Member Functions

static Standard_Boolean Complete (const Standard_CString Script)
 Returns True if the script is complete, no pending
closing braces. (})
More...
 

Detailed Description

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

Constructor & Destructor Documentation

Draw_Interpretor::Draw_Interpretor ( )
Draw_Interpretor::~Draw_Interpretor ( )
inline
Draw_Interpretor::Draw_Interpretor ( const Draw_PInterp anInterp)

Member Function Documentation

void Draw_Interpretor::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 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" 
)

 Creates a  new command  with name  <Command>, help <br>
     string   <Help>   in   group  <Group>.  <Function> <br>
     implement the function. <br>
      <FileName> is the name of the file that contains <br>
      the implementation of the command <br>


Draw_Interpretor& Draw_Interpretor::Append ( const Standard_CString  Result)

Appends to the result

Draw_Interpretor& Draw_Interpretor::Append ( const TCollection_AsciiString Result)

Appends to the result

Draw_Interpretor& Draw_Interpretor::Append ( const TCollection_ExtendedString Result)

Appends to the result

Draw_Interpretor& Draw_Interpretor::Append ( const Standard_Integer  Result)

Appends to the result

Draw_Interpretor& Draw_Interpretor::Append ( const Standard_Real  Result)

Appends to the result

Draw_Interpretor& Draw_Interpretor::Append ( const Standard_SStream Result)

Appends to the result

void Draw_Interpretor::AppendElement ( const Standard_CString  Result)

Appends to the result the string as a list element

static Standard_Boolean Draw_Interpretor::Complete ( const Standard_CString  Script)
static

Returns True if the script is complete, no pending
closing braces. (})

void Draw_Interpretor::Destroy ( )
Standard_Integer Draw_Interpretor::Eval ( const Standard_CString  Script)

Eval the script and returns OK = 0, ERROR = 1

Standard_Integer Draw_Interpretor::EvalFile ( const Standard_CString  FileName)

Eval the content on the file and returns status

Standard_Boolean Draw_Interpretor::GetDoEcho ( ) const

Returns true if echoing of commands is enabled

Standard_Boolean Draw_Interpretor::GetDoLog ( ) const

Returns true if logging of commands is enabled

void Draw_Interpretor::Init ( )
Draw_PInterp Draw_Interpretor::Interp ( ) const
Standard_SStream& Draw_Interpretor::Log ( )

Returns log stream

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
Standard_Integer Draw_Interpretor::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_Boolean Draw_Interpretor::Remove ( const Standard_CString  Command)

Removes <Command>, returns true if success (the
command existed).

void Draw_Interpretor::Reset ( )

Resets the result to empty string

Standard_CString Draw_Interpretor::Result ( ) const
void Draw_Interpretor::Set ( const Draw_PInterp anInterp)
void Draw_Interpretor::SetDoEcho ( const Standard_Boolean  doEcho)

 Enables or disables eachoing of all commands and their <br>

results to cout

void Draw_Interpretor::SetDoLog ( const Standard_Boolean  doLog)

 Enables or disables logging of all commands and their <br>

results


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