MAK RTIspy API Documentation for HLA 1516
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Attributes
DtBufferPrinter Class Reference

Prints data from an output stream to a buffer. More...

+ Inheritance diagram for DtBufferPrinter:
+ Collaboration diagram for DtBufferPrinter:

Public Member Functions

 DtBufferPrinter (std::shared_ptr< DtPrinterBuf > buffer)
 Constructor. More...
 
virtual ~DtBufferPrinter ()
 Destructor. More...
 
virtual void write (const std::string &st, int notify_level, bool sync)
 Writes the string to the buffer with the specified notify level. More...
 
std::shared_ptr< DtPrinterBufbuffer ()
 Get a shared pointer to the buffer which this printer writes to. More...
 
virtual void swapBuffer (std::shared_ptr< DtPrinterBuf > buffer)
 Swaps the current buffer for the given one. The old buffer will be deleted. More...
 
virtual void swapAndCopyBuffer (std::shared_ptr< DtPrinterBuf > buffer)
 Swaps the current buffer for the given one. More...
 

Protected Attributes

std::shared_ptr< DtPrinterBufmyBuffer
 The buffer to which all output data is written. More...
 

Detailed Description

Prints data from an output stream to a buffer.

DtBufferPrinter may be attached to MAKRti::DtOutputStream objects and will print any data received to a DtPrinterBuf.

Constructor & Destructor Documentation

DtBufferPrinter::DtBufferPrinter ( std::shared_ptr< DtPrinterBuf buffer)

Constructor.

virtual DtBufferPrinter::~DtBufferPrinter ( )
virtual

Destructor.

Member Function Documentation

std::shared_ptr<DtPrinterBuf> DtBufferPrinter::buffer ( )
inline

Get a shared pointer to the buffer which this printer writes to.

virtual void DtBufferPrinter::swapAndCopyBuffer ( std::shared_ptr< DtPrinterBuf buffer)
virtual

Swaps the current buffer for the given one.

The new buffer will be populated with the contents of the current buffer. The old buffer will be deleted.

virtual void DtBufferPrinter::swapBuffer ( std::shared_ptr< DtPrinterBuf buffer)
virtual

Swaps the current buffer for the given one. The old buffer will be deleted.

virtual void DtBufferPrinter::write ( const std::string &  st,
int  notify_level,
bool  sync 
)
virtual

Writes the string to the buffer with the specified notify level.

Member Data Documentation

std::shared_ptr<DtPrinterBuf> DtBufferPrinter::myBuffer
protected

The buffer to which all output data is written.


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

Document ID: Generated on Sun Jul 20 16:15:30 EDT 2025 from SVN revision 277985
Copyright © 2005-2025 MAK Technologies Inc. All Rights Reserved (www.mak.com)