TSDuck v3.40-3963
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
ts::AbstractOutputStream Class Referenceabstract

Intermediate abstract class to help implementing std::ostream. More...

#include <tsAbstractOutputStream.h>

Inheritance diagram for ts::AbstractOutputStream:
Collaboration diagram for ts::AbstractOutputStream:

Public Types

using SuperClass = std::basic_ostream< char >
 Explicit reference to the public superclass.
 

Public Member Functions

 AbstractOutputStream (size_t bufferSize=DEFAULT_STREAM_BUFFER_SIZE)
 Constructor.
 
virtual ~AbstractOutputStream () override
 Destructor.
 

Static Public Attributes

static constexpr size_t DEFAULT_STREAM_BUFFER_SIZE = 1024
 Default stream buffer size in bytes.
 

Protected Member Functions

virtual bool writeStreamBuffer (const void *addr, size_t size)=0
 Write buffered data to underlying output devicen whatever it is.
 

Detailed Description

Intermediate abstract class to help implementing std::ostream.

Constructor & Destructor Documentation

◆ AbstractOutputStream()

ts::AbstractOutputStream::AbstractOutputStream ( size_t  bufferSize = DEFAULT_STREAM_BUFFER_SIZE)
explicit

Constructor.

Parameters
[in]bufferSizeBuffer size in bytes.

Member Function Documentation

◆ writeStreamBuffer()

virtual bool ts::AbstractOutputStream::writeStreamBuffer ( const void *  addr,
size_t  size 
)
protectedpure virtual

Write buffered data to underlying output devicen whatever it is.

Must be implemented by subclasses.

Parameters
[in]addrBuffered data address.
[in]sizeBuffered data size in bytes.
Returns
True on success, false on error.

Implemented in ts::ForkPipe, and ts::TextFormatter.


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