// File generated by CPPExt (Value)
//
//                     Copyright (C) 1991 - 2000 by  
//                      Matra Datavision SA.  All rights reserved.
//  
//                     Copyright (C) 2001 - 2004 by
//                     Open CASCADE SA.  All rights reserved.
// 
// This file is part of the Open CASCADE Technology software.
//
// This software may be distributed and/or modified under the terms and
// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
// and appearing in the file LICENSE included in the packaging of this file.
//  
// This software is distributed on an "AS IS" basis, without warranty of any
// kind, and Open CASCADE SA hereby disclaims all such warranties,
// including without limitation, any warranties of merchantability, fitness
// for a particular purpose or non-infringement. Please see the License for
// the specific terms and conditions governing rights and limitations under the
// License.

#ifndef _Draw_Interpretor_HeaderFile
#define _Draw_Interpretor_HeaderFile

#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _Draw_PInterp_HeaderFile
#include <Draw_PInterp.hxx>
#endif
#ifndef _Standard_CString_HeaderFile
#include <Standard_CString.hxx>
#endif
#ifndef _Draw_CommandFunction_HeaderFile
#include <Draw_CommandFunction.hxx>
#endif
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif


#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
#endif

class TCollection_AsciiString;
class TCollection_ExtendedString;

//! Provides  an  encapsulation of the TCL interpretor <br>
//!          to define Draw commands. <br>
class Draw_Interpretor  {

public:

 // Methods PUBLIC
 // 


Standard_EXPORT Draw_Interpretor();


Standard_EXPORT   void Init() ;

//! Creates a  new command  with name <Command>,  help <br>
//!          string <Help> in group <Group>. <br>
//!          <Function> implement the function. <br>
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  <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>
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   <Command>, returns true  if success (the <br>
//!          command existed). <br>
Standard_EXPORT   Standard_Boolean Remove(const Standard_CString Command) ;


Standard_EXPORT   Standard_CString Result() const;

//! Resets the result to empty string <br>
Standard_EXPORT   void Reset() ;

//! Appends to the result <br>
Standard_EXPORT   Draw_Interpretor& Append(const Standard_CString Result) ;
  Draw_Interpretor& operator<<(const Standard_CString Result) 
{
  return Append(Result);
}


//! Appends to the result <br>
Standard_EXPORT   Draw_Interpretor& Append(const TCollection_AsciiString& Result) ;
  Draw_Interpretor& operator<<(const TCollection_AsciiString& Result) 
{
  return Append(Result);
}


//! Appends  to the result <br>
Standard_EXPORT   Draw_Interpretor& Append(const TCollection_ExtendedString& Result) ;
  Draw_Interpretor& operator<<(const TCollection_ExtendedString& Result) 
{
  return Append(Result);
}


//! Appends  to the result <br>
Standard_EXPORT   Draw_Interpretor& Append(const Standard_Integer Result) ;
  Draw_Interpretor& operator<<(const Standard_Integer Result) 
{
  return Append(Result);
}


//! Appends  to the result <br>
Standard_EXPORT   Draw_Interpretor& Append(const Standard_Real Result) ;
  Draw_Interpretor& operator<<(const Standard_Real Result) 
{
  return Append(Result);
}


//! Appends to the result the string as a list element <br>
Standard_EXPORT   void AppendElement(Standard_CString Result) ;

//! Eval the script and returns OK = 0, ERROR = 1 <br>
Standard_EXPORT   Standard_Integer Eval(const Standard_CString Script) ;

//! Eval the script and returns OK = 0, ERROR = 1 <br>
//!          Store the script in the history record. <br>
Standard_EXPORT   Standard_Integer RecordAndEval(const Standard_CString Script,const Standard_Integer Flags = 0) ;

//! Eval the content on the file and returns status <br>
Standard_EXPORT   Standard_Integer EvalFile(const Standard_CString FileName) ;

//! Returns True if the script is complete, no pending <br>
//!          closing braces. (}) <br>
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:

 // Methods PROTECTED
 // 


 // Fields PROTECTED
 //


private: 

 // Methods PRIVATE
 // 


 // Fields PRIVATE
 //
Standard_Boolean isAllocated;
Draw_PInterp myInterp;


};





// other Inline functions and methods (like "C++: function call" methods)
//


#endif
