Salome HOME
Fix pb. with loading of last module (in list).
[modules/kernel.git] / src / DF / DF_ChildIterator.hxx
1 #ifndef DFCHILDITERATOR_HXX
2 #define DFCHILDITERATOR_HXX
3
4 #include "DF_definitions.hxx"
5 #include "DF_Label.hxx"
6
7 #include <string>
8
9 //Class DF_ChildIterator is used to iterate a tree of Labels in the Document
10 class DF_ChildIterator {
11 public:
12   //Constructor
13   Standard_EXPORT DF_ChildIterator(const DF_Label& theLabel, bool allLevels = false);
14
15   Standard_EXPORT DF_ChildIterator();
16
17   Standard_EXPORT ~DF_ChildIterator();
18
19   //Initializes the iterator, if allLevels is true the iterator before iterating the next
20   //brother of the current Label iterates the Label children
21   Standard_EXPORT void Init(const DF_Label& theLabel, bool allLevels = false);
22
23   //Returns a current Label
24   Standard_EXPORT DF_Label Value();
25
26   //Returns true if there is a current Label
27   Standard_EXPORT bool More();
28
29   //Moves to the next Label
30   Standard_EXPORT void Next();
31
32 private:
33   DF_LabelNode*    _root;
34   DF_LabelNode*    _current;
35   bool             _allLevels;
36 };
37
38 #endif