1 // Copyright (C) 2009-2013 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #include "HEXABLOCK.hxx"
21 #include "utilities.h"
25 #include "hexa_base.hxx"
26 #include "HexVertex_impl.hxx"
27 #include "HexVector_impl.hxx"
28 #include "HexPipe_impl.hxx"
30 Pipe_impl::Pipe_impl( HEXA_NS::Pipe *ptrCpp ):_pipe_cpp(ptrCpp)
34 HEXA_NS::Pipe* Pipe_impl::GetImpl() throw (SALOME::SALOME_Exception)
39 Vertex_ptr Pipe_impl::getBase() throw (SALOME::SALOME_Exception)
41 Vertex_ptr result = Vertex::_nil();
43 HEXA_NS::Vertex* v = _pipe_cpp->getBase();
45 Vertex_impl* servantCorba = new Vertex_impl(v);
46 result = servantCorba->_this();
51 Vector_ptr Pipe_impl::getDirection() throw (SALOME::SALOME_Exception)
53 Vector_ptr result = Vector::_nil();
55 HEXA_NS::Vector* v = _pipe_cpp->getDirection();
58 Vector_impl* servantCorba = new Vector_impl(v);
59 result = servantCorba->_this();
64 ::CORBA::Double Pipe_impl::getInternal_radius() throw (SALOME::SALOME_Exception)
66 // ::CORBA::Double d = _pipe_cpp->getInternal_radius(); CS_TODO
67 ::CORBA::Double d = _pipe_cpp->getInternalRadius();
71 ::CORBA::Double Pipe_impl::getRadius() throw (SALOME::SALOME_Exception)
73 ::CORBA::Double d = _pipe_cpp->getRadius();
77 ::CORBA::Double Pipe_impl::getHeight() throw (SALOME::SALOME_Exception)
79 ::CORBA::Double d = _pipe_cpp->getHeight();
84 void Pipe_impl::dump() throw (SALOME::SALOME_Exception)
90 void Pipe_impl::printName() throw (SALOME::SALOME_Exception)
92 _pipe_cpp->printName();
96 char* Pipe_impl::getName() throw (SALOME::SALOME_Exception)
98 return CORBA::string_dup( _pipe_cpp->getName() );
100 // ========================================================= setName
101 void Pipe_impl::setName(const char* name)
102 throw (SALOME::SALOME_Exception)
104 _pipe_cpp->setName (name);