Salome HOME
ENV: Windows porting.
[modules/kernel.git] / src / SALOMEDS / SALOMEDS_SComponentIterator_i.cxx
1 //  File   : SALOMEDS_SComponentIterator_i.cxx
2 //  Author : Sergey RUIN
3 //  Module : SALOME
4
5
6 #include "SALOMEDS_SComponentIterator_i.hxx"
7 #include "SALOMEDS.hxx"
8 #include "SALOMEDSImpl_SComponent.hxx"
9
10 using namespace std;
11
12 //============================================================================
13 /*! Function : constructor
14  * 
15  */
16 //============================================================================
17
18 SALOMEDS_SComponentIterator_i::SALOMEDS_SComponentIterator_i(const SALOMEDSImpl_SComponentIterator& theImpl, 
19                                                              CORBA::ORB_ptr orb) 
20 :_impl(theImpl)
21 {
22   _orb = CORBA::ORB::_duplicate(orb);
23 }
24
25 //============================================================================
26 /*! Function : destructor
27  * 
28  */
29 //============================================================================
30 SALOMEDS_SComponentIterator_i::~SALOMEDS_SComponentIterator_i()
31 {
32 }
33
34 //============================================================================
35 /*! Function : Init
36  * 
37  */
38 //============================================================================
39 void SALOMEDS_SComponentIterator_i::Init()
40
41   SALOMEDS::Locker lock; 
42   _impl.Init();
43 }
44
45 //============================================================================
46 /*! Function : More
47  * 
48  */
49 //============================================================================
50 CORBA::Boolean SALOMEDS_SComponentIterator_i::More()
51 {
52   SALOMEDS::Locker lock; 
53   return _impl.More();
54 }
55
56  //============================================================================
57 /*! Function : Next
58   */
59 //============================================================================
60 void SALOMEDS_SComponentIterator_i::Next()
61
62   SALOMEDS::Locker lock; 
63   _impl.Next();
64 }
65
66
67 //============================================================================
68 /*! Function : Value
69  * 
70  */
71 //============================================================================
72 SALOMEDS::SComponent_ptr SALOMEDS_SComponentIterator_i::Value()
73 {
74   SALOMEDS::Locker lock; 
75   SALOMEDS::SComponent_var sco = SALOMEDS_SComponent_i::New (_impl.Value(), _orb);
76   return sco._retn();
77 }
78