Changeset 2884 in Sophya
- Timestamp:
- Jan 4, 2006, 2:30:31 PM (20 years ago)
- Location:
- trunk/SophyaLib
- Files:
-
- 2 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/BaseTools/datatype.cc
r2879 r2884 34 34 template <class T> 35 35 string DataTypeInfo<T>::getTypeName() { return("???unknowntype???"); } 36 DECL_TEMP_SPEC 36 37 string DataTypeInfo<uint_1>::getTypeName() { return("uint_1"); } 38 DECL_TEMP_SPEC 37 39 string DataTypeInfo<uint_2>::getTypeName() { return("uint_2"); } 40 DECL_TEMP_SPEC 38 41 string DataTypeInfo<int_2>::getTypeName() { return("int_2"); } 42 DECL_TEMP_SPEC 39 43 string DataTypeInfo<int_4>::getTypeName() { return("int_4"); } 44 DECL_TEMP_SPEC 40 45 string DataTypeInfo<int_8>::getTypeName() { return("int_8"); } 46 DECL_TEMP_SPEC 41 47 string DataTypeInfo<uint_4>::getTypeName() { return("uint_4"); } 48 DECL_TEMP_SPEC 42 49 string DataTypeInfo<uint_8>::getTypeName() { return("uint_8"); } 50 DECL_TEMP_SPEC 43 51 string DataTypeInfo<r_4>::getTypeName() { return("r_4"); } 52 DECL_TEMP_SPEC 44 53 string DataTypeInfo<r_8>::getTypeName() { return("r_8"); } 54 DECL_TEMP_SPEC 45 55 string DataTypeInfo< complex<r_4> >::getTypeName() { return(" complex<r_4> "); } 56 DECL_TEMP_SPEC 46 57 string DataTypeInfo< complex<r_8> >::getTypeName() { return(" complex<r_8> "); } 47 58 #endif -
trunk/SophyaLib/BaseTools/machdefs_mkmf.h
r2867 r2884 222 222 /* __KCC__ : KCC, version >= 3.3 is required */ 223 223 /* __SGICC__ : SGI (IRIX64) CC compiler */ 224 /* __INTEL_COMPILER : : INTEL compiler */ 225 /* __IBMCPP__ : AIX (IBM) xlC c++ compiler */ 224 226 225 227 /***********************************************************************/ 226 228 /* Compiler-specific stuff */ 227 229 /***********************************************************************/ 228 229 /* Some features will be *required* for Planck. Which ones ? */230 230 231 231 /* ANSI_TEMPLATES : use ANSI syntax for explicit templates */ … … 245 245 /* NO_IOS_COMPLEX : does not have operator << defined for complex */ 246 246 /* DECL_TEMP_SPEC : Template specialization declaration */ 247 /* TSNMLUPG4 : Two stage name look-up scheme (g++>3.4) */ 247 248 248 249 … … 269 270 #endif 270 271 272 /* Most compilers dot not implement two level name lookup for templates 273 introduced by gcc >= 3.4 274 */ 275 #ifdef TSNMLUPG4 276 #undef TSNMLUPG4 277 #endif 271 278 272 279 /* now the specific things */ … … 284 291 285 292 #ifdef __GNUG__ 293 #define GCC_VERSION (__GNUC__ * 10000 \ 294 + __GNUC_MINOR__ * 100 \ 295 + __GNUC_PATCHLEVEL__) 286 296 #define ANSI_TEMPLATES 287 297 /* … … 294 304 #define HAS_IOS_BIN 295 305 #define HAS_IOS_NOCREATE 306 #if ( GCC_VERSION >= 30000 ) 307 #undef DECL_TEMP_SPEC 308 #define DECL_TEMP_SPEC template <> 309 #endif 310 #if ( GCC_VERSION >= 34000 ) 311 /* Two level name look-up scheme for templates introduced from gcc 3.4 */ 312 #define TSNMLUPG4 313 #endif 314 296 315 #endif 297 316 -
trunk/SophyaLib/BaseTools/mutyv.cc
r2826 r2884 150 150 151 151 /* --Methode-- */ 152 string & MuTyV::Convert(string & x) const 153 { 154 if (typ == MTVString) x = *strv; 155 else if (typ == MTVTimeStamp) { x = TimeStamp(dv).ToString(); } 156 else { 157 char buff[96]; 158 if (typ == MTVInteger) sprintf(buff,"%ld", (long)iv); 159 else if (typ == MTVFloat) sprintf(buff,"%g", dv); 160 else if (typ == MTVComplex) sprintf(buff,"(%g,%g)", dv, dv_im); 161 else buff[0] = '\0'; 162 x = buff; 163 } 164 return x; 165 } 166 167 /* --Methode-- */ 152 168 MuTyV::operator TimeStamp() const 153 169 { 154 170 return TimeStamp(dv); 171 } 172 173 /* --Methode-- */ 174 TimeStamp& MuTyV::Convert(TimeStamp& x) const 175 { 176 x = TimeStamp(dv); 177 return x; 155 178 } 156 179 -
trunk/SophyaLib/BaseTools/mutyv.h
r2826 r2884 77 77 operator TimeStamp() const ; 78 78 79 inline uint_2 Convert(uint_2& x) const { x = (uint_2)iv; return x; } 80 inline uint_4 Convert(uint_4& x) const { x = (uint_4)iv; return x; } 81 inline uint_8 Convert(uint_8& x) const { x = (uint_8)iv; return x; } 82 inline int_4 Convert(int_4& x) const { x = (int_4)iv; return x; } 83 inline int_8 Convert(int_8& x) const { x = iv; return x; } 84 inline r_4 Convert(r_4& x) const { x = (r_4)dv; return x; } 85 inline r_8 Convert(r_8& x) const { x = dv; return x; } 86 inline complex<r_4> Convert(complex<r_4> & x) const 87 { x = complex< r_4 > ((r_4)dv, (r_4)dv_im); return x; } 88 inline complex<r_8> Convert(complex<r_8> & x) const 89 { x = complex< r_8 > (dv, dv_im); return x; } 90 91 string& Convert(string& x) const ; 92 TimeStamp& Convert(TimeStamp& x) const ; 93 79 94 inline MTVType Type() const { return typ; } 80 95 inline int_8 GetIntPart() const { return iv; } -
trunk/SophyaLib/BaseTools/segdatablock.h
r2805 r2884 91 91 { 92 92 SegDataBlock<T> * sdb = dynamic_cast< SegDataBlock<T> *>(&a); 93 if ( p!= NULL) {94 mSRef = p->mSRef;93 if (sdb != NULL) { 94 mSRef = sdb->mSRef; 95 95 mSRef->nref++; 96 96 } -
trunk/SophyaLib/TArray/tarray.cc
r2868 r2884 476 476 --- Appel explicite de l'operateur de conversion sur l'objet MuTyV 477 477 */ 478 for(k=0; k<gpas; k++) pe[k*step] = seq(j*gpas+k).operator T(); 478 for(k=0; k<gpas; k++) seq(j*gpas+k).Convert(pe[k*step]); 479 //REMPLACE suite pb compil gcc4 for(k=0; k<gpas; k++) pe[k*step] = seq(j*gpas+k).operator T(); 479 480 } 480 481 return(*this); … … 1113 1114 */ 1114 1115 for(k=0, ka=0; k<gpas; k+=step, ka+=stepa) 1115 pe[k] = a.ValueAtPosition(offa+ka).operator T(); 1116 a.ValueAtPosition(offa+ka).Convert(pe[k]); 1117 //REMPLACE Suite pb compil gcc4 pe[k] = a.ValueAtPosition(offa+ka).operator T(); 1116 1118 } 1117 1119 return(*this); -
trunk/SophyaLib/TArray/tmatrix.h
r2752 r2884 13 13 class TMatrix : public TArray<T> { 14 14 public: 15 16 #include "tmatrix_tsnl.h" /* For two level name look-up gcc >= 3.4 */ 17 15 18 // Creation / destruction 16 19 TMatrix(); -
trunk/SophyaLib/TArray/tvector.h
r2868 r2884 12 12 class TVector : public TMatrix<T> { 13 13 public: 14 15 #include "tvector_tsnl.h" /* For two level name look-up gcc >= 3.4 */ 16 14 17 // Creation / destruction 15 18 TVector();
Note:
See TracChangeset
for help on using the changeset viewer.