]> SALOME platform Git repositories - modules/smesh.git/blob - src/DriverUNV/UNV164_Structure.hxx
Salome HOME
0021806: [CEA 637] Wrap error message on Mesh Computation Failed Dialog
[modules/smesh.git] / src / DriverUNV / UNV164_Structure.hxx
1 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 #ifndef UNV164_Structure_HeaderFile
24 #define UNV164_Structure_HeaderFile
25
26 // Universal Dataset Number: 164
27 // Name:   Units
28 // Status: Current
29 // Owner:  General
30 // Revision Date: 19-AUG-1987
31 // -----------------------------------------------------------------------
32
33 // Record 1:       FORMAT(I10,20A1,I10)
34 //                 Field 1      -- units code
35 //                                 = 1 - SI: Meter (newton)
36 //                                 = 2 - BG: Foot (pound f)
37 //                                 = 3 - MG: Meter (kilogram f)
38 //                                 = 4 - BA: Foot (poundal)
39 //                                 = 5 - MM: mm (milli newton)
40 //                                 = 6 - CM: cm (centi newton)
41 //                                 = 7 - IN: Inch (pound f)
42 //                                 = 8 - GM: mm (kilogram f)
43 //                                 = 9 - US: USER_DEFINED
44 //                                 = 10- MN: mm (newton)
45 //                 Field 2      -- units description (used for
46 //                                 documentation only)
47 //                 Field 3      -- temperature mode
48 //                                 = 1 - absolute
49 //                                 = 2 - relative
50 // Record 2:       FORMAT(3D25.17)
51 //                 Unit factors for converting universal file units to SI.
52 //                 To convert from universal file units to SI divide by
53 //                 the appropriate factor listed below.
54 //                 Field 1      -- length
55 //                 Field 2      -- force
56 //                 Field 3      -- temperature
57 //                 Field 4      -- temperature offset
58
59 // Example:
60
61 //     -1
62 //    164
63 //          2Foot (pound f)               2
64 //   3.28083989501312334D+00  2.24808943099710480D-01  1.79999999999999999D+00
65 //   4.59670000000000002D+02
66 //     -1
67
68 #include "SMESH_DriverUNV.hxx"
69
70 #include <string>
71
72 namespace UNV164
73 {
74   enum { LENGTH_FACTOR, FORCE_FACTOR, TEMP_FACTOR, TEMP_OFFSET };
75
76   struct MESHDRIVERUNV_EXPORT TRecord
77   {
78     int         units_code;
79     std::string units_description;
80     int         temp_mode;
81     double      factors[4];
82     TRecord();
83   };
84   
85   MESHDRIVERUNV_EXPORT void
86   Read(std::ifstream& in_stream, TRecord& theUnitsRecord);
87
88   MESHDRIVERUNV_EXPORT void
89   Write(std::ofstream& out_stream );
90
91 };
92
93
94 #endif