1 -- Created on: 1995-11-13
2 -- Created by: Jean-Louis Frenkel
3 -- Copyright (c) 1995-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
24 uses Document from CDM,
25 TryStoreStatus from CDF,
26 StoreSetNameStatus from CDF,
27 SubComponentStatus from CDF,
28 ExtendedString from TCollection,
30 StoreStatus from PCDM,
31 ExtendedString from TCollection
38 Create (aDocument: Document from CDM)
39 returns Store from CDF;
40 ---Purpose: creates a store list from the document of the current selection.
43 ---Category: Checks methods
46 ---Purpose: Checks will make the following control. Check must be used before
47 -- using Create method. Check will not be done twice by Create.
49 -- 1) controls whether there is one document in the current selection.
50 -- 2) controls whether there is a storage driver for the document.
51 -- 3) controls whether the applicationdatatype associated with the driver
52 -- exists as metadata in the metadata manager (Design Manager for example).
53 -- 4) controls whether there is a storage driver for each subcomponents
54 -- of the document if there are. 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
57 -- 5) controls whether the applicationdatatype associated with the driver of
58 -- each subcomponent exists as metadata in the metadata manager
59 -- (Design Manager for example). If the control fails for a subcomponent,
60 -- the control stops and name and type of this subcomponent can be get
61 -- with LastName method
63 returns TryStoreStatus from CDF;
65 LastName(me) returns ExtString from Standard;
66 ---Purpose: in the case of a subcomponent for which no storage driver exists,
67 -- returns the name of the subcomponent if there is one.
69 ---Category: Inquire Methods
71 -- The store list contains one or more documents. One of them is the current document.
74 returns ExtString from Standard;
75 ---Purpose: returns the folder in which the current document will be stored.
77 Name(me) returns ExtString from Standard;
78 ---Purpose: returns the name under which the current document will be stored
80 IsStored(me) returns Boolean from Standard;
81 ---Purpose: returns true if the current document is already stored
83 IsModified(me) returns Boolean from Standard;
85 CurrentIsConsistent(me) returns Boolean from Standard;
87 IsConsistent(me) returns Boolean from Standard;
89 HasAPreviousVersion(me) returns Boolean from Standard;
91 PreviousVersion(me) returns ExtString from Standard;
93 IsMainDocument(me) returns Boolean from Standard;
94 ---Purpose: returns true if the currentdocument is the main one, ie the document
95 -- of the current selection.
97 ---Category: Set methods
99 SetFolder(me: in out; aFolder: ExtendedString from TCollection)
100 ---Purpose: defines the folder in which the document should be
101 -- stored. returns Standard_True if the Folder exists,
102 -- Standard_False otherwise.
103 returns Boolean from Standard;
106 SetName(me: in out; aName: ExtString from Standard)
107 ---Purpose: defines the name under which the document should be stored.
108 returns StoreSetNameStatus from CDF;
110 SetComment(me: in out; aComment: ExtString from Standard);
112 Comment(me) returns ExtString from Standard;
114 RecheckName(me: in out)
115 ---Purpose: defines the name under which the document should be stored.
116 -- uses for example after modification of the folder.
117 returns StoreSetNameStatus from CDF;
119 SetPreviousVersion(me: in out; aPreviousVersion: ExtString from Standard)
120 returns Boolean from Standard;
124 Path(me) returns ExtString from Standard;
125 ---Purpose: returns the complete path of the created meta-data.
127 MetaDataPath(me) returns ExtString from Standard;
128 ---Purpose: returns the path of the previous store is the object
129 -- is already stored, otherwise an empty string;
130 Description(me) returns ExtString from Standard;
131 ---Purpose: returns the description of the format of the main object.
133 ---Category: subcomponents management.
135 InitComponent (me: in out);
136 ---Purpose : Allows to Start a new Iteration from beginning
138 MoreComponent (me) returns Boolean from Standard;
139 ---Purpose : Returns True if there are more entries to return
141 NextComponent (me: in out);
142 ---Purpose : Go to the next entry
143 -- (if there is not, Value will raise an exception)
146 SetCurrent(me: in out);
148 Component (me) returns ExtString from Standard;
149 ---Purpose : Returns item value of current entry
151 HasSubComponents(me) returns Boolean from Standard;
153 SubComponentStatus(me; aPresentation: ExtString from Standard)
154 returns SubComponentStatus from CDF;
156 SetCurrent(me: in out; aPresentation: ExtString from Standard);
161 ---Category: Status method
162 ---Purpose: the two following methods can
163 -- be used just after Realize or Import -- method to know if
164 -- thes methods worked correctly, and if not why.
166 StoreStatus(me) returns StoreStatus from PCDM;
167 AssociatedStatusText(me) returns ExtString from Standard;
169 ---Category: Private methods
171 FindDefault(me: in out) is private;
173 Init(me: in out) is private;
175 SetName(me: in out; aName: ExtendedString from TCollection)
176 ---Purpose: defines the name under which the document should be stored.
177 returns StoreSetNameStatus from CDF;
180 ---Category: compatibility
181 SetFolder(me: in out; aFolder: ExtString from Standard)
182 ---Purpose: defines the folder in which the document should be
183 -- stored. returns Standard_True if the Folder exists,
184 -- Standard_False otherwise.
185 returns Boolean from Standard;
189 myList: StoreList from CDF ;
190 myMainDocument: Document from CDM ;
191 myCurrentDocument: Document from CDM ;
192 myHasSubComponents: Boolean from Standard ;
193 myIsMainDocument: Boolean from Standard ;
195 myLastName: ExtendedString from TCollection;
197 myPath: ExtendedString from TCollection;
198 myText: ExtendedString from TCollection;
199 myStatus: StoreStatus from PCDM;