Salome HOME
This commit was generated by cvs2git to track changes on a CVS vendor
[modules/kernel.git] / src / HDFPersist / HDFexplorer.cc
1 using namespace std;
2 #include "HDFcontainerObject.hxx"
3 #include "HDFexception.hxx"
4 #include "HDFinternalObject.hxx"
5 #include "HDFexplorer.hxx"
6
7 HDFexplorer::HDFexplorer(HDFcontainerObject *container)
8 {
9   _container = container;
10   _size = _container->nSons();
11   _head = _container->GetFirstSon();
12   _queue = _container->GetLastSon();
13   _current = _head;
14 }
15
16 HDFexplorer::~HDFexplorer()
17 {
18 }
19
20 void HDFexplorer::Init()
21 {
22   _current = _head;
23 }
24
25 void HDFexplorer::Next()
26 {
27   _current = _current->GetNextBrother(); 
28 }
29
30 int HDFexplorer::More()
31 {
32   if (_current != NULL)
33     return 1;
34   else
35     return 0;
36 }
37
38 HDFinternalObject *HDFexplorer::Value()
39 {
40   return _current;
41 }
42
43 void HDFexplorer::Reset(HDFcontainerObject *new_container)
44 {
45   _container = new_container;
46   _size = _container->nSons();
47   _head = _container->GetFirstSon();
48   _queue = _container->GetLastSon();
49   _current = _head;
50 }