DASH  0.3.0
dash::io::IOSBase< IOSModeType > Class Template Reference

Base type for device-specific IO streams. More...

#include <IOStream.h>

Public Types

typedef IOStreamMode< IOSModeType > ios_mode_type
 

Detailed Description

template<typename IOSModeType>
class dash::io::IOSBase< IOSModeType >

Base type for device-specific IO streams.

Implemented concept:
DashIOConcept

An IO stream implementation for a specific device defines its modes by extending dash::io::IOSBaseMode and uses these to define type specializations of dash::io::IOStreamMode and dash::io::IOSBase.

Example:

enum class MyDeviceModes : public dash::io::IOSBaseMode {
// device-specific modes:
mydevice_foo_mode_ = 1 << 8,
mydevice_bar_mode_ = 1 << 9
}
MyDeviceStreamMode;
class MyDeviceStream
: public dash::io::IOSBase<MyDeviceStreamMode> {
private:
typedef MyDeviceStream self_t;
typedef MyDeviceStreamMode mode_t;
public:
// ...
// Device-specific stream mode modifiers:
inline mode_t setfoo(mode_t foo) {
this->_ios_stream_mode |= foo;
}
inline mode_t setbar(mode_t bar) {
this->_ios_stream_mode |= bar;
}
inline mode_t foo() {
return this->_ios_stream_mode & mode_t::foo;
}
inline mode_t bar() {
return this->_ios_stream_mode & mode_t::bar;
}
};

Definition at line 176 of file IOStream.h.


The documentation for this class was generated from the following file: