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_IteratorOfDictionaryOfTransient_HeaderFile
18 #define _Dico_IteratorOfDictionaryOfTransient_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_DictionaryOfTransient;
29 class Dico_StackItemOfDictionaryOfTransient;
30 class Standard_NoSuchObject;
31 class Standard_Transient;
32 class TCollection_AsciiString;
36 class Dico_IteratorOfDictionaryOfTransient
43 //! Creates an iterator which will work on all the dictionary
44 Standard_EXPORT Dico_IteratorOfDictionaryOfTransient(const Handle(Dico_DictionaryOfTransient)& acell);
46 //! Creates an iterator which will consider only entries
47 //! which name begin by the string given as basename (subpart)
48 Standard_EXPORT Dico_IteratorOfDictionaryOfTransient(const Handle(Dico_DictionaryOfTransient)& acell, const Standard_CString basename);
50 //! Creates an iterator which will consider only entries
51 //! which name begin by the string given as basename (subpart)
52 //! Same as above, but basename is String instead of CString
53 Standard_EXPORT Dico_IteratorOfDictionaryOfTransient(const Handle(Dico_DictionaryOfTransient)& acell, const TCollection_AsciiString& basename);
55 //! Allows to Start a new Iteration from beginning
56 Standard_EXPORT void Start();
58 //! Returns True if there are more entries to return
59 Standard_EXPORT Standard_Boolean More();
61 //! Go to the next entry
62 //! (if there is not, Value will raise an exception)
63 Standard_EXPORT void Next();
65 //! Returns item value of current entry
66 Standard_EXPORT const Handle(Standard_Transient)& Value() const;
68 //! Returns name of current entry
69 Standard_EXPORT TCollection_AsciiString Name() const;
83 //! Appends a new value to the Iteration Stack
84 Standard_EXPORT void AppendStack (const Handle(Dico_DictionaryOfTransient)& val);
87 Handle(Dico_DictionaryOfTransient) thebase;
88 TCollection_AsciiString thename;
89 Handle(Dico_StackItemOfDictionaryOfTransient) thelast;
90 Standard_Integer thenb;
91 Standard_Boolean themore;
92 Standard_Boolean theinit;
93 Standard_Boolean thenext;
104 #endif // _Dico_IteratorOfDictionaryOfTransient_HeaderFile