|
|
|||
File indexing completed on 2026-09-15 09:17:34
0001 // Created on: 1999-08-04 0002 // Created by: Denis PASCAL 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 _TPrsStd_DriverTable_HeaderFile 0018 #define _TPrsStd_DriverTable_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_Type.hxx> 0022 0023 #include <Standard_GUID.hxx> 0024 #include <TPrsStd_Driver.hxx> 0025 #include <NCollection_DataMap.hxx> 0026 #include <Standard_Transient.hxx> 0027 class Standard_GUID; 0028 class TPrsStd_Driver; 0029 0030 //! This class is a container to record (AddDriver) 0031 //! binding between GUID and TPrsStd_Driver. 0032 //! You create a new instance of TPrsStd_Driver 0033 //! and use the method AddDriver to load it into the driver table. 0034 class TPrsStd_DriverTable : public Standard_Transient 0035 { 0036 0037 public: 0038 //! Returns the static table. 0039 //! If it does not exist, creates it and fills it with standard drivers. 0040 Standard_EXPORT static occ::handle<TPrsStd_DriverTable> Get(); 0041 0042 //! Default constructor 0043 Standard_EXPORT TPrsStd_DriverTable(); 0044 0045 //! Fills the table with standard drivers 0046 Standard_EXPORT void InitStandardDrivers(); 0047 0048 //! Returns true if the driver has been added successfully to the driver table. 0049 Standard_EXPORT bool AddDriver(const Standard_GUID& guid, 0050 const occ::handle<TPrsStd_Driver>& driver); 0051 0052 //! Returns true if the driver was found. 0053 Standard_EXPORT bool FindDriver(const Standard_GUID& guid, 0054 occ::handle<TPrsStd_Driver>& driver) const; 0055 0056 //! Removes a driver with the given GUID. 0057 //! Returns true if the driver has been removed successfully. 0058 Standard_EXPORT bool RemoveDriver(const Standard_GUID& guid); 0059 0060 //! Removes all drivers. 0061 //! Returns true if the driver has been removed successfully. 0062 //! If this method is used, the InitStandardDrivers method should be 0063 //! called to fill the table with standard drivers. 0064 Standard_EXPORT void Clear(); 0065 0066 DEFINE_STANDARD_RTTIEXT(TPrsStd_DriverTable, Standard_Transient) 0067 0068 private: 0069 NCollection_DataMap<Standard_GUID, occ::handle<TPrsStd_Driver>> myDrivers; 0070 }; 0071 0072 #endif // _TPrsStd_DriverTable_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|