IntaRNA 3.4.1
RNA-RNA interaction prediction | C++ API
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
IntaRNA::OutputStreamHandlerSortedCsv Class Reference

#include <OutputStreamHandlerSortedCsv.h>

Inheritance diagram for IntaRNA::OutputStreamHandlerSortedCsv:
Inheritance graph
[legend]
Collaboration diagram for IntaRNA::OutputStreamHandlerSortedCsv:
Collaboration graph
[legend]

Public Member Functions

 OutputStreamHandlerSortedCsv (OutputStreamHandler *outStreamHandler, const size_t colToSort, const bool sortLexOrder, const std::string colSep, const bool csvWithHeader, const std::string listSep="")
 
virtual ~OutputStreamHandlerSortedCsv ()
 
virtual std::ostream & getOutStream ()
 
- Public Member Functions inherited from IntaRNA::OutputStreamHandler
 OutputStreamHandler (std::ostream *outStream)
 
virtual ~OutputStreamHandler ()
 

Protected Attributes

OutputStreamHandler * outStreamHandler
 the underlying OutputStreamHandler to which the final output is reported
 
std::stringstream outStreamUnsorted
 the stream to write output to
 
const size_t colToSort
 the CSV column to sort
 
const bool sortLexOrder
 whether or not lexicographic (or numerical) sorting is to be done
 
const std::string colSep
 the column separator used within the output
 
const bool csvWithHeader
 whether or not the CSV output will contain a header line
 
std::string csvHeader
 the parsed CSV header (empty if not parsed yet)
 
const std::string listSep
 the separator used within a single column to represent multiple values
 
- Protected Attributes inherited from IntaRNA::OutputStreamHandler
std::ostream * outStream
 the stream to write output to
 

Detailed Description

Provides access to a temporal output stream for interaction reporting, which is assumed to be populated by an OutputHandlerCsv. On every flush(), the temporary stream is parsed and the sorted output is reported to the final output stream.

Author
: Martin Raden 2019

Constructor & Destructor Documentation

◆ OutputStreamHandlerSortedCsv()

IntaRNA::OutputStreamHandlerSortedCsv::OutputStreamHandlerSortedCsv ( OutputStreamHandler *  outStreamHandler,
const size_t  colToSort,
const bool  sortLexOrder,
const std::string  colSep,
const bool  csvWithHeader,
const std::string  listSep = "" 
)
inline

construction

Parameters
outStreamHandlerthe OutputStreamHandler to write output to (non-NULL) and which is to destroy on destruction
colToSortthe CSV column to sort
sortLexOrderwhether or not lexicographic (or numerical) sorting is to be done
colSepthe column separator used within the output
csvWithHeaderwhether or not the CSV output will contain a header line
listSepthe separator used within a single column to represent multiple values

◆ ~OutputStreamHandlerSortedCsv()

virtual IntaRNA::OutputStreamHandlerSortedCsv::~OutputStreamHandlerSortedCsv ( )
virtual

destruction:

  • parses the unsorted CSV output
  • writes the sorted CSV output to the final output stream
  • calls flush() on the final output
  • destruction of the underlying OutputStreamHandler

Member Function Documentation

◆ getOutStream()

std::ostream & IntaRNA::OutputStreamHandlerSortedCsv::getOutStream ( )
inlinevirtual

Access to the ostream to which unsorted CSV output is to be written.

Returns
the output stream to write unsorted CSV output to

Reimplemented from IntaRNA::OutputStreamHandler.

Member Data Documentation

◆ colSep

const std::string IntaRNA::OutputStreamHandlerSortedCsv::colSep
protected

the column separator used within the output

◆ colToSort

const size_t IntaRNA::OutputStreamHandlerSortedCsv::colToSort
protected

the CSV column to sort

◆ csvHeader

std::string IntaRNA::OutputStreamHandlerSortedCsv::csvHeader
protected

the parsed CSV header (empty if not parsed yet)

◆ csvWithHeader

const bool IntaRNA::OutputStreamHandlerSortedCsv::csvWithHeader
protected

whether or not the CSV output will contain a header line

◆ listSep

const std::string IntaRNA::OutputStreamHandlerSortedCsv::listSep
protected

the separator used within a single column to represent multiple values

◆ outStreamHandler

OutputStreamHandler* IntaRNA::OutputStreamHandlerSortedCsv::outStreamHandler
protected

the underlying OutputStreamHandler to which the final output is reported

◆ outStreamUnsorted

std::stringstream IntaRNA::OutputStreamHandlerSortedCsv::outStreamUnsorted
protected

the stream to write output to

◆ sortLexOrder

const bool IntaRNA::OutputStreamHandlerSortedCsv::sortLexOrder
protected

whether or not lexicographic (or numerical) sorting is to be done


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