IODA Bundle
odc::WriterBufferingIterator Class Reference

#include <WriterBufferingIterator.h>

Collaboration diagram for odc::WriterBufferingIterator:
[legend]

Public Types

typedef Writer< WriterBufferingIteratorOwner
 

Public Member Functions

 WriterBufferingIterator (Owner &owner, eckit::DataHandle *, bool openDataHandle, const odc::sql::TableDef *tableDef=0)
 
 ~WriterBufferingIterator ()
 
int open ()
 
double * data ()
 
double & data (size_t i)
 
int setColumn (size_t index, std::string name, api::ColumnType type)
 
int setBitfieldColumn (size_t index, std::string name, api::ColumnType type, eckit::sql::BitfieldDef b)
 
void missingValue (size_t i, double)
 
template<typename T >
unsigned long pass1 (T &, const T &)
 
unsigned long gatherStats (const double *values, unsigned long count)
 
int close ()
 
const core::MetaDatacolumns () const
 
const core::MetaDatacolumns (const core::MetaData &md)
 
void setNumberOfColumns (size_t n)
 
Ownerowner ()
 
eckit::DataHandle & dataHandle ()
 
void property (std::string key, std::string value)
 
size_t dataOffset (size_t i) const
 The offset of a given column in the doubles[] data array. More...
 
int setOptimalCodecs ()
 
void writeHeader ()
 
int writeRow (const double *values, unsigned long count)
 
size_t rowDataSizeDoubles () const
 
size_t rowsBufferSize ()
 
void rowsBufferSize (size_t n)
 
void flush ()
 
std::vector< eckit::PathName > outputFiles ()
 
bool next ()
 

Public Attributes

int refCount_
 

Protected Attributes

Ownerowner_
 
core::MetaData columns_
 
double * lastValues_
 
double * nextRow_
 
size_t * columnOffsets_
 
size_t * columnByteSizes_
 
unsigned long long nrows_
 
eckit::DataHandle * f_
 
eckit::PathName path_
 

Private Member Functions

size_t rowDataSizeDoublesInternal () const
 
 WriterBufferingIterator (const WriterBufferingIterator &)
 
WriterBufferingIteratoroperator= (const WriterBufferingIterator &)
 
template<typename T >
void pass1init (T &, const T &)
 
std::pair< eckit::Buffer, size_t > serializeHeader (size_t dataSize, size_t rowsNumber)
 
void allocBuffers ()
 
void allocRowsBuffer ()
 
void resetColumnsBuffer ()
 
int doWriteRow (core::DataStream< core::SameByteOrder > &stream, const double *values)
 

Private Attributes

bool initialisedColumns_
 
core::Properties properties_
 
eckit::Buffer rowsBuffer_
 
unsigned char * nextRowInBuffer_
 
size_t rowsBufferSize_
 
size_t rowDataSizeDoubles_
 
size_t rowByteSize_
 
codec::CodecOptimizer codecOptimizer_
 
const odc::sql::TableDef * tableDef_
 
bool openDataHandle_
 

Friends

class IteratorProxy< WriterBufferingIterator, Owner >
 

Detailed Description

Definition at line 34 of file WriterBufferingIterator.h.

Member Typedef Documentation

◆ Owner

Constructor & Destructor Documentation

◆ WriterBufferingIterator() [1/2]

odc::WriterBufferingIterator::WriterBufferingIterator ( Owner owner,
eckit::DataHandle *  dh,
bool  openDataHandle,
const odc::sql::TableDef *  tableDef = 0 
)

Definition at line 31 of file WriterBufferingIterator.cc.

Here is the call graph for this function:

◆ ~WriterBufferingIterator()

odc::WriterBufferingIterator::~WriterBufferingIterator ( )

Definition at line 54 of file WriterBufferingIterator.cc.

Here is the call graph for this function:

◆ WriterBufferingIterator() [2/2]

odc::WriterBufferingIterator::WriterBufferingIterator ( const WriterBufferingIterator )
private

Member Function Documentation

◆ allocBuffers()

void odc::WriterBufferingIterator::allocBuffers ( )
private

Definition at line 83 of file WriterBufferingIterator.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ allocRowsBuffer()

void odc::WriterBufferingIterator::allocRowsBuffer ( )
private

Definition at line 126 of file WriterBufferingIterator.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ close()

int odc::WriterBufferingIterator::close ( )

Definition at line 352 of file WriterBufferingIterator.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ columns() [1/2]

const core::MetaData& odc::WriterBufferingIterator::columns ( ) const
inline

Definition at line 59 of file WriterBufferingIterator.h.

Here is the caller graph for this function:

◆ columns() [2/2]

const core::MetaData& odc::WriterBufferingIterator::columns ( const core::MetaData md)
inline

Definition at line 60 of file WriterBufferingIterator.h.

Here is the call graph for this function:

◆ data() [1/2]

double * odc::WriterBufferingIterator::data ( )

Definition at line 165 of file WriterBufferingIterator.cc.

Here is the caller graph for this function:

◆ data() [2/2]

double & odc::WriterBufferingIterator::data ( size_t  i)

Definition at line 166 of file WriterBufferingIterator.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dataHandle()

eckit::DataHandle& odc::WriterBufferingIterator::dataHandle ( )
inline

Definition at line 71 of file WriterBufferingIterator.h.

Here is the caller graph for this function:

◆ dataOffset()

size_t odc::WriterBufferingIterator::dataOffset ( size_t  i) const
inline

The offset of a given column in the doubles[] data array.

Definition at line 76 of file WriterBufferingIterator.h.

◆ doWriteRow()

int odc::WriterBufferingIterator::doWriteRow ( core::DataStream< core::SameByteOrder > &  stream,
const double *  values 
)
private

Definition at line 203 of file WriterBufferingIterator.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ flush()

void odc::WriterBufferingIterator::flush ( )

Definition at line 300 of file WriterBufferingIterator.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gatherStats()

unsigned long odc::WriterBufferingIterator::gatherStats ( const double *  values,
unsigned long  count 
)

Definition at line 65 of file WriterBufferingIterator.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ missingValue()

void odc::WriterBufferingIterator::missingValue ( size_t  i,
double  missingValue 
)

Definition at line 291 of file WriterBufferingIterator.cc.

Here is the call graph for this function:

◆ next()

bool odc::WriterBufferingIterator::next ( )

Definition at line 160 of file WriterBufferingIterator.cc.

Here is the call graph for this function:

◆ open()

int odc::WriterBufferingIterator::open ( )

Definition at line 241 of file WriterBufferingIterator.cc.

Here is the caller graph for this function:

◆ operator=()

WriterBufferingIterator& odc::WriterBufferingIterator::operator= ( const WriterBufferingIterator )
private

◆ outputFiles()

std::vector< eckit::PathName > odc::WriterBufferingIterator::outputFiles ( )

Definition at line 364 of file WriterBufferingIterator.cc.

◆ owner()

Owner& odc::WriterBufferingIterator::owner ( )
inline

Definition at line 69 of file WriterBufferingIterator.h.

◆ pass1()

template<typename T >
unsigned long odc::WriterBufferingIterator::pass1 ( T &  it,
const T &  end 
)

Definition at line 166 of file WriterBufferingIterator.h.

Here is the call graph for this function:

◆ pass1init()

template<typename T >
void odc::WriterBufferingIterator::pass1init ( T &  it,
const T &  end 
)
private

Definition at line 149 of file WriterBufferingIterator.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ property()

void odc::WriterBufferingIterator::property ( std::string  key,
std::string  value 
)
inline

Definition at line 73 of file WriterBufferingIterator.h.

◆ resetColumnsBuffer()

void odc::WriterBufferingIterator::resetColumnsBuffer ( )
private

◆ rowDataSizeDoubles()

size_t odc::WriterBufferingIterator::rowDataSizeDoubles ( ) const
inline

Definition at line 87 of file WriterBufferingIterator.h.

Here is the caller graph for this function:

◆ rowDataSizeDoublesInternal()

size_t odc::WriterBufferingIterator::rowDataSizeDoublesInternal ( ) const
private

Definition at line 194 of file WriterBufferingIterator.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rowsBufferSize() [1/2]

size_t odc::WriterBufferingIterator::rowsBufferSize ( )
inline

Definition at line 89 of file WriterBufferingIterator.h.

◆ rowsBufferSize() [2/2]

void odc::WriterBufferingIterator::rowsBufferSize ( size_t  n)
inline

Definition at line 90 of file WriterBufferingIterator.h.

◆ serializeHeader()

std::pair< Buffer, size_t > odc::WriterBufferingIterator::serializeHeader ( size_t  dataSize,
size_t  rowsNumber 
)
private

Definition at line 348 of file WriterBufferingIterator.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setBitfieldColumn()

int odc::WriterBufferingIterator::setBitfieldColumn ( size_t  index,
std::string  name,
api::ColumnType  type,
eckit::sql::BitfieldDef  b 
)

Definition at line 277 of file WriterBufferingIterator.cc.

Here is the call graph for this function:

◆ setColumn()

int odc::WriterBufferingIterator::setColumn ( size_t  index,
std::string  name,
api::ColumnType  type 
)

Definition at line 253 of file WriterBufferingIterator.cc.

Here is the call graph for this function:

◆ setNumberOfColumns()

void odc::WriterBufferingIterator::setNumberOfColumns ( size_t  n)
inline

Definition at line 67 of file WriterBufferingIterator.h.

Here is the call graph for this function:

◆ setOptimalCodecs()

int odc::WriterBufferingIterator::setOptimalCodecs ( )

Definition at line 78 of file WriterBufferingIterator.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeHeader()

void odc::WriterBufferingIterator::writeHeader ( )

Definition at line 134 of file WriterBufferingIterator.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeRow()

int odc::WriterBufferingIterator::writeRow ( const double *  values,
unsigned long  count 
)

Definition at line 173 of file WriterBufferingIterator.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

Friends And Related Function Documentation

◆ IteratorProxy< WriterBufferingIterator, Owner >

friend class IteratorProxy< WriterBufferingIterator, Owner >
friend

Definition at line 143 of file WriterBufferingIterator.h.

Member Data Documentation

◆ codecOptimizer_

codec::CodecOptimizer odc::WriterBufferingIterator::codecOptimizer_
private

Definition at line 138 of file WriterBufferingIterator.h.

◆ columnByteSizes_

size_t* odc::WriterBufferingIterator::columnByteSizes_
protected

Definition at line 107 of file WriterBufferingIterator.h.

◆ columnOffsets_

size_t* odc::WriterBufferingIterator::columnOffsets_
protected

Definition at line 106 of file WriterBufferingIterator.h.

◆ columns_

core::MetaData odc::WriterBufferingIterator::columns_
protected

Definition at line 103 of file WriterBufferingIterator.h.

◆ f_

eckit::DataHandle* odc::WriterBufferingIterator::f_
protected

Definition at line 110 of file WriterBufferingIterator.h.

◆ initialisedColumns_

bool odc::WriterBufferingIterator::initialisedColumns_
private

Definition at line 128 of file WriterBufferingIterator.h.

◆ lastValues_

double* odc::WriterBufferingIterator::lastValues_
protected

Definition at line 104 of file WriterBufferingIterator.h.

◆ nextRow_

double* odc::WriterBufferingIterator::nextRow_
protected

Definition at line 105 of file WriterBufferingIterator.h.

◆ nextRowInBuffer_

unsigned char* odc::WriterBufferingIterator::nextRowInBuffer_
private

Definition at line 132 of file WriterBufferingIterator.h.

◆ nrows_

unsigned long long odc::WriterBufferingIterator::nrows_
protected

Definition at line 108 of file WriterBufferingIterator.h.

◆ openDataHandle_

bool odc::WriterBufferingIterator::openDataHandle_
private

Definition at line 143 of file WriterBufferingIterator.h.

◆ owner_

Owner& odc::WriterBufferingIterator::owner_
protected

Definition at line 102 of file WriterBufferingIterator.h.

◆ path_

eckit::PathName odc::WriterBufferingIterator::path_
protected

Definition at line 111 of file WriterBufferingIterator.h.

◆ properties_

core::Properties odc::WriterBufferingIterator::properties_
private

Definition at line 129 of file WriterBufferingIterator.h.

◆ refCount_

int odc::WriterBufferingIterator::refCount_

Definition at line 100 of file WriterBufferingIterator.h.

◆ rowByteSize_

size_t odc::WriterBufferingIterator::rowByteSize_
private

Definition at line 136 of file WriterBufferingIterator.h.

◆ rowDataSizeDoubles_

size_t odc::WriterBufferingIterator::rowDataSizeDoubles_
private

Definition at line 135 of file WriterBufferingIterator.h.

◆ rowsBuffer_

eckit::Buffer odc::WriterBufferingIterator::rowsBuffer_
private

Definition at line 131 of file WriterBufferingIterator.h.

◆ rowsBufferSize_

size_t odc::WriterBufferingIterator::rowsBufferSize_
private

Definition at line 134 of file WriterBufferingIterator.h.

◆ tableDef_

const odc::sql::TableDef* odc::WriterBufferingIterator::tableDef_
private

Definition at line 140 of file WriterBufferingIterator.h.


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