// This file is generated by WOK (CPPExt). // Please do not edit this file; modify original file instead. // The copyright and license terms as defined for the original file apply to // this header file considered to be the "object code" form of the original source. #ifndef _Draw_Interpretor_HeaderFile #define _Draw_Interpretor_HeaderFile #ifndef _Standard_HeaderFile #include #endif #ifndef _Standard_Macro_HeaderFile #include #endif #ifndef _Standard_Boolean_HeaderFile #include #endif #ifndef _Draw_PInterp_HeaderFile #include #endif #ifndef _Standard_CString_HeaderFile #include #endif #ifndef _Draw_CommandFunction_HeaderFile #include #endif #ifndef _Standard_Integer_HeaderFile #include #endif #ifndef _Standard_Real_HeaderFile #include #endif #ifndef _Standard_SStream_HeaderFile #include #endif class TCollection_AsciiString; class TCollection_ExtendedString; //! Provides an encapsulation of the TCL interpretor
//! to define Draw commands.
class Draw_Interpretor { public: void* operator new(size_t,void* anAddress) { return anAddress; } void* operator new(size_t size) { return Standard::Allocate(size); } void operator delete(void *anAddress) { if (anAddress) Standard::Free((Standard_Address&)anAddress); } Standard_EXPORT Draw_Interpretor(); Standard_EXPORT void Init() ; //! Creates a new command with name , help
//! string in group .
//! implement the function.
Standard_EXPORT 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 , help
//! string in group .
//! implement the function.
//! is the name of the file that contains
//! the implementation of the command
Standard_EXPORT void Add(const Standard_CString Command,const Standard_CString Help,const Standard_CString FileName,const Draw_CommandFunction Function,const Standard_CString Group = "User Commands") ; //! Removes , returns true if success (the
//! command existed).
Standard_EXPORT Standard_Boolean Remove(const Standard_CString Command) ; Standard_EXPORT Standard_CString Result() const; //! Resets the result to empty string
Standard_EXPORT void Reset() ; //! Appends to the result
Standard_EXPORT Draw_Interpretor& Append(const Standard_CString Result) ; Draw_Interpretor& operator<<(const Standard_CString Result) { return Append(Result); } //! Appends to the result
Standard_EXPORT Draw_Interpretor& Append(const TCollection_AsciiString& Result) ; Draw_Interpretor& operator<<(const TCollection_AsciiString& Result) { return Append(Result); } //! Appends to the result
Standard_EXPORT Draw_Interpretor& Append(const TCollection_ExtendedString& Result) ; Draw_Interpretor& operator<<(const TCollection_ExtendedString& Result) { return Append(Result); } //! Appends to the result
Standard_EXPORT Draw_Interpretor& Append(const Standard_Integer Result) ; Draw_Interpretor& operator<<(const Standard_Integer Result) { return Append(Result); } //! Appends to the result
Standard_EXPORT Draw_Interpretor& Append(const Standard_Real Result) ; Draw_Interpretor& operator<<(const Standard_Real Result) { return Append(Result); } //! Appends to the result
Standard_EXPORT Draw_Interpretor& Append(const Standard_SStream& Result) ; Draw_Interpretor& operator<<(const Standard_SStream& Result) { return Append(Result); } //! Appends to the result the string as a list element
Standard_EXPORT void AppendElement(const Standard_CString Result) ; //! Eval the script and returns OK = 0, ERROR = 1
Standard_EXPORT Standard_Integer Eval(const Standard_CString Script) ; //! Eval the script and returns OK = 0, ERROR = 1
//! Store the script in the history record.
Standard_EXPORT Standard_Integer RecordAndEval(const Standard_CString Script,const Standard_Integer Flags = 0) ; //! Eval the content on the file and returns status
Standard_EXPORT Standard_Integer EvalFile(const Standard_CString FileName) ; //! Returns True if the script is complete, no pending
//! closing braces. (})
Standard_EXPORT static Standard_Boolean Complete(const Standard_CString Script) ; Standard_EXPORT void Destroy() ; ~Draw_Interpretor() { Destroy(); } Standard_EXPORT Draw_Interpretor(const Draw_PInterp& anInterp); Standard_EXPORT void Set(const Draw_PInterp& anInterp) ; Standard_EXPORT Draw_PInterp Interp() const; protected: private: Standard_Boolean isAllocated; Draw_PInterp myInterp; }; // other Inline functions and methods (like "C++: function call" methods) #endif