Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:05:21

0001 // Created on: 1999-06-11
0002 // Created by: Vladislav ROMASHKO
0003 // Copyright (c) 1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _TFunction_DriverTable_HeaderFile
0018 #define _TFunction_DriverTable_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <TFunction_DataMapOfGUIDDriver.hxx>
0024 #include <TFunction_HArray1OfDataMapOfGUIDDriver.hxx>
0025 #include <Standard_Transient.hxx>
0026 #include <Standard_Integer.hxx>
0027 #include <Standard_OStream.hxx>
0028 class Standard_GUID;
0029 class TFunction_Driver;
0030 
0031 
0032 class TFunction_DriverTable;
0033 DEFINE_STANDARD_HANDLE(TFunction_DriverTable, Standard_Transient)
0034 
0035 //! A container for instances of drivers.
0036 //! You create a new instance of TFunction_Driver
0037 //! and use the method AddDriver to load it into the driver table.
0038 class TFunction_DriverTable : public Standard_Transient
0039 {
0040 
0041 public:
0042 
0043   
0044   //! Returns the driver table. If a driver does not exist, creates it.
0045   Standard_EXPORT static Handle(TFunction_DriverTable) Get();
0046   
0047   //! Default constructor
0048   Standard_EXPORT TFunction_DriverTable();
0049   
0050   //! Returns true if the driver has been added successfully to the driver table.
0051   Standard_EXPORT Standard_Boolean AddDriver (const Standard_GUID& guid, const Handle(TFunction_Driver)& driver, const Standard_Integer thread = 0);
0052   
0053   //! Returns true if the driver exists in the driver table.
0054   Standard_EXPORT Standard_Boolean HasDriver (const Standard_GUID& guid, const Standard_Integer thread = 0) const;
0055   
0056   //! Returns true if the driver was found.
0057   Standard_EXPORT Standard_Boolean FindDriver (const Standard_GUID& guid, Handle(TFunction_Driver)& driver, const Standard_Integer thread = 0) const;
0058   
0059   Standard_EXPORT Standard_OStream& Dump (Standard_OStream& anOS) const;
0060 Standard_OStream& operator << (Standard_OStream& anOS) const
0061 {
0062   return Dump(anOS);
0063 }
0064   
0065   //! Removes a driver with the given GUID.
0066   //! Returns true if the driver has been removed successfully.
0067   Standard_EXPORT Standard_Boolean RemoveDriver (const Standard_GUID& guid, const Standard_Integer thread = 0);
0068   
0069   //! Removes all drivers. Returns true if the driver has been removed successfully.
0070   Standard_EXPORT void Clear();
0071 
0072 
0073 
0074 
0075   DEFINE_STANDARD_RTTIEXT(TFunction_DriverTable,Standard_Transient)
0076 
0077 protected:
0078 
0079 
0080 
0081 
0082 private:
0083 
0084 
0085   TFunction_DataMapOfGUIDDriver myDrivers;
0086   Handle(TFunction_HArray1OfDataMapOfGUIDDriver) myThreadDrivers;
0087 
0088 
0089 };
0090 
0091 
0092 
0093 
0094 
0095 
0096 
0097 #endif // _TFunction_DriverTable_HeaderFile