theSq3Lite 10.0
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 libsq3lite::Sq3BlobC_ObjNew
 

Typedefs

typedef struct Sq3BlobSlibsq3lite::SQ3_BLOB
 class-shortcut for struct Sq3BlobS *, all shortcut using the XX_YYY syntax (only for public API) …
 
typedef const struct Sq3BlobSlibsq3lite::SQ3_BLOBN
 class-shortcut for const struct Sq3BlobS *, all const shortcut using the XX_YYYC syntax (only for public API) …
 
typedef struct Sq3BlobS libsq3lite::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 libsq3lite::Sq3BlobC_ObjNew (sqlite3_blob *hdl)
 return Programming-Language-Micro-Kernel (PLMK) instance from native hdl
 
static SQ3_BLOB libsq3lite::Sq3BlobC_ObjCreate (sqlite3_blob *hdl)
 return Programming-Language-Micro-Kernel (PLMK) instance from native hdl
 
static MK_HDL libsq3lite::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 libsq3lite::Sq3BlobHandleResolve_RT (MK_RT mkrt, MK_HDL const netHdl)
 Handle-Resolve-Slot - return a Sq3BlobC from netHdl or MK_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 libsq3lite::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 libsq3lite::Sq3BlobInstances_RT (MK_RT mkrt)
 get head-instance from linked-list of Sq3BlobS type …
 
static SQ3_BLOB libsq3lite::Sq3BlobNext (SQ3_BLOB const blob)
 get next instance from linked-list of Sq3BlobS type
 
static SQ3_BLOB libsq3lite::Sq3BlobPrev (SQ3_BLOB const blob)
 get previous instance from linked-list of Sq3BlobS type
 

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:
Sq3BlobHandleGet_RT(MK_RT_CALL __VA_ARGS__)
#define MK_RT_CALL

Definition at line 25 of file sqlite3_overload_sq3.h.

◆ Sq3BlobHandleGet_NULL

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

Definition at line 24 of file sqlite3_overload_sq3.h.

◆ Sq3BlobHandleResolve

#define Sq3BlobHandleResolve ( ...)
Value:
Sq3BlobHandleResolve_RT(MK_RT_CALL __VA_ARGS__)

Definition at line 21 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; \
})
#define Sq3BlobHandleResolve(...)

wrapper for Sq3BlobHandleResolve with error-handline

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

Definition at line 262 of file Sq3BlobC_def_sq3.h.

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

◆ Sq3BlobHandleResolve_NULL

#define Sq3BlobHandleResolve_NULL ( ...)
Value:
Sq3BlobHandleResolve_RT(MK_RT_CALL_NULL __VA_ARGS__)

Definition at line 20 of file sqlite3_overload_sq3.h.

◆ Sq3BlobInstances

#define Sq3BlobInstances ( )
Value:
Sq3BlobInstances_RT(MK_RT_CALL_ONLY)
#define MK_RT_CALL_ONLY

Definition at line 36 of file sqlite3_overload_sq3.h.

◆ Sq3BlobInstances_NULL

#define Sq3BlobInstances_NULL ( )
Value:
Sq3BlobInstances_RT(MK_RT_CALL_NULL_ONLY)
#define MK_RT_CALL_NULL_ONLY

Definition at line 35 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 libsq3lite::Sq3BlobC_ObjNew

Definition at line 184 of file Sq3BlobC_def_sq3.h.

Typedef Documentation

◆ SQ3_BLOB

typedef struct Sq3BlobS* libsq3lite::SQ3_BLOB

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

Definition at line 376 of file LibSq3Lite_sq3.h.

◆ SQ3_BLOBN

typedef const struct Sq3BlobS* libsq3lite::SQ3_BLOBN

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

Definition at line 379 of file LibSq3Lite_sq3.h.

◆ SQ3_BLOBR

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

Definition at line 382 of file LibSq3Lite_sq3.h.

Function Documentation

◆ Sq3BlobC_ObjCreate()

static SQ3_BLOB libsq3lite::Sq3BlobC_ObjCreate ( sqlite3_blob * hdl)
inlinestatic

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

Definition at line 207 of file Sq3BlobC_def_sq3.h.

207 {
209 return Sq3GetBlobFromNat(hdl);
210}
#define MkRtSetup_NULL
#define Sq3GetBlobFromNat(_nat)
helper for libsq3lite::Sq3BlobC_ObjNew …

◆ Sq3BlobC_ObjNew()

static MK_ARTIFICIAL SQ3_BLOB libsq3lite::Sq3BlobC_ObjNew ( sqlite3_blob * hdl)
inlinestatic

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

Definition at line 200 of file Sq3BlobC_def_sq3.h.

200 {
202 return Sq3GetBlobFromNat(hdl);
203}

◆ Sq3BlobGetNull()

static SQ3_BLOB libsq3lite::Sq3BlobGetNull ( void )
inlinestatic

Null-Slot - return a Sq3BlobC typed NULL instance …

Definition at line 287 of file Sq3BlobC_def_sq3.h.

287 {
288 return (SQ3_BLOB)MK_NULL;
289 }
#define MK_NULL
+ Here is the caller graph for this function:

◆ Sq3BlobHandleGet_RT()

static MK_HDL libsq3lite::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 229 of file Sq3BlobC_def_sq3.h.

232 {
233 return MkObjectHandleGet(blob?MkOBJ(blob):NULL);
234}
#define MkObjectHandleGet(...)
#define MkOBJ(x)
+ Here is the caller graph for this function:

◆ Sq3BlobHandleResolve_RT()

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

Handle-Resolve-Slot - return a Sq3BlobC from netHdl or MK_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 MK_NULL if netHdl is invalid

Definition at line 246 of file Sq3BlobC_def_sq3.h.

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

◆ Sq3BlobInstances_RT()

static SQ3_BLOB libsq3lite::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 311 of file Sq3BlobC_def_sq3.h.

311 {
313 return (SQ3_BLOB)MkTypeInstances(Sq3BlobC_TT);
314}
#define SQ3_STATIC_RT
+ Here is the caller graph for this function:

◆ Sq3BlobNext()

static SQ3_BLOB libsq3lite::Sq3BlobNext ( SQ3_BLOB const blob)
inlinestatic

get next instance from linked-list of Sq3BlobS type

Definition at line 318 of file Sq3BlobC_def_sq3.h.

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

◆ Sq3BlobPrev()

static SQ3_BLOB libsq3lite::Sq3BlobPrev ( SQ3_BLOB const blob)
inlinestatic

get previous instance from linked-list of Sq3BlobS type

Definition at line 325 of file Sq3BlobC_def_sq3.h.

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