C++ edjLibrary SDK
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
edjx::stream::BaseStream Class Reference

This is a base class for the streams. More...

#include <stream.hpp>

Inheritance diagram for edjx::stream::BaseStream:
edjx::stream::ReadStream edjx::stream::WriteStream

Public Member Functions

 BaseStream ()
 Constructs a new empty Base Stream object. More...
 
 BaseStream (uint32_t sd)
 Constructs a new initilized Base Stream object. More...
 
uint32_t get_sd () const
 Get the stream descriptor of the stream. More...
 
bool is_initialized () const
 Check whether the stream object has been initialized or not. More...
 
edjx::error::StreamError close ()
 Close the stream. More...
 

Protected Attributes

uint32_t sd
 The stream descriptor. More...
 
bool initialized
 True if the stream is initialized, false if it is closed. More...
 

Detailed Description

This is a base class for the streams.

Constructor & Destructor Documentation

◆ BaseStream() [1/2]

edjx::stream::BaseStream::BaseStream ( )
inline

Constructs a new empty Base Stream object.

◆ BaseStream() [2/2]

edjx::stream::BaseStream::BaseStream ( uint32_t  sd)
inline

Constructs a new initilized Base Stream object.

Parameters
sdStream descriptor

Member Function Documentation

◆ close()

edjx::error::StreamError edjx::stream::BaseStream::close ( )

Close the stream.

This method cleanly ends the streaming.

Returns
Returns edjx::error::StreamError::Success on success, some other value on failure.

◆ get_sd()

uint32_t edjx::stream::BaseStream::get_sd ( ) const
inline

Get the stream descriptor of the stream.

The stream descriptor may be undefined if is_open() is false.

Returns
uint32_t Stream descriptor

◆ is_initialized()

bool edjx::stream::BaseStream::is_initialized ( ) const
inline

Check whether the stream object has been initialized or not.

Returns
true The stream object has been initialized
false The stream object is not initialized

Member Data Documentation

◆ initialized

bool edjx::stream::BaseStream::initialized
protected

True if the stream is initialized, false if it is closed.

◆ sd

uint32_t edjx::stream::BaseStream::sd
protected

The stream descriptor.


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