Salome HOME
compatibility windows compilation with cmake
[modules/smesh.git] / src / MEFISTO2 / Rn.h
index 2bf72bc7b312171b31247f6c31de6adab21dca04..63c6ec26640f6493d403fe2a6daac90852c03eb4 100755 (executable)
@@ -1,6 +1,6 @@
 //  MEFISTO :  library to compute 2D triangulation from segmented boundaries
 //
-//  Copyright (C) 2003  Laboratoire J.-L. Lions UPMC Paris
+//  Copyright (C) 2006  Laboratoire J.-L. Lions UPMC Paris
 // 
 //  This library is free software; you can redistribute it and/or 
 //  modify it under the terms of the GNU Lesser General Public 
@@ -23,7 +23,7 @@
 //  File   : Rn.h
 //  Module : SMESH
 //  Authors: Frederic HECHT & Alain PERRONNET
-//
+//  Date   : 13 novembre 2006
 
 #ifndef Rn__h
 #define Rn__h
@@ -41,7 +41,6 @@
 #include <iostream>
 #include <cmath>
 
-using namespace std;
 
 template<class T> inline T Abs (const T &a){return a <0 ? -a : a;}
 template<class T> inline void Echange (T& a,T& b) {T c=a;a=b;b=c;}
@@ -63,11 +62,19 @@ typedef char Nom[1+24];
 
 //le type N des nombres entiers positifs
 //=========
+#ifndef PCLINUX64
 typedef unsigned long int N;
+#else 
+typedef unsigned int N;
+#endif
 
 //le type Z des nombres entiers relatifs
 //=========
+#ifndef PCLINUX64
 typedef long int Z;
+#else
+typedef int Z;
+#endif
 
 //le type R des nombres "reels"
 //=========
@@ -81,14 +88,14 @@ typedef double R;
 //============
 class R2 
 {
-  friend ostream& operator << (ostream& f, const R2 & P)
+  friend std::ostream& operator << (std::ostream& f, const R2 & P)
   { f << P.x << ' ' << P.y ; return f; }
-  friend istream& operator >> (istream& f, R2 & P)
+  friend std::istream& operator >> (std::istream& f, R2 & P)
   { f >> P.x >> P.y ; return f; }
 
-  friend ostream& operator << (ostream& f, const R2 * P)
+  friend std::ostream& operator << (std::ostream& f, const R2 * P)
   { f << P->x << ' ' << P->y ; return f; }
-  friend istream& operator >> (istream& f, R2 * P)
+  friend std::istream& operator >> (std::istream& f, R2 * P)
   { f >> P->x >> P->y ; return f; }
 
 public:
@@ -120,14 +127,14 @@ public:
 //============
 class R3
 {
-  friend ostream& operator << (ostream& f, const R3 & P)
+  friend std::ostream& operator << (std::ostream& f, const R3 & P)
   { f << P.x << ' ' << P.y << ' ' << P.z ; return f; }
-  friend istream& operator >> (istream& f, R3 & P)
+  friend std::istream& operator >> (std::istream& f, R3 & P)
   { f >> P.x >> P.y >> P.z ; return f; }
 
-  friend ostream& operator << (ostream& f, const R3 * P)
+  friend std::ostream& operator << (std::ostream& f, const R3 * P)
   { f << P->x << ' ' << P->y << ' ' << P->z ; return f; }
-  friend istream& operator >> (istream& f, R3 * P)
+  friend std::istream& operator >> (std::istream& f, R3 * P)
   { f >> P->x >> P->y >> P->z ; return f; }
 
 public:  
@@ -173,12 +180,12 @@ public:
 //============
 class R4: public R3
 {
-  friend ostream& operator <<(ostream& f, const R4 & P )
+  friend std::ostream& operator <<(std::ostream& f, const R4 & P )
   { f << P.x << ' ' << P.y << ' ' << P.z << ' ' << P.omega; return f; }
   friend istream& operator >>(istream& f,  R4 & P)
   { f >> P.x >>  P.y >>  P.z >> P.omega ; return f; }
 
-  friend ostream& operator <<(ostream& f, const R4 * P )
+  friend std::ostream& operator <<(std::ostream& f, const R4 * P )
   { f << P->x << ' ' << P->y << ' ' << P->z << ' ' << P->omega; return f; }
   friend istream& operator >>(istream& f,  R4 * P)
   { f >> P->x >>  P->y >>  P->z >> P->omega ; return f; }