0024947: Redesign OCCT legacy type system -- final corrections
[occt.git] / src / PCDM / PCDM_StorageDriver.cdl
CommitLineData
b311480e 1-- Created on: 1997-11-03
2-- Created by: Jean-Louis Frenkel
3-- Copyright (c) 1997-1999 Matra Datavision
973c2be1 4-- Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5--
973c2be1 6-- This file is part of Open CASCADE Technology software library.
b311480e 7--
d5f74e42 8-- This library is free software; you can redistribute it and/or modify it under
9-- the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 10-- by the Free Software Foundation, with special exception defined in the file
11-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12-- distribution for complete text of the license and disclaimer of any warranty.
b311480e 13--
973c2be1 14-- Alternatively, this file may be used under the terms of Open CASCADE
15-- commercial license or contractual agreement.
7fd59977 16
17deferred class StorageDriver from PCDM inherits Writer from PCDM
18
19 ---Purpose: persistent implemention of storage.
20 --
21 -- The application must redefine one the two Make()
22 -- methods. The first one, if the application wants to
23 -- put only one document in the storage file.
24 --
25 -- The second method should be redefined to put
26 -- additional document that could be used by the
27 -- retrieval instead of the principal document, depending
28 -- on the schema used during the retrieval. For example,
29 -- a second document could be a standard
30 -- CDMShape_Document. This means that a client
31 -- application will already be able to extract a CDMShape_Document
32 -- of the file, if the Shape Schema remains unchanged.
33 --
34 ---Category: persistent implemention of storage.
35
15e8b082
M
36uses
37 Document from CDM,
38 Document from PCDM,
39 Data from Storage,
40 ExtendedString from TCollection,
41 Schema from Storage,
42 SequenceOfExtendedString from TColStd,
43 SequenceOfDocument from PCDM,
44 StoreStatus from PCDM
7fd59977 45
46raises NoSuchObject from Standard,DriverError from PCDM
47is
48
49
50 Make(me: mutable; aDocument: Document from CDM)
51 returns Document from PCDM
52 is virtual;
53 ---Purpose: raises NotImplemented.
54
55 Make(me: mutable; aDocument: Document from CDM; Documents: out SequenceOfDocument from PCDM)
56 is virtual;
57 ---Purpose:By default, puts in the Sequence the document returns
58 -- by the previous Make method.
59 --
60
61 --
62 SchemaName(me) returns ExtendedString from TCollection
63 is deferred;
64
65 LoadExtensions(me: mutable; aSchema: Schema from Storage; Extensions: SequenceOfExtendedString from TColStd)
66 is virtual;
67
68 Write(me: mutable; aDocument: Document from CDM; aFileName: ExtendedString from TCollection)
69 raises DriverError
70 ---Purpose: Warning! raises DriverError if an error occurs during inside the
71 -- Make method.
72 is redefined virtual;
73 ---Purpose: stores the content of the Document into a new file.
74 --
75 -- by default Write will use Make method to build a persistent
76 -- document and the Schema method to write the persistent document.
77 --
78
79 SetFormat (me : mutable; aformat : ExtendedString from TCollection);
80
81 GetFormat (me)
82 returns ExtendedString from TCollection;
15e8b082
M
83
84 IsError (me) returns Boolean from Standard;
85 SetIsError(me : mutable; theIsError : Boolean);
86
87 GetStoreStatus (me) returns StoreStatus from PCDM;
88 SetStoreStatus(me : mutable; theStoreStatus : StoreStatus from PCDM);
89
7fd59977 90fields
91
92 myFormat : ExtendedString from TCollection;
15e8b082
M
93 myIsError: Boolean from Standard;
94 myStoreStatus: StoreStatus from PCDM;
7fd59977 95
96end StorageDriver from PCDM;