00001 /* 00002 * Definition of Lorene class Coord 00003 * 00004 */ 00005 00006 /* 00007 * Copyright (c) 1999-2000 Jean-Alain Marck 00008 * Copyright (c) 1999-2001 Eric Gourgoulhon 00009 * 00010 * This file is part of LORENE. 00011 * 00012 * LORENE is free software; you can redistribute it and/or modify 00013 * it under the terms of the GNU General Public License as published by 00014 * the Free Software Foundation; either version 2 of the License, or 00015 * (at your option) any later version. 00016 * 00017 * LORENE is distributed in the hope that it will be useful, 00018 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00020 * GNU General Public License for more details. 00021 * 00022 * You should have received a copy of the GNU General Public License 00023 * along with LORENE; if not, write to the Free Software 00024 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00025 * 00026 */ 00027 00028 00029 #ifndef __COORD_H_ 00030 #define __COORD_H_ 00031 00032 00033 /* 00034 * $Id: coord.h,v 1.5 2004/03/22 13:12:40 j_novak Exp $ 00035 * $Log: coord.h,v $ 00036 * Revision 1.5 2004/03/22 13:12:40 j_novak 00037 * Modification of comments to use doxygen instead of doc++ 00038 * 00039 * Revision 1.4 2003/11/06 14:43:37 e_gourgoulhon 00040 * Gave a name to const arguments in certain method prototypes (e.g. 00041 * constructors) to correct a bug of DOC++. 00042 * 00043 * Revision 1.3 2002/10/16 14:36:28 j_novak 00044 * Reorganization of #include instructions of standard C++, in order to 00045 * use experimental version 3 of gcc. 00046 * 00047 * Revision 1.2 2002/06/17 14:05:16 j_novak 00048 * friend functions are now also declared outside the class definition 00049 * 00050 * Revision 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon 00051 * LORENE 00052 * 00053 * Revision 2.1 1999/10/15 09:15:56 eric 00054 * Depoussierage. 00055 * Documentation. 00056 * 00057 * Revision 2.0 1999/02/15 10:41:51 hyc 00058 * *** empty log message *** 00059 * 00060 * Revision 2.1 1999/02/15 09:59:50 hyc 00061 * *** empty log message *** 00062 * 00063 * Revision 2.0 1999/01/15 09:10:39 hyc 00064 * *** empty log message *** 00065 * 00066 * 00067 * $Header: /cvsroot/Lorene/C++/Include/coord.h,v 1.5 2004/03/22 13:12:40 j_novak Exp $ 00068 * 00069 */ 00070 00071 // Fichier includes 00072 #include <stdlib.h> 00073 #include <stdio.h> 00074 #include "mtbl.h" 00075 00076 class Map ; 00077 00083 class Coord { 00084 00085 // Data : 00086 // ----- 00087 public: 00088 const Map* mp ; 00089 Mtbl* (*met_fait)(const Map* ) ; 00090 mutable Mtbl* c ; 00091 00092 // Constructors, destructor : 00093 // ------------------------ 00094 public: 00095 Coord() ; 00096 00105 Coord(const Map* mp, Mtbl* (*construct)(const Map*) ) ; 00106 00107 00108 private: 00112 Coord(const Coord & ) ; 00113 00114 public: 00115 ~Coord() ; 00116 00117 // Various methods : 00118 // --------------- 00119 00123 private: 00124 void operator=(const Coord& ) ; 00125 00126 public: 00137 void set(const Map* mp, Mtbl* (*construct)(const Map*) ) ; 00138 00144 void fait() const ; 00145 00147 void del_t() const ; 00148 00149 friend ostream& operator<<(ostream& , const Coord& ) ; 00150 00151 } ; 00152 ostream& operator<<(ostream& , const Coord& ) ; 00153 00154 // Prototypage de l'arithmetique 00161 Mtbl operator+(const Coord&) ; 00162 Mtbl operator-(const Coord&) ; 00163 00164 Mtbl operator+(const Coord& a, const Coord& b) ; 00165 Mtbl operator-(const Coord& a, const Coord& b) ; 00166 Mtbl operator*(const Coord& a, const Coord& b) ; 00167 00168 Mtbl operator+(const Coord& a, const Mtbl& b) ; 00169 Mtbl operator-(const Coord& a, const Mtbl& b) ; 00170 Mtbl operator*(const Coord& a, const Mtbl& b) ; 00171 00172 Mtbl operator+(const Mtbl& a, const Coord& b) ; 00173 Mtbl operator-(const Mtbl& a, const Coord& b) ; 00174 Mtbl operator*(const Mtbl& a, const Coord& b) ; 00175 00177 #endif
1.4.6