0025790: Drop unimplemented method ShallowCopy() from TCollection_HSequence.cdl
[occt.git] / src / TCollection / TCollection_BasicMapIterator.cdl
1 -- Created on: 1993-02-26
2 -- Created by: Remi LEQUETTE
3 -- Copyright (c) 1993-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 private deferred class BasicMapIterator from TCollection 
18
19         ---Purpose: This  class  provides    basic   services  for the
20         -- iterators  on Maps. The  iterators  are  inherited
21         -- from this one.
22         -- 
23         -- The  iterator   contains  an   array   of pointers
24         -- (buckets). Each bucket is a  pointer  on a node. A
25         -- node contains a pointer on the next node.
26         -- 
27         -- This class  provides also basic  services for  the
28         -- implementation of Maps.
29         -- A map iterator provides a step by step exploration of all
30         -- entries of a map. After initialization of a concrete derived
31         -- iterator, use in a loop:
32         -- -   the function More to know if there is a current entry for
33         --   the iterator in the map,
34         -- -   then the functions which read data on an entry of the
35         --   map (these functions are provided by each type of map),
36         -- -   then the function Next to set the iterator to the next   entry of the map.
37         --   Warning
38         -- -   A map is a non-ordered data structure. The order in
39         --   which entries of a map are explored by the iterator
40         --  depends on its contents, and change when the map is edited.
41         -- -   It is not recommended to modify the contents of a map
42         --   during iteration: the result is unpredictable.
43   
44 uses
45     BasicMap from TCollection
46
47 is
48     Initialize;
49         ---Purpose: Creates an empty iterator.
50
51     Initialize(M : BasicMap from TCollection);
52         ---Purpose: Initialize on the first node in the buckets.
53         
54     Initialize(me : in out; M : BasicMap from TCollection)
55         ---Purpose: Initialize on the first node in the buckets.
56     is static protected;
57     
58     Reset(me : in out)
59         ---Purpose: Resets the iterator to the first node.
60     is static;
61     
62     More(me) returns Boolean
63         ---Purpose: Returns true if there is a current entry for this iterator in the map.
64         -- Use the function Next to set this iterator to the position of
65         -- the next entry, if it exists.
66         ---C++: inline
67     is static;
68     
69     Next(me : in out)
70         ---Purpose: Sets this iterator to the position of the next entry of the map.
71         -- Nothing is changed if there is no more entry to explore in
72         -- the map: this iterator is always positioned on the last entry
73         -- of the map but the function More returns false.
74     is static;
75
76 fields
77         myNbBuckets : Integer;
78         myBuckets   : Address from Standard;
79         myBucket    : Integer;
80         myNode      : Address from Standard is protected;
81
82 end BasicMapIterator;