Helios++
Helios software for LiDAR simulations
helios::filems::ZipMultiVectorialSyncFileMeasurementWriter Class Reference

Concrete class specializing ZipMultiSyncFileWriter to write a vector of measurements to multiple zip files. More...

#include <ZipMultiVectorialSyncFileMeasurementWriter.h>

Inheritance diagram for helios::filems::ZipMultiVectorialSyncFileMeasurementWriter:
Collaboration diagram for helios::filems::ZipMultiVectorialSyncFileMeasurementWriter:

Public Member Functions

 ZipMultiVectorialSyncFileMeasurementWriter (vector< string > const &path, int compressionMode=boost::iostreams::zlib::best_compression)
 ZIP synchronous file measurement vector multi-writer constructor. More...
 
void buildMeasurementWriteStrategies ()
 Build the measurement write strategies for the zip multi vectorial synchronous file measurement writer.
 
void buildVectorialWriteStrategies ()
 Build the vectorial write strategies for the zip multi vectorial synchronous file measurement writer. More...
 
size_t indexFromWriteArgs (vector< Measurement > const &measurements, glm::dvec3 const &offset) override
 
- Public Member Functions inherited from helios::filems::ZipMultiSyncFileWriter< vector< Measurement > const &, glm::dvec3 const & >
 ZipMultiSyncFileWriter (std::vector< std::string > const &path, int compressionMode=boost::iostreams::zlib::best_compression)
 Build a ZipMultiSyncFileWriter. More...
 
void finish () override
 ZipSyncFileWriter finishes the binary output archive instead of calling its parent finish method. This is necessary to prevent malfunctions coming from interaction between output archive closing and output stream closing. More...
 
- Public Member Functions inherited from helios::filems::SimpleMultiSyncFileWriter< WriteArgs... >
 SimpleMultiSyncFileWriter (std::vector< std::string > const &path, std::ios_base::openmode om=std::ios_base::app)
 Simple synchronous multi-file writer constructor. More...
 
- Public Member Functions inherited from helios::filems::SyncFileWriter< WriteArgs ... >
 SyncFileWriter ()=default
 Default constructor for synchronous file writer.
 
std::string getPath ()
 Non index version of the SyncFileWriter::getPath(size_t const) function. More...
 

Protected Attributes

std::vector< ZipMeasurementWriteStrategyzmws
 The measurement write strategies that are wrapped by the main write strategies in a vectorial fashion ( filems::ZipMultiSyncFileWriter::writeStrategy ) More...
 
- Protected Attributes inherited from helios::filems::ZipMultiSyncFileWriter< vector< Measurement > const &, glm::dvec3 const & >
std::vector< boost::iostreams::filtering_ostream > compressedOut
 Compressed output streams.
 
std::vector< boost::iostreams::zlib_params > zp
 ZLib compression parameters for each stream.
 
std::vector< unique_ptr< boost::archive::binary_oarchive > > oa
 Binary output archive for each steam.
 
- Protected Attributes inherited from helios::filems::SimpleMultiSyncFileWriter< WriteArgs... >
std::vector< std::ofstream > ofs
 Output file streams to be used by the simple multi synchronous file writer.
 
- Protected Attributes inherited from helios::filems::MultiSyncFileWriter< WriteArgs ... >
std::vector< std::string > path
 Paths to the files to be written.
 
std::vector< std::mutex > mutex
 One mutex per file to be written (i-th mutex corresponds to i-th file)
 
std::vector< std::shared_ptr< WriteStrategy< WriteArgs ... > > > writeStrategy
 The write strategies specifying how to write data, one per file.
 

Additional Inherited Members

- Protected Member Functions inherited from helios::filems::MultiSyncFileWriter< WriteArgs ... >
 MultiSyncFileWriter ()
 Default constructor for synchronous multi-file writer. More...
 
 MultiSyncFileWriter (std::vector< std::string > const &path)
 
void write (WriteArgs ... writeArgs) override
 Synchronously write to a single file. More...
 
virtual size_t indexFromWriteArgs (WriteArgs ... writeArgs)=0
 Any concrete implementation extending MultiSyncFileWriter must override this function to specify how to obtain the index from the WriteArgs. More...
 
std::string getPath (size_t const idx) const override
 Obtain the path to the idx-th file. More...
 

Detailed Description

Concrete class specializing ZipMultiSyncFileWriter to write a vector of measurements to multiple zip files.

Author
Alberto M. Esmoris Pena
Version
1.0
See also
filems::ZipMultiSyncFileWriter
filems::ZipMeasurementWriteStrategy
Measurement
filems::ZipSyncFileMeasurementWriter

Constructor & Destructor Documentation

◆ ZipMultiVectorialSyncFileMeasurementWriter()

helios::filems::ZipMultiVectorialSyncFileMeasurementWriter::ZipMultiVectorialSyncFileMeasurementWriter ( vector< string > const &  path,
int  compressionMode = boost::iostreams::zlib::best_compression 
)
inlineexplicit

ZIP synchronous file measurement vector multi-writer constructor.

See also
filems::ZipMultiSyncFileWriter::ZipMultiSyncFileWriter

Member Function Documentation

◆ buildVectorialWriteStrategies()

void helios::filems::ZipMultiVectorialSyncFileMeasurementWriter::buildVectorialWriteStrategies ( )
inline

Build the vectorial write strategies for the zip multi vectorial synchronous file measurement writer.

WARNING! calling the buildMeasurementWriteStrategies() method will invalidate the state generated by buildVectorialWriteStrategies()

◆ indexFromWriteArgs()

size_t helios::filems::ZipMultiVectorialSyncFileMeasurementWriter::indexFromWriteArgs ( vector< Measurement > const &  measurements,
glm::dvec3 const &  offset 
)
inlineoverride

Member Data Documentation

◆ zmws

std::vector<ZipMeasurementWriteStrategy> helios::filems::ZipMultiVectorialSyncFileMeasurementWriter::zmws
protected

The measurement write strategies that are wrapped by the main write strategies in a vectorial fashion ( filems::ZipMultiSyncFileWriter::writeStrategy )

See also
filems::ZipMeasurementWriteStrategy

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