Loading...
Searching...
No Matches
MqContextC_Class_C_API

MqContextC - define the class … More...

+ Collaboration diagram for MqContextC_Class_C_API:

Topics

 MqContextC_Class_Define_C_API
 MqContextC - low level definition, access and cast …
 

Typedefs

typedef struct MqContextSMQ_CTX
 class-shortcut for struct MqContextS *, all shortcut using the XX_YYY syntax (only for public API) …
 
typedef const struct MqContextSMQ_CTXN
 class-shortcut for const struct MqContextS *, all const shortcut using the XX_YYYC syntax (only for public API) …
 
typedef struct MqContextS MQ_CTXR
 reference-shortcut for struct MqContextS, all shortcut using the XX_YYYR syntax (only for public API) …
 

MqContextC - Export - inline - interact with an external software

MK_HDL MqContextHandleGet_RT (MK_RT const mkrt, MQ_CTX const ctx)
 Handle-Get-Slot - returns a export-hdl to the MqContextC useable for external storage
 
MQ_CTX MqContextHandleResolve_RT (MK_RT const mkrt, MK_HDL const netHdl)
 Handle-Resolve-Slot - return a MqContextC from netHdl or None if invalid…
 
#define MqContextHandleResolve_e(netHdl)
 wrapper for MqContextHandleResolve with error-handline
 

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

MQ_CTX MqContextGetNull (void)
 Null-Slot - return a MqContextC typed NULL instance …
 

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

MQ_CTX MqContextInstances_RT (MK_RT_PARSER_ONLY)
 get head-instance from linked-list of MqContextS type …
 
MK_ATTR_HDL MQ_CTX MqContextNext (MQ_CTX const ctx)
 get next instance from linked-list of MqContextS type
 
MK_ATTR_HDL MQ_CTX MqContextPrev (MQ_CTX const ctx)
 get previous instance from linked-list of MqContextS type
 

MqContextC - Export - function

MQ_CTX MqContextHandleResolveP (MK_RT const mkrt, MK_HDL const netHdl)
 Non-inline replacement for MqContextHandleResolve
 
MK_HDL MqContextHandleGetP (MK_RT const mkrt, MQ_CTX const ctx)
 Non-inline replacement for MqContextHandleGet
 

MqContextC - Introspection - function

MQ_CTX MqContextNextP (MQ_CTX const ctx)
 Non-inline replacement for MqContextNext
 
MQ_CTX MqContextPrevP (MQ_CTX const ctx)
 Non-inline replacement for MqContextPrev
 
MQ_CTX MqContextInstancesP (MK_RT_PARSER_ONLY)
 Non-inline replacement for MqContextInstances
 

MqContextC - Misc - function

MQ_CTX MqContextGetNullP (void)
 Non-inline replacement for MqContextGetNull
 

MqContextC - Export - overload

#define MqContextHandleResolve_NULL(...)
 
#define MqContextHandleResolve(...)
 
#define MqContextHandleGet_NULL(...)
 
#define MqContextHandleGet(...)
 

MqContextC - Introspection - overload

#define MqContextInstances_NULL()
 
#define MqContextInstances()
 

Detailed Description

MqContextC - define the class …

Macro Definition Documentation

◆ MqContextHandleGet

#define MqContextHandleGet ( ...)
Value:
#define MK_RT_CALL
MK_HDL MqContextHandleGet_RT(MK_RT const mkrt, MQ_CTX const ctx)
Handle-Get-Slot - returns a export-hdl to the MqContextC useable for external storage

Definition at line 27 of file msgque_overload_mq.h.

◆ MqContextHandleGet_NULL

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

Definition at line 26 of file msgque_overload_mq.h.

◆ MqContextHandleResolve

#define MqContextHandleResolve ( ...)
Value:
MQ_CTX MqContextHandleResolve_RT(MK_RT const mkrt, MK_HDL const netHdl)
Handle-Resolve-Slot - return a MqContextC from netHdl or None if invalid…

Definition at line 23 of file msgque_overload_mq.h.

◆ MqContextHandleResolve_e

#define MqContextHandleResolve_e ( netHdl)
Value:
({ \
MK_HDL tmpHdl=netHdl; \
MQ_CTX tmp; \
if (tmpHdl==0) { \
tmp=NULL; \
} else { \
tmp=MqContextHandleResolve(tmpHdl); \
if (tmp==NULL) { \
MkErrorSetC_1_NULL("ERROR: 'MqContextC' handle is 'NULL'"); \
goto error; \
}; \
}; \
tmp; \
})
#define error
int32_t MK_HDL
#define MqContextHandleResolve(...)
PUBLIC data structure for the pymqmsgque-specific-data

wrapper for MqContextHandleResolve with error-handline

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

Definition at line 4202 of file LibMqMsgque_mq.h.

4202#define MqContextHandleResolve_e(netHdl) ({ \
4203 MK_HDL tmpHdl=netHdl; \
4204 MQ_CTX tmp; \
4205 if (tmpHdl==0) { \
4206 tmp=NULL; \
4207 } else { \
4208 tmp=MqContextHandleResolve(tmpHdl); \
4209 if (tmp==NULL) { \
4210 MkErrorSetC_1_NULL("ERROR: 'MqContextC' handle is 'NULL'"); \
4211 goto error; \
4212 }; \
4213 }; \
4214 tmp; \
4215})

◆ MqContextHandleResolve_NULL

#define MqContextHandleResolve_NULL ( ...)
Value:

Definition at line 22 of file msgque_overload_mq.h.

◆ MqContextInstances

#define MqContextInstances ( )
Value:
#define MK_RT_CALL_ONLY
MQ_CTX MqContextInstances_RT(MK_RT_PARSER_ONLY)
get head-instance from linked-list of MqContextS type …

Definition at line 38 of file msgque_overload_mq.h.

◆ MqContextInstances_NULL

#define MqContextInstances_NULL ( )
Value:

Definition at line 37 of file msgque_overload_mq.h.

Typedef Documentation

◆ MQ_CTX

typedef struct MqContextS* MQ_CTX

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

Definition at line 521 of file LibMqMsgque_mq.h.

◆ MQ_CTXN

typedef const struct MqContextS* MQ_CTXN

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

Definition at line 524 of file LibMqMsgque_mq.h.

◆ MQ_CTXR

typedef struct MqContextS MQ_CTXR

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

Definition at line 527 of file LibMqMsgque_mq.h.

Function Documentation

◆ MqContextGetNull()

MQ_CTX MqContextGetNull ( void )
inline

Null-Slot - return a MqContextC typed NULL instance …

Definition at line 4226 of file LibMqMsgque_mq.h.

4226 {
4227 return (MQ_CTX)MK_NULL;
4228 }
#define MK_NULL
+ Here is the caller graph for this function:

◆ MqContextGetNullP()

MQ_CTX MqContextGetNullP ( void )
extern

Non-inline replacement for MqContextGetNull

◆ MqContextHandleGet_RT()

MK_HDL MqContextHandleGet_RT ( MK_RT const mkrt,
MQ_CTX const ctx )
inline

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

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]ctxthe MqContextS instance to work on
Returns
the required export-hdl

Definition at line 4169 of file LibMqMsgque_mq.h.

4172 {
4174 return MkObjectHandleGet(MkOBJ(ctx));
#define MkObjectHandleGet(...)
#define MkOBJ(x)
#define MK_RT_ATTR_HDL_CHECK(x)
#define MK_RT_ATTR_RUNTIME
#define MK_RT_ATTR_HDL

◆ MqContextHandleGetP()

MK_HDL MqContextHandleGetP ( MK_RT const mkrt,
MQ_CTX const ctx )
extern

Non-inline replacement for MqContextHandleGet

◆ MqContextHandleResolve_RT()

MQ_CTX MqContextHandleResolve_RT ( MK_RT const mkrt,
MK_HDL const netHdl )
inline

Handle-Resolve-Slot - return a MqContextC from netHdl or None if invalid…

The MqContextHandleResolve undo the MqContextHandleGet 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 MqContextHandleGet
Returns
the required handle or None if netHdl is invalid

Definition at line 4186 of file LibMqMsgque_mq.h.

4189 {
4190 return MqCtx(MkObjectHandleResolve(netHdl));
#define MkObjectHandleResolve(...)
MQ_CTX MqCtx(MK_MNG mng)
cast a unknown-object into an MqContextS pointer or NULL if not possible

◆ MqContextHandleResolveP()

MQ_CTX MqContextHandleResolveP ( MK_RT const mkrt,
MK_HDL const netHdl )
extern

Non-inline replacement for MqContextHandleResolve

◆ MqContextInstances_RT()

MQ_CTX MqContextInstances_RT ( MK_RT_PARSER_ONLY )
inline

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

The head-instance is the last instance created.

Definition at line 9563 of file LibMqMsgque_mq.h.

9563 {
9565 return (MQ_CTX)MqContextC_TT->instances;
9566}
#define MqRtSetup_NULL_RT
#define MqContextC_TT
class as MkTypeS-class-type, useable in a class-macro as: class##_TT …

◆ MqContextInstancesP()

MQ_CTX MqContextInstancesP ( MK_RT_PARSER_ONLY )
extern

Non-inline replacement for MqContextInstances

◆ MqContextNext()

MK_ATTR_HDL MQ_CTX MqContextNext ( MQ_CTX const ctx)
inline

get next instance from linked-list of MqContextS type

Definition at line 9570 of file LibMqMsgque_mq.h.

9570 {
9571 MK_ATTR_HDL_CHECK(ctx);
9572 return (MQ_CTX)MqContextC_X2obj(ctx)->obj_protect.next;
9573}
#define MqContextC_X2obj(x)
+ Here is the caller graph for this function:

◆ MqContextNextP()

MQ_CTX MqContextNextP ( MQ_CTX const ctx)
extern

Non-inline replacement for MqContextNext

◆ MqContextPrev()

MK_ATTR_HDL MQ_CTX MqContextPrev ( MQ_CTX const ctx)
inline

get previous instance from linked-list of MqContextS type

Definition at line 9577 of file LibMqMsgque_mq.h.

9577 {
9578 MK_ATTR_HDL_CHECK(ctx);
9579 return (MQ_CTX)MqContextC_X2obj(ctx)->obj_protect.prev;
9580}
+ Here is the caller graph for this function:

◆ MqContextPrevP()

MQ_CTX MqContextPrevP ( MQ_CTX const ctx)
extern

Non-inline replacement for MqContextPrev