]> SALOME platform Git repositories - modules/hexablock.git/blob - src/HEXABLOCK_I/HexVector_impl.cxx
Salome HOME
Merge from V6_main 01/04/2013
[modules/hexablock.git] / src / HEXABLOCK_I / HexVector_impl.cxx
1 // Copyright (C) 2009-2013  CEA/DEN, EDF R&D
2 //
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.
7 //
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.
12 //
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
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 using namespace std;
20 #include "HEXABLOCK.hxx"
21 #include "utilities.h"
22
23 #include <string>
24
25 #include "hexa_base.hxx"
26 #include "HexVector_impl.hxx"
27
28 using namespace HEXABLOCK_ORB;
29
30 Vector_impl::Vector_impl( HEXA_NS::Vector *ptrCpp ):_vector_cpp(ptrCpp)
31 {
32 }
33
34 HEXA_NS::Vector* Vector_impl::GetImpl() throw (SALOME::SALOME_Exception)
35 {
36   return _vector_cpp;
37 }
38
39 ::CORBA::Double Vector_impl::getDX() throw (SALOME::SALOME_Exception)
40 {
41   ::CORBA::Double dx = _vector_cpp->getDx();
42   return dx;
43 }
44 ::CORBA::Double Vector_impl::getDY() throw (SALOME::SALOME_Exception)
45 {
46   ::CORBA::Double dy = _vector_cpp->getDy();
47   return dy;
48 }
49 ::CORBA::Double Vector_impl::getDZ() throw (SALOME::SALOME_Exception)
50 {
51   ::CORBA::Double dz = _vector_cpp->getDz();
52   return dz;
53 }
54
55
56 void Vector_impl::dump() throw (SALOME::SALOME_Exception)
57 {
58   _vector_cpp->dump();
59 }
60
61
62 void Vector_impl::printName() throw (SALOME::SALOME_Exception)
63 {
64   _vector_cpp->printName();
65 }
66
67 // ========================================================= getName
68 char* Vector_impl::getName() throw (SALOME::SALOME_Exception)
69 {
70    return CORBA::string_dup( _vector_cpp->getName() );
71 }
72 // ========================================================= setName
73 void Vector_impl::setName(const char* name) 
74      throw (SALOME::SALOME_Exception)
75 {
76   _vector_cpp->setName (name);
77 }
78 // ========================================================= getNorm
79 ::CORBA::Double Vector_impl::getNorm() throw (SALOME::SALOME_Exception)
80 {
81   ::CORBA::Double val = _vector_cpp->getNorm();
82   return val;
83 }
84 // ========================================================= getAngleX
85 ::CORBA::Double Vector_impl::getAngleX() throw (SALOME::SALOME_Exception)
86 {
87   ::CORBA::Double val = _vector_cpp->getAngleX();
88   return val;
89 }