1 // Created on: 1992-07-28
2 // Created by: Christian CAILLET
3 // Copyright (c) 1992-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 #ifndef _Dico_IteratorOfDictionaryOfInteger_HeaderFile
18 #define _Dico_IteratorOfDictionaryOfInteger_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <TCollection_AsciiString.hxx>
25 #include <Standard_Integer.hxx>
26 #include <Standard_Boolean.hxx>
27 #include <Standard_CString.hxx>
28 class Dico_DictionaryOfInteger;
29 class Dico_StackItemOfDictionaryOfInteger;
30 class Standard_NoSuchObject;
31 class TCollection_AsciiString;
35 class Dico_IteratorOfDictionaryOfInteger
42 //! Creates an iterator which will work on all the dictionary
43 Standard_EXPORT Dico_IteratorOfDictionaryOfInteger(const Handle(Dico_DictionaryOfInteger)& acell);
45 //! Creates an iterator which will consider only entries
46 //! which name begin by the string given as basename (subpart)
47 Standard_EXPORT Dico_IteratorOfDictionaryOfInteger(const Handle(Dico_DictionaryOfInteger)& acell, const Standard_CString basename);
49 //! Creates an iterator which will consider only entries
50 //! which name begin by the string given as basename (subpart)
51 //! Same as above, but basename is String instead of CString
52 Standard_EXPORT Dico_IteratorOfDictionaryOfInteger(const Handle(Dico_DictionaryOfInteger)& acell, const TCollection_AsciiString& basename);
54 //! Allows to Start a new Iteration from beginning
55 Standard_EXPORT void Start();
57 //! Returns True if there are more entries to return
58 Standard_EXPORT Standard_Boolean More();
60 //! Go to the next entry
61 //! (if there is not, Value will raise an exception)
62 Standard_EXPORT void Next();
64 //! Returns item value of current entry
65 Standard_EXPORT const Standard_Integer& Value() const;
67 //! Returns name of current entry
68 Standard_EXPORT TCollection_AsciiString Name() const;
82 //! Appends a new value to the Iteration Stack
83 Standard_EXPORT void AppendStack (const Handle(Dico_DictionaryOfInteger)& val);
86 Handle(Dico_DictionaryOfInteger) thebase;
87 TCollection_AsciiString thename;
88 Handle(Dico_StackItemOfDictionaryOfInteger) thelast;
89 Standard_Integer thenb;
90 Standard_Boolean themore;
91 Standard_Boolean theinit;
92 Standard_Boolean thenext;
103 #endif // _Dico_IteratorOfDictionaryOfInteger_HeaderFile