1 #ifndef DUNE_FEM_STREAMS_INLINE_HH 2 #define DUNE_FEM_STREAMS_INLINE_HH 7 #include <dune/common/array.hh> 8 #include <dune/common/fvector.hh> 18 template<
class Traits >
19 inline OutStreamInterface< Traits > &
20 operator<< ( OutStreamInterface< Traits > &out,
23 out.writeDouble( value );
27 template<
class Traits >
29 operator<< ( OutStreamInterface< Traits > &out,
36 template<
class Traits >
38 operator<< ( OutStreamInterface< Traits > &out,
45 template<
class Traits >
47 operator<< ( OutStreamInterface< Traits > &out,
54 template<
class Traits >
56 operator<< ( OutStreamInterface< Traits > &out,
63 template<
class Traits >
65 operator<< ( OutStreamInterface< Traits > &out,
66 const std :: string &s )
72 template<
class Traits >
74 operator<< ( OutStreamInterface< Traits > &out,
75 const unsigned int value )
81 template<
class Traits,
class T >
83 operator<< ( OutStreamInterface< Traits > &out,
84 const std::complex<T> value )
91 template <
class u
longint,
class u
int64>
97 template <
class Traits >
99 const UnsignedLongIntType& value )
103 assert(
sizeof(ulongint) <=
sizeof(uint64) );
104 uint64 value64 = value ;
108 template <
class Traits >
110 UnsignedLongIntType& value )
112 assert(
sizeof(ulongint) <=
sizeof(uint64) );
121 template <
class u
longint>
125 template <
class Traits >
129 DUNE_THROW(NotImplemented,
"method not implemented");
132 template <
class Traits >
136 DUNE_THROW(NotImplemented,
"method not implemented");
140 template<
class Traits >
142 operator<< ( OutStreamInterface< Traits > &out,
143 const uint64_t value )
149 template<
class Traits >
151 operator<< ( OutStreamInterface< Traits > &out,
158 template<
class Traits,
class T, std::
size_t N >
160 operator<< ( OutStreamInterface< Traits > &out,
const std::array< T, N > &value )
162 for( std::size_t i = 0; i < N; ++i )
167 template<
class Traits,
class T,
int N >
169 operator<< ( OutStreamInterface< Traits > &out,
const Dune::FieldVector< T, N > &value )
171 for(
int i = 0; i < N; ++i )
176 template<
class Traits,
class T,
class A >
178 operator<< ( OutStreamInterface< Traits > &out,
179 const std::vector< T, A > & value )
181 const size_t size = value.size();
183 for(
size_t i = 0; i < size; ++i )
188 template<
class Traits >
197 template<
class Traits >
206 template<
class Traits >
215 template<
class Traits >
224 template<
class Traits >
233 template<
class Traits >
242 template<
class Traits >
245 unsigned int &value )
251 template<
class Traits >
260 template<
class Traits >
269 template<
class Traits,
class T, std::
size_t N >
273 for( std::size_t i = 0; i < N; ++i )
278 template<
class Traits,
class T,
int N >
282 for(
int i = 0; i < N; ++i )
287 template<
class Traits,
class T >
290 std::complex<T> &value )
295 value = std::complex<T>(r,i);
299 template<
class Traits,
class T,
class A >
302 std::vector< T, A > & value )
306 value.resize( size );
307 for(
size_t i = 0; i < size; ++i )
316 #endif // #ifndef DUNE_FEM_STREAMS_INLINE_HH void readBool(bool &value)
read a bool from the stream
Definition: streams.hh:282
double imag(const std::complex< Double > &x)
Definition: double.hh:900
void writeDouble(const double value)
write a double to the stream
Definition: streams.hh:78
static void read(InStreamInterface< Traits > &in, UnsignedLongIntType &value)
Definition: streams_inline.hh:133
static void write(OutStreamInterface< Traits > &out, const UnsignedLongIntType &value)
Definition: streams_inline.hh:98
InStreamInterface< StreamTraits > & operator>>(InStreamInterface< StreamTraits > &in, DiscreteFunctionInterface< Impl > &df)
read a discrete function from an input stream
Definition: discretefunction_inline.hh:395
ulongint UnsignedLongIntType
Definition: streams_inline.hh:95
void writeUnsignedInt64(uint64_t value)
write an uint64_t to the stream
Definition: streams.hh:141
void writeBool(const bool value)
write a bool to the stream
Definition: streams.hh:114
void writeChar(const char value)
write a char to the stream
Definition: streams.hh:105
void readUnsignedInt64(uint64_t &value)
read an uint64_t from the stream
Definition: streams.hh:331
void writeInt(const int value)
write an int to the stream
Definition: streams.hh:96
Definition: coordinate.hh:4
abstract interface for an input stream
Definition: streams.hh:177
void readString(std::string &s)
read a string from the stream
Definition: streams.hh:302
void readUnsignedInt(unsigned int &value)
read an unsigned int from the stream
Definition: streams.hh:311
Definition: streams_inline.hh:92
void readChar(char &value)
read a char from the stream
Definition: streams.hh:261
void readFloat(float &value)
read a float from the stream
Definition: streams.hh:221
double real(const std::complex< Double > &x)
Definition: double.hh:890
void readDouble(double &value)
read a double from the stream
Definition: streams.hh:201
static void write(OutStreamInterface< Traits > &out, const UnsignedLongIntType value)
Definition: streams_inline.hh:126
void writeString(const std::string &s)
write a string to the stream
Definition: streams.hh:123
void writeUnsignedInt(unsigned int value)
write an unsigned int to the stream
Definition: streams.hh:132
static void read(InStreamInterface< Traits > &in, UnsignedLongIntType &value)
Definition: streams_inline.hh:109
void readInt(int &value)
read an int from the stream
Definition: streams.hh:241
abstract interface for an output stream
Definition: streams.hh:44
void writeFloat(const float value)
write a float to the stream
Definition: streams.hh:87