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
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 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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 class Directory from CDF inherits Transient from Standard
20 ---Purpose: A directory is a collection of documents. There is only one instance
21 -- of a given document in a directory.
24 uses Document from CDM, ListOfDocument from CDM
30 returns mutable Directory from CDF;
31 ---Purpose: Creates an empty directory.
34 Add(me:mutable; aDocument: Document from CDM);
35 ---Purpose: adds a document into the directory.
37 Remove(me: mutable; aDocument: Document from CDM);
38 ---Purpose: removes the document.
41 ---Category: Inquire Methods
44 Contains(me; aDocument: Document from CDM)
45 ---Purpose: Returns true if the document aDocument is in the directory
46 returns Boolean from Standard
49 Last(me:mutable) returns Document from CDM
50 ---Purpose: returns the last document (if any) which has been added
52 raises NoSuchObject from Standard
53 ---Warning: if the directory is empty.
56 Length(me) returns Integer from Standard
57 ---Purpose: returns the number of documents of the directory.
60 IsEmpty(me) returns Boolean from Standard
61 ---Purpose: returns true if the directory is empty.
64 ---Category: Private methods
66 List(me) returns ListOfDocument from CDM
68 ---C++: return const &
73 myDocuments: ListOfDocument from CDM;
76 class DirectoryIterator from CDF
78 end Directory from CDF;