Salome HOME
Implemented method Modified() for SALOMEDS_Study that marks the Study as being modified.
[modules/kernel.git] / src / SALOMEDS / SALOMEDS_UseCaseIterator_i.cxx
1 // Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
3 // 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either 
7 // version 2.1 of the License.
8 // 
9 // This library is distributed in the hope that it will be useful 
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of 
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
12 // Lesser General Public License for more details.
13 //
14 // You should have received a copy of the GNU Lesser General Public  
15 // License along with this library; if not, write to the Free Software 
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 //
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 //
20 //  File   : SALOMEDS_UseCaseIterator_i.cxx
21 //  Author : Sergey RUIN
22 //  Module : SALOME
23
24
25 #include "SALOMEDS_UseCaseIterator_i.hxx"
26 #include "SALOMEDS_SObject_i.hxx"
27 #include "SALOMEDS.hxx"
28
29 #include "SALOMEDSImpl_SObject.hxx"
30 #include "utilities.h"
31
32 using namespace std;
33
34 //============================================================================
35 /*! Function : constructor
36  *  Purpose  :
37  */
38 //============================================================================
39 SALOMEDS_UseCaseIterator_i::SALOMEDS_UseCaseIterator_i(const Handle(SALOMEDSImpl_UseCaseIterator)& theImpl, 
40                                                        CORBA::ORB_ptr orb)
41 {
42   _orb = CORBA::ORB::_duplicate(orb);
43   _impl = theImpl;
44 }
45
46 //============================================================================
47 /*! Function : destructor
48  *  Purpose  :
49  */
50 //============================================================================
51 SALOMEDS_UseCaseIterator_i::~SALOMEDS_UseCaseIterator_i()
52 {
53 }
54
55 //============================================================================
56 /*! Function :Init
57  * 
58  */
59 //============================================================================
60 void SALOMEDS_UseCaseIterator_i::Init(CORBA::Boolean allLevels)
61
62   SALOMEDS::Locker lock;
63   _impl->Init(allLevels);
64 }
65
66 //============================================================================
67 /*! Function : More
68  * 
69  */
70 //============================================================================
71 CORBA::Boolean SALOMEDS_UseCaseIterator_i::More()
72 {
73   SALOMEDS::Locker lock;
74   return _impl->More();
75 }
76
77 //============================================================================
78 /*! Function : Next
79  * 
80  */
81 //============================================================================
82 void SALOMEDS_UseCaseIterator_i::Next()
83 {
84   SALOMEDS::Locker lock;
85   _impl->Next();
86 }
87
88
89 //============================================================================
90 /*! Function :
91  *  Purpose  :
92  */
93 //============================================================================
94 SALOMEDS::SObject_ptr SALOMEDS_UseCaseIterator_i::Value()
95 {
96   SALOMEDS::Locker lock;
97   Handle(SALOMEDSImpl_SObject) aSO = _impl->Value();
98   SALOMEDS::SObject_var so = SALOMEDS_SObject_i::New (aSO, _orb);
99   return so._retn();
100 }
101