icedb  version 0.5.1
Snow particle scattering database API
Classes | Functions
icedb::Tables Namespace Reference

Everything to do with Tables is located in this namespace. More...

Classes

class  CanHaveTables
 The virtual base class used in all objects that can contain tables (groups and datasets). More...
 
class  CanHaveTables_impl
 
class  Table
 
class  Table_impl
 

Functions

template<class DataType , class ObjectType >
void pullData (std::vector< size_t > &dims, std::vector< DataType > &tdata, gsl::not_null< ObjectType *> obj)
 
template<class DataType , class ObjectType >
void pushData (const std::vector< size_t > &dims, gsl::not_null< ObjectType *> obj, const std::vector< DataType > &data)
 
 INST_ATTR (INST_WRITE_TBL_INNER_TYPE)
 
 INST_ATTR (INST_READ_TBL_TYPE)
 

Detailed Description

Everything to do with Tables is located in this namespace.

Function Documentation

◆ INST_ATTR() [1/2]

icedb::Tables::INST_ATTR ( INST_WRITE_TBL_INNER_TYPE  )

◆ INST_ATTR() [2/2]

icedb::Tables::INST_ATTR ( INST_READ_TBL_TYPE  )

◆ pullData()

template<class DataType , class ObjectType >
void icedb::Tables::pullData ( std::vector< size_t > &  dims,
std::vector< DataType > &  tdata,
gsl::not_null< ObjectType *>  obj 
)

Definition at line 168 of file Tables.cpp.

172  {
173  size_t sz = 1;
174  for (const auto &s : dims) sz *= s;
175  tdata.resize(sz);
176  icedb::fs::hdf5::readDatasetArray<DataType, H5::DataSet>(obj, tdata.data());
177  }

◆ pushData()

template<class DataType , class ObjectType >
void icedb::Tables::pushData ( const std::vector< size_t > &  dims,
gsl::not_null< ObjectType *>  obj,
const std::vector< DataType > &  data 
)

Definition at line 195 of file Tables.cpp.

199  {
200  size_t numElems = 1;
201  for (const auto &s : dims) numElems *= s;
202  Expects(numElems > 0);
203 
204  icedb::fs::hdf5::writeDatasetArray<DataType, ObjectType>(dims, obj, data.data());
205  }