TF++, Miscellaneous classes and modules in C++:

◆ operator<<() [2/3]

template<class T , int N>
tfxx::fortranio::FortranBinOutput& tfxx::fortranio::operator<< ( tfxx::fortranio::FortranBinOutput fo,
const blitz::Array< T, N > &  a 
)

Output operator template for class FortranBinOutput and blitz.

The compiler will consider namespace tfxx::fortranio due to the involved FortranBinOutput object.

Todo:
still far from finished

Definition at line 120 of file blitzfortranio.h.

References tfxx::fortranio::FortranBinOutput::end_block(), tfxx::fortranio::FortranBinOutput::put(), and tfxx::fortranio::FortranBinOutput::write_magic().

122 {
124  fo.put(N);
125  fo.end_block();
126  for (int i=0; i<N; i++) fo.put(a.lbound(i));
127  fo.end_block();
128  for (int i=0; i<N; i++) fo.put(a.extent(i));
129  fo.end_block();
130  for (blitz::Array<T, N>::const_iterator i=a.begin(); i!=a.end(); ++i)
131  { fo.put(*i); }
132  fo.end_block();
133  return(fo);
134 }
int magic(const char *const cmagic)
Create a magic number from a character string. ,If represents the input character sequence cmagic an...
Definition: ioswap.cc:59
void end_block()
finish data block
Definition: fortranio.cc:155
void write_magic(const char *cmagic)
write magic number (to separate block)
Definition: fortranio.cc:184
void put(const T &value)
put a value to the output
Definition: fortranio.h:253
Here is the call graph for this function: