TSDuck Version 3.20-1669 (TSDuck - The MPEG Transport Stream Toolkit)
ts::AbstractOutputStream Class Referenceabstract

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

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

Public Types

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

Public Member Functions

 AbstractOutputStream (size_t bufferSize=DEFAULT_STREAM_BUFFER_SIZE)
 Constructor. More...
 
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. More...
 

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: