Changeset 2339 in Sophya


Ignore:
Timestamp:
Mar 10, 2003, 2:49:04 PM (23 years ago)
Author:
ansari
Message:

Compli avec SGI-CC -LANG:std et remplacement template <> pour SGI-CC par DECL_TEMP_SPEC - Reza 10/03/2003

Location:
trunk/SophyaLib/BaseTools
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/BaseTools/datatype.cc

    r2327 r2339  
    1212{
    1313}
     14/*
    1415#if defined(__SGICC__)
    15 template <class uint_1>
     16template <class T>
     17string DataTypeInfo<T>::getTypeName()
     18{
     19  if (typeid(T) == typeid(uint_1)) return("uint_1");
     20  else if (typeid(T) == typeid(uint_2)) return("uint_2");
     21  else if (typeid(T) == typeid(int_2)) return("int_2");
     22  else if (typeid(T) == typeid(int_4)) return("int_4");
     23  else if (typeid(T) == typeid(int_8)) return("int_8");
     24  else if (typeid(T) == typeid(uint_4)) return("uint_4");
     25  else if (typeid(T) == typeid(uint_8)) return("uint_8");
     26  else if (typeid(T) == typeid(r_4)) return("r_4");
     27  else if (typeid(T) == typeid(r_8)) return("r_8");
     28  else if (typeid(T) == typeid(complex<r_4>)) return(" complex<r_4> ");
     29  else if (typeid(T) == typeid(complex<r_8>)) return(" complex<r_8> ");
     30  else return("???unknowntype???");
     31}
     32#else
     33*/
     34DECL_TEMP_SPEC  /* equivalent a template <> , pour SGI-CC en particulier */
    1635string DataTypeInfo<uint_1>::getTypeName() { return("uint_1"); }
    17 template <class uint_2>
     36DECL_TEMP_SPEC
    1837string DataTypeInfo<uint_2>::getTypeName() { return("uint_2"); }
    19 template <class int_2>
     38DECL_TEMP_SPEC
    2039string DataTypeInfo<int_2>::getTypeName() { return("int_2"); }
    21 template <class int_4>
     40DECL_TEMP_SPEC
    2241string DataTypeInfo<int_4>::getTypeName() { return("int_4"); }
    23 template <class int_8>
     42DECL_TEMP_SPEC
    2443string DataTypeInfo<int_8>::getTypeName() { return("int_8"); }
    25 template <class uint_4>
     44DECL_TEMP_SPEC
    2645string DataTypeInfo<uint_4>::getTypeName() { return("uint_4"); }
    27 template <class uint_8>
     46DECL_TEMP_SPEC
    2847string DataTypeInfo<uint_8>::getTypeName() { return("uint_8"); }
    29 template <class r_4>
     48DECL_TEMP_SPEC
    3049string DataTypeInfo<r_4>::getTypeName() { return("r_4"); }
    31 template <class r_8>
     50DECL_TEMP_SPEC
    3251string DataTypeInfo<r_8>::getTypeName() { return("r_8"); }
    33 template <class complex<r_4> >
     52DECL_TEMP_SPEC
    3453string DataTypeInfo< complex<r_4> >::getTypeName() { return(" complex<r_4> "); }
    35 template <class complex<r_8> >
     54DECL_TEMP_SPEC
    3655string DataTypeInfo< complex<r_8> >::getTypeName() { return(" complex<r_8> "); }
    37 #else
    38 string DataTypeInfo<uint_1>::getTypeName() { return("uint_1"); }
    39 string DataTypeInfo<uint_2>::getTypeName() { return("uint_2"); }
    40 string DataTypeInfo<int_2>::getTypeName() { return("int_2"); }
    41 string DataTypeInfo<int_4>::getTypeName() { return("int_4"); }
    42 string DataTypeInfo<int_8>::getTypeName() { return("int_8"); }
    43 string DataTypeInfo<uint_4>::getTypeName() { return("uint_4"); }
    44 string DataTypeInfo<uint_8>::getTypeName() { return("uint_8"); }
    45 string DataTypeInfo<r_4>::getTypeName() { return("r_4"); }
    46 string DataTypeInfo<r_8>::getTypeName() { return("r_8"); }
    47 string DataTypeInfo< complex<r_4> >::getTypeName() { return(" complex<r_4> "); }
    48 string DataTypeInfo< complex<r_8> >::getTypeName() { return(" complex<r_8> "); }
     56/*
    4957#endif
    50 
     58*/
    5159
    5260string DecodeGCCTypeName(string gcctype)
  • trunk/SophyaLib/BaseTools/dvlist.cc

    r2327 r2339  
    475475
    476476/* --Methode-- */
    477 #if defined(__SGICC__)
    478 template <class DVList>
    479 #endif
     477DECL_TEMP_SPEC  /* equivalent a template <> , pour SGI-CC en particulier */
    480478void        ObjFileIO<DVList>::WriteSelf(POutPersist& s) const
    481479{
     
    529527
    530528/* --Methode-- */
    531 #if defined(__SGICC__)
    532 template <class DVList>
    533 #endif
     529DECL_TEMP_SPEC  /* equivalent a template <> , pour SGI-CC en particulier */
    534530void        ObjFileIO<DVList>::ReadSelf(PInPersist& s)
    535531{
  • trunk/SophyaLib/BaseTools/machdefs_mkmf.h

    r2322 r2339  
    244244/*   HAS_STR_NPOS          : has string::npos and not a global NPOS        */
    245245/*   NO_IOS_COMPLEX        : does not have operator << defined for complex */
     246/*   DECL_TEMP_SPEC        : Template specialization declaration           */
    246247
    247248
     
    262263#define  CC_HAS_RTTI_SUPPORT
    263264#endif
     265
     266
     267#ifndef DECL_TEMP_SPEC
     268#define DECL_TEMP_SPEC
     269#endif
     270
    264271
    265272/* now the specific things */
     
    314321#ifndef ANSI_TEMPLATES
    315322#define ANSI_TEMPLATES
     323#undef  DECL_TEMP_SPEC
     324#define DECL_TEMP_SPEC template <>
    316325#endif
    317326#endif
  • trunk/SophyaLib/BaseTools/pexceptions.cc

    r2322 r2339  
    66
    77// egcs ne semble pas connaitre set_new_handler (Reza 26/04/99)
    8 #ifdef __GNUG__
     8// ca ne passe plus avec SGI-CC -LANG:std $CHECK$ Reza 14/02/2003
     9#if defined( __GNUG__ ) || defined(__SGICC__)
    910void PFailHandler(void) {}
    1011void InitFailNewHandler() {}
Note: See TracChangeset for help on using the changeset viewer.