theKernel 10.0
Loading...
Searching...
No Matches
MkKernel_Binary_C_API

MkKernel PACKAGE - operate on a binary al struct of pointer and size … More...

+ Collaboration diagram for MkKernel_Binary_C_API:

Classes

struct  libmkkernel::MkBinaryR
 binary data default format … More...
 

Functions

static MkBinaryR libmkkernel::MkBinaryCreate (MK_SIZE size, MK_BINN data)
 create a binary from data and size ...
 
static bool libmkkernel::MkBinaryIsNull (const MkBinaryR bin)
 check if binary is NULL ...
 
static const MkBinaryR libmkkernel::MkBinaryCreateSlice (const MkBinaryR bin, MK_SIZE start, MK_SIZE wide)
 create a binary slice ...
 
static MkBinaryR libmkkernel::MkBinaryDup_RT (MK_RT mkrt, const MkBinaryR bin)
 create a binary as duplicate from an already existsing MkBinaryR ...
 
static void libmkkernel::MkBinaryLog_RT (MK_RT mkrt, const MkBinaryR bin)
 get size from the binary ...
 
static MK_BINN libmkkernel::MkBinaryGetData (const MkBinaryR bin)
 get data pointer from the binary ...
 
static MK_SIZE libmkkernel::MkBinaryGetSize (const MkBinaryR bin)
 get size from the binary ...
 

MkKernel - MkKernel_Binary_C_API - overload

#define MkBinaryDup_NULL(...)
 
#define MkBinaryDup(...)
 
#define MkBinaryLog_NULL(...)
 
#define MkBinaryLog(...)
 

Detailed Description

MkKernel PACKAGE - operate on a binary al struct of pointer and size …

Attention
In general MkBinaryR is owned by the called function, to get your own copy use MkBinaryDup.

Macro Definition Documentation

◆ MkBinaryDup

#define MkBinaryDup ( ...)
Value:
MkBinaryDup_RT(MK_RT_CALL __VA_ARGS__)
#define MK_RT_CALL

Definition at line 1348 of file kernel_overload_mk.h.

◆ MkBinaryDup_NULL

#define MkBinaryDup_NULL ( ...)
Value:
MkBinaryDup_RT(MK_RT_CALL_NULL __VA_ARGS__)
#define MK_RT_CALL_NULL

Definition at line 1347 of file kernel_overload_mk.h.

◆ MkBinaryLog

#define MkBinaryLog ( ...)
Value:
MkBinaryLog_RT(MK_RT_CALL __VA_ARGS__)

Definition at line 1350 of file kernel_overload_mk.h.

◆ MkBinaryLog_NULL

#define MkBinaryLog_NULL ( ...)
Value:
MkBinaryLog_RT(MK_RT_CALL_NULL __VA_ARGS__)

Definition at line 1349 of file kernel_overload_mk.h.

Function Documentation

◆ MkBinaryCreate()

static MkBinaryR libmkkernel::MkBinaryCreate ( MK_SIZE size,
MK_BINN data )
inlinestatic

create a binary from data and size ...

Definition at line 1690 of file LibMkKernel_mk.h.

1690 {
1691 return (MkBinaryR) {size, data};
1692}
+ Here is the caller graph for this function:

◆ MkBinaryCreateSlice()

static const MkBinaryR libmkkernel::MkBinaryCreateSlice ( const MkBinaryR bin,
MK_SIZE start,
MK_SIZE wide )
inlinestatic

create a binary slice ...

Definition at line 1702 of file LibMkKernel_mk.h.

1702 {
1703 if (start>bin.size)
1704 return (const MkBinaryR) {0, NULL};
1705 else
1706 return (const MkBinaryR) {start+wide>bin.size?bin.size-start:wide, bin.data+start};
1707}
+ Here is the caller graph for this function:

◆ MkBinaryDup_RT()

static MkBinaryR libmkkernel::MkBinaryDup_RT ( MK_RT mkrt,
const MkBinaryR bin )
inlinestatic

create a binary as duplicate from an already existsing MkBinaryR ...

Definition at line 13566 of file LibMkKernel_mk.h.

13569 {

◆ MkBinaryGetData()

static MK_BINN libmkkernel::MkBinaryGetData ( const MkBinaryR bin)
inlinestatic

get data pointer from the binary ...

Definition at line 1719 of file LibMkKernel_mk.h.

1719 {
1720 return bin.data;
1721}
+ Here is the caller graph for this function:

◆ MkBinaryGetSize()

static MK_SIZE libmkkernel::MkBinaryGetSize ( const MkBinaryR bin)
inlinestatic

get size from the binary ...

Definition at line 1725 of file LibMkKernel_mk.h.

1725 {
1726 return bin.size;
1727}
+ Here is the caller graph for this function:

◆ MkBinaryIsNull()

static bool libmkkernel::MkBinaryIsNull ( const MkBinaryR bin)
inlinestatic

check if binary is NULL ...

Definition at line 1696 of file LibMkKernel_mk.h.

1696 {
1697 return bin.data == NULL;
1698}
+ Here is the caller graph for this function:

◆ MkBinaryLog_RT()

static void libmkkernel::MkBinaryLog_RT ( MK_RT mkrt,
const MkBinaryR bin )
inlinestatic

get size from the binary ...

Definition at line 13572 of file LibMkKernel_mk.h.