Serialbox  2.2.0
Data serialization library and tools for C/C++, Python and Fortran
Field meta-info methods
SERIALBOX_API serialboxFieldMetainfo_tserialboxFieldMetainfoCreate (enum serialboxTypeID type, const int *dimensions, int numDimensions)
 Construct a meta-information for a field. More...
 
SERIALBOX_API serialboxFieldMetainfo_tserialboxFieldMetainfoCreateFromFieldMetainfo (const serialboxFieldMetainfo_t *other)
 Copy construct the FieldMetainfoImpl. More...
 
SERIALBOX_API void serialboxFieldMetainfoDestroy (serialboxFieldMetainfo_t *fieldMetainfo)
 Destroy the field meta-information and deallocate all memory. More...
 
SERIALBOX_API int serialboxFieldMetainfoEqual (const serialboxFieldMetainfo_t *f1, const serialboxFieldMetainfo_t *f2)
 Check if FieldMetainfoImpl f1 is equal to FieldMetainfoImpl f2 More...
 
SERIALBOX_API char * serialboxFieldMetainfoToString (const serialboxFieldMetainfo_t *fieldMetainfo)
 Convert to string. More...
 
SERIALBOX_API enum serialboxTypeID serialboxFieldMetainfoGetTypeID (const serialboxFieldMetainfo_t *fieldMetainfo)
 Get type-id. More...
 
SERIALBOX_API const int * serialboxFieldMetainfoGetDimensions (const serialboxFieldMetainfo_t *fieldMetainfo)
 Get dimensions. More...
 
SERIALBOX_API int serialboxFieldMetainfoGetNumDimensions (const serialboxFieldMetainfo_t *fieldMetainfo)
 Get number of dimensions. More...
 
SERIALBOX_API serialboxMetainfo_tserialboxFieldMetainfoGetMetainfo (serialboxFieldMetainfo_t *fieldMetainfo)
 Allocate a new serialboxMetainfo_t which maps to the meta-information of the Field meta-information. More...
 

Detailed Description

Function Documentation

◆ serialboxFieldMetainfoCreate()

SERIALBOX_API serialboxFieldMetainfo_t* serialboxFieldMetainfoCreate ( enum serialboxTypeID  type,
const int *  dimensions,
int  numDimensions 
)

Construct a meta-information for a field.

Parameters
typeTypeID of the described field
dimensionsArray of dimensions
numDimensionsNumber of dimensions
Returns
pointer to the newly constructed FieldMetainfoImpl or NULL if an error occurred

Definition at line 24 of file FieldMetainfo.cpp.

◆ serialboxFieldMetainfoCreateFromFieldMetainfo()

SERIALBOX_API serialboxFieldMetainfo_t* serialboxFieldMetainfoCreateFromFieldMetainfo ( const serialboxFieldMetainfo_t other)

Copy construct the FieldMetainfoImpl.

Parameters
otherFieldMetainfoImpl to copy from
Returns
pointer to the newly constructed FieldMetainfoImpl or NULL if an error occurred

Definition at line 41 of file FieldMetainfo.cpp.

◆ serialboxFieldMetainfoDestroy()

SERIALBOX_API void serialboxFieldMetainfoDestroy ( serialboxFieldMetainfo_t fieldMetainfo)

Destroy the field meta-information and deallocate all memory.

Parameters
fieldMetainfoField meta-information to use

Definition at line 55 of file FieldMetainfo.cpp.

◆ serialboxFieldMetainfoEqual()

SERIALBOX_API int serialboxFieldMetainfoEqual ( const serialboxFieldMetainfo_t f1,
const serialboxFieldMetainfo_t f2 
)

Check if FieldMetainfoImpl f1 is equal to FieldMetainfoImpl f2

Parameters
f1First FieldMetainfoImpl to use
f2Second FieldMetainfoImpl to use
Returns
1 if f1 == f2, 0 otherwise

Definition at line 68 of file FieldMetainfo.cpp.

◆ serialboxFieldMetainfoGetDimensions()

SERIALBOX_API const int* serialboxFieldMetainfoGetDimensions ( const serialboxFieldMetainfo_t fieldMetainfo)

Get dimensions.

Parameters
fieldMetainfoField meta-information to use
Returns
dimensions of the field as an array of ints of size serialboxFieldMetainfoGetNumDimensions

Definition at line 89 of file FieldMetainfo.cpp.

◆ serialboxFieldMetainfoGetMetainfo()

SERIALBOX_API serialboxMetainfo_t* serialboxFieldMetainfoGetMetainfo ( serialboxFieldMetainfo_t fieldMetainfo)

Allocate a new serialboxMetainfo_t which maps to the meta-information of the Field meta-information.

Parameters
fieldMetainfoField meta-information to use
Returns
meta-information of the field

Definition at line 103 of file FieldMetainfo.cpp.

◆ serialboxFieldMetainfoGetNumDimensions()

SERIALBOX_API int serialboxFieldMetainfoGetNumDimensions ( const serialboxFieldMetainfo_t fieldMetainfo)

Get number of dimensions.

Parameters
fieldMetainfoField meta-information to use
Returns
number of dimensions of the field

Definition at line 94 of file FieldMetainfo.cpp.

◆ serialboxFieldMetainfoGetTypeID()

SERIALBOX_API enum serialboxTypeID serialboxFieldMetainfoGetTypeID ( const serialboxFieldMetainfo_t fieldMetainfo)

Get type-id.

Parameters
fieldMetainfoField meta-information to use
Returns
type-id the field

Definition at line 84 of file FieldMetainfo.cpp.

◆ serialboxFieldMetainfoToString()

SERIALBOX_API char* serialboxFieldMetainfoToString ( const serialboxFieldMetainfo_t fieldMetainfo)

Convert to string.

The function will allocate a sufficiently large char buffer (using malloc()) which needs be freed by the user using free().

Parameters
fieldMetainfoField meta-information to use
Returns
String representation of the FieldMetainfoImpl

Definition at line 75 of file FieldMetainfo.cpp.