Direct-BT v3.3.0-1-gc2d430c
Direct-BT - Direct Bluetooth Programming.
Public Member Functions | Protected Member Functions | List of all members
jau::io::iostate_func Class Reference

Supporting std::basic_ios's iostate functionality for all ByteInStream implementations. More...

#include <byte_stream.hpp>

Inheritance diagram for jau::io::iostate_func:
Collaboration diagram for jau::io::iostate_func:

Public Member Functions

 iostate_func () noexcept
 
 iostate_func (const iostate_func &o) noexcept=default
 
 iostate_func (iostate_func &&o) noexcept=default
 
virtual ~iostate_func () noexcept=default
 
bool bad () const noexcept
 Checks if a non-recoverable error has occurred. More...
 
virtual void clear (const iostate state=iostate::goodbit) noexcept
 Clears state flags by assignment to the given value. More...
 
bool eof () const noexcept
 Checks if end-of-file has been reached. More...
 
bool fail () const noexcept
 Checks if an error has occurred. More...
 
bool good () const noexcept
 Checks if no error nor eof() has occurred i.e. More...
 
 operator bool () const noexcept
 Checks if no error has occurred, synonym of !fail(). More...
 
bool operator! () const noexcept
 Checks if an error has occurred, synonym of fail(). More...
 
iostate_funcoperator= (const iostate_func &o) noexcept=default
 
iostate_funcoperator= (iostate_func &&o) noexcept=default
 
virtual iostate rdstate () const noexcept
 Returns the current state flags. More...
 
void setstate (const iostate state) noexcept
 Sets state flags, by keeping its previous bits. More...
 
bool timeout () const noexcept
 Checks if a timeout (non-recoverable) has occurred. More...
 

Protected Member Functions

constexpr iostate rdstate_impl () const noexcept
 
constexpr void setstate_impl (iostate state) const noexcept
 

Detailed Description

Supporting std::basic_ios's iostate functionality for all ByteInStream implementations.

Definition at line 110 of file byte_stream.hpp.

Constructor & Destructor Documentation

◆ iostate_func() [1/3]

jau::io::iostate_func::iostate_func ( )
inlinenoexcept

Definition at line 119 of file byte_stream.hpp.

◆ iostate_func() [2/3]

jau::io::iostate_func::iostate_func ( const iostate_func o)
defaultnoexcept

◆ iostate_func() [3/3]

jau::io::iostate_func::iostate_func ( iostate_func &&  o)
defaultnoexcept

◆ ~iostate_func()

virtual jau::io::iostate_func::~iostate_func ( )
virtualdefaultnoexcept

Member Function Documentation

◆ rdstate_impl()

constexpr iostate jau::io::iostate_func::rdstate_impl ( ) const
inlineconstexprprotectednoexcept

Definition at line 115 of file byte_stream.hpp.

Here is the caller graph for this function:

◆ setstate_impl()

constexpr void jau::io::iostate_func::setstate_impl ( iostate  state) const
inlineconstexprprotectednoexcept

Definition at line 116 of file byte_stream.hpp.

Here is the caller graph for this function:

◆ operator=() [1/2]

iostate_func & jau::io::iostate_func::operator= ( const iostate_func o)
defaultnoexcept

◆ operator=() [2/2]

iostate_func & jau::io::iostate_func::operator= ( iostate_func &&  o)
defaultnoexcept

◆ clear()

virtual void jau::io::iostate_func::clear ( const iostate  state = iostate::goodbit)
inlinevirtualnoexcept

Clears state flags by assignment to the given value.

Reimplemented in jau::io::ByteInStream_Recorder.

Definition at line 130 of file byte_stream.hpp.

Here is the caller graph for this function:

◆ rdstate()

virtual iostate jau::io::iostate_func::rdstate ( ) const
inlinevirtualnoexcept

Returns the current state flags.

Method is marked virtual to allow implementations with asynchronous resources to determine or update the current iostate.

Method is used throughout all query members and setstate(), hence they all will use the updated state from a potential override implementation.

Reimplemented in jau::io::ByteInStream_URL, jau::io::ByteInStream_Feed, and jau::io::ByteInStream_Recorder.

Definition at line 141 of file byte_stream.hpp.

Here is the caller graph for this function:

◆ setstate()

void jau::io::iostate_func::setstate ( const iostate  state)
inlinenoexcept

Sets state flags, by keeping its previous bits.

Definition at line 144 of file byte_stream.hpp.

◆ good()

bool jau::io::iostate_func::good ( ) const
inlinenoexcept

Checks if no error nor eof() has occurred i.e.

I/O operations are available.

Definition at line 147 of file byte_stream.hpp.

Here is the caller graph for this function:

◆ eof()

bool jau::io::iostate_func::eof ( ) const
inlinenoexcept

Checks if end-of-file has been reached.

Definition at line 151 of file byte_stream.hpp.

◆ fail()

bool jau::io::iostate_func::fail ( ) const
inlinenoexcept

Checks if an error has occurred.

Definition at line 155 of file byte_stream.hpp.

Here is the caller graph for this function:

◆ operator!()

bool jau::io::iostate_func::operator! ( ) const
inlinenoexcept

Checks if an error has occurred, synonym of fail().

Definition at line 159 of file byte_stream.hpp.

◆ operator bool()

jau::io::iostate_func::operator bool ( ) const
inlineexplicitnoexcept

Checks if no error has occurred, synonym of !fail().

Definition at line 162 of file byte_stream.hpp.

◆ bad()

bool jau::io::iostate_func::bad ( ) const
inlinenoexcept

Checks if a non-recoverable error has occurred.

Definition at line 165 of file byte_stream.hpp.

◆ timeout()

bool jau::io::iostate_func::timeout ( ) const
inlinenoexcept

Checks if a timeout (non-recoverable) has occurred.

Definition at line 169 of file byte_stream.hpp.


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