// File generated by CPPExt (Transient)
//
//
//                     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 _Interface_GTool_HeaderFile
#define _Interface_GTool_HeaderFile

#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Handle_Interface_GTool_HeaderFile
#include <Handle_Interface_GTool.hxx>
#endif

#ifndef _Handle_Interface_Protocol_HeaderFile
#include <Handle_Interface_Protocol.hxx>
#endif
#ifndef _Handle_Interface_SignType_HeaderFile
#include <Handle_Interface_SignType.hxx>
#endif
#ifndef _Interface_GeneralLib_HeaderFile
#include <Interface_GeneralLib.hxx>
#endif
#ifndef _Interface_DataMapOfTransientInteger_HeaderFile
#include <Interface_DataMapOfTransientInteger.hxx>
#endif
#ifndef _TColStd_IndexedDataMapOfTransientTransient_HeaderFile
#include <TColStd_IndexedDataMapOfTransientTransient.hxx>
#endif
#ifndef _MMgt_TShared_HeaderFile
#include <MMgt_TShared.hxx>
#endif
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
#ifndef _Standard_CString_HeaderFile
#include <Standard_CString.hxx>
#endif
#ifndef _Handle_Standard_Transient_HeaderFile
#include <Handle_Standard_Transient.hxx>
#endif
#ifndef _Handle_Interface_InterfaceModel_HeaderFile
#include <Handle_Interface_InterfaceModel.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _Handle_Interface_GeneralModule_HeaderFile
#include <Handle_Interface_GeneralModule.hxx>
#endif
class Interface_Protocol;
class Interface_SignType;
class Standard_Transient;
class Interface_InterfaceModel;
class Interface_GeneralLib;
class Interface_GeneralModule;


//! GTool - General Tool for a Model <br>
//!           Provides the functions performed by Protocol/GeneralModule for <br>
//!           entities of a Model, and recorded in a GeneralLib <br>
//!           Optimized : once an entity has been queried, the GeneralLib is <br>
//!           not longer queried <br>
//!           Shareable between several users : as a Handle <br>
class Interface_GTool : public MMgt_TShared {

public:
 // Methods PUBLIC
 // 

//! Creates an empty, not set, GTool <br>
Standard_EXPORT Interface_GTool();

//! Creates a GTool from a Protocol <br>
//!           Optional starting count of entities <br>
Standard_EXPORT Interface_GTool(const Handle(Interface_Protocol)& proto,const Standard_Integer nbent = 0);

//! Sets a new SignType <br>
Standard_EXPORT   void SetSignType(const Handle(Interface_SignType)& sign) ;

//! Returns the SignType. Can be null <br>
Standard_EXPORT   Handle_Interface_SignType SignType() const;

//! Returns the Signature for a Transient Object in a Model <br>
//!           It calls SignType to do that <br>
//!           If SignType is not defined, return ClassName of <ent> <br>
Standard_EXPORT   Standard_CString SignValue(const Handle(Standard_Transient)& ent,const Handle(Interface_InterfaceModel)& model) const;

//! Returns the Name of the SignType, or "Class Name" <br>
Standard_EXPORT   Standard_CString SignName() const;

//! Sets a new Protocol <br>
//!           if <enforce> is False and the new Protocol equates the old one <br>
//!           then nothing is done <br>
Standard_EXPORT   void SetProtocol(const Handle(Interface_Protocol)& proto,const Standard_Boolean enforce = Standard_False) ;

//! Returns the Protocol.  Warning : it can be Null <br>
Standard_EXPORT   Handle_Interface_Protocol Protocol() const;

//! Returns the GeneralLib itself <br>
Standard_EXPORT   Interface_GeneralLib& Lib() ;

//! Reservates maps for a count of entities <br>
//!           <enforce> False : minimum count <br>
//!           <enforce> True  : clears former reservations <br>
//!           Does not clear the maps <br>
Standard_EXPORT   void Reservate(const Standard_Integer nb,const Standard_Boolean enforce = Standard_False) ;

//! Clears the maps which record, for each already recorded entity <br>
//!           its Module and Case Number <br>
Standard_EXPORT   void ClearEntities() ;

//! Selects for an entity, its Module and Case Number <br>
//!           It is optimised : once done for each entity, the result is <br>
//!           mapped and the GeneralLib is not longer queried <br>
//!           <enforce> True overpasses this optimisation <br>
Standard_EXPORT   Standard_Boolean Select(const Handle(Standard_Transient)& ent,Handle(Interface_GeneralModule)& gmod,Standard_Integer& CN,const Standard_Boolean enforce = Standard_False) ;
//Standard_EXPORT ~Interface_GTool();




 // Type management
 //
 Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
 //Standard_EXPORT Standard_Boolean	       IsKind(const Handle(Standard_Type)&) const;

protected:

 // Methods PROTECTED
 // 


 // Fields PROTECTED
 //


private: 

 // Methods PRIVATE
 // 


 // Fields PRIVATE
 //
Handle_Interface_Protocol theproto;
Handle_Interface_SignType thesign;
Interface_GeneralLib thelib;
Interface_DataMapOfTransientInteger thentnum;
TColStd_IndexedDataMapOfTransientTransient thentmod;


};





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


#endif
