Back to index

salome-smesh  6.5.0
UNV164_Structure.hxx
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 #ifndef UNV164_Structure_HeaderFile
00024 #define UNV164_Structure_HeaderFile
00025 
00026 // Universal Dataset Number: 164
00027 // Name:   Units
00028 // Status: Current
00029 // Owner:  General
00030 // Revision Date: 19-AUG-1987
00031 // -----------------------------------------------------------------------
00032 
00033 // Record 1:       FORMAT(I10,20A1,I10)
00034 //                 Field 1      -- units code
00035 //                                 = 1 - SI: Meter (newton)
00036 //                                 = 2 - BG: Foot (pound f)
00037 //                                 = 3 - MG: Meter (kilogram f)
00038 //                                 = 4 - BA: Foot (poundal)
00039 //                                 = 5 - MM: mm (milli newton)
00040 //                                 = 6 - CM: cm (centi newton)
00041 //                                 = 7 - IN: Inch (pound f)
00042 //                                 = 8 - GM: mm (kilogram f)
00043 //                                 = 9 - US: USER_DEFINED
00044 //                                 = 10- MN: mm (newton)
00045 //                 Field 2      -- units description (used for
00046 //                                 documentation only)
00047 //                 Field 3      -- temperature mode
00048 //                                 = 1 - absolute
00049 //                                 = 2 - relative
00050 // Record 2:       FORMAT(3D25.17)
00051 //                 Unit factors for converting universal file units to SI.
00052 //                 To convert from universal file units to SI divide by
00053 //                 the appropriate factor listed below.
00054 //                 Field 1      -- length
00055 //                 Field 2      -- force
00056 //                 Field 3      -- temperature
00057 //                 Field 4      -- temperature offset
00058 
00059 // Example:
00060 
00061 //     -1
00062 //    164
00063 //          2Foot (pound f)               2
00064 //   3.28083989501312334D+00  2.24808943099710480D-01  1.79999999999999999D+00
00065 //   4.59670000000000002D+02
00066 //     -1
00067 
00068 #include "SMESH_DriverUNV.hxx"
00069 
00070 #include <string>
00071 
00072 namespace UNV164
00073 {
00074   enum { LENGTH_FACTOR, FORCE_FACTOR, TEMP_FACTOR, TEMP_OFFSET };
00075 
00076   struct MESHDRIVERUNV_EXPORT TRecord
00077   {
00078     int         units_code;
00079     std::string units_description;
00080     int         temp_mode;
00081     double      factors[4];
00082     TRecord();
00083   };
00084   
00085   MESHDRIVERUNV_EXPORT void
00086   Read(std::ifstream& in_stream, TRecord& theUnitsRecord);
00087 
00088   MESHDRIVERUNV_EXPORT void
00089   Write(std::ofstream& out_stream );
00090 
00091 };
00092 
00093 
00094 #endif