X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FDriverUNV%2FUNV164_Structure.hxx;fp=src%2FDriverUNV%2FUNV164_Structure.hxx;h=e01a6e30ce7f45d85823b23ccd59f4188dc95755;hb=bd4e115a78b52e3fbc016e5e30bb0e19b2a9e7d6;hp=0000000000000000000000000000000000000000;hpb=0635c9fc80f67d1e5dc0e94ec85f487286a92070;p=modules%2Fsmesh.git diff --git a/src/DriverUNV/UNV164_Structure.hxx b/src/DriverUNV/UNV164_Structure.hxx new file mode 100644 index 000000000..e01a6e30c --- /dev/null +++ b/src/DriverUNV/UNV164_Structure.hxx @@ -0,0 +1,94 @@ +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +#ifndef UNV164_Structure_HeaderFile +#define UNV164_Structure_HeaderFile + +// Universal Dataset Number: 164 +// Name: Units +// Status: Current +// Owner: General +// Revision Date: 19-AUG-1987 +// ----------------------------------------------------------------------- + +// Record 1: FORMAT(I10,20A1,I10) +// Field 1 -- units code +// = 1 - SI: Meter (newton) +// = 2 - BG: Foot (pound f) +// = 3 - MG: Meter (kilogram f) +// = 4 - BA: Foot (poundal) +// = 5 - MM: mm (milli newton) +// = 6 - CM: cm (centi newton) +// = 7 - IN: Inch (pound f) +// = 8 - GM: mm (kilogram f) +// = 9 - US: USER_DEFINED +// = 10- MN: mm (newton) +// Field 2 -- units description (used for +// documentation only) +// Field 3 -- temperature mode +// = 1 - absolute +// = 2 - relative +// Record 2: FORMAT(3D25.17) +// Unit factors for converting universal file units to SI. +// To convert from universal file units to SI divide by +// the appropriate factor listed below. +// Field 1 -- length +// Field 2 -- force +// Field 3 -- temperature +// Field 4 -- temperature offset + +// Example: + +// -1 +// 164 +// 2Foot (pound f) 2 +// 3.28083989501312334D+00 2.24808943099710480D-01 1.79999999999999999D+00 +// 4.59670000000000002D+02 +// -1 + +#include "SMESH_DriverUNV.hxx" + +#include + +namespace UNV164 +{ + enum { LENGTH_FACTOR, FORCE_FACTOR, TEMP_FACTOR, TEMP_OFFSET }; + + struct MESHDRIVERUNV_EXPORT TRecord + { + int units_code; + std::string units_description; + int temp_mode; + double factors[4]; + TRecord(); + }; + + MESHDRIVERUNV_EXPORT void + Read(std::ifstream& in_stream, TRecord& theUnitsRecord); + + MESHDRIVERUNV_EXPORT void + Write(std::ofstream& out_stream ); + +}; + + +#endif