AbstractDataTypeFunctions Class Reference

#include <datatypebase.h>

Inheritance diagram for AbstractDataTypeFunctions:

Detailed Description

AbstractDataTypeFunctions can be used as base class of a class which implements the DataType functions for a type. AbstractDataTypeFunctions implements all DataType functions, either by returning an error, showing a CriticalStop or forwarding to other functions. For example the MoveFrom function is implemented by at first calling Destruct and then MoveConstruct, while Destruct and MoveConstruct show a CriticalStop(). At least the functions Construct, Destruct, MoveConstruct, CopyFrom have to be implemented for a working DataType and IsEqual, Compare, GetHashCode to support comparisons. The other functions can be implemented to improve the performance.

Static Public Member Functions

static void AddReference (const DataTypeImpl *type, const void *obj)
 
static void RemoveReference (const DataTypeImpl *type, const void *obj)
 
static Result< void * > Create (const DataTypeImpl *type)
 
static Result< void > DescribeIO (const DataTypeImpl *type, const DataSerializeInterface &dsi)
 
static void Construct (const DataTypeImpl *type, void *dest, Int dstride, Int count)
 
static void Destruct (const DataTypeImpl *type, const void *dest, Int dstride, Int count)
 
static void MoveConstruct (const DataTypeImpl *type, void *dest, Int dstride, void *src, Int sstride, Int count)
 
static void MoveFrom (const DataTypeImpl *type, void *dest, Int dstride, void *src, Int sstride, Int count)
 
static Result< void > CopyFrom (const DataTypeImpl *type, void *dest, Int dstride, const void *src, Int sstride, Int count)
 
static Result< void > InitData (const DataTypeImpl *type, DataMemBlock *mem)
 
static void FreeData (const DataTypeImpl *type, DataMemBlock *mem)
 
static const void * GetPtr (const DataTypeImpl *type, const DataMemBlock *s)
 
static Result< void > CopyData (const DataTypeImpl *type, DataMemBlock *d, const DataMemBlock *s)
 
static Result< void > InitCopyData (const DataTypeImpl *type, DataMemBlock *d, const DataMemBlock *s)
 
static void MoveData (const DataTypeImpl *type, DataMemBlock *d, DataMemBlock *s)
 
static void InitMoveData (const DataTypeImpl *type, DataMemBlock *d, DataMemBlock *s)
 
static Bool IsEqualData (const DataTypeImpl *type, const DataMemBlock *a, const DataMemBlock *b, EQUALITY equality)
 
static Bool IsEqual (const DataTypeImpl *type, const void *a, const void *b, EQUALITY equality)
 
static COMPARERESULT Compare (const DataTypeImpl *type, const void *a, const void *b)
 
static HashInt GetHashCode (const DataTypeImpl *type, const void *a)
 
static HashValue GetHashValue (const DataTypeImpl *type, const void *a)
 
static String ToStringImpl (const DataTypeImpl *type, const void *a, const FormatStatement *formatStatement)
 

Static Public Attributes

static const VALUEKIND CAPABILITY_FLAGS
 

Member Function Documentation

◆ AddReference()

static void AddReference ( const DataTypeImpl type,
const void *  obj 
)
static

◆ RemoveReference()

static void RemoveReference ( const DataTypeImpl type,
const void *  obj 
)
static

◆ Create()

static Result<void*> Create ( const DataTypeImpl type)
static

◆ DescribeIO()

static Result<void> DescribeIO ( const DataTypeImpl type,
const DataSerializeInterface dsi 
)
static

◆ Construct()

static void Construct ( const DataTypeImpl type,
void *  dest,
Int  dstride,
Int  count 
)
static

◆ Destruct()

static void Destruct ( const DataTypeImpl type,
const void *  dest,
Int  dstride,
Int  count 
)
static

◆ MoveConstruct()

static void MoveConstruct ( const DataTypeImpl type,
void *  dest,
Int  dstride,
void *  src,
Int  sstride,
Int  count 
)
static

◆ MoveFrom()

static void MoveFrom ( const DataTypeImpl type,
void *  dest,
Int  dstride,
void *  src,
Int  sstride,
Int  count 
)
static

◆ CopyFrom()

static Result<void> CopyFrom ( const DataTypeImpl type,
void *  dest,
Int  dstride,
const void *  src,
Int  sstride,
Int  count 
)
static

◆ InitData()

static Result<void> InitData ( const DataTypeImpl type,
DataMemBlock mem 
)
static

◆ FreeData()

static void FreeData ( const DataTypeImpl type,
DataMemBlock mem 
)
static

◆ GetPtr()

static const void* GetPtr ( const DataTypeImpl type,
const DataMemBlock s 
)
static

◆ CopyData()

static Result<void> CopyData ( const DataTypeImpl type,
DataMemBlock d,
const DataMemBlock s 
)
static

◆ InitCopyData()

static Result<void> InitCopyData ( const DataTypeImpl type,
DataMemBlock d,
const DataMemBlock s 
)
static

◆ MoveData()

static void MoveData ( const DataTypeImpl type,
DataMemBlock d,
DataMemBlock s 
)
static

◆ InitMoveData()

static void InitMoveData ( const DataTypeImpl type,
DataMemBlock d,
DataMemBlock s 
)
static

◆ IsEqualData()

static Bool IsEqualData ( const DataTypeImpl type,
const DataMemBlock a,
const DataMemBlock b,
EQUALITY  equality 
)
static

◆ IsEqual()

static Bool IsEqual ( const DataTypeImpl type,
const void *  a,
const void *  b,
EQUALITY  equality 
)
static

◆ Compare()

static COMPARERESULT Compare ( const DataTypeImpl type,
const void *  a,
const void *  b 
)
static

◆ GetHashCode()

static HashInt GetHashCode ( const DataTypeImpl type,
const void *  a 
)
static

◆ GetHashValue()

static HashValue GetHashValue ( const DataTypeImpl type,
const void *  a 
)
static

◆ ToStringImpl()

static String ToStringImpl ( const DataTypeImpl type,
const void *  a,
const FormatStatement formatStatement 
)
static

Member Data Documentation

◆ CAPABILITY_FLAGS

const VALUEKIND CAPABILITY_FLAGS
static