1 #ifndef DASH__IO__IOSTREM_H__INCLUDED 2 #define DASH__IO__IOSTREM_H__INCLUDED 45 template<
typename IOSModeType>
51 using UT = std::underlying_type<IOSBaseMode>::type;
63 inline operator IOSModeType()
const {
70 inline operator bool()
const {
71 return _ios_mode != IOSBaseMode::no_flags;
77 _ios_mode |= rhs._ios_mode;
81 inline self_t & operator&=(
const self_t & rhs) {
82 _ios_mode &= rhs._ios_mode;
86 inline self_t & operator^=(
const self_t & rhs) {
87 _ios_mode ^= rhs._ios_mode;
91 inline self_t operator~() {
92 return self_t(~_ios_mode);
95 inline self_t operator|(
const self_t & rhs) {
96 return self_t(static_cast<IOSModeType>(
97 static_cast<UT>(_ios_mode)
98 | static_cast<UT>(rhs._ios_mode))
102 inline self_t operator&(
const self_t & rhs) {
103 return self_t(static_cast<IOSModeType>(
104 static_cast<UT>(_ios_mode)
105 & static_cast<UT>(rhs._ios_mode))
109 inline self_t operator^(
const self_t & rhs) {
110 return self_t(static_cast<IOSModeType>(
111 static_cast<UT>(_ios_mode)
112 ^ static_cast<UT>(rhs._ios_mode))
118 IOSModeType _ios_mode;
175 template<
typename IOSModeType>
185 : _io_stream_mode(IOSBaseMode::no_flags)
190 ios_mode_type _io_stream_mode;
197 #endif // DASH__IO__IOSTREM_H__INCLUDED self_t & operator|=(const self_t &rhs)
Binary operators.
IOStreamMode(IOSModeType ios_base=IOSBaseMode::no_flags)
Constructors.
This class is a simple memory pool which holds allocates elements of size ValueType.
Append: set the stream position to the end of the stream before output operations.
Allow output operations on the stream.
At End: set the stream position to the end of the stream on open.
Truncate: discard content of the stream on open.
Allow input operations on the stream.
IOSBaseMode
Modes defined for all parallel IO devices.
Base type for device-specific IO streams.
Binary: Consider stream as raw data.
Type facade wrapping dash::io::IOSBaseMode and its device-dependent specializations.