DNA Calib 1.1
Project brief
Public Member Functions | Private Attributes | List of all members
trio::StreamScope Class Reference

#include <StreamScope.h>

Collaboration diagram for trio::StreamScope:
Collaboration graph

Public Member Functions

 StreamScope (Controllable *stream_)
 
 ~StreamScope ()
 
 StreamScope (const StreamScope &)=delete
 
StreamScopeoperator= (const StreamScope &)=delete
 
 StreamScope (StreamScope &&rhs) noexcept
 
StreamScopeoperator= (StreamScope &&rhs) noexcept
 

Private Attributes

Controllablestream
 

Constructor & Destructor Documentation

◆ StreamScope() [1/3]

trio::StreamScope::StreamScope ( Controllable stream_)
inlineexplicit
13 : stream{stream_} {
14 stream->open();
15 }
virtual void open()=0
Open access to the stream.
Controllable * stream
Definition: StreamScope.h:36

References trio::Openable::open(), and stream.

◆ ~StreamScope()

trio::StreamScope::~StreamScope ( )
inline
17 {
18 if (stream != nullptr) {
19 stream->close();
20 }
21 }
virtual void close()=0
Close access to the stream.

References trio::Closeable::close(), and stream.

◆ StreamScope() [2/3]

trio::StreamScope::StreamScope ( const StreamScope )
delete

◆ StreamScope() [3/3]

trio::StreamScope::StreamScope ( StreamScope &&  rhs)
inlinenoexcept
26 : stream{nullptr} {
27 std::swap(stream, rhs.stream);
28 }

Member Function Documentation

◆ operator=() [1/2]

StreamScope & trio::StreamScope::operator= ( const StreamScope )
delete

◆ operator=() [2/2]

StreamScope & trio::StreamScope::operator= ( StreamScope &&  rhs)
inlinenoexcept
30 {
31 std::swap(stream, rhs.stream);
32 return *this;
33 }

References stream.

Member Data Documentation

◆ stream

Controllable* trio::StreamScope::stream
private

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