1 -- Created on: 1995-11-13
2 -- Created by: Jean-Louis Frenkel
3 -- Copyright (c) 1995-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
8 -- This library is free software; you can redistribute it and / or modify it
9 -- under the terms of the GNU Lesser General Public version 2.1 as published
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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
19 uses Document from CDM,
20 TryStoreStatus from CDF,
21 StoreSetNameStatus from CDF,
22 SubComponentStatus from CDF,
23 ExtendedString from TCollection,
25 StoreStatus from PCDM,
26 ExtendedString from TCollection
33 Create (aDocument: Document from CDM)
34 returns Store from CDF;
35 ---Purpose: creates a store list from the document of the current selection.
38 ---Category: Checks methods
41 ---Purpose: Checks will make the following control. Check must be used before
42 -- using Create method. Check will not be done twice by Create.
44 -- 1) controls whether there is one document in the current selection.
45 -- 2) controls whether there is a storage driver for the document.
46 -- 3) controls whether the applicationdatatype associated with the driver
47 -- exists as metadata in the metadata manager (Design Manager for example).
48 -- 4) controls whether there is a storage driver for each subcomponents
49 -- of the document if there are. If the control fails for a subcomponent,
50 -- the control stops and name and type of this subcomponent can be get
51 -- with LastName method
52 -- 5) controls whether the applicationdatatype associated with the driver of
53 -- each subcomponent exists as metadata in the metadata manager
54 -- (Design Manager for example). If the control fails for a subcomponent,
55 -- the control stops and name and type of this subcomponent can be get
56 -- with LastName method
58 returns TryStoreStatus from CDF;
60 LastName(me) returns ExtString from Standard;
61 ---Purpose: in the case of a subcomponent for which no storage driver exists,
62 -- returns the name of the subcomponent if there is one.
64 ---Category: Inquire Methods
66 -- The store list contains one or more documents. One of them is the current document.
69 returns ExtString from Standard;
70 ---Purpose: returns the folder in which the current document will be stored.
72 Name(me) returns ExtString from Standard;
73 ---Purpose: returns the name under which the current document will be stored
75 IsStored(me) returns Boolean from Standard;
76 ---Purpose: returns true if the current document is already stored
78 IsModified(me) returns Boolean from Standard;
80 CurrentIsConsistent(me) returns Boolean from Standard;
82 IsConsistent(me) returns Boolean from Standard;
84 HasAPreviousVersion(me) returns Boolean from Standard;
86 PreviousVersion(me) returns ExtString from Standard;
88 IsMainDocument(me) returns Boolean from Standard;
89 ---Purpose: returns true if the currentdocument is the main one, ie the document
90 -- of the current selection.
92 ---Category: Set methods
94 SetFolder(me: in out; aFolder: ExtendedString from TCollection)
95 ---Purpose: defines the folder in which the document should be
96 -- stored. returns Standard_True if the Folder exists,
97 -- Standard_False otherwise.
98 returns Boolean from Standard;
101 SetName(me: in out; aName: ExtString from Standard)
102 ---Purpose: defines the name under which the document should be stored.
103 returns StoreSetNameStatus from CDF;
105 SetComment(me: in out; aComment: ExtString from Standard);
107 Comment(me) returns ExtString from Standard;
109 RecheckName(me: in out)
110 ---Purpose: defines the name under which the document should be stored.
111 -- uses for example after modification of the folder.
112 returns StoreSetNameStatus from CDF;
114 SetPreviousVersion(me: in out; aPreviousVersion: ExtString from Standard)
115 returns Boolean from Standard;
119 Path(me) returns ExtString from Standard;
120 ---Purpose: returns the complete path of the created meta-data.
122 MetaDataPath(me) returns ExtString from Standard;
123 ---Purpose: returns the path of the previous store is the object
124 -- is already stored, otherwise an empty string;
125 Description(me) returns ExtString from Standard;
126 ---Purpose: returns the description of the format of the main object.
128 ---Category: subcomponents management.
130 InitComponent (me: in out);
131 ---Purpose : Allows to Start a new Iteration from beginning
133 MoreComponent (me) returns Boolean from Standard;
134 ---Purpose : Returns True if there are more entries to return
136 NextComponent (me: in out);
137 ---Purpose : Go to the next entry
138 -- (if there is not, Value will raise an exception)
141 SetCurrent(me: in out);
143 Component (me) returns ExtString from Standard;
144 ---Purpose : Returns item value of current entry
146 HasSubComponents(me) returns Boolean from Standard;
148 SubComponentStatus(me; aPresentation: ExtString from Standard)
149 returns SubComponentStatus from CDF;
151 SetCurrent(me: in out; aPresentation: ExtString from Standard);
156 ---Category: Status method
157 ---Purpose: the two following methods can
158 -- be used just after Realize or Import -- method to know if
159 -- thes methods worked correctly, and if not why.
161 StoreStatus(me) returns StoreStatus from PCDM;
162 AssociatedStatusText(me) returns ExtString from Standard;
164 ---Category: Private methods
166 FindDefault(me: in out) is private;
168 Init(me: in out) is private;
170 SetName(me: in out; aName: ExtendedString from TCollection)
171 ---Purpose: defines the name under which the document should be stored.
172 returns StoreSetNameStatus from CDF;
175 ---Category: compatibility
176 SetFolder(me: in out; aFolder: ExtString from Standard)
177 ---Purpose: defines the folder in which the document should be
178 -- stored. returns Standard_True if the Folder exists,
179 -- Standard_False otherwise.
180 returns Boolean from Standard;
184 myList: StoreList from CDF ;
185 myMainDocument: Document from CDM ;
186 myCurrentDocument: Document from CDM ;
187 myHasSubComponents: Boolean from Standard ;
188 myIsMainDocument: Boolean from Standard ;
190 myLastName: ExtendedString from TCollection;
192 myPath: ExtendedString from TCollection;
193 myText: ExtendedString from TCollection;
194 myStatus: StoreStatus from PCDM;