1 // Copyright (C) 2009-2012 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 "HexHexa_impl.hxx"
27 #include "HexQuad_impl.hxx"
28 #include "HexEdge_impl.hxx"
29 #include "HexVertex_impl.hxx"
31 Hexa_impl::Hexa_impl( HEXA_NS::Hexa *ptrCpp ):_hexa_cpp(ptrCpp)
35 HEXA_NS::Hexa* Hexa_impl::GetImpl()
36 throw (SALOME::SALOME_Exception)
41 Quad_ptr Hexa_impl::getQuad(::CORBA::Long n)
42 throw (SALOME::SALOME_Exception)
44 Quad_ptr result = Quad::_nil();
46 HEXA_NS::Quad* q = _hexa_cpp->getQuad(n);
48 Quad_impl* servantCorba = new Quad_impl(q);
49 result = servantCorba->_this();
54 Edge_ptr Hexa_impl::getEdge(::CORBA::Long n)
55 throw (SALOME::SALOME_Exception)
57 Edge_ptr result = Edge::_nil();
59 HEXA_NS::Edge* e = _hexa_cpp->getEdge(n);
61 Edge_impl* servantCorba = new Edge_impl(e);
62 result = servantCorba->_this();
67 Vertex_ptr Hexa_impl::getVertex(::CORBA::Long n)
68 throw (SALOME::SALOME_Exception)
70 Vertex_ptr result = Vertex::_nil();
72 HEXA_NS::Vertex* v = _hexa_cpp->getVertex(n);
74 Vertex_impl* servantCorba = new Vertex_impl(v);
75 result = servantCorba->_this();
80 void Hexa_impl::setScalar( ::CORBA::Double val )throw (SALOME::SALOME_Exception)
82 _hexa_cpp->setScalar(val);
85 void Hexa_impl::dump() throw (SALOME::SALOME_Exception)
91 void Hexa_impl::printName() throw (SALOME::SALOME_Exception)
93 _hexa_cpp->printName();
97 char* Hexa_impl::getName() throw (SALOME::SALOME_Exception)
99 return CORBA::string_dup( _hexa_cpp->getName() );
102 // ========================================================= setName
103 void Hexa_impl::setName(const char* name)
104 throw (SALOME::SALOME_Exception)
106 _hexa_cpp->setName (name);