Adaptive Framework  0.9.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Files | Functions

Files

file  afw_safe_cast.h
 Safe cast functions.
 

Functions

afw_size_t afw_safe_cast_off_to_size (afw_off_t off, afw_xctx_t *xctx)
 Safely cast afw_off_t to afw_size_t. More...
 
afw_size_t afw_safe_cast_integer_to_size (afw_integer_t integer, afw_xctx_t *xctx)
 Safely cast afw_integer_t to afw_size_t. More...
 
int afw_safe_cast_integer_to_int (afw_integer_t integer, afw_xctx_t *xctx)
 Safely cast afw_integer_t to int. More...
 
int afw_safe_cast_size_to_int (afw_size_t size, afw_xctx_t *xctx)
 Safely cast afw_size_t to int. More...
 
afw_integer_t afw_safe_cast_size_to_integer (afw_size_t size, afw_xctx_t *xctx)
 Safely cast afw_size_t to afw_integer_t. More...
 
afw_int32_t afw_safe_cast_size_to_int32 (afw_size_t size, afw_xctx_t *xctx)
 Safely cast afw_size_t to afw_int32_t. More...
 
afw_uint32_t afw_safe_cast_size_to_uint32 (afw_size_t size, afw_xctx_t *xctx)
 Safely cast afw_size_t to afw_uint32_t. More...
 

Detailed Description

Safe cast between c types.

Function Documentation

◆ afw_safe_cast_integer_to_int()

int afw_safe_cast_integer_to_int ( afw_integer_t  integer,
afw_xctx_t xctx 
)

Safely cast afw_integer_t to int.

Parameters
integerafw_integer_t
Returns
native int

The size of these on some systems may be different.

Definition at line 89 of file afw_safe_cast.h.

◆ afw_safe_cast_integer_to_size()

afw_size_t afw_safe_cast_integer_to_size ( afw_integer_t  integer,
afw_xctx_t xctx 
)

Safely cast afw_integer_t to afw_size_t.

Parameters
integerafw_integer_t
Returns
native afw_size_t

The size of these on some systems may be different.

Definition at line 68 of file afw_safe_cast.h.

◆ afw_safe_cast_off_to_size()

afw_size_t afw_safe_cast_off_to_size ( afw_off_t  off,
afw_xctx_t xctx 
)

Safely cast afw_off_t to afw_size_t.

Parameters
offafw_off_t
Returns
native afw_size_t

The size of these on some systems may be different.

Definition at line 48 of file afw_safe_cast.h.

◆ afw_safe_cast_size_to_int()

int afw_safe_cast_size_to_int ( afw_size_t  size,
afw_xctx_t xctx 
)

Safely cast afw_size_t to int.

Parameters
sizeafw_size_t
Returns
native int

The size of these on some systems may be different.

Definition at line 110 of file afw_safe_cast.h.

◆ afw_safe_cast_size_to_int32()

afw_int32_t afw_safe_cast_size_to_int32 ( afw_size_t  size,
afw_xctx_t xctx 
)

Safely cast afw_size_t to afw_int32_t.

Parameters
sizeafw_size_t
Returns
native int

The size of these on some systems may be different.

Definition at line 152 of file afw_safe_cast.h.

◆ afw_safe_cast_size_to_integer()

afw_integer_t afw_safe_cast_size_to_integer ( afw_size_t  size,
afw_xctx_t xctx 
)

Safely cast afw_size_t to afw_integer_t.

Parameters
sizeafw_size_t
Returns
afw_integer_t

The size of these on some systems may be different.

Definition at line 131 of file afw_safe_cast.h.

◆ afw_safe_cast_size_to_uint32()

afw_uint32_t afw_safe_cast_size_to_uint32 ( afw_size_t  size,
afw_xctx_t xctx 
)

Safely cast afw_size_t to afw_uint32_t.

Parameters
sizeafw_size_t
Returns
native int

The size of these on some systems may be different.

Definition at line 173 of file afw_safe_cast.h.