blob: 5b3a5663997018714dead2368988f0d0dd299d54 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
-- File: CDF_Directory.cdl
-- Created: Thu Aug 7 16:57:46 1997
-- Author: Jean-Louis Frenkel
-- <rmi@frilox.paris1.matra-dtv.fr>
---Copyright: Matra Datavision 1997
class Directory from CDF inherits Transient from Standard
---Purpose: A directory is a collection of documents. There is only one instance
-- of a given document in a directory.
-- put.
uses Document from CDM, ListOfDocument from CDM
raises NoSuchObject
is
Create
returns mutable Directory from CDF;
---Purpose: Creates an empty directory.
Add(me:mutable; aDocument: Document from CDM);
---Purpose: adds a document into the directory.
Remove(me: mutable; aDocument: Document from CDM);
---Purpose: removes the document.
---Category: Inquire Methods
--
Contains(me; aDocument: Document from CDM)
---Purpose: Returns true if the document aDocument is in the directory
returns Boolean from Standard
is static;
Last(me:mutable) returns Document from CDM
---Purpose: returns the last document (if any) which has been added
-- in the directory.
raises NoSuchObject from Standard
---Warning: if the directory is empty.
is static;
Length(me) returns Integer from Standard
---Purpose: returns the number of documents of the directory.
is static;
IsEmpty(me) returns Boolean from Standard
---Purpose: returns true if the directory is empty.
is static;
---Category: Private methods
List(me) returns ListOfDocument from CDM
is static private;
---C++: return const &
--
fields
myDocuments: ListOfDocument from CDM;
friends
class DirectoryIterator from CDF
end Directory from CDF;
|