1 -- Created on: 2001-07-09
2 -- Created by: Julia DOROVSKIKH
3 -- Copyright (c) 2001-2014 OPEN CASCADE SAS
5 -- This file is part of Open CASCADE Technology software library.
7 -- This library is free software; you can redistribute it and/or modify it under
8 -- the terms of the GNU Lesser General Public License version 2.1 as published
9 -- by the Free Software Foundation, with special exception defined in the file
10 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 -- distribution for complete text of the license and disclaimer of any warranty.
13 -- Alternatively, this file may be used under the terms of Open CASCADE
14 -- commercial license or contractual agreement.
18 ---Purpose: This package provides classes and methods to
19 -- translate a transient DF into a persistent one and
24 -- A driver is a tool used to translate a transient
25 -- attribute into a persistent one and vice versa.
29 -- A driver table is an object building links between
30 -- object types and object drivers. In the
31 -- translation process, a driver table is asked to
32 -- give a translation driver for each current object
44 -- =============================================================
46 deferred class ADriver; -- Attribute Storage/Retrieve Driver.
48 private class MapOfDriver
49 instantiates DataMap from TCollection (AsciiString from TCollection,
51 AsciiString from TCollection);
53 ---Category: Storage and Retrieval attributes drivers
54 -- ========================================
56 class TagSourceDriver;
58 class ReferenceDriver;
60 ---Category: Instantiations
61 -- =============================================================
63 -- Map (Type, ADriver)
64 class TypeADriverMap instantiates DataMap from TCollection
67 MapTransientHasher from TColStd);
69 -- Attribute Storage Driver Table.
75 FromTo(aSource : Data from TDF;
76 aTarget : in out Element from XmlObjMgt;
77 aReloc : in out SRelocationTable from XmlObjMgt;
78 aDrivers : ADriverTable from XmlMDF);
79 ---Purpose: Translates a transient <aSource> into a persistent
82 WriteSubTree(theLabel : Label from TDF;
83 theElement : in out Element from XmlObjMgt;
84 aReloc : in out SRelocationTable from XmlObjMgt;
85 aDrivers : ADriverTable from XmlMDF)
86 returns Integer from Standard
90 FromTo(aSource : Element from XmlObjMgt;
91 aTarget : in out Data from TDF;
92 aReloc : in out RRelocationTable from XmlObjMgt;
93 aDrivers : ADriverTable from XmlMDF)
94 returns Boolean from Standard;
95 ---Purpose: Translates a persistent <aSource> into a transient
97 -- Returns True if completed successfully (False on error)
99 ReadSubTree (theElement : Element from XmlObjMgt;
100 theLabel : Label from TDF;
101 aReloc : in out RRelocationTable from XmlObjMgt;
102 aDrivers : MapOfDriver from XmlMDF)
103 returns Integer from Standard
107 AddDrivers (aDriverTable : ADriverTable from XmlMDF;
108 theMessageDriver: MessageDriver from CDM);
109 ---Purpose: Adds the attribute storage drivers to <aDriverSeq>.
111 CreateDrvMap (aDriverTable : ADriverTable from XmlMDF;
112 anAsciiDriverMap: out MapOfDriver from XmlMDF)