12 #ifndef ECL_CONTAINERS_ARRAY_FORMATTERS_HPP_ 
   13 #define ECL_CONTAINERS_ARRAY_FORMATTERS_HPP_ 
   24 #include "../common/formatters.hpp" 
   25 #include "../array.hpp" 
   63 template<
typename Type, 
size_t N>
 
   67   virtual ~ArrayFormatter()
 
  106 template<
typename Byte, 
size_t N>
 
  117   ByteArrayFormatter() : ready_to_format(false)
 
  126   ByteArrayFormatter<Byte,N>& operator()(
const Array<Byte,N> &array)
 
  128     begin_iterator = array.begin();
 
  129     end_iterator = array.end();
 
  130     ready_to_format = 
true;
 
  142     begin_iterator = stencil.begin();
 
  143     end_iterator = stencil.end();
 
  144     ready_to_format = 
true;
 
  163     begin_iterator = begin_iter;
 
  164     end_iterator = end_iter;
 
  165     ready_to_format = 
true;
 
  169   virtual ~ByteArrayFormatter()
 
  181   template <
typename OutputStream, 
typename CharType, 
size_t M>
 
  182   friend OutputStream& 
operator << (OutputStream& ostream, 
const ByteArrayFormatter<CharType,M> &formatter);
 
  187   bool ready_to_format;
 
  194 template <
typename OutputStream, 
typename CharType, 
size_t M>
 
  198           "either there is no data available, or you have tried to use the " 
  199           "formatter more than once in a single streaming operation. " 
  200           "C++ produces unspecified results when functors are used multiply " 
  201           "in the same stream sequence, so this is not permitted here.") );
 
  206   for ( iter = formatter.begin_iterator; iter != formatter.end_iterator; ++iter )
 
  208     ostream << format(*iter) << 
" ";
 
  232 class ECL_PUBLIC ArrayFormatter< signed char,N > : 
public ByteArrayFormatter<signed char, N>
 
  249 class ECL_PUBLIC ArrayFormatter< char,N > : 
public ByteArrayFormatter<char, N>
 
  266 class ECL_PUBLIC ArrayFormatter< unsigned char,N > : 
public ByteArrayFormatter<unsigned char, N>
 
  280 class ECL_PUBLIC ArrayFormatter< float,N > : 
public FloatContainerFormatter< Array<float,N> >
 
  291   ArrayFormatter(
const int p=2, 
const int w=-1) : FloatContainerFormatter< Array<float,N> >(p,w)
 
  307 class ECL_PUBLIC ArrayFormatter< double,N > : 
public FloatContainerFormatter< Array<double,N> >
 
  318   ArrayFormatter(
const int p=2, 
const int w=-1) : FloatContainerFormatter< Array<double,N> >(p,w)