|
|
|||
Warning, file /include/opencascade/BinMDF_ADriverTable.hxx was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 // Created on: 2002-10-29 0002 // Created by: Michael SAZONOV 0003 // Copyright (c) 2002-2014 OPEN CASCADE SAS 0004 // 0005 // This file is part of Open CASCADE Technology software library. 0006 // 0007 // This library is free software; you can redistribute it and/or modify it under 0008 // the terms of the GNU Lesser General Public License version 2.1 as published 0009 // by the Free Software Foundation, with special exception defined in the file 0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0011 // distribution for complete text of the license and disclaimer of any warranty. 0012 // 0013 // Alternatively, this file may be used under the terms of Open CASCADE 0014 // commercial license or contractual agreement. 0015 0016 #ifndef _BinMDF_ADriverTable_HeaderFile 0017 #define _BinMDF_ADriverTable_HeaderFile 0018 0019 #include <Standard.hxx> 0020 #include <Standard_Type.hxx> 0021 0022 #include <BinMDF_TypeADriverMap.hxx> 0023 #include <BinMDF_TypeIdMap.hxx> 0024 #include <Standard_Transient.hxx> 0025 #include <Standard_Integer.hxx> 0026 #include <TColStd_IndexedMapOfTransient.hxx> 0027 #include <TColStd_SequenceOfAsciiString.hxx> 0028 class BinMDF_ADriver; 0029 0030 class BinMDF_ADriverTable; 0031 DEFINE_STANDARD_HANDLE(BinMDF_ADriverTable, Standard_Transient) 0032 0033 //! A driver table is an object building links between 0034 //! object types and object drivers. In the 0035 //! translation process, a driver table is asked to 0036 //! give a translation driver for each current object 0037 //! to be translated. 0038 class BinMDF_ADriverTable : public Standard_Transient 0039 { 0040 0041 public: 0042 //! Constructor 0043 Standard_EXPORT BinMDF_ADriverTable(); 0044 0045 //! Adds a translation driver <theDriver>. 0046 Standard_EXPORT void AddDriver(const Handle(BinMDF_ADriver)& theDriver); 0047 0048 //! Adds a translation driver for the derived attribute. The base driver must be already added. 0049 //! @param theInstance is newly created attribute, detached from any label 0050 Standard_EXPORT void AddDerivedDriver(const Handle(TDF_Attribute)& theInstance); 0051 0052 //! Adds a translation driver for the derived attribute. The base driver must be already added. 0053 //! @param theDerivedType is registered attribute type using IMPLEMENT_DERIVED_ATTRIBUTE macro 0054 Standard_EXPORT const Handle(Standard_Type)& AddDerivedDriver(Standard_CString theDerivedType); 0055 0056 //! Assigns the IDs to the drivers of the given Types. 0057 //! It uses indices in the map as IDs. 0058 //! Useful in storage procedure. 0059 Standard_EXPORT void AssignIds(const TColStd_IndexedMapOfTransient& theTypes); 0060 0061 //! Assigns the IDs to the drivers of the given Type Names; 0062 //! It uses indices in the sequence as IDs. 0063 //! Useful in retrieval procedure. 0064 Standard_EXPORT void AssignIds(const TColStd_SequenceOfAsciiString& theTypeNames); 0065 0066 //! Gets a driver <theDriver> according to <theType>. 0067 //! Returns Type ID if the driver was assigned an ID; 0 otherwise. 0068 Standard_Integer GetDriver(const Handle(Standard_Type)& theType, 0069 Handle(BinMDF_ADriver)& theDriver); 0070 0071 //! Returns a driver according to <theTypeId>. 0072 //! Returns null handle if a driver is not found 0073 Handle(BinMDF_ADriver) GetDriver(const Standard_Integer theTypeId); 0074 0075 DEFINE_STANDARD_RTTIEXT(BinMDF_ADriverTable, Standard_Transient) 0076 0077 protected: 0078 private: 0079 //! Assigns the ID to the driver of the Type 0080 void AssignId(const Handle(Standard_Type)& theType, const Standard_Integer theId); 0081 0082 BinMDF_TypeADriverMap myMap; 0083 BinMDF_TypeIdMap myMapId; 0084 }; 0085 0086 #include <BinMDF_ADriverTable.lxx> 0087 0088 #endif // _BinMDF_ADriverTable_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|