TF++, Miscellaneous classes and modules in C++:
complexio.h
Go to the documentation of this file.
1 
39 // include guard
40 #ifndef TF_COMPLEXIO_H_VERSION
41 
42 #define TF_COMPLEXIO_H_VERSION \
43  "TF_COMPLEXIO_H V1.1"
44 
45 #include<complex>
46 #include<tfxx/fortranio.h>
47 
48 namespace tfxx {
49 
56  namespace fortranio {
57 
58 
70  template<typename T>
73  const std::complex<T>& value)
74  {
75  fo.put(value.real());
76  fo.put(value.imag());
77  return(fo);
78  }
79 
91  template<typename T>
94  std::complex<T>& value)
95  {
96  T rvalue,ivalue;
97  fi.get(rvalue);
98  fi.get(ivalue);
99  value=std::complex<T>(rvalue, ivalue);
100  return(fi);
101  }
102 
103  } // namespace fortranio
104 
105 }
106 
107 #endif // TF_COMPLEXIO_H_VERSION (includeguard)
108 
109 /* ----- END OF complexio.h ----- */
write FORTRAN binary data ,This class writes FORTRAN binary data. FORTRAN binary data is always writt...
Definition: fortranio.h:200
tfxx::fortranio::FortranBinOutput & operator<<(tfxx::fortranio::FortranBinOutput &fo, const blitz::Array< T, N > &a)
Output operator template for class FortranBinOutput and blitz.
tfxx::fortranio::FortranBinInput & operator>>(tfxx::fortranio::FortranBinInput &fi, blitz::Array< T, N > &a)
Input operator template for class FortranBinInput and blitz.
read FORTRAN binary data ,This class reads FORTRAN binary data. FORTRAN binary data is always written...
Definition: fortranio.h:137
void put(const T &value)
put a value to the output
Definition: fortranio.h:253
Namespace containing all code of library libtfxx.