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
Sq3FileC_Class_C_API

Sq3FileC - define the class … More...

+ Collaboration diagram for Sq3FileC_Class_C_API:

Topics

 Sq3FileC_Class_Define_C_API
 Sq3FileC - low level definition, access and cast …
 

Macros

#define Sq3GetFileFromNat(_nat)
 helper for Sq3FileC_ObjNew
 

Typedefs

typedef struct Sq3FileSSQ3_FILE
 class-shortcut for struct Sq3FileS *, all shortcut using the XX_YYY syntax (only for public API) …
 
typedef const struct Sq3FileSSQ3_FILEN
 class-shortcut for const struct Sq3FileS *, all const shortcut using the XX_YYYC syntax (only for public API) …
 
typedef struct Sq3FileS SQ3_FILER
 reference-shortcut for struct Sq3FileS, all shortcut using the XX_YYYR syntax (only for public API) …
 

Sq3FileC - Export - inline - interact with an external software

static MK_ARTIFICIAL SQ3_FILE Sq3FileC_ObjNew (sqlite3_file *hdl)
 return Programming-Language-Micro-Kernel (PLMK) instance from native hdl
 
static SQ3_FILE Sq3FileC_ObjCreate (sqlite3_file *hdl)
 return Programming-Language-Micro-Kernel (PLMK) instance from native hdl
 
static MK_HDL Sq3FileHandleGet_RT (MK_RT mkrt, SQ3_FILE const file)
 Handle-Get-Slot - returns a export-hdl to the Sq3FileC useable for external storage
 
static SQ3_FILE Sq3FileHandleResolve_RT (MK_RT mkrt, MK_HDL const netHdl)
 Handle-Resolve-Slot - return a Sq3FileC from netHdl or "MK_NULL" if invalid…
 
#define Sq3FileHandleResolve_e(netHdl)
 wrapper for Sq3FileHandleResolve with error-handline
 

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

static SQ3_FILE Sq3FileGetNull (void)
 Null-Slot - return a Sq3FileC typed NULL instance …
 

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

static SQ3_FILE Sq3FileInstances_RT (MK_RT mkrt)
 get head-instance from linked-list of Sq3FileS type …
 
static SQ3_FILE Sq3FileNext (SQ3_FILE const file)
 get next instance from linked-list of Sq3FileS type
 
static SQ3_FILE Sq3FilePrev (SQ3_FILE const file)
 get previous instance from linked-list of Sq3FileS type
 

Sq3FileC - Export - function

SQ3_FILE Sq3FileHandleResolveP (MK_RT mkrt, MK_HDL const netHdl)
 Non-inline replacement for Sq3FileHandleResolve
 
MK_HDL Sq3FileHandleGetP (MK_RT mkrt, SQ3_FILE const file)
 Non-inline replacement for Sq3FileHandleGet
 

Sq3FileC - Introspection - function

SQ3_FILE Sq3FileNextP (SQ3_FILE const file)
 Non-inline replacement for Sq3FileNext
 
SQ3_FILE Sq3FilePrevP (SQ3_FILE const file)
 Non-inline replacement for Sq3FilePrev
 
SQ3_FILE Sq3FileInstancesP (MK_RT mkrt)
 Non-inline replacement for Sq3FileInstances
 

Sq3FileC - Misc - function

SQ3_FILE Sq3FileGetNullP (void)
 Non-inline replacement for Sq3FileGetNull
 

Sq3FileC - Export - overload

#define Sq3FileHandleResolve_NULL(...)
 
#define Sq3FileHandleResolve(...)
 
#define Sq3FileHandleGet_NULL(...)
 
#define Sq3FileHandleGet(...)
 

Sq3FileC - Introspection - overload

#define Sq3FileInstances_NULL()
 
#define Sq3FileInstances()
 

Detailed Description

Sq3FileC - define the class …

Macro Definition Documentation

◆ Sq3FileHandleGet

#define Sq3FileHandleGet ( ...)
Value:
#define MK_RT_CALL
static MK_HDL Sq3FileHandleGet_RT(MK_RT mkrt, SQ3_FILE const file)
Handle-Get-Slot - returns a export-hdl to the Sq3FileC useable for external storage

Definition at line 99 of file sqlite3_overload_sq3.h.

◆ Sq3FileHandleGet_NULL

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

Definition at line 98 of file sqlite3_overload_sq3.h.

◆ Sq3FileHandleResolve

#define Sq3FileHandleResolve ( ...)
Value:
static SQ3_FILE Sq3FileHandleResolve_RT(MK_RT mkrt, MK_HDL const netHdl)
Handle-Resolve-Slot - return a Sq3FileC from netHdl or "MK_NULL" if invalid…

Definition at line 95 of file sqlite3_overload_sq3.h.

◆ Sq3FileHandleResolve_e

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

wrapper for Sq3FileHandleResolve with error-handline

Parameters
[in]netHdlThe handle previously returned by MkObjectHandleGet.
Returns
Return an valid SQ3_FILE 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.
  • Sq3FileHandleResolve return an valid SQ3_FILE 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 SQ3_FILE is returned than the netHdl is valid.

Definition at line 265 of file Sq3FileC_def_sq3.h.

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

◆ Sq3FileHandleResolve_NULL

#define Sq3FileHandleResolve_NULL ( ...)
Value:

Definition at line 94 of file sqlite3_overload_sq3.h.

◆ Sq3FileInstances

#define Sq3FileInstances ( )
Value:
#define MK_RT_CALL_ONLY
static SQ3_FILE Sq3FileInstances_RT(MK_RT mkrt)
get head-instance from linked-list of Sq3FileS type …

Definition at line 110 of file sqlite3_overload_sq3.h.

◆ Sq3FileInstances_NULL

#define Sq3FileInstances_NULL ( )
Value:

Definition at line 109 of file sqlite3_overload_sq3.h.

◆ Sq3GetFileFromNat

#define Sq3GetFileFromNat ( _nat)
Value:
SQ3_SET_T(Sq3FileC,some_api__hook,_nat)
#define SQ3_SET_T(_cls, _hook, _nat)

helper for Sq3FileC_ObjNew

Definition at line 187 of file Sq3FileC_def_sq3.h.

Typedef Documentation

◆ SQ3_FILE

typedef struct Sq3FileS* SQ3_FILE

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

Definition at line 393 of file LibSq3Lite_sq3.h.

◆ SQ3_FILEN

typedef const struct Sq3FileS* SQ3_FILEN

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

Definition at line 396 of file LibSq3Lite_sq3.h.

◆ SQ3_FILER

typedef struct Sq3FileS SQ3_FILER

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

Definition at line 399 of file LibSq3Lite_sq3.h.

Function Documentation

◆ Sq3FileC_ObjCreate()

static SQ3_FILE Sq3FileC_ObjCreate ( sqlite3_file * hdl)
inlinestatic

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

Definition at line 210 of file Sq3FileC_def_sq3.h.

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

◆ Sq3FileC_ObjNew()

static MK_ARTIFICIAL SQ3_FILE Sq3FileC_ObjNew ( sqlite3_file * hdl)
inlinestatic

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

Definition at line 203 of file Sq3FileC_def_sq3.h.

203 {
205 return Sq3GetFileFromNat(hdl);
206}

◆ Sq3FileGetNull()

static SQ3_FILE Sq3FileGetNull ( void )
inlinestatic

Null-Slot - return a Sq3FileC typed NULL instance …

Definition at line 290 of file Sq3FileC_def_sq3.h.

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

◆ Sq3FileGetNullP()

SQ3_FILE Sq3FileGetNullP ( void )

Non-inline replacement for Sq3FileGetNull

◆ Sq3FileHandleGet_RT()

static MK_HDL Sq3FileHandleGet_RT ( MK_RT mkrt,
SQ3_FILE const file )
inlinestatic

Handle-Get-Slot - returns a export-hdl to the Sq3FileC 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 Sq3FileHandleResolve.

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]fileProgramming-Language-Micro-Kernel (PLMK) instance from sqlite3_file
Returns
the required export-hdl

Definition at line 232 of file Sq3FileC_def_sq3.h.

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

◆ Sq3FileHandleGetP()

MK_HDL Sq3FileHandleGetP ( MK_RT mkrt,
SQ3_FILE const file )

Non-inline replacement for Sq3FileHandleGet

◆ Sq3FileHandleResolve_RT()

static SQ3_FILE Sq3FileHandleResolve_RT ( MK_RT mkrt,
MK_HDL const netHdl )
inlinestatic

Handle-Resolve-Slot - return a Sq3FileC from netHdl or "MK_NULL" if invalid…

The Sq3FileHandleResolve undo the Sq3FileHandleGet 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 Sq3FileHandleGet
Returns
the required handle or "MK_NULL" if netHdl is invalid

Definition at line 249 of file Sq3FileC_def_sq3.h.

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

◆ Sq3FileHandleResolveP()

SQ3_FILE Sq3FileHandleResolveP ( MK_RT mkrt,
MK_HDL const netHdl )

Non-inline replacement for Sq3FileHandleResolve

◆ Sq3FileInstances_RT()

static SQ3_FILE Sq3FileInstances_RT ( MK_RT mkrt)
inlinestatic

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

The head-instance is the last instance created.

Definition at line 314 of file Sq3FileC_def_sq3.h.

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

◆ Sq3FileInstancesP()

SQ3_FILE Sq3FileInstancesP ( MK_RT mkrt)

Non-inline replacement for Sq3FileInstances

◆ Sq3FileNext()

static SQ3_FILE Sq3FileNext ( SQ3_FILE const file)
inlinestatic

get next instance from linked-list of Sq3FileS type

Definition at line 321 of file Sq3FileC_def_sq3.h.

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

◆ Sq3FileNextP()

SQ3_FILE Sq3FileNextP ( SQ3_FILE const file)

Non-inline replacement for Sq3FileNext

◆ Sq3FilePrev()

static SQ3_FILE Sq3FilePrev ( SQ3_FILE const file)
inlinestatic

get previous instance from linked-list of Sq3FileS type

Definition at line 328 of file Sq3FileC_def_sq3.h.

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

◆ Sq3FilePrevP()

SQ3_FILE Sq3FilePrevP ( SQ3_FILE const file)

Non-inline replacement for Sq3FilePrev