Salome HOME
First publish of HEXABLOCKcomponant
[modules/hexablock.git] / src / HEXABLOCK_I / HexPipe_impl.cxx
1 using namespace std;
2 #include "HEXABLOCK.hxx"
3 #include "utilities.h"
4
5 #include <string>
6
7 #include "hexa_base.hxx"
8 #include "HexVertex_impl.hxx"
9 #include "HexVector_impl.hxx"
10 #include "HexPipe_impl.hxx"
11
12 Pipe_impl::Pipe_impl( HEXA_NS::Pipe *ptrCpp ):_pipe_cpp(ptrCpp)
13 {
14 }
15
16 HEXA_NS::Pipe* Pipe_impl::GetImpl() throw (SALOME::SALOME_Exception)
17 {
18   return _pipe_cpp;
19 }
20
21 Vertex_ptr Pipe_impl::getBase() throw (SALOME::SALOME_Exception)
22 {
23   Vertex_ptr result = Vertex::_nil();
24
25   HEXA_NS::Vertex* v = _pipe_cpp->getBase();
26   if ( v!= NULL ){  
27     Vertex_impl* servantCorba = new Vertex_impl(v);
28     result = servantCorba->_this();
29   }
30   return result;
31 }
32
33 Vector_ptr Pipe_impl::getDirection() throw (SALOME::SALOME_Exception)
34 {
35   Vector_ptr result = Vector::_nil();
36
37   HEXA_NS::Vector* v = _pipe_cpp->getDirection();
38
39   if ( v!= NULL ){  
40     Vector_impl* servantCorba = new Vector_impl(v);
41     result = servantCorba->_this();
42   }
43   return result;
44 }
45
46 ::CORBA::Double Pipe_impl::getInternal_radius() throw (SALOME::SALOME_Exception)
47 {
48 //   ::CORBA::Double d = _pipe_cpp->getInternal_radius(); CS_TODO
49   ::CORBA::Double d = _pipe_cpp->getInternalRadius();
50   return d;
51 }
52
53 ::CORBA::Double Pipe_impl::getRadius() throw (SALOME::SALOME_Exception)
54 {
55   ::CORBA::Double d = _pipe_cpp->getRadius();
56   return d;
57 }
58
59 ::CORBA::Double Pipe_impl::getHeight() throw (SALOME::SALOME_Exception)
60 {
61   ::CORBA::Double d = _pipe_cpp->getHeight();
62   return d;
63 }
64
65
66 void Pipe_impl::dump() throw (SALOME::SALOME_Exception)
67 {
68   _pipe_cpp->dump();
69 }
70
71
72 void Pipe_impl::printName() throw (SALOME::SALOME_Exception)
73 {
74   _pipe_cpp->printName();
75 }