lsst.astshim  22.0.0+04719a4bac
Public Member Functions | List of all members
ast::StringStream Class Reference

#include <Stream.h>

Inheritance diagram for ast::StringStream:
ast::Stream

Public Member Functions

 StringStream (std::string const &data="")
 
virtual ~StringStream ()
 
std::string getSourceData () const
 Get a copy of the text from the sink/output stream, without changing the stream. More...
 
std::string getSinkData () const
 Get a copy of the text from the sink/output stream, without changing the stream. More...
 
void sinkToSource ()
 Move output/sink data to input/source. More...
 
- Public Member Functions inherited from ast::Stream
 Stream (std::istream *istreamPtr, std::ostream *ostreamPtr)
 
 Stream ()
 
virtual ~Stream ()
 
 Stream (Stream const &)=default
 
 Stream (Stream &&)=default
 
Streamoperator= (Stream const &)=default
 
Streamoperator= (Stream &&)=default
 
bool hasStdStream ()
 
char const * source ()
 
bool sink (char const *cstr)
 
bool getIsFits () const
 get isfits More...
 

Additional Inherited Members

- Protected Member Functions inherited from ast::Stream
void setIsFits (bool isFits)
 set isFits More...
 
- Protected Attributes inherited from ast::Stream
std::shared_ptr< std::istream > _istreamPtr
 input stream More...
 
std::shared_ptr< std::ostream > _ostreamPtr
 
std::string _sourceStr
 
bool _isFits
 is this a FITS stream? More...
 

Detailed Description

String-based source and sink for channels

This sources from one stringstream and sinks to another. The data can be retrieved at any time, without affecting the stream, using getData.

Constructor & Destructor Documentation

◆ StringStream()

ast::StringStream::StringStream ( std::string const &  data = "")
inlineexplicit

Construct a StringStream

Parameters
[in]datainitial data for the source stream

◆ ~StringStream()

virtual ast::StringStream::~StringStream ( )
inlinevirtual

Member Function Documentation

◆ getSinkData()

std::string ast::StringStream::getSinkData ( ) const
inline

Get a copy of the text from the sink/output stream, without changing the stream.

◆ getSourceData()

std::string ast::StringStream::getSourceData ( ) const
inline

Get a copy of the text from the sink/output stream, without changing the stream.

◆ sinkToSource()

void ast::StringStream::sinkToSource ( )
inline

Move output/sink data to input/source.


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