0024742: Remove rarely used collection classes: Stack
[occt.git] / src / CDF / CDF_Directory.cdl
1 -- Created on: 1997-08-07
2 -- Created by: Jean-Louis Frenkel
3 -- Copyright (c) 1997-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
5 --
6 -- This file is part of Open CASCADE Technology software library.
7 --
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
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.
13 --
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
16
17 class Directory from CDF inherits Transient from Standard
18
19
20 ---Purpose: A directory is a collection of documents. There is only one instance
21 --          of a given document in a directory.
22 --          put.
23
24 uses Document from CDM, ListOfDocument from CDM
25
26 raises  NoSuchObject
27     
28 is
29     Create 
30     returns mutable Directory from CDF;
31     ---Purpose: Creates an empty directory.
32     
33     
34     Add(me:mutable; aDocument: Document from CDM);
35     ---Purpose: adds a document into the directory.
36     
37     Remove(me: mutable; aDocument: Document from CDM);
38     ---Purpose: removes the document.
39     
40     
41 ---Category: Inquire Methods
42 --           
43
44     Contains(me; aDocument: Document from CDM) 
45     ---Purpose: Returns true if the document aDocument is in the directory
46     returns Boolean from Standard
47     is static;
48
49     Last(me:mutable) returns Document from CDM
50     ---Purpose: returns the last document (if any) which has been added
51     --          in the directory.
52     raises NoSuchObject from Standard
53     ---Warning: if the directory is empty.
54     is static;
55
56     Length(me) returns Integer from Standard
57     ---Purpose: returns the number of documents of the directory.
58     is static;
59
60     IsEmpty(me) returns Boolean from Standard
61     ---Purpose: returns true if the directory is empty.
62     is static;
63     
64 ---Category: Private methods
65    
66    List(me) returns ListOfDocument from CDM
67    is static private;
68    ---C++: return const &
69    --      
70    
71 fields
72
73     myDocuments: ListOfDocument from CDM;
74
75 friends    
76     class DirectoryIterator from CDF
77
78 end Directory from CDF;