regify utility  2.0.0-0

This section contains collection support for 16 Bit Integers such as int16_t. More...

Functions

RUAPI ru_uint ruInt16Hash (trans_ptr key)
 Returns a hash for given 16 bit integer number. More...
 
RUAPI bool ruInt16Match (trans_ptr testKey, trans_ptr existingKey)
 Convenience 16 bit integer match function for Maps. More...
 
RUAPI int32_t ruInt16Comp (trans_ptr testVal, trans_ptr existingVal)
 16 bit integer comparator function for the ruType system More...
 
RUAPI ptr ruInt16RefPtr (ptr in)
 Returns the content of the given 16 bit integer address as pointer. More...
 
RUAPI int32_t ruRefPtrInt16 (ptr src, ptr *dst)
 Copies the 16 bit integer stored in src to dst. More...
 
RUAPI ruType ruTypeInt16 (void)
 Returns an ruType used for 16 bit integers. More...
 

Detailed Description

This section contains collection support for 16 Bit Integers such as int16_t.

Function Documentation

◆ ruInt16Comp()

RUAPI int32_t ruInt16Comp ( trans_ptr  testVal,
trans_ptr  existingVal 
)

16 bit integer comparator function for the ruType system

Parameters
testValValue to compare against existing value.
existingValThe existing value to compare testVal to.
Returns
-1 if testVal is less existingVal, 1 if testVal is greater existingVal or 0 in case both of them are equal.

◆ ruInt16Hash()

RUAPI ru_uint ruInt16Hash ( trans_ptr  key)

Returns a hash for given 16 bit integer number.

Parameters
keyNumber to hash
Returns
The hash of the given number.

◆ ruInt16Match()

RUAPI bool ruInt16Match ( trans_ptr  testKey,
trans_ptr  existingKey 
)

Convenience 16 bit integer match function for Maps.

Parameters
testKeyFirst comparison int.
existingKeySecond comparison int.
Returns
true if they are equal

◆ ruInt16RefPtr()

RUAPI ptr ruInt16RefPtr ( ptr  in)

Returns the content of the given 16 bit integer address as pointer.

Parameters
inaddress to 16 bit integer
Returns
content of given address in pointer sized field

◆ ruRefPtrInt16()

RUAPI int32_t ruRefPtrInt16 ( ptr  src,
ptr dst 
)

Copies the 16 bit integer stored in src to dst.

Parameters
srcWhere the 16 bit integer is stored, usually in the collection.
dstWhere the value will be copied to properly type casted.
Returns
RUE_OK unless dst is not set.

◆ ruTypeInt16()

RUAPI ruType ruTypeInt16 ( void  )

Returns an ruType used for 16 bit integers.

Returns
16 bit integer type specification. Caller need not free.