ae2f::Core
Loading...
Searching...
No Matches
Ref.h File Reference

Go to the source code of this file.

Macros

#define ae2f_ds_Alloc_cRef   ae2f_ds_cAlloc
 
#define ae2f_ds_Alloc_cRef_Mk(This)
 Initialises the class for reffering.
 
#define ae2f_ds_Alloc_cRef_getSize(This, sizebuff, elsizebuff)
 Gets the length, and element size of the class.
 
#define ae2f_ds_Alloc_cRef_Read(This, idx, buff, elsize)
 Gets data from a class.
 
#define ae2f_ds_Alloc_cRef_Write(This, idx, src, srcsize)
 Sets data to a class.
 

Typedefs

typedef ae2f_errint_t(* ae2f_ds_Alloc_fpLen_t) (const ae2f_struct ae2f_ds_Alloc_cRef *_this, size_t *pSize, size_t *pel)
 Gets the length, and element size of the class.
 
typedef ae2f_errint_t(* ae2f_ds_Alloc_fpRead_t) (const ae2f_struct ae2f_ds_Alloc_cRef *_this, size_t Index, void *lpBuff, size_t Buff_size)
 Gets data from a class.
 
typedef ae2f_errint_t(* ae2f_ds_Alloc_fpWrite_t) (ae2f_struct ae2f_ds_Alloc_cRef *_this, size_t Index, const void *lpBuff, size_t Buff_size)
 Sets data to a class.
 

Detailed Description

Warning
This file is a helper header of ae2f/Ds/Alloc.h
Few definitions may lack.

Macro Definition Documentation

◆ ae2f_ds_Alloc_cRef

#define ae2f_ds_Alloc_cRef   ae2f_ds_cAlloc

This structure does not own the memory.

An interface to implement the linear array.

See also
ae2f_ds_cAlloc

◆ ae2f_ds_Alloc_cRef_getSize

#define ae2f_ds_Alloc_cRef_getSize ( This,
sizebuff,
elsizebuff )
Value:
_ae2f_ds_Alloc_Call(This, GetSize, sizebuff, elsizebuff)
#define _ae2f_ds_Alloc_Call(This, Name,...)
Definition Alloc.h:65

Gets the length, and element size of the class.

Parameters
ThisThe constant instance of the class.
sizebuffA pointer where the count of the array, as an unit of elements.
elsizebuffA pointer where the size of the element.
Returns
ae2f_errGlob_OK
ae2f_ds_Alloc_Err_NCOPIED
Exceptions

ae2f_errGlob_PTR_IS_NULL

See also
ae2f_ds_Alloc_cRef
ae2f_ds_Alloc_fpLen_t

◆ ae2f_ds_Alloc_cRef_Mk

#define ae2f_ds_Alloc_cRef_Mk ( This)
Value:
#define ae2f_struct
In C, keyword 'struct' must be written in front of the structure's name in order to use as a type nam...
Definition Cast.h:81
#define ae2f_record_make(type,...)
Initialiser for trivial structures / classes.
Definition Cast.h:45
#define ae2f_ds_Alloc_cRef
Definition Ref.h:11

Initialises the class for reffering.

Parameters
This{const ae2f_ds_cAlloc*}
Returns
{const ae2f_ds_Alloc_cRef} This initiated structure.
Warning
You need to suggest that returning value of this does not own the memory.
See also
ae2f_ds_Alloc_cRef

◆ ae2f_ds_Alloc_cRef_Read

#define ae2f_ds_Alloc_cRef_Read ( This,
idx,
buff,
elsize )
Value:
_ae2f_ds_Alloc_Call(This, Read, idx, buff, elsize)

Gets data from a class.

Parameters
ThisThe constant instance of the class.
idxThe Index [in an unit of bytes] where the element to copy is.
buffA pointer of buffer where the element to be copied.
elsizeThe allocated size of the [buff].
Returns
ae2f_errGlob_OK
Exceptions

ae2f_errGlob_IMP_NOT_FOUND
ae2f_errGlob_PTR_IS_NULL
ae2f_ds_Alloc_Err_IDX_INVALID

See also
ae2f_ds_Alloc_cRef
ae2f_ds_Alloc_fpRead_t

◆ ae2f_ds_Alloc_cRef_Write

#define ae2f_ds_Alloc_cRef_Write ( This,
idx,
src,
srcsize )
Value:
_ae2f_ds_Alloc_Call(This, Write, idx, src, srcsize)

Sets data to a class.

Parameters
ThisThe instance of the class.
idxThe Index [in an unit of bytes] where the element to be overwritten.
srcA pointer of an element.
srcsizeAn allocated size of the [src].
Returns
ae2f_errGlob_OK
Exceptions

ae2f_errGlob_IMP_NOT_FOUND
ae2f_errGlob_PTR_IS_NULL
ae2f_ds_Alloc_Err_IDX_INVALID

See also
ae2f_ds_Alloc_cRef
ae2f_ds_Alloc_fpWrite_t

Typedef Documentation

◆ ae2f_ds_Alloc_fpLen_t

typedef ae2f_errint_t(* ae2f_ds_Alloc_fpLen_t) (const ae2f_struct ae2f_ds_Alloc_cRef *_this, size_t *pSize, size_t *pel)

Gets the length, and element size of the class.

Parameters
_thisThe constant instance of the class.
pSizeA pointer where the count of the array, as an unit of elements.
pelA pointer where the size of the element.
Returns
ae2f_errGlob_OK
ae2f_ds_Alloc_Err_NCOPIED
Exceptions

ae2f_errGlob_PTR_IS_NULL

See also
ae2f_ds_Alloc_cRef

◆ ae2f_ds_Alloc_fpRead_t

typedef ae2f_errint_t(* ae2f_ds_Alloc_fpRead_t) (const ae2f_struct ae2f_ds_Alloc_cRef *_this, size_t Index, void *lpBuff, size_t Buff_size)

Gets data from a class.

Parameters
_thisThe constant instance of the class.
IndexThe Index [in an unit of bytes] where the element to copy is.
lpBuffA pointer of buffer where the element to be copied.
Buff_sizeThe allocated size of the lpBuff.
Returns
ae2f_errGlob_OK
Exceptions

ae2f_errGlob_PTR_IS_NULL
ae2f_ds_Alloc_Err_IDX_INVALID

See also
ae2f_ds_Alloc_cRef

◆ ae2f_ds_Alloc_fpWrite_t

typedef ae2f_errint_t(* ae2f_ds_Alloc_fpWrite_t) (ae2f_struct ae2f_ds_Alloc_cRef *_this, size_t Index, const void *lpBuff, size_t Buff_size)

Sets data to a class.

Parameters
_thisThe instance of the class.
IndexThe Index [in an unit of bytes] where the element to be overwritten.
lpBuffA pointer of an element.
Buff_sizeAn allocated size of the lpBuff.
Returns
ae2f_errGlob_OK
Exceptions

ae2f_errGlob_PTR_IS_NULL
ae2f_ds_Alloc_Err_IDX_INVALID

See also
ae2f_ds_Alloc_cRef