85263c0c7457ce55548efe433efb72661d9b0634
[occt.git] / src / PCDM / PCDM_StorageDriver.cdl
1 -- File:        PCDM_StorageDriver.cdl
2 -- Created:     Mon Nov  3 10:09:25 1997
3 -- Author:      Jean-Louis Frenkel
4 --              <rmi@frilox.paris1.matra-dtv.fr>
5 ---Copyright:    Matra Datavision 1997
6
7 deferred class StorageDriver from PCDM inherits Writer from PCDM
8
9     ---Purpose: persistent implemention of storage.
10     --
11     --          The  application  must redefine one the two Make()
12     --           methods.  The first one, if  the application wants to
13     --          put only one document in the storage file.
14     --          
15     --            The  second  method  should  be   redefined  to  put
16     --            additional document  that   could  be  used by   the
17     --          retrieval instead of the principal document, depending
18     --          on the schema used during the retrieval.  For example,
19     --          a    second     document   could   be     a   standard
20     --             CDMShape_Document.    This  means   that a   client
21     --          application will already be able to extract a CDMShape_Document
22     --          of the file, if the Shape Schema remains unchanged.
23     --          
24     ---Category: persistent implemention of storage.
25
26 uses Document from CDM, Document from PCDM, Data from Storage, ExtendedString from TCollection, Schema from Storage,SequenceOfExtendedString from TColStd, SequenceOfDocument from PCDM
27
28 raises NoSuchObject from Standard,DriverError from PCDM
29 is
30
31
32     Make(me: mutable; aDocument: Document from CDM)
33     returns Document from PCDM 
34     is virtual;
35     ---Purpose: raises NotImplemented.
36
37     Make(me: mutable; aDocument: Document from CDM; Documents: out SequenceOfDocument from PCDM)
38     is virtual;
39     ---Purpose:By default, puts  in the Sequence the  document returns
40     --            by the previous Make method.
41     --            
42
43     --          
44     SchemaName(me) returns ExtendedString from TCollection
45     is deferred;
46     
47     LoadExtensions(me: mutable; aSchema: Schema from Storage; Extensions: SequenceOfExtendedString from TColStd)
48     is virtual;
49     
50     Write(me: mutable; aDocument: Document from CDM; aFileName: ExtendedString from TCollection)
51     raises DriverError
52     ---Purpose:  Warning! raises DriverError if an error occurs during inside the
53     --          Make method.
54     is redefined virtual;
55     ---Purpose: stores the content of the Document into a new file.
56     --          
57     --          by  default  Write will  use Make   method to build a persistent
58     --          document and the Schema method to write the persistent document.
59     --          
60
61     SetFormat (me : mutable; aformat : ExtendedString from TCollection);
62
63     GetFormat (me)
64     returns ExtendedString from TCollection;
65
66 fields 
67
68     myFormat : ExtendedString from TCollection;
69
70 end StorageDriver from PCDM;