theSq3Lite 10.0 NHI1 - theKernel - theLink - theConfig - theSq3Lite - theCompiler - theBrain - theGuard - theLib - theATL
c - tcl - atl - cs - py - rb - jv - cc
Loading...
Searching...
No Matches
Sq3BlobC_Class_C_API

Sq3BlobC - define the class … More...

+ Collaboration diagram for Sq3BlobC_Class_C_API:

Topics

 Sq3BlobC_Class_Define_C_API
 Sq3BlobC - low level definition, access and cast …
 

Macros

#define Sq3GetBlobFromNat(_nat)
 helper for Sq3BlobC_ObjNew
 

Typedefs

typedef struct Sq3BlobSSQ3_BLOB
 class-shortcut for struct Sq3BlobS *, all shortcut using the XX_YYY syntax (only for public API) …
 
typedef const struct Sq3BlobSSQ3_BLOBN
 class-shortcut for const struct Sq3BlobS *, all const shortcut using the XX_YYYC syntax (only for public API) …
 
typedef struct Sq3BlobS SQ3_BLOBR
 reference-shortcut for struct Sq3BlobS, all shortcut using the XX_YYYR syntax (only for public API) …
 

Sq3BlobC - Export - inline - interact with an external software

static MK_ARTIFICIAL SQ3_BLOB Sq3BlobC_ObjNew (sqlite3_blob *hdl)
 return Programming-Language-Micro-Kernel (PLMK) instance from native hdl
 
static SQ3_BLOB Sq3BlobC_ObjCreate (sqlite3_blob *hdl)
 return Programming-Language-Micro-Kernel (PLMK) instance from native hdl
 
static MK_HDL Sq3BlobHandleGet_RT (MK_RT mkrt, SQ3_BLOB const blob)
 Handle-Get-Slot - returns a export-hdl to the Sq3BlobC useable for external storage
 
static SQ3_BLOB Sq3BlobHandleResolve_RT (MK_RT mkrt, MK_HDL const netHdl)
 Handle-Resolve-Slot - return a Sq3BlobC from netHdl or null if invalid…
 
#define Sq3BlobHandleResolve_e(netHdl)
 wrapper for Sq3BlobHandleResolve with error-handline
 

Sq3BlobC - Misc - function - unspecified functions to perform different tasks

static SQ3_BLOB Sq3BlobGetNull (void)
 Null-Slot - return a Sq3BlobC typed NULL instance …
 

Sq3BlobC - Introspection - inline - access to all instances created by class starting with the last one

static SQ3_BLOB Sq3BlobInstances_RT (MK_RT mkrt)
 get head-instance from linked-list of Sq3BlobS type …
 
static SQ3_BLOB Sq3BlobNext (SQ3_BLOB const blob)
 get next instance from linked-list of Sq3BlobS type
 
static SQ3_BLOB Sq3BlobPrev (SQ3_BLOB const blob)
 get previous instance from linked-list of Sq3BlobS type
 

Sq3BlobC - Export - function

SQ3_BLOB Sq3BlobHandleResolveP (MK_RT mkrt, MK_HDL const netHdl)
 Non-inline replacement for Sq3BlobHandleResolve
 
MK_HDL Sq3BlobHandleGetP (MK_RT mkrt, SQ3_BLOB const blob)
 Non-inline replacement for Sq3BlobHandleGet
 

Sq3BlobC - Introspection - function

SQ3_BLOB Sq3BlobNextP (SQ3_BLOB const blob)
 Non-inline replacement for Sq3BlobNext
 
SQ3_BLOB Sq3BlobPrevP (SQ3_BLOB const blob)
 Non-inline replacement for Sq3BlobPrev
 
SQ3_BLOB Sq3BlobInstancesP (MK_RT mkrt)
 Non-inline replacement for Sq3BlobInstances
 

Sq3BlobC - Misc - function

SQ3_BLOB Sq3BlobGetNullP (void)
 Non-inline replacement for Sq3BlobGetNull
 

Sq3BlobC - Export - overload

#define Sq3BlobHandleResolve_NULL(...)
 
#define Sq3BlobHandleResolve(...)
 
#define Sq3BlobHandleGet_NULL(...)
 
#define Sq3BlobHandleGet(...)
 

Sq3BlobC - Introspection - overload

#define Sq3BlobInstances_NULL()
 
#define Sq3BlobInstances()
 

Detailed Description

Sq3BlobC - define the class …

Macro Definition Documentation

◆ Sq3BlobHandleGet

#define Sq3BlobHandleGet ( ...)
Value:
#define MK_RT_CALL
static MK_HDL Sq3BlobHandleGet_RT(MK_RT mkrt, SQ3_BLOB const blob)
Handle-Get-Slot - returns a export-hdl to the Sq3BlobC useable for external storage

Definition at line 28 of file sqlite3_overload_sq3.h.

◆ Sq3BlobHandleGet_NULL

#define Sq3BlobHandleGet_NULL ( ...)
Value:
#define MK_RT_CALL_NULL

Definition at line 27 of file sqlite3_overload_sq3.h.

◆ Sq3BlobHandleResolve

#define Sq3BlobHandleResolve ( ...)
Value:
static SQ3_BLOB Sq3BlobHandleResolve_RT(MK_RT mkrt, MK_HDL const netHdl)
Handle-Resolve-Slot - return a Sq3BlobC from netHdl or null if invalid…

Definition at line 24 of file sqlite3_overload_sq3.h.

◆ Sq3BlobHandleResolve_e

#define Sq3BlobHandleResolve_e ( netHdl)
Value:
({ \
MK_HDL tmpHdl=netHdl; \
SQ3_BLOB tmp; \
if (tmpHdl==0) { \
tmp=NULL; \
} else { \
tmp=Sq3BlobHandleResolve(tmpHdl); \
if (tmp==NULL) { \
MkErrorSetC_1_NULL("ERROR: 'Sq3BlobC' handle is 'NULL'"); \
goto error; \
}; \
}; \
tmp; \
})
int32_t MK_HDL
#define Sq3BlobHandleResolve(...)
Struct to represent the data of the Sq3BlobC …

wrapper for Sq3BlobHandleResolve with error-handline

Parameters
[in]netHdlThe handle previously returned by MkObjectHandleGet.
Returns
Return an valid SQ3_BLOB or null with an error set.
  • If netHdl is 0 than null is returned and the upper-code decide how to deal with it.
  • Sq3BlobHandleResolve return an valid SQ3_BLOB or null if the netHdl is invalid or the underlying object has already been deleted.
    • If a null is returned than an error-message is created and a jump to the label error is done.
    • If a SQ3_BLOB is returned than the netHdl is valid.

Definition at line 265 of file Sq3BlobC_def_sq3.h.

265#define Sq3BlobHandleResolve_e(netHdl) ({ \
266 MK_HDL tmpHdl=netHdl; \
267 SQ3_BLOB tmp; \
268 if (tmpHdl==0) { \
269 tmp=NULL; \
270 } else { \
271 tmp=Sq3BlobHandleResolve(tmpHdl); \
272 if (tmp==NULL) { \
273 MkErrorSetC_1_NULL("ERROR: 'Sq3BlobC' handle is 'NULL'"); \
274 goto error; \
275 }; \
276 }; \
277 tmp; \
278})

◆ Sq3BlobHandleResolve_NULL

#define Sq3BlobHandleResolve_NULL ( ...)
Value:

Definition at line 23 of file sqlite3_overload_sq3.h.

◆ Sq3BlobInstances

#define Sq3BlobInstances ( )
Value:
#define MK_RT_CALL_ONLY
static SQ3_BLOB Sq3BlobInstances_RT(MK_RT mkrt)
get head-instance from linked-list of Sq3BlobS type …

Definition at line 39 of file sqlite3_overload_sq3.h.

◆ Sq3BlobInstances_NULL

#define Sq3BlobInstances_NULL ( )
Value:

Definition at line 38 of file sqlite3_overload_sq3.h.

◆ Sq3GetBlobFromNat

#define Sq3GetBlobFromNat ( _nat)
Value:
SQ3_SET_T(Sq3BlobC,some_api__hook,_nat)
#define SQ3_SET_T(_cls, _hook, _nat)

helper for Sq3BlobC_ObjNew

Definition at line 187 of file Sq3BlobC_def_sq3.h.

Typedef Documentation

◆ SQ3_BLOB

typedef struct Sq3BlobS* SQ3_BLOB

class-shortcut for struct Sq3BlobS *, all shortcut using the XX_YYY syntax (only for public API) …

Definition at line 379 of file LibSq3Lite_sq3.h.

◆ SQ3_BLOBN

typedef const struct Sq3BlobS* SQ3_BLOBN

class-shortcut for const struct Sq3BlobS *, all const shortcut using the XX_YYYC syntax (only for public API) …

Definition at line 382 of file LibSq3Lite_sq3.h.

◆ SQ3_BLOBR

typedef struct Sq3BlobS SQ3_BLOBR

reference-shortcut for struct Sq3BlobS, all shortcut using the XX_YYYR syntax (only for public API) …

Definition at line 385 of file LibSq3Lite_sq3.h.

Function Documentation

◆ Sq3BlobC_ObjCreate()

static SQ3_BLOB Sq3BlobC_ObjCreate ( sqlite3_blob * hdl)
inlinestatic

return Programming-Language-Micro-Kernel (PLMK) instance from native hdl

Definition at line 210 of file Sq3BlobC_def_sq3.h.

210 {
212 return Sq3GetBlobFromNat(hdl);
213}
#define MkRtSetup_NULL
#define Sq3GetBlobFromNat(_nat)
helper for Sq3BlobC_ObjNew …
+ Here is the caller graph for this function:

◆ Sq3BlobC_ObjNew()

static MK_ARTIFICIAL SQ3_BLOB Sq3BlobC_ObjNew ( sqlite3_blob * hdl)
inlinestatic

return Programming-Language-Micro-Kernel (PLMK) instance from native hdl

Definition at line 203 of file Sq3BlobC_def_sq3.h.

203 {
205 return Sq3GetBlobFromNat(hdl);
206}
+ Here is the caller graph for this function:

◆ Sq3BlobGetNull()

static SQ3_BLOB Sq3BlobGetNull ( void )
inlinestatic

Null-Slot - return a Sq3BlobC typed NULL instance …

Definition at line 290 of file Sq3BlobC_def_sq3.h.

290 {
291 return (SQ3_BLOB)MK_NULL;
292 }
#define MK_NULL
+ Here is the caller graph for this function:

◆ Sq3BlobGetNullP()

SQ3_BLOB Sq3BlobGetNullP ( void )

Non-inline replacement for Sq3BlobGetNull

◆ Sq3BlobHandleGet_RT()

static MK_HDL Sq3BlobHandleGet_RT ( MK_RT mkrt,
SQ3_BLOB const blob )
inlinestatic

Handle-Get-Slot - returns a export-hdl to the Sq3BlobC useable for external storage

The export-hdl is a reference to an instance that can be stored in software and converted back into an instance using the Sq3BlobHandleResolve.

By default, the export-hdl is initialized to "0", which is equivalent to does not exist. This function returns a non-zero and unique export-hdl that is recreated if necessary.

The export-hdl is only valid until the Programming-Language-Micro-Kernel (PLMK) ends.

example: The export-hdl is used in rpc to identify an object across the network.

Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]blobProgramming-Language-Micro-Kernel (PLMK) instance from sqlite3_blob
Returns
the required export-hdl

Definition at line 232 of file Sq3BlobC_def_sq3.h.

235 {
236 return MkObjectHandleGet(blob?MkOBJ(blob):NULL);
237}
#define MkObjectHandleGet(...)
#define MkOBJ(x)

◆ Sq3BlobHandleGetP()

MK_HDL Sq3BlobHandleGetP ( MK_RT mkrt,
SQ3_BLOB const blob )

Non-inline replacement for Sq3BlobHandleGet

◆ Sq3BlobHandleResolve_RT()

static SQ3_BLOB Sq3BlobHandleResolve_RT ( MK_RT mkrt,
MK_HDL const netHdl )
inlinestatic

Handle-Resolve-Slot - return a Sq3BlobC from netHdl or null if invalid…

The Sq3BlobHandleResolve undo the Sq3BlobHandleGet and is intended to export a unique identifer into external code not belonging to the Programming-Language-Micro-Kernel (PLMK).

Parameters
[in]mkrtthe MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only)
[in]netHdlhandle former exported with Sq3BlobHandleGet
Returns
the required handle or null if netHdl is invalid

Definition at line 249 of file Sq3BlobC_def_sq3.h.

252 {
253 return Sq3Blob(MkObjectHandleResolve(netHdl));
254}
#define MkObjectHandleResolve(...)
static SQ3_BLOB Sq3Blob(MK_MNG mng)
cast a unknown-object into an Sq3BlobS pointer or NULL if not possible

◆ Sq3BlobHandleResolveP()

SQ3_BLOB Sq3BlobHandleResolveP ( MK_RT mkrt,
MK_HDL const netHdl )

Non-inline replacement for Sq3BlobHandleResolve

◆ Sq3BlobInstances_RT()

static SQ3_BLOB Sq3BlobInstances_RT ( MK_RT mkrt)
inlinestatic

get head-instance from linked-list of Sq3BlobS type …

The head-instance is the last instance created.

Definition at line 314 of file Sq3BlobC_def_sq3.h.

314 {
317}
static MK_OBJ MkTypeInstances(MK_TYP const typ)
__thread MK_TYP Sq3BlobC_TT
class as MkTypeDefS-class-type …
#define SQ3_STATIC_RT

◆ Sq3BlobInstancesP()

SQ3_BLOB Sq3BlobInstancesP ( MK_RT mkrt)

Non-inline replacement for Sq3BlobInstances

◆ Sq3BlobNext()

static SQ3_BLOB Sq3BlobNext ( SQ3_BLOB const blob)
inlinestatic

get next instance from linked-list of Sq3BlobS type

Definition at line 321 of file Sq3BlobC_def_sq3.h.

321 {
322 MK_INSTANCE_HDL(blob);
323 return (SQ3_BLOB)Sq3BlobC_X2obj(blob)->obj_protect.next;
324}
#define MK_INSTANCE_HDL(x)
#define Sq3BlobC_X2obj(x)
+ Here is the caller graph for this function:

◆ Sq3BlobNextP()

SQ3_BLOB Sq3BlobNextP ( SQ3_BLOB const blob)

Non-inline replacement for Sq3BlobNext

◆ Sq3BlobPrev()

static SQ3_BLOB Sq3BlobPrev ( SQ3_BLOB const blob)
inlinestatic

get previous instance from linked-list of Sq3BlobS type

Definition at line 328 of file Sq3BlobC_def_sq3.h.

328 {
329 MK_INSTANCE_HDL(blob);
330 return (SQ3_BLOB)Sq3BlobC_X2obj(blob)->obj_protect.prev;
331}
+ Here is the caller graph for this function:

◆ Sq3BlobPrevP()

SQ3_BLOB Sq3BlobPrevP ( SQ3_BLOB const blob)

Non-inline replacement for Sq3BlobPrev