00001 /* 00002 * Methods of class Eos_Compstar 00003 * 00004 * (see file eos_tabul.h for documentation). 00005 * 00006 */ 00007 00008 /* 00009 * Copyright (c) 2010 Jerome Novak 00010 * 00011 * This file is part of LORENE. 00012 * 00013 * LORENE is free software; you can redistribute it and/or modify 00014 * it under the terms of the GNU General Public License as published by 00015 * the Free Software Foundation; either version 2 of the License, or 00016 * (at your option) any later version. 00017 * 00018 * LORENE is distributed in the hope that it will be useful, 00019 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00020 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00021 * GNU General Public License for more details. 00022 * 00023 * You should have received a copy of the GNU General Public License 00024 * along with LORENE; if not, write to the Free Software 00025 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00026 * 00027 */ 00028 00029 00030 char eos_compstar_C[] = "$Header: /cvsroot/Lorene/C++/Source/Eos/eos_compstar.C,v 1.1 2010/02/03 14:56:45 j_novak Exp $" ; 00031 00032 /* 00033 * $Id: eos_compstar.C,v 1.1 2010/02/03 14:56:45 j_novak Exp $ 00034 * $Log: eos_compstar.C,v $ 00035 * Revision 1.1 2010/02/03 14:56:45 j_novak 00036 * *** empty log message *** 00037 * 00038 * 00039 * $Header: /cvsroot/Lorene/C++/Source/Eos/eos_compstar.C,v 1.1 2010/02/03 14:56:45 j_novak Exp $ 00040 * 00041 */ 00042 00043 // Headers Lorene 00044 #include "headcpp.h" 00045 #include "eos.h" 00046 00047 //----------------------------// 00048 // Constructors // 00049 //----------------------------// 00050 00051 // Standard constructor 00052 // -------------------- 00053 Eos_Compstar::Eos_Compstar(const char* file_name) 00054 : Eos_tabul("EOS Compstar", file_name) 00055 {} 00056 00057 00058 // Constructor from binary file 00059 // ---------------------------- 00060 Eos_Compstar::Eos_Compstar(FILE* fich) : Eos_tabul(fich) {} 00061 00062 00063 00064 // Constructor from a formatted file 00065 // --------------------------------- 00066 Eos_Compstar::Eos_Compstar(ifstream& fich) : Eos_tabul(fich) 00067 {} 00068 00069 00070 00071 //--------------// 00072 // Destructor // 00073 //--------------// 00074 00075 Eos_Compstar::~Eos_Compstar(){ 00076 00077 // does nothing 00078 00079 } 00080 00081 00082 //------------------------// 00083 // Comparison operators // 00084 //------------------------// 00085 00086 00087 bool Eos_Compstar::operator==(const Eos& eos_i) const { 00088 00089 bool resu = true ; 00090 00091 if ( eos_i.identify() != identify() ) { 00092 cout << "The second EOS is not of type Eos_Compstar !" << endl ; 00093 resu = false ; 00094 } 00095 00096 return resu ; 00097 00098 } 00099 00100 bool Eos_Compstar::operator!=(const Eos& eos_i) const { 00101 00102 return !(operator==(eos_i)) ; 00103 00104 } 00105 00106 //------------// 00107 // Outputs // 00108 //------------// 00109 00110 00111 ostream& Eos_Compstar::operator>>(ostream & ost) const { 00112 00113 ost << 00114 "EOS of class Eos_Compstar : tabulated EOS for the 2010 CompStar school." 00115 << endl ; 00116 00117 return ost ; 00118 00119 } 00120 00121
1.4.6