// 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 _Resource_Manager_HeaderFile
#define _Resource_Manager_HeaderFile

#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Handle_Resource_Manager_HeaderFile
#include <Handle_Resource_Manager.hxx>
#endif

#ifndef _TCollection_AsciiString_HeaderFile
#include <TCollection_AsciiString.hxx>
#endif
#ifndef _Resource_DataMapOfAsciiStringAsciiString_HeaderFile
#include <Resource_DataMapOfAsciiStringAsciiString.hxx>
#endif
#ifndef _Resource_DataMapOfAsciiStringExtendedString_HeaderFile
#include <Resource_DataMapOfAsciiStringExtendedString.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _MMgt_TShared_HeaderFile
#include <MMgt_TShared.hxx>
#endif
#ifndef _Standard_CString_HeaderFile
#include <Standard_CString.hxx>
#endif
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
#ifndef _Standard_ExtString_HeaderFile
#include <Standard_ExtString.hxx>
#endif
class Standard_TypeMismatch;
class Resource_NoSuchResource;
class Standard_OutOfRange;
class TCollection_AsciiString;
class Resource_DataMapOfAsciiStringAsciiString;


//! Defines a resource structure and its management methods. <br>
class Resource_Manager : public MMgt_TShared {

public:
 // Methods PUBLIC
 // 

//! Create a Resource manager. <br>
//!          Attempts to find the two following files: <br>
//!          $CSF_`aName`Defaults/aName <br>
//!          $CSF_`aName`UserDefaults/aName <br>
//!          and load them respectively into a reference and a user resource structure. <br>
Standard_EXPORT Resource_Manager(const Standard_CString aName,const Standard_Boolean Verbose = Standard_False);


Standard_EXPORT Resource_Manager(const Standard_CString aName,TCollection_AsciiString& aDefaultsDirectory,TCollection_AsciiString& anUserDefaultsDirectory,const Standard_Boolean Verbose = Standard_False);

//! Save the user resource structure in the specified file. <br>
//!          Creates the file if it does not exist. <br>
Standard_EXPORT   Standard_Boolean Save() const;

//! returns True if the Resource does exist. <br>
Standard_EXPORT   Standard_Boolean Find(const Standard_CString aResource) const;

//! Gets the value of an integer resource according to its <br>
//!          instance and its type. <br>
Standard_EXPORT virtual  Standard_Integer Integer(const Standard_CString aResourceName) const;

//! Gets the value of a real resource according to its instance <br>
//!          and its type. <br>
Standard_EXPORT virtual  Standard_Real Real(const Standard_CString aResourceName) const;

//! Gets the value of a CString resource according to its instance <br>
//!          and its type. <br>
Standard_EXPORT virtual  Standard_CString Value(const Standard_CString aResourceName) const;

//! Gets the value of an ExtString resource according to its instance <br>
//!          and its type. <br>
Standard_EXPORT virtual  Standard_ExtString ExtValue(const Standard_CString aResourceName) ;

//! Sets the new value of an integer resource. <br>
//!          If the resource does not exist, it is created. <br>
Standard_EXPORT virtual  void SetResource(const Standard_CString aResourceName,const Standard_Integer aValue) ;

//! Sets the new value of a real resource. <br>
//!          If the resource does not exist, it is created. <br>
Standard_EXPORT virtual  void SetResource(const Standard_CString aResourceName,const Standard_Real aValue) ;

//! Sets the new value of an CString resource. <br>
//!          If the resource does not exist, it is created. <br>
Standard_EXPORT virtual  void SetResource(const Standard_CString aResourceName,const Standard_CString aValue) ;

//! Sets the new value of an ExtString resource. <br>
//!          If the resource does not exist, it is created. <br>
Standard_EXPORT virtual  void SetResource(const Standard_CString aResourceName,const Standard_ExtString aValue) ;
//Standard_EXPORT ~Resource_Manager();




 // 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
 // 


Standard_EXPORT   void Load(TCollection_AsciiString& aDirectory,TCollection_AsciiString& aName,Resource_DataMapOfAsciiStringAsciiString& aMap) ;


 // Fields PRIVATE
 //
TCollection_AsciiString myName;
Resource_DataMapOfAsciiStringAsciiString myRefMap;
Resource_DataMapOfAsciiStringAsciiString myUserMap;
Resource_DataMapOfAsciiStringExtendedString myExtStrMap;
Standard_Boolean myVerbose;


};





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


#endif
