mksqlite  2.5
A MATLAB interface to SQLite
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
TBHData< HeaderBaseType > Struct Template Reference

Template class extending base class uniquely. More...

#include <typed_blobs.hpp>

+ Inheritance diagram for TBHData< HeaderBaseType >:
+ Collaboration diagram for TBHData< HeaderBaseType >:

Public Member Functions

void init (mxClassID clsid, mwSize nDims, const mwSize *pSize)
 Initialization (hides base class init() function) More...
 
void init (const mxArray *pItem)
 Set class ID and dimension information of an array item.
 
bool validVer ()
 Header version checking. More...
 
void * getData (mwSize nDims)
 Get pointer to array data (while initializing) More...
 
void * getData ()
 get a pointer to array data (initialized)
 
size_t dataOffset ()
 Get header offset to begin of array data (initialized)
 
size_t getDataSize ()
 Get data size in bytes, returns 0 on error.
 
mxArray * createNumericArray (bool doCopyData)
 

Static Public Member Functions

static size_t dataOffset (mwSize nDims)
 Get header offset to begin of array data (while initializing) More...
 

Public Attributes

int32_t m_nDims [1]
 Number of dimensions, followed by sizes of each dimension (BLOB data follows after last dimension size...)
 

Private Member Functions

Inhibitance

Creation of instances inhibited. Scheme represented by this template, and others derived, do only shadow memory got from allocators (malloc)

 TBHData ()
 
 TBHData (const TBHData &)
 
TBHDataoperator= (const TBHData &)
 

Detailed Description

template<typename HeaderBaseType>
struct TBHData< HeaderBaseType >

Template class extending base class uniquely.

This template class appends the number of dimensions, their extents and finally the numeric data itself to the header.\ HeaderBaseType is either TypedBLOBHeader or TypedBLOBHeaderCompressed.

Definition at line 314 of file typed_blobs.hpp.

Member Function Documentation

◆ createNumericArray()

template<typename HeaderBaseType >
mxArray* TBHData< HeaderBaseType >::createNumericArray ( bool  doCopyData)
inline
Parameters
[in]doCopyDataIf true, containig data will be copied

Create a MATLAB array suitable for containing data, which will optionally copied.

Definition at line 421 of file typed_blobs.hpp.

References TypedBLOBHeaderBase::getDataSize().

◆ dataOffset()

template<typename HeaderBaseType >
static size_t TBHData< HeaderBaseType >::dataOffset ( mwSize  nDims)
inlinestatic

Get header offset to begin of array data (while initializing)

Get the offset from structure begin to data begin with given number of dimensions.

Definition at line 392 of file typed_blobs.hpp.

References TBHData< HeaderBaseType >::m_nDims.

◆ getData()

template<typename HeaderBaseType >
void* TBHData< HeaderBaseType >::getData ( mwSize  nDims)
inline

Get pointer to array data (while initializing)

Get a pointer to data begin with number of dimensions given first data byte starts after last dimension.

Definition at line 372 of file typed_blobs.hpp.

◆ init()

template<typename HeaderBaseType >
void TBHData< HeaderBaseType >::init ( mxClassID  clsid,
mwSize  nDims,
const mwSize *  pSize 
)
inline

Initialization (hides base class init() function)

Parameters
[in]clsidMATLAB class ID of array elements
[in]nDimsAmount of array dimensions
[in]pSizePointer to vector of dimension lengths

Definition at line 326 of file typed_blobs.hpp.

◆ validVer()

template<typename HeaderBaseType >
bool TBHData< HeaderBaseType >::validVer ( )
inline

Header version checking.

Version information is stored as struct size. compare if current size equals to assumed.

Definition at line 360 of file typed_blobs.hpp.


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