theKernel 10.0
Loading...
Searching...
No Matches
LibMkKernel_atl.h File Reference

tag: nhi1-release-250425 More...

#include "libmyoox_mox.h"
#include "LibMkKernel_mk.h"
#include "tmpl/mk_type_S_lng.h"
#include "LibMkKernel_registry_atl.h"
#include "tmpl/mk_misc_check_lng.h"
#include "tmpl/mk_misc_ObjAs_lng.h"
+ Include dependency graph for LibMkKernel_atl.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  OT_MK_RT_S
 
struct  MkCallS
 
struct  LookupEnumE
 
struct  LookupClassS
 
struct  OtObjProcDefS
 
struct  MkVarFrameS
 
struct  AtlClassDefS
 

Macros

#define META_FILE_NAME   (__builtin_strrchr(__FILE__, '/') ? __builtin_strrchr(__FILE__, '/') + 1 : __FILE__)
 
#define OT_DEBUG_NAMESPACE_DELETE(...)
 
#define HEADER
 
#define MK_ATL_EXTERN
 static library
 
#define MK_ATL_EXTERN_DATA   extern
 
#define MK(n)
 
#define NS(n)
 
#define META_CONTEXT_S   hdl
 
#define OT_ProcRet   int
 
#define ATL_OBJV_ARGS   int objc, OT_OBJ_T const objv[]
 
#define ATL_OBJV_ARGS_CALL   objc, objv
 
#define ATL_ARGS   OT_ENV_T interp, int objc, OT_OBJ_T const objv[]
 
#define ATL_ARGS_CALL   interp, objc, objv
 
#define OBJECT_ARGS   ClientData clientData, ATL_ARGS
 
#define OBJECT_ARGS_CALL   hdl, ATL_ARGS_CALL
 
#define OBJCMD_ARGS   ClientData clientData, ATL_ARGS
 
#define OBJCMD_ARGS_CALL   clientData, ATL_ARGS_CALL
 
#define CONSTR_ARGS   OBJECT_ARGS
 
#define SKIP_ARGS   ATL_ARGS, int __skip
 
#define SKIP_ARGS_CALL   ATL_ARGS_CALL, __skip
 
#define OtClass_ARGS   OBJECT_ARGS
 
#define OtClass_ARGS_CALL   OBJECT_ARGS_CALL
 
#define MkBufferListC_ARGS   OBJECT_ARGS
 
#define MkBufferListC_ARGS_CALL   OBJECT_ARGS_CALL
 
#define MkBufferC_ARGS   OBJECT_ARGS
 
#define MkBufferC_ARGS_CALL   OBJECT_ARGS_CALL
 
#define MkBufferStreamC_ARGS   OBJECT_ARGS
 
#define MkBufferStreamC_ARGS_CALL   OBJECT_ARGS_CALL
 
#define MkErrorC_ARGS   OBJECT_ARGS
 
#define MkErrorC_ARGS_CALL   OBJECT_ARGS_CALL
 
#define MkLogFileC_ARGS   OBJECT_ARGS
 
#define MkLogFileC_ARGS_CALL   OBJECT_ARGS_CALL
 
#define MkObjectC_ARGS   OBJECT_ARGS
 
#define MkObjectC_ARGS_CALL   OBJECT_ARGS_CALL
 
#define MkRuntimeC_ARGS   OBJECT_ARGS
 
#define MkRuntimeC_ARGS_CALL   OBJECT_ARGS_CALL
 
#define OT_SETUP_ARGS_ALL(d)
 
#define OT_FRAME_CLEANUP   if (frame != NULL) { Tcl_DecrRefCount(frame); frame = NULL; }
 
#define OT_SETUP_VARARGS(min, max, d)
 
#define OT_SETUP_CONSTRUCTOR_ARGS(...)
 
#define OT_SETUP_ONEARG(d)
 
#define OT_SETUP_NOARG(d)
 
#define OT_SETUP_obj   MK_OBJ obj = OBJ
 
#define OT_SETUP_doc   __attribute__((unused)) const MK_STRN __doc = __func__;
 
#define SETUP_ARGS   MK_RT_ARGS ATL_ARGS
 
#define SETUP_ARGS_CALL   MK_RT_CALL ATL_ARGS_CALL
 
#define OT_CONSTRUCTOR_POST(x)
 
#define OT_retObj_SET(val)
 
#define OT_retObj_SET_isPtr   ((long)retObj) > 0x1
 
#define OT_retObj_SET_None   retObj = ((OT_OBJ_T)0x1)
 
#define OT_retObj_SET_isNone   ((long)retObj) == 0x1
 
#define OT_retObj_SET_Error   retObj = NULL
 
#define OT_retObj_SET_List   retObj = Tcl_NewListObj(0,NULL)
 
#define OT_retObj_APPEND(var)
 
#define OT_retObj_RETURN
 
#define OT_retObj_SET_BOL(nat)
 
#define OT_retObj_SET_I8(nat)
 
#define OT_retObj_SET_I16(nat)
 
#define OT_retObj_SET_U16(nat)
 
#define OT_retObj_SET_I32(nat)
 
#define OT_retObj_SET_I64(nat)
 
#define OT_retObj_SET_LLG(nat)
 
#define OT_retObj_SET_FLT(nat)
 
#define OT_retObj_SET_DBL(nat)
 
#define OT_retObj_SET_BIN(nat, len)
 
#define OT_retObj_SET_STR(nat)
 
#define OT_retObj_SET_STRN(nat)
 
#define OT_retObj_SET_LONG(nat)
 
#define OT_retObj_SET_HDL(nat)
 
#define OT_MK_CALL_0(hdl, cls, meth, ret)
 
#define OT_MK_RT_SIG   0x62384526
 
#define AtlClassName_buf_size   64
 
#define regTclObj(t)
 
#define regTclObj2(t, v)
 
#define regTclCmd(t)
 
#define regTclArray(m, t)
 
#define OT_MK_ARGS   OT_MK_RT_T amkrt, OT_ENV_T interp, MK_RT_ARGS
 
#define OT_MK_CALL   amkrt, interp, MK_RT_CALL
 
#define OT_LNG_NULL   NULL
 
#define OT_LNG_UNDEF   NULL
 
#define OT_LNG_RETURN(ret, cmd)
 
#define OT_LNG_NAME_FROM_OBJECT(_obj)
 
#define OT_LNG_NAME_FROM_CLASS(_cls)
 
#define OT_LNG_NAME_FROM_OBJ(_obj)
 
#define OT_LNG_OBJ_CLASSNAME(val)
 
#define OT_LNG_OBJ_CLASSNAME_SHORT(val)
 
#define OT_OBJ_TYPE_STRING(val)
 
#define OT_LNG_SELF_2_LNG(selfT)
 
#define OT_LNG_OBJV(__skip)
 
#define OT_OBJ_TO_CLASS(obj)
 
#define OT_OBJ_TO_ENUM(str)
 
#define OT_LNG_SET_VAR(var, val)
 
#define OT_LNG_EMBEDDED(type, call, ...)
 
#define OT_ERROR_LNG_RETURN   return TCL_ERROR
 
#define OT_ERROR_VAR_DEFAULT(...)
 
#define OT_ERROR_STR_DEFAULT(...)
 
#define OT_ERROR_TYPE(str)
 
#define OT_ERROR_SOFT_CONSTRUCTOR(class)
 
#define OT_ERROR_CONSTRUCTOR(class)
 
#define OT_ERROR_NUMARGS(...)
 
#define OT_ERROR_ABNORMAL(mng)
 
#define OT_ERROR_APPEND_LNG_STACK()
 
#define OT_ERROR_LNG_RETURN_VAR_ERROR(...)
 
#define OT_ERROR_LNG_RETURN_STR_ERROR(...)
 
#define OT_ERROR_LNG_RETURN_HDL_NAT_NULL(_hdl)
 
#define OT_ERROR_LNG_RETURN_INVALID_CLASS(_clsHasS, _clsExpS)
 
#define OT_ERROR_LNG_RETURN_HDL_IS_NULL()
 
#define OT_Prefix_ARGS   OT_MK_ARGS
 
#define OT_Prefix_CALL   OT_MK_CALL
 
#define OT_Check_ARGS   OT_MK_ARGS MK_MNG hdl, MK_STRN const arg, ATL_OBJV_ARGS, int *skipP
 
#define OT_Check_CALL(arg)
 
#define OT_Check_CALL2(arg)
 
#define OT_CHECK_OPTIONAL(val)
 
#define OT_CHECK_REQUIRED(val)
 
#define OT_CHECK_NUM_ARGS(min, max)
 
#define OT_CHECK_NOARGS
 
#define OT_GET_CONSTR_NAME(ctor)
 
#define OT_CHECK_BNP(val, len)
 
#define OT_CHECK_BCP(val)
 
#define OT_CHECK_BCPN(val)
 
#define MkErrorC_Check(mng, PROC)
 
#define MkErrorC_CheckD(PROC)
 
#define OT_ERROR_META_2_LNG(m)
 
#define OT_ERROR_LNG_2_META(m)
 
#define check_LNG(code)
 
#define check_NULL(code)
 
#define check_META(code)
 
#define OT_TMP_BOL_OBJ(val)
 
#define OT_TMP_I8_OBJ(val)
 
#define OT_TMP_I16_OBJ(val)
 
#define OT_TMP_I32_OBJ(val)
 
#define OT_TMP_I64_OBJ(val)
 
#define OT_TMP_FLT_OBJ(val)
 
#define OT_TMP_DBL_OBJ(val)
 
#define OT_TMP_BIN_OBJ(val, len)
 
#define OT_TMP_STR_OBJ(val)
 
#define OT_TMP_CST_OBJ(val)
 
#define OT_OBJECT_DELETE_SOFT(O)
 
#define OT_OBJECT_DELETE_HARD(O)
 
#define OT_OBJECT_DISPOSE(O)
 
#define OT_OBJECT_DELETE(O)
 
#define OT_REF_INCR(_obj)
 
#define OT_REF_DECR(_obj)
 
#define OT_REF_INCR_AND_RETURN(_obj)
 
#define OT_REF_DECR_AND_NULL(_obj)
 
#define MkCallS_SIG   0x30364351
 
#define MkCallLog(c)
 
#define MkProcResolve_maxArgsLen   16
 
#define OT_OBJ_COPY(o)
 
#define CallProlog(m)
 
#define NO_OtCheckEnum
 
#define NO_OtCheckEnumFlag
 
#define NO_TestObject
 
#define OT_CHECK_ENUM(ename, val)
 
#define OT_CHECK_ENUM_FLAG(ename, val)
 
#define OT_CHECK_LNGTMPL(val, func)
 
#define OT_CHECK_bool(val)
 
#define OT_CHECK_NB1(val)
 
#define OT_CHECK_NI1(val)
 
#define OT_CHECK_NI2(val)
 
#define OT_CHECK_U2N(val)
 
#define OT_CHECK_NI4(val)
 
#define OT_CHECK_U4N(val)
 
#define OT_CHECK_NI8(val)
 
#define OT_CHECK_IXN(val)
 
#define OT_CHECK_NF4(val)
 
#define OT_CHECK_NF8(val)
 
#define OT_CHECK_STRN(val)
 
#define OT_CHECK_NIL(val)
 
#define OT_CHECK_NIH(val)
 
#define OT_CHECK_STRN_NULL(val)
 
#define OT_CHECK_C_COPY(val, size)
 
#define OT_GET_CALL_PROC   MK(Get_Call_Proc)(OT_MK_CALL &frame)
 
#define OT_GET_CALL_FILE   MK(Get_Call_File)(OT_MK_CALL &frame)
 
#define OT_GET_CALL_LINE   MK(Get_Call_Line)(OT_MK_CALL &frame)
 
#define FRAME_ARGS   OT_MK_ARGS OT_OBJ_T * frameP
 
#define FRAME_CALL   OT_MK_CALL &frame
 
#define WNA(min, max, txt)
 
#define AltClassDef(...)
 
#define AtlUnknownSetup(...)
 
#define OT_VARFRAME_CREATE
 
#define OT_VARFRAME_DELETE
 
#define OT_VARFRAME_ARGS   MK_RT_ARGS OT_VARFRAME varframe
 
#define OT_VARFRAME_CALL   MK_RT_CALL varframe
 
#define OT_VARFRAME_OBJ_RESULT(itp)
 
#define OT_EVAL_ARGS   OT_ENV_T interp, int objc, OT_OBJ_T const objv[], int flags
 
#define OT_EVAL_CALL   interp, objc, objv , flags
 
#define OT_NEW_Mk_enum_OBJ(typ, val)
 
#define Get_MkErrorE_FromObj_path   MK(Get_MkErrorE_FromObj)
 
#define Get_MkIdSE_FromObj_path   MK(Get_MkIdSE_FromObj)
 
#define Get_MkTimeoutE_FromObj_path   MK(Get_MkTimeoutE_FromObj)
 
#define Get_MkTypeE_FromObj_path   MK(Get_MkTypeE_FromObj)
 
#define SETUP_interp   MK_UNUSED OT_ENV_T interp = amkrt->interp
 
#define SETUP_moxrt
 
#define SETUP_amkrt(r)
 
#define OT_SELF_O(o)
 
#define OT_SELF_X(x)
 
#define OT_SELF_M(m)
 
#define OT_SELF   selfO
 
#define SetupHdlFromMetaData_init_2(_SHORT)
 
#define SetupHdlFromMetaData_2(_SHORT)
 
#define SetupHdlFromMetaData__null_allow_2(_SHORT)
 
#define SetupHdlConstr(_ClassC)
 
#define SetupHdlStatic(_ClassC)
 
#define PTR2VAL(nat)
 
#define SELF2VAL(slf)
 
#define CLS2VAL(cls)
 
#define META2VAL_X(x)
 
#define META2VAL_O(o)
 
#define I82VAL(nat)
 
#define BOL2VAL(nat)
 
#define I162VAL(nat)
 
#define U162VAL(nat)
 
#define INT2VAL(nat)
 
#define I642VAL(nat)
 
#define HDL2VAL(nat)
 
#define LLG2VAL(nat)
 
#define FLT2VAL(nat)
 
#define DBL2VAL(nat)
 
#define STRN2VAL(nat)
 
#define BIN2VAL(ptr, len)
 
#define STR2VAL(ptr)
 
#define STR2VAL_2(ptr, len)
 
#define LONG2VAL(nat)
 
#define VAL2STR(val)
 
#define VAL2STR_NULL(val)
 
#define VAL2SELF(val)
 
#define VAL2OBJ(val)
 
#define VAL2BFL(val)
 
#define VAL2MNG(val)
 
#define AtlInfoScript(s)
 
#define AtlInfoExists(l)
 
#define AtlArrayExists(l)
 
#define AtlClassIsN(...)
 
#define OT_ATL_EXTERN   __attribute__ ((visibility("default")))
 
#define AtlClassDefGetNN(...)
 
#define AtlGetClassFrmNsPtr(nsP, flg)
 
#define AtlGetClassFromProc(cmdT)
 
#define OT_TMP_BAC_OBJ(val)
 
#define MkBufferListC_rt   (*amkrt)
 
#define MkBufferListC_lngO   (MkBufferListC_rt.AtlMkBufferListC)
 
#define MkBufferListCTT   (MkBufferListC_rt.AtlMkBufferListCTT)
 
#define MkBufferListC_ObjNew(nat)
 
#define OT_TMP_BFL_OBJ(nat)
 
#define OT_retObj_SET_BFL(nat)
 
#define MkBufferC_rt   (*amkrt)
 
#define MkBufferC_lngO   (MkBufferC_rt.AtlMkBufferC)
 
#define MkBufferCTT   (MkBufferC_rt.AtlMkBufferCTT)
 
#define MkBufferC_ObjNew(nat)
 
#define OT_TMP_BUF_OBJ(nat)
 
#define OT_retObj_SET_BUF(nat)
 
#define MkBufferStreamC_rt   (*amkrt)
 
#define MkBufferStreamC_lngO   (MkBufferStreamC_rt.AtlMkBufferStreamC)
 
#define MkBufferStreamCTT   (MkBufferStreamC_rt.AtlMkBufferStreamCTT)
 
#define MkBufferStreamC_ObjNew(nat)
 
#define OT_TMP_BUS_OBJ(nat)
 
#define OT_retObj_SET_BUS(nat)
 
#define MkErrorC_rt   (*amkrt)
 
#define MkErrorC_lngO   (MkErrorC_rt.AtlMkErrorC)
 
#define MkErrorCTT   (MkErrorC_rt.AtlMkErrorCTT)
 
#define MkErrorC_ObjNew(nat)
 
#define OT_TMP_ERR_OBJ(nat)
 
#define OT_retObj_SET_ERR(nat)
 
#define MkLogFileC_rt   (*amkrt)
 
#define MkLogFileC_lngO   (MkLogFileC_rt.AtlMkLogFileC)
 
#define MkLogFileCTT   (MkLogFileC_rt.AtlMkLogFileCTT)
 
#define MkLogFileC_ObjNew(nat)
 
#define OT_TMP_LFL_OBJ(nat)
 
#define OT_retObj_SET_LFL(nat)
 
#define MkObjectC_rt   (*amkrt)
 
#define MkObjectC_lngO   (MkObjectC_rt.AtlMkObjectC)
 
#define MkObjectCTT   (MkObjectC_rt.AtlMkObjectCTT)
 
#define MkObjectC_ObjNew(nat)
 
#define OT_TMP_OBJ_OBJ(nat)
 
#define OT_retObj_SET_OBJ(nat)
 
#define MkRuntimeC_rt   (*amkrt)
 
#define MkRuntimeC_lngO   (MkRuntimeC_rt.AtlMkRuntimeC)
 
#define MkRuntimeCTT   (MkRuntimeC_rt.AtlMkRuntimeCTT)
 
#define MkRuntimeC_ObjNew(nat)
 
#define OT_TMP_RT_OBJ(nat)
 
#define OT_retObj_SET_RT(nat)
 
#define ME_REF_MkBinaryR   MkBinaryR
 
#define OT_GET__ME_REF_MkBinaryR(b)
 
#define VAL2MkBinaryR(obj)
 
#define OT_CHECK__ME_REF_MkBinaryR(val)
 
#define ME_REF_MkStringR   MkStringR
 
#define OT_GET__ME_REF_MkStringR(s)
 
#define VAL2MkStringR(obj)
 
#define OT_CHECK__ME_REF_MkStringR(val)
 
#define Ot_GetBooleanFromObj(val)
 
#define ot_fixstr(_s, _l)
 
#define ot_fixstrobj(_s)
 
#define ot_enum_append(_o, _s)
 
#define printLng(var)
 
#define printXLng(x, var)
 
#define printXLngObj(x, var)
 
#define printLLngObj(var)
 
#define printLngObj(var)
 
#define printLngObj2(var)
 
#define printLngErrorCode()
 
#define printLngErrorInfo()
 
#define printObjv
 
#define printXObjv(x)
 
#define printAry(c, o)
 
#define printAryDetail(c, o)
 
#define printXAry(x, c, o)
 
#define printXAryDetail(x, c, o)
 
#define printAry3(txt, c, o)
 
#define printAryX(x, t, c, o)
 
#define printAryL(t, c, o)
 
#define xstr(s)
 
#define str(s)
 
#define printLngClass(clsC)
 
#define printLngObject(objO)
 
#define Self2PtrNN(myP)
 
#define Self2PtrN(myO)
 
#define __doc   "AtomObjNew"
 
#define AtomInit(...)
 
#define AtomCreate(...)
 
#define AtomMake(...)
 
#define AtomCreateNULL(...)
 
#define AtomCreateCONSTR(...)
 
#define Atl_EvalObjv(...)
 

Typedefs

typedef MOX_PTR OT_PTR_T
 
typedef MOX_ENV_T OT_ENV_T
 
typedef MOX_NS_T OT_NS_T
 
typedef MOX_CLS_T OT_CLS_T
 
typedef MOX_OBJ_T OT_OBJ_T
 
typedef MK_STRN OT_ENUM_T
 
typedef MOX_OBJ_T OT_SELF_T
 
typedef enum OT_MK_RT_StatusE OT_MK_RT_StatusE
 
typedef OT_MK_RT_SOT_MK_RT_T
 
typedef enum MkCallTypeE MkCallTypeE
 
typedef struct MkCallS MkCallS
 
typedef int(* LookupClassF) (SKIP_ARGS)
 
typedef struct MkVarFrameSOT_VARFRAME
 
typedef struct AtlClassDefS AtlClassDefS
 
typedef AtlClassDefSAtlClassDefT
 

Enumerations

enum  OT_MK_RT_StatusE { OT_MK_RT_STATUS_NEW = 0 , OT_MK_RT_STATUS_ONEXIT = 1 , OT_MK_RT_STATUS_DELETED = 2 }
 
enum  MkCallTypeE {
  MkCallS_init = 0 , MkCallS_null = 1 , MkCallS_proc = 2 , MkCallS_static = 3 ,
  MkCallS_own_method = 4 , MkCallS_other_method = 5 , MkCallS_error = 6
}
 

Functions

int atlmkkernel_OT_ERROR_LNG_RETURN_HDL_IS_NULL (OT_MK_ARGS OT_CLS_T, OT_OBJ_T)
 
static OT_OBJ_T atlmkkernel_AtomObjNew (OT_MK_ARGS MK_OBJ, MK_PTR)
 
static bool atlmkkernel_AtomDeleteHard (OT_MK_ARGS OT_SELF_T)
 
static void atlmkkernel_AtomDispose (OT_MK_ARGS OT_SELF_T)
 
MK_ATL_EXTERN void atlmkkernel_CallLog (MK_RT mkrt, MkCallS *call, MK_STRN caller)
 
MK_ATL_EXTERN enum MkErrorE atlmkkernel_ProcResolve (OT_MK_ARGS MK_MNG, struct MkCallS *)
 
static void atlmkkernel_ProcResolveAppendArgs (struct MkCallS *call, int *objcP, OT_OBJ_T objv[])
 
static void atlmkkernel_CallFree (MK_CBP *dataP)
 
static void atlmkkernel_CallFreeOnce (MK_CBP *callP)
 
static void atlmkkernel_CallCopy (MK_RT mkrt, MK_OBJ obj, MK_CBP *dataP)
 
MK_ATL_EXTERN enum MkErrorE atlmkkernel_Obj_AsSTR_COPY (OT_Check_ARGS, MK_STR, size_t)
 
MK_ATL_EXTERN MK_STRN atlmkkernel_Get_Call_Proc (FRAME_ARGS)
 
MK_ATL_EXTERN MK_STRN atlmkkernel_Get_Call_File (FRAME_ARGS)
 
MK_ATL_EXTERN MK_I32 atlmkkernel_Get_Call_Line (FRAME_ARGS)
 
MK_ATL_EXTERN bool atlmkkernel_Get_Call_Stack (OT_MK_ARGS MK_ERR const, int)
 
MK_ATL_EXTERN int atlmkkernel_EnumFlagWorker (MK_RT mkrt, OT_ENV_T, const struct LookupEnumE *, OT_OBJ_T, int *)
 
MK_ATL_EXTERN int atlmkkernel_MkBufferC_ToObject (MkBufferC_ARGS)
  Atl: obj [MkBufferC::ToObject $buf] C-API
return the native language object from a MkBufferC
 
MK_ATL_EXTERN int atlmkkernel_MkBufferC_GetBFL (MkBufferC_ARGS)
  Atl: MkBufferListC [MkBufferC::GetBFL $buf ?val_inout:MkBufferListC=NULL?] C-API
function to read an MkBufferListC from an MkBufferC object …
 
MK_ATL_EXTERN int atlmkkernel_MkBufferC_Temp (MkBufferC_ARGS)
  Atl: MkBufferC [MkBufferC::Temp $buf] C-API
create a temporary copy of the MkBufferC buf …
 
MK_ATL_EXTERN int atlmkkernel_MkBufferListC_ToList (MkBufferListC_ARGS)
  Atl: [list...] [MkBufferListC::ToList $bfl] C-API
get a target-language list representation of the bfl
 
MK_ATL_EXTERN bool atlmkkernel_TestObject (OT_Prefix_ARGS OT_OBJ_T, OT_CLS_T, MK_OBJ *, MkTestClassE *)
 
MK_ATL_EXTERN MK_STRN atlmkkernel_ClassName (OT_Prefix_ARGS OT_OBJ_T, bool)
 
MK_ATL_EXTERN MK_STRN atlmkkernel_GetTypeFromObj (OT_Prefix_ARGS OT_OBJ_T, bool *)
 helper to print the type-name of a Tcl_Obj MkKernel::print type $RET
 
MK_ATL_EXTERN OT_CLS_T atlmkkernel_ClassDef (OT_MK_ARGS MK_TYP, OT_NS_T *)
 
MK_ATL_EXTERN int atlmkkernel_UnknownSetup (OT_ENV_T, const OtObjProcDefS[], ClientData)
 
static OT_OBJ_T atlmkkernel_OT_VARFRAME_ADD (OT_VARFRAME_ARGS, OT_OBJ_T add)
 
MK_ATL_EXTERN MK_STR atlmkkernel_PrintObj (OT_Prefix_ARGS MK_STRN, OT_OBJ_T)
 helper to print a Tcl_Obj MkKernel::print object $RET
 
MK_ATL_EXTERN void atlmkkernel_PrintObj2 (OT_Prefix_ARGS MK_STRN, OT_OBJ_T, MK_STRN)
 
MK_ATL_EXTERN int atlmkkernel_EvalObjvVA (OT_ENV_T, int,...)
 
MK_ATL_EXTERN MK_STRN atlmkkernel_ObjvToString (MK_RT mkrt, MK_STRN cls, ATL_ARGS)
 
MK_ATL_EXTERN enum MkErrorE atlmkkernel_LngListToMkBufferListS (OT_Prefix_ARGS OT_OBJ_T, MK_BFL *)
 
static OT_OBJ_T atlmkkernel_EvalObjvRt (OT_EVAL_ARGS)
 
static OT_OBJ_T atlmkkernel_EvalObjvFr (OT_VARFRAME_ARGS, OT_EVAL_ARGS)
 
static int atlmkkernel_EvalObjv (OT_EVAL_ARGS)
 
MK_ATL_EXTERN int atlmkkernel_FillNamespace (OT_ENV_T, const OtObjProcDefS[], ClientData)
 
MK_ATL_EXTERN MK_ERR atlmkkernel_MkExceptionC_Catch (OT_Prefix_ARGS MK_MNG const, MK_EXP const, MK_STRN const)
 convert an Target-Programming-Language (TPL) exception into an MkErrorC
 
MK_ATL_EXTERN void atlmkkernel_MkExceptionC_Raise (OT_Prefix_ARGS MK_MNGN const, MK_STRN const, MK_STRN const, MK_I32)
 convert an MkErrorC into a Target-Programming-Language (TPL) exception …
 
void atlmkkernel_ObjectDeleteFree (MkObjectDeleteFreeF_ARGS)
 
enum MkErrorE atlmkkernel_ObjectDeleteCall (MK_RT mkrt, MK_OBJN const obj, MK_STRN const typeName, MK_HDL const typeHdl, MK_HDL const objHdl, MK_CBP const __data__)
 
MK_ATL_EXTERN OT_OBJ_T atlmkkernel_MkErrorE_ToString (const enum MkErrorE)
 
MK_ATL_EXTERN OT_OBJ_T atlmkkernel_MkIdSE_ToString (const enum MkIdSE)
 
MK_ATL_EXTERN OT_OBJ_T atlmkkernel_MkTimeoutE_ToString (const enum MkTimeoutE)
 
MK_ATL_EXTERN OT_OBJ_T atlmkkernel_MkTypeE_ToString (const enum MkTypeE)
 
MK_ATL_EXTERN int atlmkkernel_Get_MkErrorE_FromObj (MK_RT mkrt, OT_ENV_T interp, OT_OBJ_T enumE, enum MkErrorE *ret)
 
MK_ATL_EXTERN int atlmkkernel_Get_MkIdSE_FromObj (MK_RT mkrt, OT_ENV_T interp, OT_OBJ_T enumE, enum MkIdSE *ret)
 
MK_ATL_EXTERN int atlmkkernel_Get_MkTimeoutE_FromObj (MK_RT mkrt, OT_ENV_T interp, OT_OBJ_T enumE, enum MkTimeoutE *ret)
 
MK_ATL_EXTERN int atlmkkernel_Get_MkTypeE_FromObj (MK_RT mkrt, OT_ENV_T interp, OT_OBJ_T enumE, enum MkTypeE *ret)
 
static OT_OBJ_T atlmkkernel_STRN2VAL (MK_STRN val)
 
MK_ATL_EXTERN MK_STRN atlmkkernel_AtlInfoScript (OT_MK_ARGS MK_STRN)
 
MK_ATL_EXTERN int atlmkkernel_AtlInfoExists (OT_MK_ARGS OT_OBJ_T)
 
MK_ATL_EXTERN int atlmkkernel_AtlArrayExists (OT_MK_ARGS OT_OBJ_T)
 
MK_ATL_EXTERN int atlmkkernel_AtlClassIsN (OT_MK_ARGS OT_SELF_T myNsO, OT_CLS_T clsNsO, bool *boolP)
 
AtlClassDefT atlmkkernel_AtlClassDefGetNN (OT_MK_ARGS OT_NS_T classP, OT_CLS_T classO, MK_TYP classTT, int flags)
 
static OT_CLS_T atlmkkernel_GetClassFrmNsPtr (OT_MK_ARGS OT_NS_T nsP, int flags)
 
static OT_CLS_T atlmkkernel_GetClassFromProc (OT_MK_ARGS Tcl_Command cmdT)
 
int atlmkkernel_pMkBufferListC_Init (OT_MK_ARGS OT_NS_T)
 
static MK_ARTIFICIAL OT_OBJ_T atlmkkernel_MkBufferListC_ObjNew (OT_MK_ARGS MkBufferListC_type hdl)
 
int atlmkkernel_pMkBufferC_Init (OT_MK_ARGS OT_NS_T)
 
static MK_ARTIFICIAL OT_OBJ_T atlmkkernel_MkBufferC_ObjNew (OT_MK_ARGS MkBufferC_type hdl)
 
int atlmkkernel_pMkBufferStreamC_Init (OT_MK_ARGS OT_NS_T)
 
static MK_ARTIFICIAL OT_OBJ_T atlmkkernel_MkBufferStreamC_ObjNew (OT_MK_ARGS MkBufferStreamC_type hdl)
 
int atlmkkernel_pMkErrorC_Init (OT_MK_ARGS OT_NS_T)
 
static MK_ARTIFICIAL OT_OBJ_T atlmkkernel_MkErrorC_ObjNew (OT_MK_ARGS MkErrorC_type hdl)
 
int atlmkkernel_pMkLogFileC_Init (OT_MK_ARGS OT_NS_T)
 
static MK_ARTIFICIAL OT_OBJ_T atlmkkernel_MkLogFileC_ObjNew (OT_MK_ARGS MkLogFileC_type hdl)
 
int atlmkkernel_pMkObjectC_Init (OT_MK_ARGS OT_NS_T)
 
static MK_ARTIFICIAL OT_OBJ_T atlmkkernel_MkObjectC_ObjNew (OT_MK_ARGS MkObjectC_type hdl)
 
int atlmkkernel_pMkRuntimeC_Init (OT_MK_ARGS OT_NS_T)
 
static MK_ARTIFICIAL OT_OBJ_T atlmkkernel_MkRuntimeC_ObjNew (OT_MK_ARGS MkRuntimeC_type hdl)
 
static MkStringR Ot_GetStringFromObj (OT_OBJ_T tclO)
 
static void Ot_DecrRefCount (OT_OBJ_T tclO)
 
static MK_MNG atlmkkernel_Self2PtrNN (OT_NS_T nsP)
 
static MK_MNG atlmkkernel_Self2PtrN (OT_ENV_T interp, OT_SELF_T myO)
 
OT_SELF_T atlmkkernel_AtomInit (OT_MK_ARGS OT_SELF_T selfO, MK_OBJ obj, MK_PTR const env)
 
OT_SELF_T atlmkkernel_AtomCreate (OT_MK_ARGS MK_OBJ obj, OT_CLS_T cls, OT_OBJ_T nameO, OT_OBJ_T nsO, int objc, OT_OBJ_T const objv[], MK_PTR const env)
 
OT_SELF_T atlmkkernel_AtomMake (OT_MK_ARGS MK_OBJ obj, OT_CLS_T cls, OT_OBJ_T nameO, OT_OBJ_T nsO, MK_PTR const env)
 
static OT_SELF_T atlmkkernel_AtomCreateNULL (OT_MK_ARGS OT_CLS_T cls, MK_STRN name, MK_PTR const env)
 
OT_SELF_T atlmkkernel_AtomCreateCONSTR (OT_MK_ARGS MK_OBJ obj, OT_CLS_T cls, OT_OBJ_T nameO, MK_PTR const env)
 
static void atlmkkernel_AtomUnlink (OT_MK_ARGS OT_SELF_T selfO)
 

Variables

__thread OT_MK_RT_S amkrtR
 

Detailed Description

tag: nhi1-release-250425

Definition in file LibMkKernel_atl.h.

Macro Definition Documentation

◆ __doc

#define __doc   "AtomObjNew"

◆ AltClassDef

#define AltClassDef ( ...)
Value:
MK(ClassDef)(OT_MK_CALL __VA_ARGS__)
#define MK(n)
#define OT_MK_CALL

Definition at line 769 of file LibMkKernel_atl.h.

◆ ATL_ARGS

#define ATL_ARGS   OT_ENV_T interp, int objc, OT_OBJ_T const objv[]

Definition at line 102 of file LibMkKernel_atl.h.

◆ ATL_ARGS_CALL

#define ATL_ARGS_CALL   interp, objc, objv

Definition at line 103 of file LibMkKernel_atl.h.

◆ Atl_EvalObjv

#define Atl_EvalObjv ( ...)
Value:
Tcl_EvalObjv(__VA_ARGS__)

Definition at line 1522 of file LibMkKernel_atl.h.

◆ ATL_OBJV_ARGS

#define ATL_OBJV_ARGS   int objc, OT_OBJ_T const objv[]

Definition at line 99 of file LibMkKernel_atl.h.

◆ ATL_OBJV_ARGS_CALL

#define ATL_OBJV_ARGS_CALL   objc, objv

Definition at line 100 of file LibMkKernel_atl.h.

◆ AtlArrayExists

#define AtlArrayExists ( l)
Value:
#define AtlArrayExists(l)

Definition at line 1035 of file LibMkKernel_atl.h.

◆ AtlClassDefGetNN

#define AtlClassDefGetNN ( ...)
Value:
#define NS(n)
#define AtlClassDefGetNN(...)

Definition at line 1071 of file LibMkKernel_atl.h.

◆ AtlClassIsN

#define AtlClassIsN ( ...)
Value:
#define OT_LNG_EMBEDDED(type, call,...)
#define AtlClassIsN(...)

Definition at line 1038 of file LibMkKernel_atl.h.

◆ AtlClassName_buf_size

#define AtlClassName_buf_size   64

Definition at line 261 of file LibMkKernel_atl.h.

◆ AtlGetClassFrmNsPtr

#define AtlGetClassFrmNsPtr ( nsP,
flg )
Value:
MK(GetClassFrmNsPtr)(OT_MK_CALL nsP, flg)

Definition at line 1074 of file LibMkKernel_atl.h.

◆ AtlGetClassFromProc

#define AtlGetClassFromProc ( cmdT)
Value:
MK(GetClassFromProc)(OT_MK_CALL cmdT)

Definition at line 1087 of file LibMkKernel_atl.h.

◆ AtlInfoExists

#define AtlInfoExists ( l)
Value:
#define AtlInfoExists(l)

Definition at line 1032 of file LibMkKernel_atl.h.

◆ AtlInfoScript

#define AtlInfoScript ( s)
Value:
#define AtlInfoScript(s)

Definition at line 1029 of file LibMkKernel_atl.h.

◆ AtlUnknownSetup

#define AtlUnknownSetup ( ...)
Value:
MK(UnknownSetup) (interp, __VA_ARGS__)

Definition at line 778 of file LibMkKernel_atl.h.

◆ AtomCreate

#define AtomCreate ( ...)
Value:
MK(AtomCreate)(OT_MK_CALL __VA_ARGS__)
#define AtomCreate(...)

Definition at line 1426 of file LibMkKernel_atl.h.

◆ AtomCreateCONSTR

#define AtomCreateCONSTR ( ...)
Value:
#define AtomCreateCONSTR(...)

Definition at line 1458 of file LibMkKernel_atl.h.

◆ AtomCreateNULL

#define AtomCreateNULL ( ...)
Value:
#define AtomCreateNULL(...)

Definition at line 1448 of file LibMkKernel_atl.h.

◆ AtomInit

#define AtomInit ( ...)
Value:
MK(AtomInit)(OT_MK_CALL __VA_ARGS__)
#define AtomInit(...)

Definition at line 1411 of file LibMkKernel_atl.h.

◆ AtomMake

#define AtomMake ( ...)
Value:
MK(AtomMake)(OT_MK_CALL __VA_ARGS__)
#define AtomMake(...)

Definition at line 1437 of file LibMkKernel_atl.h.

◆ BIN2VAL

#define BIN2VAL ( ptr,
len )
Value:
Tcl_NewByteArrayObj((const unsigned char*)ptr,(int)len)

Definition at line 994 of file LibMkKernel_atl.h.

◆ BOL2VAL

#define BOL2VAL ( nat)
Value:
Tcl_NewBooleanObj(nat)

Definition at line 984 of file LibMkKernel_atl.h.

◆ CallProlog

#define CallProlog ( m)

Definition at line 628 of file LibMkKernel_atl.h.

628#define CallProlog(m) \
629 /* 1. setup runtime */ \
630 OT_MK_RT_T const amkrt = call->amkrt; \
631 assert (amkrt->signature == OT_MK_RT_SIG); \
632 OT_ENV_T const interp = amkrt->interp; \
633 assert (!Tcl_InterpDeleted(interp)); \
634 \
635 /* 2. setup arguments */ \
636 Tcl_Obj *objv[5+MkProcResolve_maxArgsLen]; \
637 \
638 rescan: \
639 int objc = 1; \
640 \
641 /* 1. setup methode */ \
642 objv[0] = call->mth; \
643 \
644 /* 2. setup my */ \
645 switch (call->type) { \
646 case MkCallS_own_method: \
647 dbgMsg("%s","MkCallS_own_method"); \
648 break; \
649 case MkCallS_static: \
650 dbgMsg("%s","MkCallS_static"); \
651 break; \
652 case MkCallS_proc: \
653 dbgMsg("%s","MkCallS_proc"); \
654 break; \
655 case MkCallS_other_method: \
656 dbgMsg("%s","MkCallS_other_method"); \
657 objv[objc++] = call->my; \
658 break; \
659 case MkCallS_init: { \
660 dbgMsg("%s","MkCallS_init"); \
661 check_META(MK(ProcResolve)(OT_MK_CALL (m), call)) goto error_mq; \
662 goto rescan; \
663 } \
664 case MkCallS_null: \
665 dbgMsg("%s","MkCallS_null"); \
666 return MK_OK; \
667 case MkCallS_error: \
668 dbgMsg("%s","MkCallS_error"); \
669 goto error; \
670 }

◆ check_LNG

#define check_LNG ( code)
Value:
if ((code) != TCL_OK)

Definition at line 472 of file LibMkKernel_atl.h.

◆ check_META

#define check_META ( code)
Value:
if (MkErrorCheckI(code))
#define MkErrorCheckI(err)

Definition at line 474 of file LibMkKernel_atl.h.

◆ check_NULL

#define check_NULL ( code)
Value:
if ((code) == NULL)

Definition at line 473 of file LibMkKernel_atl.h.

◆ CLS2VAL

#define CLS2VAL ( cls)
Value:
(cls)

Definition at line 979 of file LibMkKernel_atl.h.

◆ CONSTR_ARGS

#define CONSTR_ARGS   OBJECT_ARGS

Definition at line 111 of file LibMkKernel_atl.h.

◆ DBL2VAL

#define DBL2VAL ( nat)
Value:
Tcl_NewDoubleObj(nat)

Definition at line 992 of file LibMkKernel_atl.h.

◆ FLT2VAL

#define FLT2VAL ( nat)
Value:
Tcl_NewDoubleObj(nat)

Definition at line 991 of file LibMkKernel_atl.h.

◆ FRAME_ARGS

#define FRAME_ARGS   OT_MK_ARGS OT_OBJ_T * frameP

Definition at line 725 of file LibMkKernel_atl.h.

◆ FRAME_CALL

#define FRAME_CALL   OT_MK_CALL &frame

Definition at line 726 of file LibMkKernel_atl.h.

◆ Get_MkErrorE_FromObj_path

#define Get_MkErrorE_FromObj_path   MK(Get_MkErrorE_FromObj)

Definition at line 902 of file LibMkKernel_atl.h.

◆ Get_MkIdSE_FromObj_path

#define Get_MkIdSE_FromObj_path   MK(Get_MkIdSE_FromObj)

Definition at line 905 of file LibMkKernel_atl.h.

◆ Get_MkTimeoutE_FromObj_path

#define Get_MkTimeoutE_FromObj_path   MK(Get_MkTimeoutE_FromObj)

Definition at line 908 of file LibMkKernel_atl.h.

◆ Get_MkTypeE_FromObj_path

#define Get_MkTypeE_FromObj_path   MK(Get_MkTypeE_FromObj)

Definition at line 911 of file LibMkKernel_atl.h.

◆ HDL2VAL

#define HDL2VAL ( nat)
Value:
Tcl_NewIntObj(nat)

Definition at line 989 of file LibMkKernel_atl.h.

◆ HEADER

#define HEADER

Definition at line 38 of file LibMkKernel_atl.h.

◆ I162VAL

#define I162VAL ( nat)
Value:
Tcl_NewIntObj(nat)

Definition at line 985 of file LibMkKernel_atl.h.

◆ I642VAL

#define I642VAL ( nat)
Value:
Tcl_NewWideIntObj(nat)

Definition at line 988 of file LibMkKernel_atl.h.

◆ I82VAL

#define I82VAL ( nat)
Value:
Tcl_NewIntObj(nat)

Definition at line 983 of file LibMkKernel_atl.h.

◆ INT2VAL

#define INT2VAL ( nat)
Value:
Tcl_NewIntObj(nat)

Definition at line 987 of file LibMkKernel_atl.h.

◆ LLG2VAL

#define LLG2VAL ( nat)
Value:
Tcl_NewWideIntObj(nat)

Definition at line 990 of file LibMkKernel_atl.h.

◆ LONG2VAL

#define LONG2VAL ( nat)
Value:
Tcl_NewLongObj(nat)

Definition at line 997 of file LibMkKernel_atl.h.

◆ ME_REF_MkBinaryR

#define ME_REF_MkBinaryR   MkBinaryR

Definition at line 1240 of file LibMkKernel_atl.h.

◆ ME_REF_MkStringR

#define ME_REF_MkStringR   MkStringR

Definition at line 1251 of file LibMkKernel_atl.h.

◆ META2VAL_O

#define META2VAL_O ( o)
Value:
#define OT_SELF_O(o)
#define SELF2VAL(slf)

Definition at line 981 of file LibMkKernel_atl.h.

◆ META2VAL_X

#define META2VAL_X ( x)
Value:
#define OT_SELF_X(x)

Definition at line 980 of file LibMkKernel_atl.h.

◆ META_CONTEXT_S

#define META_CONTEXT_S   hdl

Definition at line 95 of file LibMkKernel_atl.h.

◆ META_FILE_NAME

#define META_FILE_NAME   (__builtin_strrchr(__FILE__, '/') ? __builtin_strrchr(__FILE__, '/') + 1 : __FILE__)

Definition at line 17 of file LibMkKernel_atl.h.

◆ MK

#define MK ( n)
Value:
atlmkkernel_ ## n

Definition at line 89 of file LibMkKernel_atl.h.

◆ MK_ATL_EXTERN

#define MK_ATL_EXTERN

static library

Definition at line 62 of file LibMkKernel_atl.h.

◆ MK_ATL_EXTERN_DATA

#define MK_ATL_EXTERN_DATA   extern

Definition at line 85 of file LibMkKernel_atl.h.

◆ MkBufferC_ARGS

#define MkBufferC_ARGS   OBJECT_ARGS

Definition at line 125 of file LibMkKernel_atl.h.

◆ MkBufferC_ARGS_CALL

#define MkBufferC_ARGS_CALL   OBJECT_ARGS_CALL

Definition at line 126 of file LibMkKernel_atl.h.

◆ MkBufferC_lngO

#define MkBufferC_lngO   (MkBufferC_rt.AtlMkBufferC)

Definition at line 1122 of file LibMkKernel_atl.h.

◆ MkBufferC_ObjNew

#define MkBufferC_ObjNew ( nat)
Value:
#define MkBufferC_ObjNew(nat)

Definition at line 1128 of file LibMkKernel_atl.h.

◆ MkBufferC_rt

#define MkBufferC_rt   (*amkrt)

Definition at line 1121 of file LibMkKernel_atl.h.

◆ MkBufferCTT

#define MkBufferCTT   (MkBufferC_rt.AtlMkBufferCTT)

Definition at line 1124 of file LibMkKernel_atl.h.

◆ MkBufferListC_ARGS

#define MkBufferListC_ARGS   OBJECT_ARGS

Definition at line 123 of file LibMkKernel_atl.h.

◆ MkBufferListC_ARGS_CALL

#define MkBufferListC_ARGS_CALL   OBJECT_ARGS_CALL

Definition at line 124 of file LibMkKernel_atl.h.

◆ MkBufferListC_lngO

#define MkBufferListC_lngO   (MkBufferListC_rt.AtlMkBufferListC)

Definition at line 1103 of file LibMkKernel_atl.h.

◆ MkBufferListC_ObjNew

#define MkBufferListC_ObjNew ( nat)
Value:
#define MkBufferListC_ObjNew(nat)

Definition at line 1109 of file LibMkKernel_atl.h.

◆ MkBufferListC_rt

#define MkBufferListC_rt   (*amkrt)

Definition at line 1102 of file LibMkKernel_atl.h.

◆ MkBufferListCTT

#define MkBufferListCTT   (MkBufferListC_rt.AtlMkBufferListCTT)

Definition at line 1105 of file LibMkKernel_atl.h.

◆ MkBufferStreamC_ARGS

#define MkBufferStreamC_ARGS   OBJECT_ARGS

Definition at line 127 of file LibMkKernel_atl.h.

◆ MkBufferStreamC_ARGS_CALL

#define MkBufferStreamC_ARGS_CALL   OBJECT_ARGS_CALL

Definition at line 128 of file LibMkKernel_atl.h.

◆ MkBufferStreamC_lngO

#define MkBufferStreamC_lngO   (MkBufferStreamC_rt.AtlMkBufferStreamC)

Definition at line 1141 of file LibMkKernel_atl.h.

◆ MkBufferStreamC_ObjNew

#define MkBufferStreamC_ObjNew ( nat)
Value:
#define MkBufferStreamC_ObjNew(nat)

Definition at line 1147 of file LibMkKernel_atl.h.

◆ MkBufferStreamC_rt

#define MkBufferStreamC_rt   (*amkrt)

Definition at line 1140 of file LibMkKernel_atl.h.

◆ MkBufferStreamCTT

#define MkBufferStreamCTT   (MkBufferStreamC_rt.AtlMkBufferStreamCTT)

Definition at line 1143 of file LibMkKernel_atl.h.

◆ MkCallLog

#define MkCallLog ( c)
Value:
MK(CallLog) ( MK_RT_CALL_NULL (c), __func__ )
#define MK_RT_CALL_NULL

Definition at line 539 of file LibMkKernel_atl.h.

◆ MkCallS_SIG

#define MkCallS_SIG   0x30364351

Definition at line 513 of file LibMkKernel_atl.h.

◆ MkErrorC_ARGS

#define MkErrorC_ARGS   OBJECT_ARGS

Definition at line 129 of file LibMkKernel_atl.h.

◆ MkErrorC_ARGS_CALL

#define MkErrorC_ARGS_CALL   OBJECT_ARGS_CALL

Definition at line 130 of file LibMkKernel_atl.h.

◆ MkErrorC_Check

#define MkErrorC_Check ( mng,
PROC )
Value:
if (unlikely(MkErrorCheckI(PROC))) { \
OT_ERROR_META_2_LNG(mng); goto error; \
}
#define unlikely(x)

Definition at line 459 of file LibMkKernel_atl.h.

459#define MkErrorC_Check(mng,PROC) \
460 if (unlikely(MkErrorCheckI(PROC))) { \
461 OT_ERROR_META_2_LNG(mng); goto error; \
462 }

◆ MkErrorC_CheckD

#define MkErrorC_CheckD ( PROC)
Value:
if (unlikely(MkErrorCheckI(PROC))) { \
OT_ERROR_META_2_LNG(hdl); goto error; \
}

Definition at line 464 of file LibMkKernel_atl.h.

464#define MkErrorC_CheckD(PROC) \
465 if (unlikely(MkErrorCheckI(PROC))) { \
466 OT_ERROR_META_2_LNG(hdl); goto error; \
467 }

◆ MkErrorC_lngO

#define MkErrorC_lngO   (MkErrorC_rt.AtlMkErrorC)

Definition at line 1160 of file LibMkKernel_atl.h.

◆ MkErrorC_ObjNew

#define MkErrorC_ObjNew ( nat)
Value:
#define MkErrorC_ObjNew(nat)

Definition at line 1166 of file LibMkKernel_atl.h.

◆ MkErrorC_rt

#define MkErrorC_rt   (*amkrt)

Definition at line 1159 of file LibMkKernel_atl.h.

◆ MkErrorCTT

#define MkErrorCTT   (MkErrorC_rt.AtlMkErrorCTT)

Definition at line 1162 of file LibMkKernel_atl.h.

◆ MkLogFileC_ARGS

#define MkLogFileC_ARGS   OBJECT_ARGS

Definition at line 131 of file LibMkKernel_atl.h.

◆ MkLogFileC_ARGS_CALL

#define MkLogFileC_ARGS_CALL   OBJECT_ARGS_CALL

Definition at line 132 of file LibMkKernel_atl.h.

◆ MkLogFileC_lngO

#define MkLogFileC_lngO   (MkLogFileC_rt.AtlMkLogFileC)

Definition at line 1179 of file LibMkKernel_atl.h.

◆ MkLogFileC_ObjNew

#define MkLogFileC_ObjNew ( nat)
Value:
#define MkLogFileC_ObjNew(nat)

Definition at line 1185 of file LibMkKernel_atl.h.

◆ MkLogFileC_rt

#define MkLogFileC_rt   (*amkrt)

Definition at line 1178 of file LibMkKernel_atl.h.

◆ MkLogFileCTT

#define MkLogFileCTT   (MkLogFileC_rt.AtlMkLogFileCTT)

Definition at line 1181 of file LibMkKernel_atl.h.

◆ MkObjectC_ARGS

#define MkObjectC_ARGS   OBJECT_ARGS

Definition at line 133 of file LibMkKernel_atl.h.

◆ MkObjectC_ARGS_CALL

#define MkObjectC_ARGS_CALL   OBJECT_ARGS_CALL

Definition at line 134 of file LibMkKernel_atl.h.

◆ MkObjectC_lngO

#define MkObjectC_lngO   (MkObjectC_rt.AtlMkObjectC)

Definition at line 1198 of file LibMkKernel_atl.h.

◆ MkObjectC_ObjNew

#define MkObjectC_ObjNew ( nat)
Value:
#define MkObjectC_ObjNew(nat)

Definition at line 1204 of file LibMkKernel_atl.h.

◆ MkObjectC_rt

#define MkObjectC_rt   (*amkrt)

Definition at line 1197 of file LibMkKernel_atl.h.

◆ MkObjectCTT

#define MkObjectCTT   (MkObjectC_rt.AtlMkObjectCTT)

Definition at line 1200 of file LibMkKernel_atl.h.

◆ MkProcResolve_maxArgsLen

#define MkProcResolve_maxArgsLen   16

Definition at line 541 of file LibMkKernel_atl.h.

◆ MkRuntimeC_ARGS

#define MkRuntimeC_ARGS   OBJECT_ARGS

Definition at line 135 of file LibMkKernel_atl.h.

◆ MkRuntimeC_ARGS_CALL

#define MkRuntimeC_ARGS_CALL   OBJECT_ARGS_CALL

Definition at line 136 of file LibMkKernel_atl.h.

◆ MkRuntimeC_lngO

#define MkRuntimeC_lngO   (MkRuntimeC_rt.AtlMkRuntimeC)

Definition at line 1217 of file LibMkKernel_atl.h.

◆ MkRuntimeC_ObjNew

#define MkRuntimeC_ObjNew ( nat)
Value:
#define MkRuntimeC_ObjNew(nat)

Definition at line 1223 of file LibMkKernel_atl.h.

◆ MkRuntimeC_rt

#define MkRuntimeC_rt   (*amkrt)

Definition at line 1216 of file LibMkKernel_atl.h.

◆ MkRuntimeCTT

#define MkRuntimeCTT   (MkRuntimeC_rt.AtlMkRuntimeCTT)

Definition at line 1219 of file LibMkKernel_atl.h.

◆ NO_OtCheckEnum

#define NO_OtCheckEnum

Definition at line 674 of file LibMkKernel_atl.h.

◆ NO_OtCheckEnumFlag

#define NO_OtCheckEnumFlag

Definition at line 675 of file LibMkKernel_atl.h.

◆ NO_TestObject

#define NO_TestObject

Definition at line 676 of file LibMkKernel_atl.h.

◆ NS

#define NS ( n)
Value:
atlmkkernel_ ## n

Definition at line 91 of file LibMkKernel_atl.h.

◆ OBJCMD_ARGS

#define OBJCMD_ARGS   ClientData clientData, ATL_ARGS

Definition at line 108 of file LibMkKernel_atl.h.

◆ OBJCMD_ARGS_CALL

#define OBJCMD_ARGS_CALL   clientData, ATL_ARGS_CALL

Definition at line 109 of file LibMkKernel_atl.h.

◆ OBJECT_ARGS

#define OBJECT_ARGS   ClientData clientData, ATL_ARGS

Definition at line 105 of file LibMkKernel_atl.h.

◆ OBJECT_ARGS_CALL

#define OBJECT_ARGS_CALL   hdl, ATL_ARGS_CALL

Definition at line 106 of file LibMkKernel_atl.h.

◆ OT_ATL_EXTERN

#define OT_ATL_EXTERN   __attribute__ ((visibility("default")))

Definition at line 1051 of file LibMkKernel_atl.h.

◆ OT_CHECK__ME_REF_MkBinaryR

#define OT_CHECK__ME_REF_MkBinaryR ( val)
Value:
if (__skip >= objc) { \
OT_ERROR_NUMARGS(hdl,__skip, objc, -999, +999, #val); \
} else { \
val = VAL2MkBinaryR(objv[__skip++]); \
}
#define VAL2MkBinaryR(obj)

Definition at line 1244 of file LibMkKernel_atl.h.

1244#define OT_CHECK__ME_REF_MkBinaryR(val) \
1245 if (__skip >= objc) { \
1246 OT_ERROR_NUMARGS(hdl,__skip, objc, -999, +999, #val); \
1247 } else { \
1248 val = VAL2MkBinaryR(objv[__skip++]); \
1249 }

◆ OT_CHECK__ME_REF_MkStringR

#define OT_CHECK__ME_REF_MkStringR ( val)
Value:
if (__skip >= objc) { \
OT_ERROR_NUMARGS(hdl,__skip, objc, -999, +999, #val); \
} else { \
val = VAL2MkStringR(objv[__skip++]); \
}
#define VAL2MkStringR(obj)

Definition at line 1255 of file LibMkKernel_atl.h.

1255#define OT_CHECK__ME_REF_MkStringR(val) \
1256 if (__skip >= objc) { \
1257 OT_ERROR_NUMARGS(hdl,__skip, objc, -999, +999, #val); \
1258 } else { \
1259 val = VAL2MkStringR(objv[__skip++]); \
1260 }

◆ OT_Check_ARGS

#define OT_Check_ARGS   OT_MK_ARGS MK_MNG hdl, MK_STRN const arg, ATL_OBJV_ARGS, int *skipP

Definition at line 414 of file LibMkKernel_atl.h.

◆ OT_CHECK_BCP

#define OT_CHECK_BCP ( val)
Value:
if (__skip >= objc) {\
OT_ERROR_NUMARGS(hdl,__skip, objc, -999, +999, #val); \
} else { \
val = (MK_BIN) Tcl_GetByteArrayFromObj(objv[__skip++], NULL); \
}
MK_BINB * MK_BIN
byte-array pointer data-type with binary encoding (binary)

Definition at line 443 of file LibMkKernel_atl.h.

443#define OT_CHECK_BCP(val) \
444 if (__skip >= objc) {\
445 OT_ERROR_NUMARGS(hdl,__skip, objc, -999, +999, #val); \
446 } else { \
447 val = (MK_BIN) Tcl_GetByteArrayFromObj(objv[__skip++], NULL); \
448 }

◆ OT_CHECK_BCPN

#define OT_CHECK_BCPN ( val)
Value:
if (__skip >= objc) {\
OT_ERROR_NUMARGS(hdl,__skip, objc, -999, +999, #val); \
} else { \
val = (MK_BINN) Tcl_GetByteArrayFromObj(objv[__skip++], NULL); \
}
MK_BINB const * MK_BINN
const byte-array pointer data-type

Definition at line 450 of file LibMkKernel_atl.h.

450#define OT_CHECK_BCPN(val) \
451 if (__skip >= objc) {\
452 OT_ERROR_NUMARGS(hdl,__skip, objc, -999, +999, #val); \
453 } else { \
454 val = (MK_BINN) Tcl_GetByteArrayFromObj(objv[__skip++], NULL); \
455 }

◆ OT_CHECK_BNP

#define OT_CHECK_BNP ( val,
len )
Value:
if (__skip >= objc) {\
OT_ERROR_NUMARGS(hdl,__skip, objc, -999, +999, #val); \
} else { \
int i; \
val = (MK_BINN) Tcl_GetByteArrayFromObj(objv[__skip++], &i); \
len = (MK_SIZE)i; \
}
long MK_SIZE

Definition at line 434 of file LibMkKernel_atl.h.

434#define OT_CHECK_BNP(val,len) \
435 if (__skip >= objc) {\
436 OT_ERROR_NUMARGS(hdl,__skip, objc, -999, +999, #val); \
437 } else { \
438 int i; \
439 val = (MK_BINN) Tcl_GetByteArrayFromObj(objv[__skip++], &i); \
440 len = (MK_SIZE)i; \
441 }

◆ OT_CHECK_bool

#define OT_CHECK_bool ( val)
Value:
#define OT_CHECK_LNGTMPL(val, func)
MK_ATTR_HOT MK_EXTERN enum MkErrorE MK_DECL MK Obj_AsBOOL(OT_Check_ARGS, bool *)

Definition at line 699 of file LibMkKernel_atl.h.

◆ OT_CHECK_C_COPY

#define OT_CHECK_C_COPY ( val,
size )
Value:
MkErrorC_CheckD (MK(Obj_AsSTR_COPY)(OT_Check_CALL(#val),val,size));
#define OT_Check_CALL(arg)
#define MkErrorC_CheckD(PROC)

Definition at line 717 of file LibMkKernel_atl.h.

◆ OT_Check_CALL

#define OT_Check_CALL ( arg)
Value:
OT_MK_CALL hdl, arg, ATL_OBJV_ARGS_CALL, &__skip
#define ATL_OBJV_ARGS_CALL

Definition at line 415 of file LibMkKernel_atl.h.

◆ OT_Check_CALL2

#define OT_Check_CALL2 ( arg)
Value:

Definition at line 416 of file LibMkKernel_atl.h.

◆ OT_CHECK_ENUM

#define OT_CHECK_ENUM ( ename,
val )
Value:
if (__skip >= objc) {\
OT_ERROR_NUMARGS(hdl,__skip, objc, -999, +999, #val); \
} else { \
check_LNG(Get_ ## ename ## _FromObj_path (MK_RT_CALL interp,objv[__skip++],&val)) goto error; \
}
#define MK_RT_CALL

Definition at line 679 of file LibMkKernel_atl.h.

679#define OT_CHECK_ENUM(ename,val) \
680 if (__skip >= objc) {\
681 OT_ERROR_NUMARGS(hdl,__skip, objc, -999, +999, #val); \
682 } else { \
683 check_LNG(Get_ ## ename ## _FromObj_path (MK_RT_CALL interp,objv[__skip++],&val)) goto error; \
684 }

◆ OT_CHECK_ENUM_FLAG

#define OT_CHECK_ENUM_FLAG ( ename,
val )
Value:
if (__skip >= objc) {\
OT_ERROR_NUMARGS(hdl,__skip, objc, -999, +999, #val); \
} else { \
check_LNG(Get_ ## ename ## _FromObj_path (MK_RT_CALL interp,objv[__skip++],&val)) goto error; \
}

Definition at line 686 of file LibMkKernel_atl.h.

686#define OT_CHECK_ENUM_FLAG(ename,val) \
687 if (__skip >= objc) {\
688 OT_ERROR_NUMARGS(hdl,__skip, objc, -999, +999, #val); \
689 } else { \
690 check_LNG(Get_ ## ename ## _FromObj_path (MK_RT_CALL interp,objv[__skip++],&val)) goto error; \
691 }

◆ OT_CHECK_IXN

#define OT_CHECK_IXN ( val)
Value:
OT_CHECK_LNGTMPL(val,MK(Obj_AsLLG))

Definition at line 707 of file LibMkKernel_atl.h.

◆ OT_CHECK_LNGTMPL

#define OT_CHECK_LNGTMPL ( val,
func )
Value:
MkErrorC_CheckD (func(OT_Check_CALL(#val),&val));

Definition at line 697 of file LibMkKernel_atl.h.

◆ OT_CHECK_NB1

#define OT_CHECK_NB1 ( val)
Value:
MK_ATTR_HOT MK_EXTERN enum MkErrorE MK_DECL MK Obj_AsBOL(OT_Check_ARGS, MK_BOL *)

Definition at line 700 of file LibMkKernel_atl.h.

◆ OT_CHECK_NF4

#define OT_CHECK_NF4 ( val)
Value:
MK_ATTR_HOT MK_EXTERN enum MkErrorE MK_DECL MK Obj_AsFLT(OT_Check_ARGS, MK_FLT *)

Definition at line 708 of file LibMkKernel_atl.h.

◆ OT_CHECK_NF8

#define OT_CHECK_NF8 ( val)
Value:
MK_ATTR_HOT MK_EXTERN enum MkErrorE MK_DECL MK Obj_AsDBL(OT_Check_ARGS, MK_DBL *)

Definition at line 709 of file LibMkKernel_atl.h.

◆ OT_CHECK_NI1

#define OT_CHECK_NI1 ( val)
Value:
MK_ATTR_HOT MK_EXTERN enum MkErrorE MK_DECL MK Obj_AsI8(OT_Check_ARGS, MK_I8 *)

Definition at line 701 of file LibMkKernel_atl.h.

◆ OT_CHECK_NI2

#define OT_CHECK_NI2 ( val)
Value:
MK_ATTR_HOT MK_EXTERN enum MkErrorE MK_DECL MK Obj_AsI16(OT_Check_ARGS, MK_I16 *)

Definition at line 702 of file LibMkKernel_atl.h.

◆ OT_CHECK_NI4

#define OT_CHECK_NI4 ( val)
Value:
MK_ATTR_HOT MK_EXTERN enum MkErrorE MK_DECL MK Obj_AsI32(OT_Check_ARGS, MK_I32 *)

Definition at line 704 of file LibMkKernel_atl.h.

◆ OT_CHECK_NI8

#define OT_CHECK_NI8 ( val)
Value:
MK_ATTR_HOT MK_EXTERN enum MkErrorE MK_DECL MK Obj_AsI64(OT_Check_ARGS, MK_I64 *)

Definition at line 706 of file LibMkKernel_atl.h.

◆ OT_CHECK_NIH

#define OT_CHECK_NIH ( val)
Value:
MK_HDL_REF_S3(OT_CHECK_) (val)
#define MK_HDL_REF_S3(__prefix)

Definition at line 712 of file LibMkKernel_atl.h.

◆ OT_CHECK_NIL

#define OT_CHECK_NIL ( val)
Value:
MK_ATTR_HOT MK_EXTERN enum MkErrorE MK_DECL MK Obj_AsLONG(OT_Check_ARGS, long *)

Definition at line 711 of file LibMkKernel_atl.h.

◆ OT_CHECK_NOARGS

#define OT_CHECK_NOARGS
Value:
if (__skip != objc) { \
OT_ERROR_NUMARGS(hdl,objc, __skip, -999, +999, ""); \
}

Definition at line 427 of file LibMkKernel_atl.h.

427#define OT_CHECK_NOARGS \
428 if (__skip != objc) { \
429 OT_ERROR_NUMARGS(hdl,objc, __skip, -999, +999, ""); \
430 }

◆ OT_CHECK_NUM_ARGS

#define OT_CHECK_NUM_ARGS ( min,
max )
Value:
if ((objc-__skip) < min || (objc-__skip) > max) { \
OT_ERROR_NUMARGS(hdl,__skip, objc, min, max, ""); \
}

Definition at line 421 of file LibMkKernel_atl.h.

421#define OT_CHECK_NUM_ARGS(min,max) \
422 if ((objc-__skip) < min || (objc-__skip) > max) { \
423 OT_ERROR_NUMARGS(hdl,__skip, objc, min, max, ""); \
424 }

◆ OT_CHECK_OPTIONAL

#define OT_CHECK_OPTIONAL ( val)
Value:
if (__skip < objc) {val}

Definition at line 418 of file LibMkKernel_atl.h.

◆ OT_CHECK_REQUIRED

#define OT_CHECK_REQUIRED ( val)
Value:
val

Definition at line 419 of file LibMkKernel_atl.h.

◆ OT_CHECK_STRN

#define OT_CHECK_STRN ( val)
Value:
MK_ATTR_HOT MK_EXTERN enum MkErrorE MK_DECL MK Obj_AsSTRN(OT_Check_ARGS, MK_STRN *)

Definition at line 710 of file LibMkKernel_atl.h.

◆ OT_CHECK_STRN_NULL

#define OT_CHECK_STRN_NULL ( val)
Value:
OT_CHECK_LNGTMPL(val,MK(Obj_AsCSTNull))

Definition at line 714 of file LibMkKernel_atl.h.

◆ OT_CHECK_U2N

#define OT_CHECK_U2N ( val)
Value:
OT_CHECK_LNGTMPL(val,MK(Obj_AsU16))

Definition at line 703 of file LibMkKernel_atl.h.

◆ OT_CHECK_U4N

#define OT_CHECK_U4N ( val)
Value:
OT_CHECK_LNGTMPL(val,MK(Obj_AsU32))

Definition at line 705 of file LibMkKernel_atl.h.

◆ OT_CONSTRUCTOR_POST

#define OT_CONSTRUCTOR_POST ( x)

Definition at line 170 of file LibMkKernel_atl.h.

◆ OT_DEBUG_NAMESPACE_DELETE

#define OT_DEBUG_NAMESPACE_DELETE ( ...)

Definition at line 26 of file LibMkKernel_atl.h.

◆ ot_enum_append

#define ot_enum_append ( _o,
_s )
Value:
Tcl_ListObjAppendElement(NULL,_o,ot_fixstrobj(_s))
#define ot_fixstrobj(_s)

Definition at line 1283 of file LibMkKernel_atl.h.

◆ OT_ERROR_ABNORMAL

#define OT_ERROR_ABNORMAL ( mng)
Value:
do { \
MkErrorSetV_4M(mng,__func__,999,"AbnormalError: %s", Tcl_GetStringResult(interp));\
Tcl_ResetResult(interp); \
} while (0)

Definition at line 383 of file LibMkKernel_atl.h.

383#define OT_ERROR_ABNORMAL(mng) do { \
384 MkErrorSetV_4M(mng,__func__,999,"AbnormalError: %s", Tcl_GetStringResult(interp));\
385 Tcl_ResetResult(interp); \
386} while (0)

◆ OT_ERROR_APPEND_LNG_STACK

#define OT_ERROR_APPEND_LNG_STACK ( )
Value:
Tcl_AppendResult(interp,"\nERROR-STACK: func=",__func__,", file=",__FILE__,", line=",MK_CPPXSTR(__LINE__),NULL)
#define MK_CPPXSTR(s)
connecting of expressions, step 1 …

Definition at line 388 of file LibMkKernel_atl.h.

388#define OT_ERROR_APPEND_LNG_STACK() \
389 Tcl_AppendResult(interp,"\nERROR-STACK: func=",__func__,", file=",__FILE__,", line=",MK_CPPXSTR(__LINE__),NULL)

◆ OT_ERROR_CONSTRUCTOR

#define OT_ERROR_CONSTRUCTOR ( class)
Value:
do { \
Tcl_SetResult(interp, "InitError: '" #class "' constructor return 'NULL' pointer", TCL_STATIC); \
if (MkErrorCheckE_0E()) { \
Tcl_AppendResult(interp, "\nMqError: ", MkErrorGetText_0E(), NULL); \
MkErrorReset_0M(); \
} \
} while (0)
#define MkErrorCheckE_0E()
#define MkErrorGetText_0E()

Definition at line 371 of file LibMkKernel_atl.h.

371#define OT_ERROR_CONSTRUCTOR(class) do { \
372 Tcl_SetResult(interp, "InitError: '" #class "' constructor return 'NULL' pointer", TCL_STATIC); \
373 if (MkErrorCheckE_0E()) { \
374 Tcl_AppendResult(interp, "\nMqError: ", MkErrorGetText_0E(), NULL); \
375 MkErrorReset_0M(); \
376 } \
377} while (0)

◆ OT_ERROR_LNG_2_META

#define OT_ERROR_LNG_2_META ( m)
Value:
MK(MkExceptionC_Catch) (OT_Prefix_CALL m, NULL, __func__)
#define OT_Prefix_CALL

Definition at line 470 of file LibMkKernel_atl.h.

◆ OT_ERROR_LNG_RETURN

#define OT_ERROR_LNG_RETURN   return TCL_ERROR

Definition at line 360 of file LibMkKernel_atl.h.

◆ OT_ERROR_LNG_RETURN_HDL_IS_NULL

#define OT_ERROR_LNG_RETURN_HDL_IS_NULL ( )
Value:
#define OT_CLASS
#define OT_SELF
#define OT_ERROR_LNG_RETURN_HDL_IS_NULL()

Definition at line 407 of file LibMkKernel_atl.h.

◆ OT_ERROR_LNG_RETURN_HDL_NAT_NULL

#define OT_ERROR_LNG_RETURN_HDL_NAT_NULL ( _hdl)
Value:
do { \
OT_ERROR_VAR_DEFAULT("[HdlIsNullError] : %s", MkObjectToString(_hdl)); \
return TCL_ERROR; \
} while (0)
#define MkObjectToString(...)

Definition at line 397 of file LibMkKernel_atl.h.

397#define OT_ERROR_LNG_RETURN_HDL_NAT_NULL(_hdl) do { \
398 OT_ERROR_VAR_DEFAULT("[HdlIsNullError] : %s", MkObjectToString(_hdl)); \
399 return TCL_ERROR; \
400} while (0)

◆ OT_ERROR_LNG_RETURN_INVALID_CLASS

#define OT_ERROR_LNG_RETURN_INVALID_CLASS ( _clsHasS,
_clsExpS )
Value:
do { \
OT_ERROR_VAR_DEFAULT("[InvalidClassError] : Expect class '%s' but get class '%s'", _clsExpS, _clsHasS ); \
return TCL_ERROR; \
} while (0)

Definition at line 402 of file LibMkKernel_atl.h.

402#define OT_ERROR_LNG_RETURN_INVALID_CLASS(_clsHasS,_clsExpS) do { \
403 OT_ERROR_VAR_DEFAULT("[InvalidClassError] : Expect class '%s' but get class '%s'", _clsExpS, _clsHasS ); \
404 return TCL_ERROR; \
405} while (0)

◆ OT_ERROR_LNG_RETURN_STR_ERROR

#define OT_ERROR_LNG_RETURN_STR_ERROR ( ...)
Value:
return ({ OT_ERROR_STR_DEFAULT(__VA_ARGS__); TCL_ERROR; })
#define OT_ERROR_STR_DEFAULT(...)

Definition at line 395 of file LibMkKernel_atl.h.

◆ OT_ERROR_LNG_RETURN_VAR_ERROR

#define OT_ERROR_LNG_RETURN_VAR_ERROR ( ...)
Value:
return ({ OT_ERROR_VAR_DEFAULT(__VA_ARGS__); TCL_ERROR; })
#define OT_ERROR_VAR_DEFAULT(...)

Definition at line 394 of file LibMkKernel_atl.h.

◆ OT_ERROR_META_2_LNG

#define OT_ERROR_META_2_LNG ( m)
Value:
MK(MkExceptionC_Raise) (OT_Prefix_CALL m, __doc, __FILE__, __LINE__)
#define __doc

Definition at line 469 of file LibMkKernel_atl.h.

◆ OT_ERROR_NUMARGS

#define OT_ERROR_NUMARGS ( ...)
Value:
#define WrongNumArgs(...)

Definition at line 380 of file LibMkKernel_atl.h.

380#define OT_ERROR_NUMARGS(...) \
381 MkErrorC_CheckD(WrongNumArgs(__VA_ARGS__))

◆ OT_ERROR_SOFT_CONSTRUCTOR

#define OT_ERROR_SOFT_CONSTRUCTOR ( class)
Value:
do { \
Tcl_SetResult(interp, "InitSoftError: '" #class "' soft constructor return 'NULL' pointer", TCL_STATIC); \
} while (0)

Definition at line 367 of file LibMkKernel_atl.h.

367#define OT_ERROR_SOFT_CONSTRUCTOR(class) do { \
368 Tcl_SetResult(interp, "InitSoftError: '" #class "' soft constructor return 'NULL' pointer", TCL_STATIC); \
369} while (0)

◆ OT_ERROR_STR_DEFAULT

#define OT_ERROR_STR_DEFAULT ( ...)
Value:
Tcl_SetObjResult(interp,Tcl_NewStringObj(__VA_ARGS__,-1))

Definition at line 363 of file LibMkKernel_atl.h.

◆ OT_ERROR_TYPE

#define OT_ERROR_TYPE ( str)
Value:
Tcl_SetObjResult(interp, Tcl_ObjPrintf("TYPE ERROR: %s", str))
#define str(s)

Definition at line 365 of file LibMkKernel_atl.h.

◆ OT_ERROR_VAR_DEFAULT

#define OT_ERROR_VAR_DEFAULT ( ...)
Value:
Tcl_SetObjResult(interp,Tcl_ObjPrintf(__VA_ARGS__))

Definition at line 362 of file LibMkKernel_atl.h.

◆ OT_EVAL_ARGS

#define OT_EVAL_ARGS   OT_ENV_T interp, int objc, OT_OBJ_T const objv[], int flags

Definition at line 846 of file LibMkKernel_atl.h.

◆ OT_EVAL_CALL

#define OT_EVAL_CALL   interp, objc, objv , flags

Definition at line 847 of file LibMkKernel_atl.h.

◆ ot_fixstr

#define ot_fixstr ( _s,
_l )
Value:
Tcl_NewStringObj(_s,_l)

Definition at line 1281 of file LibMkKernel_atl.h.

◆ ot_fixstrobj

#define ot_fixstrobj ( _s)
Value:
ot_fixstr(_s,strlen(_s))
#define ot_fixstr(_s, _l)

Definition at line 1282 of file LibMkKernel_atl.h.

◆ OT_FRAME_CLEANUP

#define OT_FRAME_CLEANUP   if (frame != NULL) { Tcl_DecrRefCount(frame); frame = NULL; }

Definition at line 147 of file LibMkKernel_atl.h.

◆ OT_GET__ME_REF_MkBinaryR

#define OT_GET__ME_REF_MkBinaryR ( b)
Value:
BIN2VAL(b.data,b.size)
#define BIN2VAL(ptr, len)

Definition at line 1241 of file LibMkKernel_atl.h.

◆ OT_GET__ME_REF_MkStringR

#define OT_GET__ME_REF_MkStringR ( s)
Value:
STR2VAL_2(s.ptr,s.len)
#define STR2VAL_2(ptr, len)

Definition at line 1252 of file LibMkKernel_atl.h.

◆ OT_GET_CALL_FILE

#define OT_GET_CALL_FILE   MK(Get_Call_File)(OT_MK_CALL &frame)

Definition at line 722 of file LibMkKernel_atl.h.

◆ OT_GET_CALL_LINE

#define OT_GET_CALL_LINE   MK(Get_Call_Line)(OT_MK_CALL &frame)

Definition at line 723 of file LibMkKernel_atl.h.

◆ OT_GET_CALL_PROC

#define OT_GET_CALL_PROC   MK(Get_Call_Proc)(OT_MK_CALL &frame)

Definition at line 721 of file LibMkKernel_atl.h.

◆ OT_GET_CONSTR_NAME

#define OT_GET_CONSTR_NAME ( ctor)
Value:
VAL2STR(MoxCls__NAME__N(ctor))
#define VAL2STR(val)

Definition at line 432 of file LibMkKernel_atl.h.

◆ Ot_GetBooleanFromObj

#define Ot_GetBooleanFromObj ( val)
Value:
({int bol; if (Tcl_GetBooleanFromObj(interp,val,&bol)==TCL_ERROR) goto error; bol;})

Definition at line 1272 of file LibMkKernel_atl.h.

◆ OT_LNG_EMBEDDED

#define OT_LNG_EMBEDDED ( type,
call,
... )
Value:
({ \
type ret = (type) 0; \
check_LNG(call (__VA_ARGS__,&ret)) { \
OT_ERROR_APPEND_LNG_STACK(); \
goto error; \
} \
ret; \
})

Definition at line 349 of file LibMkKernel_atl.h.

349#define OT_LNG_EMBEDDED(type,call,...) ({ \
350 type ret = (type) 0; \
351 check_LNG(call (__VA_ARGS__,&ret)) { \
352 OT_ERROR_APPEND_LNG_STACK(); \
353 goto error; \
354 } \
355 ret; \
356})

◆ OT_LNG_NAME_FROM_CLASS

#define OT_LNG_NAME_FROM_CLASS ( _cls)
Value:
#define OT_LNG_NAME_FROM_OBJECT(_obj)

Definition at line 331 of file LibMkKernel_atl.h.

◆ OT_LNG_NAME_FROM_OBJ

#define OT_LNG_NAME_FROM_OBJ ( _obj)
Value:

Definition at line 332 of file LibMkKernel_atl.h.

◆ OT_LNG_NAME_FROM_OBJECT

#define OT_LNG_NAME_FROM_OBJECT ( _obj)
Value:
VAL2STR(_obj)

Definition at line 330 of file LibMkKernel_atl.h.

◆ OT_LNG_NULL

#define OT_LNG_NULL   NULL

Definition at line 324 of file LibMkKernel_atl.h.

◆ OT_LNG_OBJ_CLASSNAME

#define OT_LNG_OBJ_CLASSNAME ( val)
Value:
MK(ClassName)(OT_Prefix_CALL val, false)

Definition at line 334 of file LibMkKernel_atl.h.

◆ OT_LNG_OBJ_CLASSNAME_SHORT

#define OT_LNG_OBJ_CLASSNAME_SHORT ( val)
Value:
MK(ClassName)(OT_Prefix_CALL val, true)

Definition at line 335 of file LibMkKernel_atl.h.

◆ OT_LNG_OBJV

#define OT_LNG_OBJV ( __skip)
Value:
objv[__skip]

Definition at line 341 of file LibMkKernel_atl.h.

◆ OT_LNG_RETURN

#define OT_LNG_RETURN ( ret,
cmd )
Value:
check_LNG(cmd) goto error; \
ret = Tcl_GetObjResult(interp); \
#define check_LNG(code)

Definition at line 326 of file LibMkKernel_atl.h.

326#define OT_LNG_RETURN(ret,cmd) \
327 check_LNG(cmd) goto error; \
328 ret = Tcl_GetObjResult(interp); \
329

◆ OT_LNG_SELF_2_LNG

#define OT_LNG_SELF_2_LNG ( selfT)
Value:
((OT_OBJ_T)(selfT))
MOX_OBJ_T OT_OBJ_T

Definition at line 339 of file LibMkKernel_atl.h.

◆ OT_LNG_SET_VAR

#define OT_LNG_SET_VAR ( var,
val )
Value:
if (Tcl_ObjSetVar2(interp, var, NULL, val, TCL_LEAVE_ERR_MSG) == NULL) goto error

Definition at line 346 of file LibMkKernel_atl.h.

346#define OT_LNG_SET_VAR(var,val) \
347 if (Tcl_ObjSetVar2(interp, var, NULL, val, TCL_LEAVE_ERR_MSG) == NULL) goto error

◆ OT_LNG_UNDEF

#define OT_LNG_UNDEF   NULL

Definition at line 325 of file LibMkKernel_atl.h.

◆ OT_MK_ARGS

#define OT_MK_ARGS   OT_MK_RT_T amkrt, OT_ENV_T interp, MK_RT_ARGS

Definition at line 321 of file LibMkKernel_atl.h.

◆ OT_MK_CALL

#define OT_MK_CALL   amkrt, interp, MK_RT_CALL

Definition at line 322 of file LibMkKernel_atl.h.

◆ OT_MK_CALL_0

#define OT_MK_CALL_0 ( hdl,
cls,
meth,
ret )
Value:
{ \
OT_SELF_T selfO = cls##_ObjNew(hdl); \
assert(selfO != NULL); \
RL_init(2,cls##_##meth,RL_NewS(0,MK_CPPXSTR(::cls::meth))) ; RL_O(1,SELF2VAL(selfO)) ; \
check_LNG(RL_EvalEx(TCL_EVAL_GLOBAL)) goto error; \
ret = Tcl_GetObjResult(interp); \
}
MOX_OBJ_T OT_SELF_T

Definition at line 223 of file LibMkKernel_atl.h.

223#define OT_MK_CALL_0(hdl,cls,meth,ret) { \
224 OT_SELF_T selfO = cls##_ObjNew(hdl); \
225 assert(selfO != NULL); \
226 RL_init(2,cls##_##meth,RL_NewS(0,MK_CPPXSTR(::cls::meth))) ; RL_O(1,SELF2VAL(selfO)) ; \
227 check_LNG(RL_EvalEx(TCL_EVAL_GLOBAL)) goto error; \
228 ret = Tcl_GetObjResult(interp); \
229}

◆ OT_MK_RT_SIG

#define OT_MK_RT_SIG   0x62384526

Definition at line 251 of file LibMkKernel_atl.h.

◆ OT_NEW_Mk_enum_OBJ

#define OT_NEW_Mk_enum_OBJ ( typ,
val )
Value:
MK(Mk ## typ ## _ToString(val))

Definition at line 887 of file LibMkKernel_atl.h.

◆ OT_OBJ_COPY

#define OT_OBJ_COPY ( o)
Value:
({OT_OBJ_T t=(o); if (t) { t = Tcl_NewStringObj(Tcl_GetString(t),-1); OT_REF_INCR(t); }; t; })
#define OT_REF_INCR(_obj)

Definition at line 591 of file LibMkKernel_atl.h.

◆ OT_OBJ_TO_CLASS

#define OT_OBJ_TO_CLASS ( obj)
Value:
obj

Definition at line 343 of file LibMkKernel_atl.h.

◆ OT_OBJ_TO_ENUM

#define OT_OBJ_TO_ENUM ( str)
Value:
#str

Definition at line 344 of file LibMkKernel_atl.h.

◆ OT_OBJ_TYPE_STRING

#define OT_OBJ_TYPE_STRING ( val)
Value:
MK(ClassName)(OT_Prefix_CALL val, false)

Definition at line 336 of file LibMkKernel_atl.h.

◆ OT_OBJECT_DELETE

#define OT_OBJECT_DELETE ( O)
Value:
MK(AtomDispose) (OT_MK_CALL O)

Definition at line 504 of file LibMkKernel_atl.h.

◆ OT_OBJECT_DELETE_HARD

#define OT_OBJECT_DELETE_HARD ( O)
Value:
MK(AtomDeleteHard) (OT_MK_CALL O)

Definition at line 499 of file LibMkKernel_atl.h.

◆ OT_OBJECT_DELETE_SOFT

#define OT_OBJECT_DELETE_SOFT ( O)
Value:
error: done in Atom_ns_delete

Definition at line 496 of file LibMkKernel_atl.h.

◆ OT_OBJECT_DISPOSE

#define OT_OBJECT_DISPOSE ( O)
Value:
MK(AtomDispose) (OT_MK_CALL O)

Definition at line 502 of file LibMkKernel_atl.h.

◆ OT_Prefix_ARGS

#define OT_Prefix_ARGS   OT_MK_ARGS

Definition at line 412 of file LibMkKernel_atl.h.

◆ OT_Prefix_CALL

#define OT_Prefix_CALL   OT_MK_CALL

Definition at line 413 of file LibMkKernel_atl.h.

◆ OT_ProcRet

#define OT_ProcRet   int

Definition at line 97 of file LibMkKernel_atl.h.

◆ OT_REF_DECR

#define OT_REF_DECR ( _obj)
Value:
Tcl_DecrRefCount(_obj)

Definition at line 507 of file LibMkKernel_atl.h.

◆ OT_REF_DECR_AND_NULL

#define OT_REF_DECR_AND_NULL ( _obj)
Value:
if (_obj) { Tcl_DecrRefCount (_obj) ; _obj = NULL; }

Definition at line 509 of file LibMkKernel_atl.h.

◆ OT_REF_INCR

#define OT_REF_INCR ( _obj)
Value:
Tcl_IncrRefCount(_obj)

Definition at line 506 of file LibMkKernel_atl.h.

◆ OT_REF_INCR_AND_RETURN

#define OT_REF_INCR_AND_RETURN ( _obj)
Value:
({ Tcl_IncrRefCount(_obj); _obj;})

Definition at line 508 of file LibMkKernel_atl.h.

◆ OT_retObj_APPEND

#define OT_retObj_APPEND ( var)
Value:
check_LNG(Tcl_ListObjAppendElement(interp,retObj,var)) goto error

Definition at line 179 of file LibMkKernel_atl.h.

◆ OT_retObj_RETURN

#define OT_retObj_RETURN
Value:
do { \
Tcl_SetObjResult(interp,retObj); \
return TCL_OK; \
} else if (OT_retObj_SET_isNone) { \
Tcl_ResetResult(interp); \
return TCL_OK; \
} else { \
return TCL_ERROR; \
} \
} while (0)
#define OT_retObj_SET_isNone
#define OT_retObj_SET_isPtr

Definition at line 180 of file LibMkKernel_atl.h.

180#define OT_retObj_RETURN do { \
181 if (OT_retObj_SET_isPtr) { \
182 Tcl_SetObjResult(interp,retObj); \
183 return TCL_OK; \
184 } else if (OT_retObj_SET_isNone) { \
185 Tcl_ResetResult(interp); \
186 return TCL_OK; \
187 } else { \
188 return TCL_ERROR; \
189 } \
190} while (0)

◆ OT_retObj_SET

#define OT_retObj_SET ( val)
Value:
retObj = (val)

Definition at line 172 of file LibMkKernel_atl.h.

◆ OT_retObj_SET_BFL

#define OT_retObj_SET_BFL ( nat)
Value:
retObj = MkBufferListC_ObjNew (nat)

Definition at line 1111 of file LibMkKernel_atl.h.

◆ OT_retObj_SET_BIN

#define OT_retObj_SET_BIN ( nat,
len )
Value:
retObj = BIN2VAL(nat,len);

Definition at line 201 of file LibMkKernel_atl.h.

◆ OT_retObj_SET_BOL

#define OT_retObj_SET_BOL ( nat)
Value:
retObj = BOL2VAL(nat);
#define BOL2VAL(nat)

Definition at line 192 of file LibMkKernel_atl.h.

◆ OT_retObj_SET_BUF

#define OT_retObj_SET_BUF ( nat)
Value:
retObj = MkBufferC_ObjNew (nat)

Definition at line 1130 of file LibMkKernel_atl.h.

◆ OT_retObj_SET_BUS

#define OT_retObj_SET_BUS ( nat)
Value:
retObj = MkBufferStreamC_ObjNew (nat)

Definition at line 1149 of file LibMkKernel_atl.h.

◆ OT_retObj_SET_DBL

#define OT_retObj_SET_DBL ( nat)
Value:
retObj = DBL2VAL(nat);
#define DBL2VAL(nat)

Definition at line 200 of file LibMkKernel_atl.h.

◆ OT_retObj_SET_ERR

#define OT_retObj_SET_ERR ( nat)
Value:
retObj = MkErrorC_ObjNew (nat)

Definition at line 1168 of file LibMkKernel_atl.h.

◆ OT_retObj_SET_Error

#define OT_retObj_SET_Error   retObj = NULL

Definition at line 176 of file LibMkKernel_atl.h.

◆ OT_retObj_SET_FLT

#define OT_retObj_SET_FLT ( nat)
Value:
retObj = FLT2VAL(nat);
#define FLT2VAL(nat)

Definition at line 199 of file LibMkKernel_atl.h.

◆ OT_retObj_SET_HDL

#define OT_retObj_SET_HDL ( nat)
Value:
retObj = HDL2VAL(nat);
#define HDL2VAL(nat)

Definition at line 205 of file LibMkKernel_atl.h.

◆ OT_retObj_SET_I16

#define OT_retObj_SET_I16 ( nat)
Value:
retObj = I162VAL(nat);
#define I162VAL(nat)

Definition at line 194 of file LibMkKernel_atl.h.

◆ OT_retObj_SET_I32

#define OT_retObj_SET_I32 ( nat)
Value:
retObj = INT2VAL(nat);
#define INT2VAL(nat)

Definition at line 196 of file LibMkKernel_atl.h.

◆ OT_retObj_SET_I64

#define OT_retObj_SET_I64 ( nat)
Value:
retObj = I642VAL(nat);
#define I642VAL(nat)

Definition at line 197 of file LibMkKernel_atl.h.

◆ OT_retObj_SET_I8

#define OT_retObj_SET_I8 ( nat)
Value:
retObj = I82VAL(nat);
#define I82VAL(nat)

Definition at line 193 of file LibMkKernel_atl.h.

◆ OT_retObj_SET_isNone

#define OT_retObj_SET_isNone   ((long)retObj) == 0x1

Definition at line 175 of file LibMkKernel_atl.h.

◆ OT_retObj_SET_isPtr

#define OT_retObj_SET_isPtr   ((long)retObj) > 0x1

Definition at line 173 of file LibMkKernel_atl.h.

◆ OT_retObj_SET_LFL

#define OT_retObj_SET_LFL ( nat)
Value:
retObj = MkLogFileC_ObjNew (nat)

Definition at line 1187 of file LibMkKernel_atl.h.

◆ OT_retObj_SET_List

#define OT_retObj_SET_List   retObj = Tcl_NewListObj(0,NULL)

Definition at line 178 of file LibMkKernel_atl.h.

◆ OT_retObj_SET_LLG

#define OT_retObj_SET_LLG ( nat)
Value:
retObj = LLG2VAL(nat);
#define LLG2VAL(nat)

Definition at line 198 of file LibMkKernel_atl.h.

◆ OT_retObj_SET_LONG

#define OT_retObj_SET_LONG ( nat)
Value:
retObj = LONG2VAL(nat);
#define LONG2VAL(nat)

Definition at line 204 of file LibMkKernel_atl.h.

◆ OT_retObj_SET_None

#define OT_retObj_SET_None   retObj = ((OT_OBJ_T)0x1)

Definition at line 174 of file LibMkKernel_atl.h.

◆ OT_retObj_SET_OBJ

#define OT_retObj_SET_OBJ ( nat)
Value:
retObj = MkObjectC_ObjNew (nat)

Definition at line 1206 of file LibMkKernel_atl.h.

◆ OT_retObj_SET_RT

#define OT_retObj_SET_RT ( nat)
Value:
retObj = MkRuntimeC_ObjNew (nat)

Definition at line 1225 of file LibMkKernel_atl.h.

◆ OT_retObj_SET_STR

#define OT_retObj_SET_STR ( nat)
Value:
retObj = STRN2VAL(nat);
#define STRN2VAL(nat)

Definition at line 202 of file LibMkKernel_atl.h.

◆ OT_retObj_SET_STRN

#define OT_retObj_SET_STRN ( nat)
Value:
retObj = STRN2VAL(nat);

Definition at line 203 of file LibMkKernel_atl.h.

◆ OT_retObj_SET_U16

#define OT_retObj_SET_U16 ( nat)
Value:
retObj = U162VAL(nat);
#define U162VAL(nat)

Definition at line 195 of file LibMkKernel_atl.h.

◆ OT_SELF

#define OT_SELF   selfO

Definition at line 930 of file LibMkKernel_atl.h.

◆ OT_SELF_M

#define OT_SELF_M ( m)
Value:
OT_SELF_O((MK_OBJ)(m)) /* unsafe */
object header …

Definition at line 929 of file LibMkKernel_atl.h.

◆ OT_SELF_O

#define OT_SELF_O ( o)
Value:
((OT_SELF_T)(*o).self)

Definition at line 927 of file LibMkKernel_atl.h.

◆ OT_SELF_X

#define OT_SELF_X ( x)
Value:
#define MkOBJ(x)
cast a known-object into an MkObjectS pointer

Definition at line 928 of file LibMkKernel_atl.h.

◆ OT_SETUP_ARGS_ALL

#define OT_SETUP_ARGS_ALL ( d)
Value:
OT_OBJ_T retObj=NULL; \
MK_UNUSED static const MK_STRN __doc=d; \
MK_UNUSED OT_OBJ_T frame=NULL; \
#define MK_UNUSED
mark unnused variables and functions
const MK_STRB * MK_STRN
constant string pointer data-type

Definition at line 142 of file LibMkKernel_atl.h.

142#define OT_SETUP_ARGS_ALL(d) \
143 OT_OBJ_T retObj=NULL; \
144 MK_UNUSED static const MK_STRN __doc=d; \
145 MK_UNUSED OT_OBJ_T frame=NULL; \
146

◆ OT_SETUP_CONSTRUCTOR_ARGS

#define OT_SETUP_CONSTRUCTOR_ARGS ( ...)
Value:
OT_SETUP_VARARGS(__VA_ARGS__)
#define OT_SETUP_VARARGS(min, max, d)

Definition at line 153 of file LibMkKernel_atl.h.

◆ OT_SETUP_doc

#define OT_SETUP_doc   __attribute__((unused)) const MK_STRN __doc = __func__;

Definition at line 164 of file LibMkKernel_atl.h.

◆ OT_SETUP_NOARG

#define OT_SETUP_NOARG ( d)
Value:
OT_CHECK_NUM_ARGS(0,0)
#define OT_SETUP_ARGS_ALL(d)

Definition at line 159 of file LibMkKernel_atl.h.

159#define OT_SETUP_NOARG(d) \
160 OT_SETUP_ARGS_ALL(d) \
161 OT_CHECK_NUM_ARGS(0,0)

◆ OT_SETUP_obj

#define OT_SETUP_obj   MK_OBJ obj = OBJ

Definition at line 163 of file LibMkKernel_atl.h.

◆ OT_SETUP_ONEARG

#define OT_SETUP_ONEARG ( d)
Value:
OT_CHECK_NUM_ARGS(1,1)

Definition at line 155 of file LibMkKernel_atl.h.

155#define OT_SETUP_ONEARG(d) \
156 OT_SETUP_ARGS_ALL(d) \
157 OT_CHECK_NUM_ARGS(1,1)

◆ OT_SETUP_VARARGS

#define OT_SETUP_VARARGS ( min,
max,
d )
Value:
OT_CHECK_NUM_ARGS(min,max)

Definition at line 149 of file LibMkKernel_atl.h.

149#define OT_SETUP_VARARGS(min,max,d) \
150 OT_SETUP_ARGS_ALL(d) \
151 OT_CHECK_NUM_ARGS(min,max)

◆ OT_TMP_BAC_OBJ

#define OT_TMP_BAC_OBJ ( val)
Value:

Definition at line 1095 of file LibMkKernel_atl.h.

◆ OT_TMP_BFL_OBJ

#define OT_TMP_BFL_OBJ ( nat)
Value:

Definition at line 1110 of file LibMkKernel_atl.h.

◆ OT_TMP_BIN_OBJ

#define OT_TMP_BIN_OBJ ( val,
len )
Value:
BIN2VAL(val,len)

Definition at line 485 of file LibMkKernel_atl.h.

◆ OT_TMP_BOL_OBJ

#define OT_TMP_BOL_OBJ ( val)
Value:
BOL2VAL(val)

Definition at line 478 of file LibMkKernel_atl.h.

◆ OT_TMP_BUF_OBJ

#define OT_TMP_BUF_OBJ ( nat)
Value:

Definition at line 1129 of file LibMkKernel_atl.h.

◆ OT_TMP_BUS_OBJ

#define OT_TMP_BUS_OBJ ( nat)
Value:

Definition at line 1148 of file LibMkKernel_atl.h.

◆ OT_TMP_CST_OBJ

#define OT_TMP_CST_OBJ ( val)
Value:

Definition at line 487 of file LibMkKernel_atl.h.

◆ OT_TMP_DBL_OBJ

#define OT_TMP_DBL_OBJ ( val)
Value:
DBL2VAL(val)

Definition at line 484 of file LibMkKernel_atl.h.

◆ OT_TMP_ERR_OBJ

#define OT_TMP_ERR_OBJ ( nat)
Value:

Definition at line 1167 of file LibMkKernel_atl.h.

◆ OT_TMP_FLT_OBJ

#define OT_TMP_FLT_OBJ ( val)
Value:
FLT2VAL(val)

Definition at line 483 of file LibMkKernel_atl.h.

◆ OT_TMP_I16_OBJ

#define OT_TMP_I16_OBJ ( val)
Value:
I162VAL(val)

Definition at line 480 of file LibMkKernel_atl.h.

◆ OT_TMP_I32_OBJ

#define OT_TMP_I32_OBJ ( val)
Value:
INT2VAL(val)

Definition at line 481 of file LibMkKernel_atl.h.

◆ OT_TMP_I64_OBJ

#define OT_TMP_I64_OBJ ( val)
Value:
I642VAL(val)

Definition at line 482 of file LibMkKernel_atl.h.

◆ OT_TMP_I8_OBJ

#define OT_TMP_I8_OBJ ( val)
Value:
I82VAL(val)

Definition at line 479 of file LibMkKernel_atl.h.

◆ OT_TMP_LFL_OBJ

#define OT_TMP_LFL_OBJ ( nat)
Value:

Definition at line 1186 of file LibMkKernel_atl.h.

◆ OT_TMP_OBJ_OBJ

#define OT_TMP_OBJ_OBJ ( nat)
Value:

Definition at line 1205 of file LibMkKernel_atl.h.

◆ OT_TMP_RT_OBJ

#define OT_TMP_RT_OBJ ( nat)
Value:

Definition at line 1224 of file LibMkKernel_atl.h.

◆ OT_TMP_STR_OBJ

#define OT_TMP_STR_OBJ ( val)
Value:

Definition at line 486 of file LibMkKernel_atl.h.

◆ OT_VARFRAME_ARGS

#define OT_VARFRAME_ARGS   MK_RT_ARGS OT_VARFRAME varframe

Definition at line 808 of file LibMkKernel_atl.h.

◆ OT_VARFRAME_CALL

#define OT_VARFRAME_CALL   MK_RT_CALL varframe

Definition at line 809 of file LibMkKernel_atl.h.

◆ OT_VARFRAME_CREATE

#define OT_VARFRAME_CREATE
Value:
struct MkVarFrameS otVarFrame = {50, 0}; otVarFrame.data = otVarFrame.prealloc; \
OT_VARFRAME varframe = &otVarFrame;
OT_OBJ_T prealloc[50]
OT_OBJ_T * data

Definition at line 799 of file LibMkKernel_atl.h.

799#define OT_VARFRAME_CREATE \
800 struct MkVarFrameS otVarFrame = {50, 0}; otVarFrame.data = otVarFrame.prealloc; \
801 OT_VARFRAME varframe = &otVarFrame;

◆ OT_VARFRAME_DELETE

#define OT_VARFRAME_DELETE
Value:
{ \
for (int i=0; i<varframe->num; i++) Tcl_DecrRefCount(varframe->data[i]); \
varframe = NULL; \
}

Definition at line 803 of file LibMkKernel_atl.h.

803#define OT_VARFRAME_DELETE { \
804 for (int i=0; i<varframe->num; i++) Tcl_DecrRefCount(varframe->data[i]); \
805 varframe = NULL; \
806}

◆ OT_VARFRAME_OBJ_RESULT

#define OT_VARFRAME_OBJ_RESULT ( itp)
Value:
MK(OT_VARFRAME_ADD)(OT_VARFRAME_CALL,Tcl_GetObjResult(itp))
#define OT_VARFRAME_CALL

Definition at line 830 of file LibMkKernel_atl.h.

◆ OtClass_ARGS

#define OtClass_ARGS   OBJECT_ARGS

Definition at line 116 of file LibMkKernel_atl.h.

◆ OtClass_ARGS_CALL

#define OtClass_ARGS_CALL   OBJECT_ARGS_CALL

Definition at line 117 of file LibMkKernel_atl.h.

◆ printAry

#define printAry ( c,
o )
Value:
printAry3(#o,c,o)
#define printAry3(txt, c, o)

Definition at line 1318 of file LibMkKernel_atl.h.

1318#define printAry(c,o) \
1319 printAry3(#o,c,o)

◆ printAry3

#define printAry3 ( txt,
c,
o )
Value:
do { \
mk_dbg_Z_start(512,MK_COLOR_BLUE "%s : ",txt); \
for(int i=0;i<c;i++) { \
mk_dbg_Z_next(MK_COLOR_YELLOW "[%d:%p]" MK_COLOR_RESET "='%s' ",i,o[i],o[i]?Tcl_GetString(o[i]):"NULL"); \
} \
mk_dbg_Z_end(); \
} while (0)

Definition at line 1330 of file LibMkKernel_atl.h.

1330#define printAry3(txt, c,o) do { \
1331 mk_dbg_Z_start(512,MK_COLOR_BLUE "%s : ",txt); \
1332 for(int i=0;i<c;i++) { \
1333 mk_dbg_Z_next(MK_COLOR_YELLOW "[%d:%p]" MK_COLOR_RESET "='%s' ",i,o[i],o[i]?Tcl_GetString(o[i]):"NULL"); \
1334 } \
1335 mk_dbg_Z_end(); \
1336} while (0)

◆ printAryDetail

#define printAryDetail ( c,
o )
Value:
for(int i=0;i<c;i++) { printLngObj(o[i]) }
#define printLngObj(var)

Definition at line 1321 of file LibMkKernel_atl.h.

1321#define printAryDetail(c,o) \
1322 for(int i=0;i<c;i++) { printLngObj(o[i]) }

◆ printAryL

#define printAryL ( t,
c,
o )
Value:
#define printAryX(x, t, c, o)
#define META_CONTEXT_S

Definition at line 1345 of file LibMkKernel_atl.h.

1345#define printAryL(t,c,o) printAryX(META_CONTEXT_S,t,c,o) \
1346

◆ printAryX

#define printAryX ( x,
t,
c,
o )
Value:
printXV(x, "%-15s = ",t); \
for(int i=0;i<c;i++) { \
fprintf(stderr, "'%s' ",o[i]?Tcl_GetString(o[i]):"NULL"); \
} \
fputc('\n', stderr);

Definition at line 1338 of file LibMkKernel_atl.h.

1338#define printAryX(x,t,c,o) \
1339 printXV(x, "%-15s = ",t); \
1340 for(int i=0;i<c;i++) { \
1341 fprintf(stderr, "'%s' ",o[i]?Tcl_GetString(o[i]):"NULL"); \
1342 } \
1343 fputc('\n', stderr);

◆ printLLngObj

#define printLLngObj ( var)
Value:
printLC2( MK(PrintObj)(OT_Prefix_CALL #var,var))

Definition at line 1296 of file LibMkKernel_atl.h.

◆ printLng

#define printLng ( var)
Value:
printV(#var" = '%s' [ref=%i]",(var?VAL2STR(var):"NULL"),(var)?(var)->refCount:-1)

Definition at line 1293 of file LibMkKernel_atl.h.

◆ printLngClass

#define printLngClass ( clsC)
Value:
printV(#clsC " name = %s", OT_LNG_NAME_FROM_CLASS(clsC))
#define OT_LNG_NAME_FROM_CLASS(_cls)

Definition at line 1350 of file LibMkKernel_atl.h.

◆ printLngErrorCode

#define printLngErrorCode ( )
Value:
do { \
OT_OBJ_T errorCode = Tcl_GetVar2Ex (interp, "errorCode", NULL, TCL_GLOBAL_ONLY); \
printLngObj(errorCode); \
} while (0); \

Definition at line 1300 of file LibMkKernel_atl.h.

1300#define printLngErrorCode() do { \
1301 OT_OBJ_T errorCode = Tcl_GetVar2Ex (interp, "errorCode", NULL, TCL_GLOBAL_ONLY); \
1302 printLngObj(errorCode); \
1303} while (0); \
1304

◆ printLngErrorInfo

#define printLngErrorInfo ( )
Value:
do { \
OT_OBJ_T errorInfo = Tcl_GetVar2Ex (interp, "errorInfo", NULL, TCL_GLOBAL_ONLY); \
printLngObj(errorInfo); \
} while (0); \

Definition at line 1305 of file LibMkKernel_atl.h.

1305#define printLngErrorInfo() do { \
1306 OT_OBJ_T errorInfo = Tcl_GetVar2Ex (interp, "errorInfo", NULL, TCL_GLOBAL_ONLY); \
1307 printLngObj(errorInfo); \
1308} while (0); \
1309

◆ printLngObj

#define printLngObj ( var)
Value:
printTxt(MK(PrintObj)(OT_Prefix_CALL #var,var))

Definition at line 1297 of file LibMkKernel_atl.h.

◆ printLngObj2

#define printLngObj2 ( var)
Value:
MK(PrintObj2)(OT_Prefix_CALL #var,var,__func__)

Definition at line 1298 of file LibMkKernel_atl.h.

◆ printLngObject

#define printLngObject ( objO)
Value:
printV(#objO " name = %s", OT_LNG_NAME_FROM_OBJECT(objO))

Definition at line 1351 of file LibMkKernel_atl.h.

◆ printObjv

#define printObjv
Value:
printV("printObjv: __skip=%i, objc=%i",__skip,objc);\
printAry(objc,objv)

Definition at line 1310 of file LibMkKernel_atl.h.

1310#define printObjv \
1311 printV("printObjv: __skip=%i, objc=%i",__skip,objc);\
1312 printAry(objc,objv)

◆ printXAry

#define printXAry ( x,
c,
o )
Value:
for(int i=0;i<c;i++) { printXV(x,"%2i= %s",i,o[i]?Tcl_GetString(o[i]):"NULL"); }

Definition at line 1324 of file LibMkKernel_atl.h.

1324#define printXAry(x,c,o) \
1325 for(int i=0;i<c;i++) { printXV(x,"%2i= %s",i,o[i]?Tcl_GetString(o[i]):"NULL"); }

◆ printXAryDetail

#define printXAryDetail ( x,
c,
o )
Value:
for(int i=0;i<c;i++) { printXLngObj(x,o[i]) }
#define printXLngObj(x, var)

Definition at line 1327 of file LibMkKernel_atl.h.

1327#define printXAryDetail(x,c,o) \
1328 for(int i=0;i<c;i++) { printXLngObj(x,o[i]) }

◆ printXLng

#define printXLng ( x,
var )
Value:
printXV(x,#var" = '%s' [ref=%i]",(var?VAL2STR(var):"NULL"),(var)?(var)->refCount:-1)

Definition at line 1294 of file LibMkKernel_atl.h.

◆ printXLngObj

#define printXLngObj ( x,
var )
Value:
printXC2(x,MK(PrintObj)(OT_Prefix_CALL #var,var))

Definition at line 1295 of file LibMkKernel_atl.h.

◆ printXObjv

#define printXObjv ( x)
Value:
printXV(x,"__skip=%i, objc=%i",__skip,objc);\
printXAry(x,objc,objv)

Definition at line 1314 of file LibMkKernel_atl.h.

1314#define printXObjv(x) \
1315 printXV(x,"__skip=%i, objc=%i",__skip,objc);\
1316 printXAry(x,objc,objv)

◆ PTR2VAL

#define PTR2VAL ( nat)
Value:
(OT_OBJ_T)(nat)

Definition at line 977 of file LibMkKernel_atl.h.

◆ regTclArray

#define regTclArray ( m,
t )
Value:
OT_OBJ_T t[m];

Definition at line 267 of file LibMkKernel_atl.h.

◆ regTclCmd

#define regTclCmd ( t)
Value:

Definition at line 266 of file LibMkKernel_atl.h.

◆ regTclObj

#define regTclObj ( t)
Value:

Definition at line 264 of file LibMkKernel_atl.h.

◆ regTclObj2

#define regTclObj2 ( t,
v )
Value:

Definition at line 265 of file LibMkKernel_atl.h.

◆ Self2PtrN

#define Self2PtrN ( myO)
Value:
MK(Self2PtrN)(interp,myO)
#define Self2PtrN(myO)

Definition at line 1357 of file LibMkKernel_atl.h.

◆ Self2PtrNN

#define Self2PtrNN ( myP)
Value:
#define Self2PtrNN(myP)

Definition at line 1356 of file LibMkKernel_atl.h.

◆ SELF2VAL

#define SELF2VAL ( slf)
Value:
(slf)

Definition at line 978 of file LibMkKernel_atl.h.

◆ SETUP_amkrt

#define SETUP_amkrt ( r)
Value:
MK_UNUSED OT_MK_RT_T const amkrt = (r) ? (r) : &amkrtR; \
assert(amkrt && amkrt->signature == OT_MK_RT_SIG); \
__thread OT_MK_RT_S amkrtR
#define SETUP_moxrt
#define OT_MK_RT_SIG
#define SETUP_interp

Definition at line 922 of file LibMkKernel_atl.h.

922#define SETUP_amkrt(r) MK_UNUSED OT_MK_RT_T const amkrt = (r) ? (r) : &amkrtR; \
923 assert(amkrt && amkrt->signature == OT_MK_RT_SIG); \
924 SETUP_interp; \
925 SETUP_moxrt

◆ SETUP_ARGS

#define SETUP_ARGS   MK_RT_ARGS ATL_ARGS

Definition at line 166 of file LibMkKernel_atl.h.

◆ SETUP_ARGS_CALL

#define SETUP_ARGS_CALL   MK_RT_CALL ATL_ARGS_CALL

Definition at line 167 of file LibMkKernel_atl.h.

◆ SETUP_interp

#define SETUP_interp   MK_UNUSED OT_ENV_T interp = amkrt->interp

Definition at line 919 of file LibMkKernel_atl.h.

◆ SETUP_moxrt

#define SETUP_moxrt
Value:
MK_UNUSED MOX_RT_T moxrt = amkrt->moxrt; \
assert(moxrt && moxrt->signature == MOX_RT_SIG);

Definition at line 920 of file LibMkKernel_atl.h.

920#define SETUP_moxrt MK_UNUSED MOX_RT_T moxrt = amkrt->moxrt; \
921 assert(moxrt && moxrt->signature == MOX_RT_SIG);

◆ SetupHdlConstr

#define SetupHdlConstr ( _ClassC)
Value:
int __skip=2; \
/* on ATL the self is already available if the CTOR is called */ \
MK_UNUSED OT_SELF_T selfO = objv[1]; \
if (!AtlClassIsN(selfO,_ClassC##_lngO)) \
OT_ERROR_LNG_RETURN_INVALID_CLASS(VAL2STR(MoxMy__CLASS__N(selfO)),OT_CLASS_NAME); \
MK_UNUSED MK_TYP hdl = _ClassC##_TT; \
#define MK_RT_SETUP_METHOD
#define OT_CLASS_NAME
MkTypeS - class known as typ or type is used as class-base for a Managed-Object-Technology (MOT) type...

Definition at line 956 of file LibMkKernel_atl.h.

956#define SetupHdlConstr(_ClassC) \
957 MK_RT_SETUP_METHOD; \
958 int __skip=2; \
959 /* on ATL the self is already available if the CTOR is called */ \
960 MK_UNUSED OT_SELF_T selfO = objv[1]; \
961 if (!AtlClassIsN(selfO,_ClassC##_lngO)) \
962 OT_ERROR_LNG_RETURN_INVALID_CLASS(VAL2STR(MoxMy__CLASS__N(selfO)),OT_CLASS_NAME); \
963 MK_UNUSED MK_TYP hdl = _ClassC##_TT; \
964

◆ SetupHdlFromMetaData_2

#define SetupHdlFromMetaData_2 ( _SHORT)
Value:
if (objc < 2) OT_ERROR_LNG_RETURN_STR_ERROR("error: missing hdl argument"); \
__skip = 2; \
selfO = objv[1]; \
hdl = SELF2HDL(selfO); \
if (hdl == NULL) OT_ERROR_LNG_RETURN_HDL_IS_NULL();
#define SetupHdlFromMetaData_init_2(_SHORT)
#define OT_ERROR_LNG_RETURN_STR_ERROR(...)
#define SELF2HDL(O)

Definition at line 936 of file LibMkKernel_atl.h.

936#define SetupHdlFromMetaData_2(_SHORT) \
937 SetupHdlFromMetaData_init_2(_SHORT) \
938 if (objc < 2) OT_ERROR_LNG_RETURN_STR_ERROR("error: missing hdl argument"); \
939 __skip = 2; \
940 selfO = objv[1]; \
941 hdl = SELF2HDL(selfO); \
942 if (hdl == NULL) OT_ERROR_LNG_RETURN_HDL_IS_NULL();

◆ SetupHdlFromMetaData__null_allow_2

#define SetupHdlFromMetaData__null_allow_2 ( _SHORT)
Value:
if (objc < 2) { \
__skip = 1; \
selfO = OT_CLASS; \
hdl = NULL; \
} else { \
__skip = 2; \
selfO = objv[1]; \
hdl = SELF2HDL(selfO); \
}

Definition at line 944 of file LibMkKernel_atl.h.

944#define SetupHdlFromMetaData__null_allow_2(_SHORT) \
945 SetupHdlFromMetaData_init_2(_SHORT) \
946 if (objc < 2) { \
947 __skip = 1; \
948 selfO = OT_CLASS; \
949 hdl = NULL; \
950 } else { \
951 __skip = 2; \
952 selfO = objv[1]; \
953 hdl = SELF2HDL(selfO); \
954 }

◆ SetupHdlFromMetaData_init_2

#define SetupHdlFromMetaData_init_2 ( _SHORT)
Value:
int __skip; OT_SELF_T selfO; _SHORT hdl;

Definition at line 932 of file LibMkKernel_atl.h.

932#define SetupHdlFromMetaData_init_2(_SHORT) \
933 MK_RT_SETUP_METHOD; \
934 int __skip; OT_SELF_T selfO; _SHORT hdl;

◆ SetupHdlStatic

#define SetupHdlStatic ( _ClassC)
Value:
int __skip=1; \
MK_UNUSED MK_TYP hdl = _ClassC##_TT; \

Definition at line 965 of file LibMkKernel_atl.h.

965#define SetupHdlStatic(_ClassC) \
966 MK_RT_SETUP_METHOD; \
967 int __skip=1; \
968 MK_UNUSED OT_SELF_T selfO = OT_CLASS; \
969 MK_UNUSED MK_TYP hdl = _ClassC##_TT; \
970

◆ SKIP_ARGS

#define SKIP_ARGS   ATL_ARGS, int __skip

Definition at line 113 of file LibMkKernel_atl.h.

◆ SKIP_ARGS_CALL

#define SKIP_ARGS_CALL   ATL_ARGS_CALL, __skip

Definition at line 114 of file LibMkKernel_atl.h.

◆ str

#define str ( s)
Value:
#s

Definition at line 1348 of file LibMkKernel_atl.h.

◆ STR2VAL

#define STR2VAL ( ptr)
Value:
Tcl_NewStringObj((const char*)ptr,-1)

Definition at line 995 of file LibMkKernel_atl.h.

◆ STR2VAL_2

#define STR2VAL_2 ( ptr,
len )
Value:
Tcl_NewStringObj((const char*)ptr,(int)len)

Definition at line 996 of file LibMkKernel_atl.h.

◆ STRN2VAL

#define STRN2VAL ( nat)
Value:
MK(STRN2VAL)(nat)

Definition at line 993 of file LibMkKernel_atl.h.

◆ U162VAL

#define U162VAL ( nat)
Value:
Tcl_NewIntObj((int)nat)

Definition at line 986 of file LibMkKernel_atl.h.

◆ VAL2BFL

#define VAL2BFL ( val)
Value:
struct MkBufferListS * MK_BFL
class-shortcut for struct MkBufferListS *, all shortcut using the XX_YYY syntax (only for public API)...

Definition at line 1004 of file LibMkKernel_atl.h.

◆ VAL2MkBinaryR

#define VAL2MkBinaryR ( obj)
Value:
({int size;unsigned char * bin =Tcl_GetByteArrayFromObj(obj,&size);MkBinaryCreate(size,bin);})
static MkBinaryR MkBinaryCreate(MK_SIZE size, MK_BINN data)
create a binary from data and size ...

Definition at line 1242 of file LibMkKernel_atl.h.

1242#define VAL2MkBinaryR(obj) \
1243 ({int size;unsigned char * bin =Tcl_GetByteArrayFromObj(obj,&size);MkBinaryCreate(size,bin);})

◆ VAL2MkStringR

#define VAL2MkStringR ( obj)
Value:
({int len;char * str =Tcl_GetStringFromObj(obj,&len);MkStringCreate(len,str);})
static MkStringR MkStringCreate(MK_NUM len, MK_STRN str)
create a str from ptr and len ...

Definition at line 1253 of file LibMkKernel_atl.h.

1253#define VAL2MkStringR(obj) \
1254 ({int len;char * str =Tcl_GetStringFromObj(obj,&len);MkStringCreate(len,str);})

◆ VAL2MNG

#define VAL2MNG ( val)
Value:
MK_PTRB * MK_MNG
managed object pointer, datatype will be checked at runtime

Definition at line 1005 of file LibMkKernel_atl.h.

◆ VAL2OBJ

#define VAL2OBJ ( val)
Value:
struct MkObjectS * MK_OBJ
class-shortcut for struct MkObjectS *, all shortcut using the XX_YYY syntax (only for public API) …

Definition at line 1003 of file LibMkKernel_atl.h.

◆ VAL2SELF

#define VAL2SELF ( val)
Value:
(val)

Definition at line 1001 of file LibMkKernel_atl.h.

◆ VAL2STR

#define VAL2STR ( val)
Value:
Tcl_GetString(val)

Definition at line 999 of file LibMkKernel_atl.h.

◆ VAL2STR_NULL

#define VAL2STR_NULL ( val)
Value:
(val?Tcl_GetString(val):"NULL")

Definition at line 1000 of file LibMkKernel_atl.h.

◆ WNA

#define WNA ( min,
max,
txt )
Value:
{ \
/* printObjV */ \
if (objc<(__skip+min) || objc>(__skip+max)) { \
Tcl_WrongNumArgs (interp, __skip, objv, txt); \
return TCL_ERROR; \
} \
}

Definition at line 761 of file LibMkKernel_atl.h.

761#define WNA(min,max,txt) { \
762/* printObjV */ \
763 if (objc<(__skip+min) || objc>(__skip+max)) { \
764 Tcl_WrongNumArgs (interp, __skip, objv, txt); \
765 return TCL_ERROR; \
766 } \
767}

◆ xstr

#define xstr ( s)
Value:
str(s)

Definition at line 1347 of file LibMkKernel_atl.h.

Typedef Documentation

◆ AtlClassDefS

typedef struct AtlClassDefS AtlClassDefS

◆ AtlClassDefT

Definition at line 1069 of file LibMkKernel_atl.h.

◆ LookupClassF

typedef int(* LookupClassF) (SKIP_ARGS)

Definition at line 754 of file LibMkKernel_atl.h.

◆ MkCallS

typedef struct MkCallS MkCallS

◆ MkCallTypeE

typedef enum MkCallTypeE MkCallTypeE

◆ OT_CLS_T

typedef MOX_CLS_T OT_CLS_T

Definition at line 239 of file LibMkKernel_atl.h.

◆ OT_ENUM_T

typedef MK_STRN OT_ENUM_T

Definition at line 242 of file LibMkKernel_atl.h.

◆ OT_ENV_T

typedef MOX_ENV_T OT_ENV_T

Definition at line 237 of file LibMkKernel_atl.h.

◆ OT_MK_RT_StatusE

◆ OT_MK_RT_T

Definition at line 317 of file LibMkKernel_atl.h.

◆ OT_NS_T

typedef MOX_NS_T OT_NS_T

Definition at line 238 of file LibMkKernel_atl.h.

◆ OT_OBJ_T

typedef MOX_OBJ_T OT_OBJ_T

Definition at line 240 of file LibMkKernel_atl.h.

◆ OT_PTR_T

typedef MOX_PTR OT_PTR_T

Definition at line 236 of file LibMkKernel_atl.h.

◆ OT_SELF_T

typedef MOX_OBJ_T OT_SELF_T

Definition at line 243 of file LibMkKernel_atl.h.

◆ OT_VARFRAME

typedef struct MkVarFrameS* OT_VARFRAME

Definition at line 797 of file LibMkKernel_atl.h.

Enumeration Type Documentation

◆ MkCallTypeE

Enumerator
MkCallS_init 
MkCallS_null 
MkCallS_proc 
MkCallS_static 
MkCallS_own_method 
MkCallS_other_method 
MkCallS_error 

Definition at line 514 of file LibMkKernel_atl.h.

514 {
515 MkCallS_init = 0,
516 MkCallS_null = 1,
517 MkCallS_proc = 2,
518 MkCallS_static = 3,
521 MkCallS_error = 6,
MkCallTypeE
@ MkCallS_init
@ MkCallS_null
@ MkCallS_error
@ MkCallS_own_method
@ MkCallS_other_method
@ MkCallS_proc
@ MkCallS_static

◆ OT_MK_RT_StatusE

Enumerator
OT_MK_RT_STATUS_NEW 
OT_MK_RT_STATUS_ONEXIT 
OT_MK_RT_STATUS_DELETED 

Definition at line 245 of file LibMkKernel_atl.h.

245 {
OT_MK_RT_StatusE
@ OT_MK_RT_STATUS_NEW
@ OT_MK_RT_STATUS_DELETED
@ OT_MK_RT_STATUS_ONEXIT

Function Documentation

◆ atlmkkernel_AtlArrayExists()

MK_ATL_EXTERN int atlmkkernel_AtlArrayExists ( OT_MK_ARGS OT_OBJ_T)

Definition at line 1013 of file LibMkKernel_atl.c.

1014{
1015 RL_init( 2, array_exists, RL_NewS(0,"::tcl::array::exists") ); RL_O(1,var) ;
1016 return Ot_GetBooleanFromObj(RL_EvalRt(TCL_EVAL_GLOBAL));
1017error:
1018 return 0;
1019}
#define Ot_GetBooleanFromObj(val)
#define RL_EvalRt(f)

◆ atlmkkernel_AtlClassDefGetNN()

AtlClassDefT atlmkkernel_AtlClassDefGetNN ( OT_MK_ARGS OT_NS_T classP,
OT_CLS_T classO,
MK_TYP classTT,
int flags )

Definition at line 235 of file LibMkKernel_atl.c.

236{
237//colorBLUE("classP->fullName<%s>, classO<%s>, classTT<%s>", classP->fullName, VAL2STR_NULL(classO), MK_TYP2STR(classTT));
238 assert(classP != NULL);
239 if (classP->clientData) {
240 AtlClassDefT clsDef = classP->clientData;
241 assert(clsDef->signature == AtlClassDefS_SIG);
242 return clsDef;
243 }
244 if (classO == NULL)
245 classO = STR2VAL(classP->fullName);
246 #ifndef NDEBUG
247 OT_NS_T classNsP = MoxResolveN(classO);
248 assert(classNsP == classP);
249 #endif
250 if (classTT == NULL) {
252 int retI;
253
254 // is this a ATL Class ?
255 OT_OBJ_T superO = MoxCls__SUPER__NN(classP,flags);
256 if (superO == NULL) {
257 if (flags & TCL_LEAVE_ERR_MSG) {
258 OT_ERROR_VAR_DEFAULT("[ClassDefError] unable to retrieve '__SUPER__' from '%s'\n -> %s",
259 classP->fullName, Tcl_GetStringResult(interp));
260 Tcl_SetErrorCode(interp,"ATLMK","CLASS","TYP","INVALID",NULL);
261 }
262 return NULL;
263 }
264 int objc;
265 Tcl_Obj **objv;
266 retI = Tcl_ListObjGetElements(interp,superO,&objc,&objv);
267 if (retI == TCL_OK) {
268 for (int i=0; i<objc; i++) {
269 classTT = AtlClassDefGetTypN(objv[i],0);
270 if (classTT) break;
271 }
272 }
273
274 if (classTT == NULL) {
275 if (flags & TCL_LEAVE_ERR_MSG) {
276 OT_ERROR_VAR_DEFAULT("[ClassDefError] unable to retrieve 'MK_TYP' from '%s'",classP->fullName);
277 Tcl_SetErrorCode(interp,"ATLMK","CLASS","TYP","INVALID",NULL);
278 }
279 return NULL;
280 }
281 }
282 return ClassDefCreateNN(classP,classO,classTT);
283}
#define AtlClassDefS_SIG
#define AtlClassDefGetTypN(...)
#define ClassDefCreateNN(...)
#define STR2VAL(ptr)
MOX_NS_T OT_NS_T

◆ atlmkkernel_AtlClassIsN()

MK_ATL_EXTERN int atlmkkernel_AtlClassIsN ( OT_MK_ARGS OT_SELF_T myNsO,
OT_CLS_T clsNsO,
bool * boolP )

Definition at line 1036 of file LibMkKernel_atl.c.

1037{
1039 int retI;
1040 RL_init(3,MyIsClsN,RL_NewS(0,"::myooX::ClassIsN")) ; RL_O(1,myNsO) ; RL_O(2,clsNsO) ;
1041 retI = RL_EvalEx(TCL_EVAL_GLOBAL);
1042 if (retI != TCL_OK) goto error;
1043 OT_OBJ_T retO = Tcl_GetObjResult(interp);
1044 int intB;
1045 retI = Tcl_GetBooleanFromObj(interp,retO,&intB);
1046 if (retI != TCL_OK) goto error;
1047 (*boolP) = intB;
1048error:
1050 return retI;
1051}
#define OT_ERROR_APPEND_LNG_STACK()

◆ atlmkkernel_AtlInfoExists()

MK_ATL_EXTERN int atlmkkernel_AtlInfoExists ( OT_MK_ARGS OT_OBJ_T var)

TCL PRIVATE INTERFACE

Definition at line 1005 of file LibMkKernel_atl.c.

1006{
1007 RL_init( 2, info_exists, RL_NewS(0,"::tcl::info::exists") ); RL_O(1,var) ;
1008 return Ot_GetBooleanFromObj(RL_EvalRt(TCL_EVAL_GLOBAL));
1009error:
1010 return 0;
1011}

◆ atlmkkernel_AtlInfoScript()

MK_ATL_EXTERN MK_STRN atlmkkernel_AtlInfoScript ( OT_MK_ARGS MK_STRN)

Definition at line 1021 of file LibMkKernel_atl.c.

1022{
1023 OT_OBJ_T ret;
1024 if (script) {
1025 RL_init( 2, info_script_2, RL_NewS(0,"::tcl::info::script") ) ; RL_NewS(1,script) ;
1026 ret = RL_EvalRt(TCL_EVAL_GLOBAL);
1027 } else {
1028 RL_init( 1, info_script_1, RL_NewS(0,"::tcl::info::script") ) ;
1029 ret = RL_EvalRt(TCL_EVAL_GLOBAL);
1030 }
1031 return Tcl_GetStringFromObj(ret,NULL);
1032error:
1033 return NULL;
1034}

◆ atlmkkernel_AtomCreate()

OT_SELF_T atlmkkernel_AtomCreate ( OT_MK_ARGS MK_OBJ obj,
OT_CLS_T cls,
OT_OBJ_T nameO,
OT_OBJ_T nsO,
int objc,
OT_OBJ_T const objv[],
MK_PTR const env )

Definition at line 1241 of file LibMkKernel_atl.c.

1250 {
1252 int retI;
1253 OT_SELF_T selfO = NULL;
1254
1255 retI = MoxCreate3N(clsC, nameO, nsO, objc, objv);
1256 if (retI != TCL_OK) goto error;
1257
1258 selfO = Tcl_GetObjResult(interp);
1259 if (selfO == NULL) goto error;
1260
1261 selfO = AtomInit(selfO,obj,env);
1262 if (selfO == NULL) goto error;
1263
1264 return selfO;
1265error:
1268 return NULL;
1269}
#define OT_ERROR_LNG_2_META(m)
#define MkErrorStackFormat_0E()

◆ atlmkkernel_AtomCreateCONSTR()

OT_SELF_T atlmkkernel_AtomCreateCONSTR ( OT_MK_ARGS MK_OBJ obj,
OT_CLS_T cls,
OT_OBJ_T nameO,
MK_PTR const env )

Definition at line 1296 of file LibMkKernel_atl.c.

1302 {
1303 assert(nameO != NULL);
1304
1305 OT_SELF_T selfO = NULL;
1306 OT_OBJ_T nsO = NULL;
1307
1308 // check if "nameO" has Namespace
1309 if (strncmp("::",Tcl_GetString(nameO),2) != 0) {
1310 nsO = STR2VAL(Tcl_GetCurrentNamespace(interp)->fullName);
1311 Tcl_IncrRefCount(nsO);
1312 }
1313 selfO = AtomCreate(obj, clsC, nameO, nsO, 0, NULL, env);
1314 if (selfO == NULL) goto error;
1315
1316 Ot_DecrRefCount(nsO);
1317 return selfO;
1318error:
1319 Ot_DecrRefCount(nsO);
1321 return NULL;
1322}
static void Ot_DecrRefCount(OT_OBJ_T tclO)

◆ atlmkkernel_AtomCreateNULL()

static OT_SELF_T atlmkkernel_AtomCreateNULL ( OT_MK_ARGS OT_CLS_T cls,
MK_STRN name,
MK_PTR const env )
inlinestatic

Definition at line 1439 of file LibMkKernel_atl.h.

1444 {
1445 return AtomMake(NULL, cls, STR2VAL(name), NULL, env);
1446}

◆ atlmkkernel_AtomDeleteHard()

static bool atlmkkernel_AtomDeleteHard ( OT_MK_ARGS OT_SELF_T selfO)
inlinestatic

Definition at line 1462 of file LibMkKernel_atl.h.

1465 {
1466 assert(selfO != NULL);
1467 // if (Tcl_InterpDeleted(interp)) return false;
1468 OT_NS_T ns = MoxResolveN(selfO);
1469 check_NULL(ns) return false;
1470 Tcl_DeleteNamespace(ns);
1471 // refer: AtomInit
1472 OT_REF_DECR(selfO);
1473 return true;
1474}
#define check_NULL(code)
#define OT_REF_DECR(_obj)

◆ atlmkkernel_AtomDispose()

static void atlmkkernel_AtomDispose ( OT_MK_ARGS OT_SELF_T selfO)
inlinestatic

Definition at line 1478 of file LibMkKernel_atl.h.

1481 {
1482 assert(selfO != NULL);
1483 MK_MNG mng = VAL2MNG(selfO);
1484 check_NULL(mng) return;
1485 MK_OBJ obj = MkObj(mng);
1486 check_NULL(obj) return;
1487 // unlink ATL from META
1489}
#define VAL2MNG(val)
static MK_OBJ MkObj(MK_MNG mng)
cast a unknown-object into an MkObjectS pointer or NULL if not possible
#define MkRefDecrWithUnlinkSelf(...)

◆ atlmkkernel_AtomInit()

OT_SELF_T atlmkkernel_AtomInit ( OT_MK_ARGS OT_SELF_T selfO,
MK_OBJ obj,
MK_PTR const env )

Definition at line 1212 of file LibMkKernel_atl.c.

1217 {
1218 if (obj) {
1219 MkSelfSet (obj, (void*) selfO, env);
1220 //attention "OT_REF_DECR" in "AtomDeleteHard"
1221 OT_REF_INCR(selfO);
1222 MkRefIncr(obj);
1223
1224 OT_NS_T myNsP = MoxResolveN(selfO);
1225 if (myNsP == NULL) goto error;
1226
1227 myNsP->clientData = obj;
1228 myNsP->deleteProc = MK(Atom_ns_delete);
1229 }
1230
1231 return selfO;
1232error:
1233 // HINT: refCnt-leak in "selfO" and "obj"
1236 return NULL;
1237}
static void MkSelfSet(MK_OBJ const obj, MK_PTR const self, MK_PTR const env)
set the MkObjectS::self value
static void MkRefIncr(MK_OBJ obj)
increment the reference-count

◆ atlmkkernel_AtomMake()

OT_SELF_T atlmkkernel_AtomMake ( OT_MK_ARGS MK_OBJ obj,
OT_CLS_T cls,
OT_OBJ_T nameO,
OT_OBJ_T nsO,
MK_PTR const env )

Definition at line 1271 of file LibMkKernel_atl.c.

1278 {
1280 OT_SELF_T selfO = NULL;
1281
1282 selfO = MoxMakeN(clsC, nameO, nsO);
1283 if (selfO == NULL) goto error;
1284
1285 selfO = AtomInit(selfO,obj,env);
1286 if (selfO == NULL) goto error;
1287
1288 return selfO;
1289error:
1292 return NULL;
1293}

◆ atlmkkernel_AtomObjNew()

static OT_OBJ_T atlmkkernel_AtomObjNew ( OT_MK_ARGS MK_OBJ obj,
MK_PTR env )
inlinestatic

ATOM API

Definition at line 1385 of file LibMkKernel_atl.h.

1389 {
1390 #define __doc "AtomObjNew"
1391 MK_PTR selfO = NULL;
1392 // force "class-NULL object → test done BEFORE "AtomObjNew" is called
1393 assert(obj != NULL);
1394 MkErrorC_Check(obj, MkSelfNew(obj,&selfO,env))
1395 OT_OBJ_T ret = OT_LNG_SELF_2_LNG(selfO);
1396 return ret;
1397 #undef __doc
1398error:
1399 return NULL;
1400}
#define OT_LNG_SELF_2_LNG(selfT)
#define MkErrorC_Check(mng, PROC)
MK_PTRB * MK_PTR
generic pointer data-type
#define MkSelfNew(...)

◆ atlmkkernel_AtomUnlink()

static void atlmkkernel_AtomUnlink ( OT_MK_ARGS OT_SELF_T selfO)
inlinestatic

Definition at line 1493 of file LibMkKernel_atl.h.

1496 {
1497#if 0
1498 // I need a HATRD-DELETE here because the namespace should also be deleted.
1499 //
1500 // Every instance has a namespace, and the @e instance-ns has a dependency on the @e instance-type-ns.
1501 // The @RMqExit uses `Tcl_Exit` to delete, among other things, all namespaces, including the @e instance-ns.
1502 // However, the @e instance-ns in turn has a dependency on the @e type-ns, which is also deleted.
1503 // A simple @e unlink removes the dependency, which then results in the @e type-ns being deleted, perhaps @b BEFORE
1504 // the @e instance-ns, which in turn has consequences for memory management.
1505 MK(AtomDeleteHard) ( OT_MK_CALL selfO );
1506#else
1507 assert(selfO != NULL);
1508 OT_OBJ_T myO = SELF2VAL(selfO);
1509 check_NULL(myO) return;
1510
1511 OT_NS_T myNs = MoxResolveN(myO);
1512 myNs->clientData = NULL;
1513 myNs->deleteProc = NULL;
1514 //PTR2SELF(selfO,0);
1515#endif
1516}

◆ atlmkkernel_CallCopy()

static void atlmkkernel_CallCopy ( MK_RT mkrt,
MK_OBJ obj,
MK_CBP * dataP )
inlinestatic

Definition at line 596 of file LibMkKernel_atl.h.

597{
598 assert (dataP != NULL && *dataP != NULL);
599
600 MkCallS *call = MkSysMemDup(MK_ERROR_PANIC,*dataP,sizeof(*call));
601 call->isAlloc = true;
602
603 call->my = OT_OBJ_COPY (call->my) ;
604 call->mth = OT_OBJ_COPY (call->mth) ;
605 call->args = OT_OBJ_COPY (call->args) ;
606 call->nsO = OT_OBJ_COPY (call->nsO) ;
607
608 *dataP = call;
609}
#define OT_OBJ_COPY(o)
#define MK_ERROR_PANIC
MK_PTR MkSysMemDup(MK_OBJN fmtobj, MK_PTRN const blck, size_t const size)
memdup syscall with atlmkkernel error plugin
OT_OBJ_T mth
OT_OBJ_T args
OT_CLS_T nsO
OT_OBJ_T my

◆ atlmkkernel_CallFree()

static void atlmkkernel_CallFree ( MK_CBP * dataP)
inlinestatic

Definition at line 566 of file LibMkKernel_atl.h.

567{
568 if (amkrtR.signature != OT_MK_RT_SIG) return;
569
570 MkCallS * call = *dataP;
571
572//MkCallLog(call);
573
574 call->signature = 0x0;
575
580
581 if (call->isAlloc) MkSysFree(*dataP);
582 else *dataP = NULL;
583}
#define OT_REF_DECR_AND_NULL(_obj)
#define MkSysFree(pointer)
MK_SIG signature

◆ atlmkkernel_CallFreeOnce()

static void atlmkkernel_CallFreeOnce ( MK_CBP * callP)
inlinestatic

Definition at line 585 of file LibMkKernel_atl.h.

586{
587 MK(CallFree) (callP);
588}

◆ atlmkkernel_CallLog()

MK_ATL_EXTERN void atlmkkernel_CallLog ( MK_RT mkrt,
MkCallS * call,
MK_STRN caller )

Definition at line 273 of file MkCall_atl.c.

277 {
279 MkLogV_3(NULL,caller,"MkCallS[%p] : sig=%c, type=%s, isAlloc = %c\n",
280 call, logB(call->signature == MkCallS_SIG), sMkCallTypeEC(call->type), logB(call->isAlloc));
281 if (call->my) { MkLogV_3(NULL,caller, " | my = %s\n", Tcl_GetString(call->my)); }
282 if (call->mth) { MkLogV_3(NULL,caller, " | mth = %s\n", Tcl_GetString(call->mth)); }
283 if (call->args) { MkLogV_3(NULL,caller, " | args = %s\n", Tcl_GetString(call->args)); }
284 while (call->hdl) {
285 MK_OBJ obj = MkObj(call->hdl);
286 if (obj == NULL) { MkLogV_3(NULL,caller, " | hdl = %p (INVALID)\n", call->hdl); break; }
287 OT_OBJ_T objO = META2VAL_O(obj);
288 if (objO == NULL) { MkLogV_3(NULL,caller, " | hdl = %p (NO SELF)\n", call->hdl); break; }
289
290 MkLogV_3(NULL,caller, " | hdl = %s\n", Tcl_GetString(objO));
291 break;
292 }
293 if (call->amkrt) { MkLogV_3(NULL,caller, " | amkrt = %p\n", call->amkrt); }
294 if (call->nsO) { MkLogV_3(NULL,caller, " | nsO = %s\n", Tcl_GetString(call->nsO)); }
296}
#define MkCallS_SIG
#define META2VAL_O(o)
static MK_STRN sMkCallTypeEC(MkCallTypeE type)
Definition MkCall_atl.c:260
#define MkLogV_3(fmtobj, callfunc, printfmt,...)
#define MkRuntimeLogBufferPush()
#define MkRuntimeLogBufferPop()
MkCallTypeE type
OT_MK_RT_T amkrt

◆ atlmkkernel_ClassDef()

MK_ATL_EXTERN OT_CLS_T atlmkkernel_ClassDef ( OT_MK_ARGS MK_TYP,
OT_NS_T * clsNsP )

Definition at line 308 of file LibMkKernel_atl.c.

312 {
313 int retI;
314 Tcl_ResetResult(interp);
315 assert(typeTT != NULL);
316 MK_TYP classTT = typeTT->type_class;
317
318 // 1. ClassName = ::TypeName
319 OT_OBJ_T classNs = Tcl_ObjPrintf("::%s", classTT->type_class->type_name);
320 if (classNs == NULL) return NULL;
321
322 OT_OBJ_T classO = NULL;
323 OT_OBJ_T codeO = NULL;
324
325 // If 'classTT->self' is defined - import it
326 // > require that "interp" and "MkOBJ_R(classTT).env" are in the SAME thread.
327 // > silent assume that class dependency is ORDERED with "MkObjectC" first !!
328 if (classTT != MkObjectC_TT) {
329 if (MkOBJ_R(classTT->type_base).env != amkrt) {
330 char buf[256] = {0};
331 snprintf(buf,256,"\nCLASS-SETUP-ERROR: the '%s-env=%p' and the 'class-def-interp=%p' are not equal",
332 MkOBJ_R(classTT->type_base).type->type_name, MkOBJ_R(classTT->type_base).env, interp
333 );
334 Tcl_AppendResult(interp, buf,NULL);
335 Tcl_SetErrorCode(interp,"ATLMK","CLASS","ENV",NULL);
336 goto error;
337 } else if (MkOBJ_R(classTT->type_base).self == NULL) {
338 Tcl_AppendResult(interp,
339 "\nCLASS-SETUP-ERROR: class '", classTT->type_name, "' has a base class '", classTT->type_base->type_name,
340 "' with EMPTY SELF pointer", NULL);
341 Tcl_SetErrorCode(interp,"ATLMK","CLASS","SELF",NULL);
342 goto error;
343 } else {
344 codeO = MkOBJ_R(classTT->type_base).self;
345 }
346 }
347 // 2. call class-CTOR
348 retI = MOX(ClassN_direct)(amkrt->moxrt,interp,classNs,codeO);
349 if (retI != TCL_OK) goto error;
350
351 // 3. "final" class-Name (should by ClassName but open for future change)
352 classO = Tcl_GetObjResult(interp);
353 OT_REF_INCR(classO);
354
355 OT_OBJ_T superO = Tcl_ObjPrintf("SuperI %s", Tcl_GetString(classO));
356 MkSelfSet_3X(classTT, (MK_PTR) superO, amkrt); // save reference of OT_CLS_T and OT_ENV_T
357 Tcl_IncrRefCount(superO);
358
359 // save my namespace
360 OT_NS_T classNS = (*clsNsP) = MoxResolveN(classO);
361 if (classNS == NULL) goto error;
362
363 // attach Class-O to Class-NS
364 ClassDefCreateNN(classNS,classO,classTT);
365
366 // export public commands
367 retI = Tcl_Export(interp, classNS, "[A-Za-z]*", 0);
368 if (retI != TCL_OK) goto error;
369
370end:
371 if (classO) {
372 Tcl_SetObjResult(interp,classO);
373 OT_REF_DECR(classO);
374 }
375 return classO;
376error:
378 goto end;
379}
#define MkObjectC_TT
class as MkTypeS-class-type, useable in a class-macro as: class##_TT …
#define MkOBJ_R(x)
cast a known-object into an MkObjectS reference
#define MkSelfSet_3X(x, self, env)
MK_TYP type_class
point to the instancesR linked list of the class-type
MK_STRB type_name[MkTypeS_name_size]
public name of the type like TclMqContextC
MK_TYP type_base
base type

◆ atlmkkernel_ClassName()

MK_ATL_EXTERN MK_STRN atlmkkernel_ClassName ( OT_Prefix_ARGS OT_OBJ_T,
bool doShort )

Definition at line 646 of file LibMkKernel_atl.c.

650 {
651 const Tcl_ObjType *typePtr=myO->typePtr;
652 MK_STRN name = NULL;
653 MOX_RT_T const moxrt = amkrt->moxrt;
654
655 if (MoxMyIsN(myO)) {
656 // myoo instance
657 name = OT_LNG_NAME_FROM_CLASS(MoxMy__CLASS__N(myO));
658 } else if (MoxClsIsN(myO)) {
659 // myoo class
660 name = OT_LNG_NAME_FROM_CLASS(myO);
661 } else {
662 snprintf(amkrt->AtlClassName_buf,AtlClassName_buf_size,"Tcl_ObjType<%s>",typePtr ? typePtr->name : "unknown");
663 name = amkrt->AtlClassName_buf;
664 doShort = false;
665 }
666 if (doShort) name = NS(NamespaceTailCmd)(name);
667 return name;
668}
#define AtlClassName_buf_size

◆ atlmkkernel_EnumFlagWorker()

MK_ATL_EXTERN int atlmkkernel_EnumFlagWorker ( MK_RT mkrt,
OT_ENV_T interp,
const struct LookupEnumE * keys,
OT_OBJ_T enumE,
int * ret )

Definition at line 515 of file LibMkKernel_atl.c.

516{
517 // read flag enum
518 int valI = 0;
519 int index = 0;
520 int objc = 0;
521 OT_OBJ_T *objv = NULL;
522 check_LNG(Tcl_ListObjGetElements(interp,enumE,&objc,&objv)) return TCL_ERROR;
523 for (int i=0; i<objc; i++) {
524 check_LNG (Tcl_GetIndexFromObjStruct (interp, objv[i], keys,
525 sizeof(struct LookupClassS), "enum", TCL_EXACT, &index)) return TCL_ERROR;
526 valI |= keys[index].val;
527 }
528//myprint(valI);
529 *ret = valI;
530 return TCL_OK;
531}

◆ atlmkkernel_EvalObjv()

static int atlmkkernel_EvalObjv ( OT_EVAL_ARGS )
inlinestatic

Definition at line 865 of file LibMkKernel_atl.h.

866{
867 int i,ret;
868 for (i=0;i<objc;i++) Tcl_IncrRefCount(objv[i]);
869 ret = Tcl_EvalObjv (interp, objc, objv, flags);
870 for (i=0;i<objc;i++) Tcl_DecrRefCount(objv[i]);
871 return ret;
872}

◆ atlmkkernel_EvalObjvFr()

static OT_OBJ_T atlmkkernel_EvalObjvFr ( OT_VARFRAME_ARGS ,
OT_EVAL_ARGS  )
inlinestatic

Definition at line 855 of file LibMkKernel_atl.h.

856{
857//printAry2("objv",objc,objv)
858 check_LNG(Tcl_EvalObjv (interp, objc, objv, flags)) return NULL;
859 OT_OBJ_T result = OT_VARFRAME_OBJ_RESULT(interp);
860//printLng(result)
861 return result;
862}
#define OT_VARFRAME_OBJ_RESULT(itp)

◆ atlmkkernel_EvalObjvRt()

static OT_OBJ_T atlmkkernel_EvalObjvRt ( OT_EVAL_ARGS )
inlinestatic

Definition at line 849 of file LibMkKernel_atl.h.

850{
851 check_LNG(Tcl_EvalObjv (interp, objc, objv, flags)) return NULL;
852 return Tcl_GetObjResult(interp);
853}

◆ atlmkkernel_EvalObjvVA()

MK_ATL_EXTERN int atlmkkernel_EvalObjvVA ( OT_ENV_T interp,
int flags,
... )

Definition at line 850 of file LibMkKernel_atl.c.

854 {
855 #define SIZE 20
856 int objc;
857 OT_OBJ_T objv[SIZE];
858 va_list ap;
859 va_start(ap, flags);
860 for (objc=0; (objv[objc]=(OT_OBJ_T )va_arg(ap,OT_OBJ_T )) != NULL; objc++) {
861 //Tcl_IncrRefCount(objv[objc]);
862 if (objc >= (SIZE-1)) {
863 Tcl_SetResult(interp, "EVAL-ERROR: size in MkEvalObjvVA is limited to " xstr(SIZE), TCL_STATIC);
864 return TCL_ERROR;
865 }
866 }
867 va_end(ap);
868//printAry2(__func__,objc,objv)
869 int ret;
870 //for (i=0;i<objc;i++) Tcl_IncrRefCount(objv[i]);
871 ret = Tcl_EvalObjv (interp, objc, objv, flags);
872 //for (i=0;i<objc;i++) Tcl_DecrRefCount(objv[i]);
873 return ret;
874 #undef SIZE
875}
#define SIZE
#define xstr(s)

◆ atlmkkernel_FillNamespace()

MK_ATL_EXTERN int atlmkkernel_FillNamespace ( OT_ENV_T interp,
const OtObjProcDefS type[],
ClientData env )

Definition at line 877 of file LibMkKernel_atl.c.

881 {
882 // 2. create commands
883 for (int i=0; type[i].name != NULL; i++) {
884 check_NULL (
885 Tcl_CreateObjCommand(interp, type[i].name, type[i].callProc, env,NULL)
886 ) return TCL_ERROR;
887 }
888 return TCL_OK;
889}
const char * name

◆ atlmkkernel_Get_Call_File()

MK_ATL_EXTERN MK_STRN atlmkkernel_Get_Call_File ( FRAME_ARGS )

Definition at line 437 of file LibMkKernel_atl.c.

437 {
439 FRAME_GET(file)
440 if (file == NULL) goto error;
441 return Tcl_GetStringFromObj(file,NULL);
442error: {
443 MK_STRN script = AtlInfoScript(NULL);
444 check_NULL(script) goto error1;
445 return script;
446 }
447error1:
448 Tcl_ResetResult(interp);
449 FRAME_GET(type)
450 return Tcl_GetStringFromObj(type,NULL);
451}
#define FRAME_UPDATE
#define FRAME_GET(key)

◆ atlmkkernel_Get_Call_Line()

MK_ATL_EXTERN MK_I32 atlmkkernel_Get_Call_Line ( FRAME_ARGS )

Definition at line 453 of file LibMkKernel_atl.c.

453 {
455 FRAME_GET(line)
456 if (line == NULL) goto error;
457 MK_I32 lineI = -1;
458 if (Tcl_GetIntFromObj(NULL,line,&lineI)==TCL_ERROR) goto error;
459 return lineI;
460error:
461 Tcl_ResetResult(interp);
462 return -1;
463}
signed int MK_I32
4 byte integer data-type

◆ atlmkkernel_Get_Call_Proc()

MK_ATL_EXTERN MK_STRN atlmkkernel_Get_Call_Proc ( FRAME_ARGS )

Definition at line 398 of file LibMkKernel_atl.c.

398 {
399 OT_OBJ_T retObj = NULL;
401 FRAME_GET(method)
402 if (method != NULL) {retObj = method; goto end;}
403 FRAME_GET(proc)
404 if (proc != NULL) {retObj = proc; goto end;}
405 return "main";
406end:
407 return Tcl_GetStringFromObj(retObj,NULL);;
408}

◆ atlmkkernel_Get_Call_Stack()

MK_ATL_EXTERN bool atlmkkernel_Get_Call_Stack ( OT_MK_ARGS MK_ERR const err,
int level )

Definition at line 466 of file LibMkKernel_atl.c.

466 {
467 RL_init( 2, info_frame_2, RL_NewS(0,"::tcl::info::frame") ) ; RL_NewI(1,level) ;
468 OT_OBJ_T frame = RL_EvalRt(TCL_EVAL_GLOBAL);
469 Tcl_IncrRefCount(frame);
470//printLng(frame);
472 MK(Get_Call_Cmd)(FRAME_CALL),
473 MK(Get_Call_File)(FRAME_CALL),
474 MK(Get_Call_Line)(FRAME_CALL)
475 );
476 Tcl_DecrRefCount(frame);
477 return true;
478error:
479 Tcl_ResetResult(interp);
480 return false;
481}
#define FRAME_CALL
#define MkErrorStackFormat(...)

◆ atlmkkernel_GetClassFrmNsPtr()

static OT_CLS_T atlmkkernel_GetClassFrmNsPtr ( OT_MK_ARGS OT_NS_T nsP,
int flags )
inlinestatic

Definition at line 1075 of file LibMkKernel_atl.h.

1075 {
1076 AtlClassDefT clsDef = AtlClassDefGetNN(nsP,NULL,NULL,flags);
1077 if (clsDef != NULL) return clsDef->classO;
1078/*
1079 assert(nsP != NULL);
1080 SETUP_moxrt;
1081 return MoxCls__NS__NN(nsP,0);
1082*/
1083 return NULL;
1084}

◆ atlmkkernel_GetClassFromProc()

static OT_CLS_T atlmkkernel_GetClassFromProc ( OT_MK_ARGS Tcl_Command cmdT)
inlinestatic

Definition at line 1088 of file LibMkKernel_atl.h.

1088 {
1089 Tcl_CmdInfo cmdInfo;
1090 Tcl_GetCommandInfoFromToken(cmdT,&cmdInfo);
1092 return MoxCls__NS__NN(cmdInfo.namespacePtr,0);
1093}

◆ atlmkkernel_GetTypeFromObj()

MK_ATL_EXTERN MK_STRN atlmkkernel_GetTypeFromObj ( OT_Prefix_ARGS OT_OBJ_T,
bool * isObject )

helper to print the type-name of a Tcl_Obj MkKernel::print type $RET

Definition at line 599 of file LibMkKernel_atl.c.

603 {
605 const Tcl_ObjType *typePtr=myO->typePtr;
606 MK_STRN name=NULL;
607 bool isObjectB=false;
608
609 if (MoxMyIsN(myO)) {
610 // myoo instance NS
611 isObjectB=true;
612 name = OT_LNG_NAME_FROM_CLASS(MoxMy__CLASS__N(myO));
613 } else if (MoxClsIsN(myO)) {
614 // myoo class NS
615 isObjectB=true;
616 name = "Class";
617 } else {
618 // Tcl_Obj
619 name = typePtr ? typePtr->name : "unknown";
620 isObjectB=false;
621 }
622 if (isObject) *isObject=isObjectB;
623 return name;
624}

◆ atlmkkernel_LngListToMkBufferListS()

MK_ATL_EXTERN enum MkErrorE atlmkkernel_LngListToMkBufferListS ( OT_Prefix_ARGS OT_OBJ_T,
MK_BFL * retP )

Definition at line 688 of file LibMkKernel_atl.c.

692 {
693 if (argsO == NULL) {
694 return MK_OK;
695 } else {
696 int __skip=0;
697 int listObjc;
698 OT_OBJ_T * listObjv;
699 check_LNG (Tcl_ListObjGetElements(interp,argsO,&listObjc,&listObjv)) goto error;
700 MK(LngTupleToMkBufferListS)( MK_RT_CALL interp,listObjc,listObjv,&__skip,retP);
701 }
702 return MK_OK;
703error:
704 return MK_ERROR;
705}
@ MK_ERROR
(persistent) raise an error-event, the calling-fucntion is interrupted.
@ MK_OK
(persistent) everything is OK.

◆ atlmkkernel_MkBufferC_ObjNew()

static MK_ARTIFICIAL OT_OBJ_T atlmkkernel_MkBufferC_ObjNew ( OT_MK_ARGS MkBufferC_type hdl)
inlinestatic

Definition at line 1133 of file LibMkKernel_atl.h.

1133 {
1134 return ( hdl ? MK(AtomObjNew) (OT_MK_CALL MkBufferC_X2obj(hdl), amkrt) : MkBufferC_rt.AtlMkBufferC_MK_NULL );
1135 }
#define MkBufferC_rt
#define MkBufferC_X2obj(x)

◆ atlmkkernel_MkBufferC_ToObject()

OT_ProcRet atlmkkernel_MkBufferC_ToObject ( MkBufferC_ARGS )

Atl: obj [MkBufferC::ToObject $buf] C-API
return the native language object from a MkBufferC

◆ atlmkkernel_MkBufferListC_ObjNew()

static MK_ARTIFICIAL OT_OBJ_T atlmkkernel_MkBufferListC_ObjNew ( OT_MK_ARGS MkBufferListC_type hdl)
inlinestatic

Definition at line 1114 of file LibMkKernel_atl.h.

1114 {
1115 return ( hdl ? MK(AtomObjNew) (OT_MK_CALL MkBufferListC_X2obj(hdl), amkrt) : MkBufferListC_rt.AtlMkBufferListC_MK_NULL );
1116 }
#define MkBufferListC_rt
#define MkBufferListC_X2obj(x)

◆ atlmkkernel_MkBufferListC_ToList()

OT_ProcRet atlmkkernel_MkBufferListC_ToList ( MkBufferListC_ARGS )

Atl: [list...] [MkBufferListC::ToList $bfl] C-API
get a target-language list representation of the bfl

◆ atlmkkernel_MkBufferStreamC_ObjNew()

static MK_ARTIFICIAL OT_OBJ_T atlmkkernel_MkBufferStreamC_ObjNew ( OT_MK_ARGS MkBufferStreamC_type hdl)
inlinestatic

Definition at line 1152 of file LibMkKernel_atl.h.

1152 {
1153 return ( hdl ? MK(AtomObjNew) (OT_MK_CALL MkBufferStreamC_X2obj(hdl), amkrt) : MkBufferStreamC_rt.AtlMkBufferStreamC_MK_NULL );
1154 }
#define MkBufferStreamC_rt
#define MkBufferStreamC_X2obj(x)

◆ atlmkkernel_MkErrorC_ObjNew()

static MK_ARTIFICIAL OT_OBJ_T atlmkkernel_MkErrorC_ObjNew ( OT_MK_ARGS MkErrorC_type hdl)
inlinestatic

Definition at line 1171 of file LibMkKernel_atl.h.

1171 {
1172 return ( hdl ? MK(AtomObjNew) (OT_MK_CALL MkErrorC_X2obj(hdl), amkrt) : MkErrorC_rt.AtlMkErrorC_MK_NULL );
1173 }
#define MkErrorC_rt
#define MkErrorC_X2obj(x)

◆ atlmkkernel_MkLogFileC_ObjNew()

static MK_ARTIFICIAL OT_OBJ_T atlmkkernel_MkLogFileC_ObjNew ( OT_MK_ARGS MkLogFileC_type hdl)
inlinestatic

Definition at line 1190 of file LibMkKernel_atl.h.

1190 {
1191 return ( hdl ? MK(AtomObjNew) (OT_MK_CALL MkLogFileC_X2obj(hdl), amkrt) : MkLogFileC_rt.AtlMkLogFileC_MK_NULL );
1192 }
#define MkLogFileC_rt
#define MkLogFileC_X2obj(x)

◆ atlmkkernel_MkObjectC_ObjNew()

static MK_ARTIFICIAL OT_OBJ_T atlmkkernel_MkObjectC_ObjNew ( OT_MK_ARGS MkObjectC_type hdl)
inlinestatic

Definition at line 1209 of file LibMkKernel_atl.h.

1209 {
1210 return ( hdl ? MK(AtomObjNew) (OT_MK_CALL MkObjectC_X2obj(hdl), amkrt) : MkObjectC_rt.AtlMkObjectC_MK_NULL );
1211 }
#define MkObjectC_rt
#define MkObjectC_X2obj(x)

◆ atlmkkernel_MkRuntimeC_ObjNew()

static MK_ARTIFICIAL OT_OBJ_T atlmkkernel_MkRuntimeC_ObjNew ( OT_MK_ARGS MkRuntimeC_type hdl)
inlinestatic

Definition at line 1228 of file LibMkKernel_atl.h.

1228 {
1229 return ( hdl ? MK(AtomObjNew) (OT_MK_CALL MkRuntimeC_X2obj(hdl), amkrt) : MkRuntimeC_rt.AtlMkRuntimeC_MK_NULL );
1230 }
#define MkRuntimeC_rt
#define MkRuntimeC_X2obj(x)

◆ atlmkkernel_Obj_AsSTR_COPY()

MK_ATL_EXTERN enum MkErrorE atlmkkernel_Obj_AsSTR_COPY ( OT_Check_ARGS ,
MK_STR ret,
size_t size )

Definition at line 830 of file LibMkKernel_atl.c.

830 {
831 if ((*skipP) >= objc) {
832 return WrongNumArgs(hdl, (*skipP), objc, -999, +999, arg);
833 }
834 strncpy(ret,Tcl_GetString(objv[(*skipP)++]),size);
835 return MK_OK;
836}

◆ atlmkkernel_ObjectDeleteCall()

enum MkErrorE atlmkkernel_ObjectDeleteCall ( MK_RT mkrt,
MK_OBJN const obj,
MK_STRN const typeName,
MK_HDL const typeHdl,
MK_HDL const objHdl,
MK_CBP const __data__ )

Definition at line 217 of file MkCall_atl.c.

218{
220
221 // if NO self object is available than NO callback is called
222 if (!MkSelfExists(obj)) return MK_OK;
223
224 // 1. setup environment
225 struct MkCallS *call = __data__;
226
227 // 2. Prolog
228 CallProlog(call->hdl);
229 if (call->type == MkCallS_own_method) {
230 return MkErrorSetC_1E("MkCallS_own_method not supported");
231 }
232
233 // 3. setup args
234 objv[objc++] = STR2VAL(typeName);
235 objv[objc++] = HDL2VAL(typeHdl);
236 objv[objc++] = HDL2VAL(objHdl);
237
238 // 4. setup user args
239 if (call->args) MK(ProcResolveAppendArgs)(call,&objc,objv);
240
241 // 5. call the callback
242 int ret = MK(EvalObjv) (interp, objc, objv, 0); /* "MK(EvalObjv)" IS required !! */
243 if (ret != TCL_OK) goto error;
244
245 Tcl_ResetResult(interp);
246 return MkErrorGetCode_0E();
247
248error:
250
251error_mq:
252 return MkErrorStack_0E();
253}
#define CallProlog(m)
#define MkErrorGetCode_0E()
#define MkErrorStack_0E()
#define MkErrorSetC_1E(message)
static bool MkSelfExists(MK_OBJN obj)
Check if the MkObjectS::self exists …
#define MkObjectDeleteCallF_CHECK
validate call to MkObjectDeleteCallF

◆ atlmkkernel_ObjectDeleteFree()

void atlmkkernel_ObjectDeleteFree ( MkObjectDeleteFreeF_ARGS )

Definition at line 255 of file MkCall_atl.c.

256{
257 MK(CallFree)(dataP);
258}

◆ atlmkkernel_ObjvToString()

MK_ATL_EXTERN MK_STRN atlmkkernel_ObjvToString ( MK_RT mkrt,
MK_STRN cls,
ATL_ARGS  )

Definition at line 891 of file LibMkKernel_atl.c.

891 {
892 MkBufferCreateTLS_T(MkBuffer64C,ret,50);
893 MkBufferAppendV(ret,"&%s ", cls);
894 for(int i=1;i<objc;i++) {
895 MkBufferAppendV(ret,"%s ", VAL2STR(objv[i]));
896 }
897 return MkBUF_R(&retR).storage.first.C;
898}
#define MkBufferAppendV(...)
#define MkBUF_R(x)
cast a known-object into an MkBufferS reference
#define MkBufferCreateTLS_T(cls, name, size)
create an new MkBufferC object as T)hread L)ocal S)torage…

◆ atlmkkernel_OT_ERROR_LNG_RETURN_HDL_IS_NULL()

int atlmkkernel_OT_ERROR_LNG_RETURN_HDL_IS_NULL ( OT_MK_ARGS OT_CLS_T,
OT_OBJ_T objO )

Definition at line 707 of file LibMkKernel_atl.c.

708{
709 MOX_RT_T const moxrt = amkrt->moxrt;
710 OT_CLS_T objClsO = MoxMy__CLASS__N(objO);
711
712 if (objClsO == NULL) {
713 OT_ERROR_VAR_DEFAULT("HdlIsNullError: '%s' hdl is NULL (not a myoox)",VAL2STR(clsO));
714 Tcl_SetErrorCode(interp,"ATLMK","HDL","NULL",NULL);
715 goto error;
716 }
717
718 MK_STRN objClsC = VAL2STR(objClsO);
719 MK_MNG mng = VAL2MNG(objO);
720
721 if (mng == NULL) {
722 OT_ERROR_VAR_DEFAULT("HdlIsNullError: '%s' hdl is NULL (not an instance)",objClsC);
723 Tcl_SetErrorCode(interp,"ATLMK","HDL","NULL",NULL);
724 goto error;
725 }
726
727 MK_OBJ obj = MkObj(mng);
728 if (obj == NULL) {
729 OT_ERROR_VAR_DEFAULT("HdlIsNullError: '%s' hdl is NULL (not an object)",objClsC);
730 Tcl_SetErrorCode(interp,"ATLMK","HDL","NULL",NULL);
731 goto error;
732 }
733
734 MK_TYP objTT = AtlClassDefGetTypN(objClsO,TCL_LEAVE_ERR_MSG);
735 if (objTT == NULL) goto error_and_stack;
736 MK_TYP clsTT = AtlClassDefGetTypN(clsO,TCL_LEAVE_ERR_MSG);
737 if (clsTT == NULL) goto error_and_stack;
738
739/*
740 RL_init(3,hdl_is_null_3, RL_T(0,ClassIsN) ) ; RL_O(1,objO) ; RL_O(2,clsO) ;
741 OT_OBJ_T retO = RL_EvalRt(TCL_EVAL_GLOBAL);
742 int boolI;
743 if (retO == NULL || Tcl_GetBooleanFromObj(interp,retO,&boolI) != TCL_OK) {
744 OT_ERROR_VAR_DEFAULT("[HdlInternalError] '%s'",Tcl_GetStringResult(interp));
745 Tcl_SetErrorCode(interp,"ATLMK","HDL","INTERNAL",NULL);
746 goto error;
747 }
748*/
749
750 MK_STRN clsC = VAL2STR(clsO);
751 if (objTT == clsTT) {
752 OT_ERROR_VAR_DEFAULT("HdlClassInvalidError: Expected 'hdl' in class '%s' not found", objClsC);
753 Tcl_SetErrorCode(interp,"ATLMK","HDL","INVALID",NULL);
754 } else {
755 OT_ERROR_VAR_DEFAULT("HdlClassInvalidError: Expecting 'hdl' class '%s', but getting class '%s'", clsC, objClsC);
756 Tcl_SetErrorCode(interp,"ATLMK","HDL","WRONG","CLASS",NULL);
757 }
758error_and_stack:
760error:
761 return TCL_ERROR;
762}
MOX_CLS_T OT_CLS_T

◆ atlmkkernel_OT_VARFRAME_ADD()

static OT_OBJ_T atlmkkernel_OT_VARFRAME_ADD ( OT_VARFRAME_ARGS ,
OT_OBJ_T add )
inlinestatic

Definition at line 811 of file LibMkKernel_atl.h.

811 {
812 if (varframe != NULL) {
813 if (varframe->num >= varframe->max) {
814 void *tmp;
815 if (varframe->data == varframe->prealloc) {
816 tmp = MkSysCalloc(MK_ERROR_PANIC,(size_t)varframe->max*2,sizeof(OT_OBJ_T));
817 memcpy(tmp,varframe->data,(size_t)varframe->max*sizeof(OT_OBJ_T));
818 } else {
819 tmp = MkSysReCalloc(MK_ERROR_PANIC,varframe->data,varframe->max,varframe->max,sizeof(OT_OBJ_T));
820 }
821 varframe->data = tmp;
822 varframe->max *= 2;
823 }
824 varframe->data[varframe->num++] = add;
825 Tcl_IncrRefCount(add);
826 }
827 return add;
828}
MK_PTR MkSysCalloc(MK_OBJN fmtobj, size_t const nmemb, size_t const size)
calloc syscall with atlmkkernel error plugin
MK_PTR MkSysReCalloc(MK_OBJN fmtobj, MK_PTR const buf, MK_NUM const oldnum, MK_NUM const addnum, size_t const size)
realloc syscall with atlmkkernel error plugin

◆ atlmkkernel_pMkBufferC_Init()

int atlmkkernel_pMkBufferC_Init ( OT_MK_ARGS OT_NS_T ns)

Public API

Definition at line 1488 of file MkBufferC_atl.c.

1489{
1490 ClassInit
1491
1492 MkBuffer64C_TT->selfCreate = NS(MkBufferC_selfCreate) ;
1493 MkBuffer64C_TT->selfDelete = NS(MkBufferC_selfDelete) ;
1494 MkBuffer64C_TT->selfUnlink = NS(MkBufferC_selfUnlink) ;
1495 MkBuffer256C_TT->selfCreate = NS(MkBufferC_selfCreate) ;
1496 MkBuffer256C_TT->selfDelete = NS(MkBufferC_selfDelete) ;
1497 MkBuffer256C_TT->selfUnlink = NS(MkBufferC_selfUnlink) ;
1498 MkBuffer1024C_TT->selfCreate = NS(MkBufferC_selfCreate) ;
1499 MkBuffer1024C_TT->selfDelete = NS(MkBufferC_selfDelete) ;
1500 MkBuffer1024C_TT->selfUnlink = NS(MkBufferC_selfUnlink) ;
1501
1502 return TCL_OK;
1503error:
1504 return TCL_ERROR;
1505}
#define ClassInit
#define MkBuffer1024C_TT
class as MkTypeS-class-type, useable in a class-macro as: class##_TT …
#define MkBuffer256C_TT
class as MkTypeS-class-type, useable in a class-macro as: class##_TT …
#define MkBuffer64C_TT
class as MkTypeS-class-type, useable in a class-macro as: class##_TT …

◆ atlmkkernel_pMkBufferListC_Init()

int atlmkkernel_pMkBufferListC_Init ( OT_MK_ARGS OT_NS_T)

Definition at line 1435 of file MkBufferListC_atl.c.

1436{
1437 ClassInit
1438
1439 return TCL_OK;
1440error:
1441 return TCL_ERROR;
1442}
#define ClassInit

◆ atlmkkernel_pMkBufferStreamC_Init()

int atlmkkernel_pMkBufferStreamC_Init ( OT_MK_ARGS OT_NS_T ns)

Public API

Definition at line 1214 of file MkBufferStreamC_atl.c.

1215{
1216 ClassInit
1217
1218 MkBufferStream16384C_TT->selfCreate = NS(MkBufferStreamC_selfCreate) ;
1219 MkBufferStream16384C_TT->selfDelete = NS(MkBufferStreamC_selfDelete) ;
1220 MkBufferStream16384C_TT->selfUnlink = NS(MkBufferStreamC_selfUnlink) ;
1221 MkBufferStream256C_TT->selfCreate = NS(MkBufferStreamC_selfCreate) ;
1222 MkBufferStream256C_TT->selfDelete = NS(MkBufferStreamC_selfDelete) ;
1223 MkBufferStream256C_TT->selfUnlink = NS(MkBufferStreamC_selfUnlink) ;
1224 MkBufferStream64C_TT->selfCreate = NS(MkBufferStreamC_selfCreate) ;
1225 MkBufferStream64C_TT->selfDelete = NS(MkBufferStreamC_selfDelete) ;
1226 MkBufferStream64C_TT->selfUnlink = NS(MkBufferStreamC_selfUnlink) ;
1227 MkBufferStream1024C_TT->selfCreate = NS(MkBufferStreamC_selfCreate) ;
1228 MkBufferStream1024C_TT->selfDelete = NS(MkBufferStreamC_selfDelete) ;
1229 MkBufferStream1024C_TT->selfUnlink = NS(MkBufferStreamC_selfUnlink) ;
1230
1231 return TCL_OK;
1232error:
1233 return TCL_ERROR;
1234}
#define ClassInit
#define MkBufferStream1024C_TT
class as MkTypeS-class-type, useable in a class-macro as: class##_TT …
#define MkBufferStream16384C_TT
class as MkTypeS-class-type, useable in a class-macro as: class##_TT …
#define MkBufferStream256C_TT
class as MkTypeS-class-type, useable in a class-macro as: class##_TT …
#define MkBufferStream64C_TT
class as MkTypeS-class-type, useable in a class-macro as: class##_TT …

◆ atlmkkernel_pMkErrorC_Init()

int atlmkkernel_pMkErrorC_Init ( OT_MK_ARGS OT_NS_T ns)

TCL API Public API

Definition at line 960 of file MkErrorC_atl.c.

961{
963
964 MkErrorDefaultC_TT->selfCreate = NS(MkErrorC_selfCreate);
965 MkErrorDefaultC_TT->selfDelete = NS(MkErrorC_selfDelete);
966 MkErrorDefaultC_TT->selfUnlink = NS(MkErrorC_selfUnlink);
967
968 return TCL_OK;
969error:
970 return TCL_ERROR;
971}
#define ClassInit
#define MkErrorDefaultC_TT
class as MkTypeS-class-type, useable in a class-macro as: class##_TT …

◆ atlmkkernel_pMkLogFileC_Init()

int atlmkkernel_pMkLogFileC_Init ( OT_MK_ARGS OT_NS_T ns)

Public API

Definition at line 368 of file MkLogFileC_atl.c.

369{
371
372 return TCL_OK;
373error:
374 return TCL_ERROR;
375}
#define ClassInit

◆ atlmkkernel_pMkObjectC_Init()

int atlmkkernel_pMkObjectC_Init ( OT_MK_ARGS OT_NS_T ns)

Public API

Definition at line 1083 of file MkObjectC_atl.c.

1084{
1085 ClassInit
1086
1087 return TCL_OK;
1088error:
1089 return TCL_ERROR;
1090}
#define ClassInit

◆ atlmkkernel_pMkRuntimeC_Init()

int atlmkkernel_pMkRuntimeC_Init ( OT_MK_ARGS OT_NS_T ns)

TCL API Public API

Definition at line 341 of file MkRuntimeC_atl.c.

342{
344
345 return TCL_OK;
346error:
347 return TCL_ERROR;
348}
#define ClassInit

◆ atlmkkernel_PrintObj()

MK_ATL_EXTERN MK_STR atlmkkernel_PrintObj ( OT_Prefix_ARGS MK_STRN,
OT_OBJ_T valO )

helper to print a Tcl_Obj MkKernel::print object $RET

Definition at line 966 of file LibMkKernel_atl.c.

970 {
971 if (valO == NULL) {
972 MkBufferSetV(MkBUF(&MK_RT_REF.tbuf), "%s=NULL", header);
973 } else {
974 //printP(valO)
975 MK_OBJ retObj = NULL;
976 bool isObject;
977 MK_STRN type = MK(GetTypeFromObj) (OT_Prefix_CALL valO, &isObject);
978 if (isObject) OT_LNG_OBJECT_IS_3(valO, &retObj, NULL);
979
980 #define objF "[type<%s>, refCount<MQ=%i,TCL=%i,SHARED=%i>, ptr<MQ=%p,TCL=%p>]"
981 #define objA type, (retObj?retObj->refCount:-1),valO->refCount, Tcl_IsShared(valO), retObj, (retObj?retObj->self:NULL)
982
983 // fill the buf and get the len back
984 if (header) {
985 MkBufferSetV(MkBUF(&MK_RT_REF.tbuf), "%-20s: %s " objF, header, Tcl_GetString (valO), objA);
986 } else if (retObj) {
987 MkBufferSetV(MkBUF(&MK_RT_REF.tbuf), "%s " objF, Tcl_GetString (valO), objA);
988 } else {
989 MkBufferSetV(MkBUF(&MK_RT_REF.tbuf), "%s " objF, Tcl_GetString (valO), objA);
990 }
991
992 #undef objF
993 #undef objA
994 }
995
996 return MkBUF_R(&MK_RT_REF.tbuf).storage.first.S;
997}
#define objF
#define objA
#define MkBUF(x)
cast a known-object into an MkBufferS pointer
#define MkBufferSetV(...)
#define MK_RT_REF
#define OT_LNG_OBJECT_IS_3(objV, obj, flag)

◆ atlmkkernel_PrintObj2()

MK_ATL_EXTERN void atlmkkernel_PrintObj2 ( OT_Prefix_ARGS MK_STRN,
OT_OBJ_T obj,
MK_STRN caller )

Definition at line 905 of file LibMkKernel_atl.c.

910 {
911 if (obj == NULL) {
912 _printV("%s=NULL", header);
913 }
914 const Tcl_ObjType *typePtr = obj->typePtr;
915 _printV("STRING # %s<%s>", header, VAL2STR(obj));
916 if (typePtr) {
917 const char * typeName = typePtr->name;
918 _printV(" | OBJECT # typePtr<%s>, refCount<%d>", typeName, obj->refCount);
919 if (strcmp(typeName,"parsedVarName")==0) {
920 _printV(" | %-10p # pointer to the array name Tcl_Obj, or NULL if it is ascalar variable",
921 obj->internalRep.twoPtrValue.ptr1);
922 _printV(" | %-10p # pointer to the element name string (owned by this Tcl_Obj), or NULL if it is a scalar variable",
923 obj->internalRep.twoPtrValue.ptr2);
924 } else if (strcmp(typeName,"nsName")==0) {
925 // ===========================================================================
926 // generic/tclNamesp.c
927 /*
928 * This structure contains a cached pointer to a namespace that is the result
929 * of resolving the namespace's name in some other namespace. It is the
930 * internal representation for a nsName object. It contains the pointer along
931 * with some information that is used to check the cached pointer's validity.
932 */
933
934 typedef struct ResolvedNsName {
935 Namespace *nsPtr; /* A cached pointer to the Namespace that the
936 * name resolved to. */
937 Namespace *refNsPtr; /* Points to the namespace context in which
938 * the name was resolved. NULL if the name is
939 * fully qualified and thus the resolution
940 * does not depend on the context. */
941 int refCount; /* Reference count: 1 for each nsName object
942 * that has a pointer to this ResolvedNsName
943 * structure as its internal rep. This
944 * structure can be freed when refCount
945 * becomes zero. */
946 } ResolvedNsName;
947 // ===========================================================================
948 ResolvedNsName *resNamePtr = obj->internalRep.twoPtrValue.ptr1;
949 if (resNamePtr==NULL) return;
950 Namespace* nsPtr = resNamePtr->nsPtr ;
951 char *nsPtrS = nsPtr ? nsPtr->fullName : "null";
952 ClientData nsPtrCD = nsPtr ? nsPtr->clientData : NULL;
953 Namespace* refNsPtr = resNamePtr->refNsPtr;
954 char *refNsPtrS = refNsPtr ? refNsPtr->fullName : "null";
955 _printV(" | NAMESPACE # namespace<%s>, ClientData<%p>, refNsPtr<%s>", nsPtrS, nsPtrCD, refNsPtrS);
956 }
957 } else {
958 _printV(" | OBJECT # refCount : %d", obj->refCount);
959 }
960}
#define _printV(fmt,...)

◆ atlmkkernel_ProcResolve()

MK_ATL_EXTERN enum MkErrorE atlmkkernel_ProcResolve ( OT_MK_ARGS MK_MNG,
struct MkCallS * call )

Definition at line 78 of file MkCall_atl.c.

82 {
84 OT_OBJ_T argsO = call->args;
85 call->args = NULL;
86 int objc;
87 OT_OBJ_T *objv;
88
89 assert(call->signature == MkCallS_SIG);
90
91//colorORANGE("call->nsPtr<%p>, call->nsO<%s>",call->nsPtr,VAL2STR(call->nsO));
92 OT_NS_T nsPtr = MoxResolveN(call->nsO);
93 if (nsPtr == NULL) return MK_OK ; /* DEFINITION namespace already deleted */
94
95 if (argsO == NULL) {
96 MkErrorSetC_2M(hdl,"CallbackResolveError: INTERNAL ERROR -> callback is invalid");
97 goto error;
98 }
99
100 check_LNG(Tcl_ListObjGetElements(interp,argsO,&objc,&objv)) {
102 goto error;
103 }
104
105 Tcl_Command procCmd = NULL;
106 OT_OBJ_T arg0 = objv[0];
107 do {
108 // resolve using CURRENT and GLOBAL namespace
109 procCmd = Tcl_FindCommand (interp,VAL2STR(arg0),nsPtr,0);
110 if (procCmd != NULL) break;
111
112 // resolve using toplevel CLASS namespace for METHOD call → test if "objv[0]" is an INSTANCE
113 if (objc == 1) break;
114
115 MOX_NS_T myNsP = MoxResolveN(objv[1]);
116 if (myNsP == NULL) break;
117 OT_OBJ_T clsNsO = MoxMy__CLASS__NN(myNsP,0);
118 if (clsNsO == NULL) break;
119 OT_NS_T clsNsPtr = MoxResolveN(clsNsO);
120 if (clsNsPtr == NULL) break;
121 procCmd = Tcl_FindCommand (interp,VAL2STR(arg0),clsNsPtr,0);
122 if (procCmd == NULL) break;
123
124 // FOUND toplevel CLASS namespace with METHOD "arg0"
125 OT_REF_DECR(call->nsO);
126 call->nsO = clsNsO;
127 OT_REF_INCR(call->nsO);
128
129 } while (0);
130
131 if (procCmd == NULL) {
132 MK_STRN cbS = VAL2STR(arg0);
133 MkErrorSetV_2M(hdl,"CallbackResolveError: unknown method \"%s\" in namespace \"%s\"", cbS, nsPtr->fullName);
134 MkErrorAppendC_2M(hdl," attention: private callback require namespace prefix!");
135 goto error;
136 }
137
138 arg0 = NULL;
139 objc--;objv++;
140
141 call->mth = Tcl_NewObj();
142 Tcl_GetCommandFullName(interp,procCmd,call->mth);
143 OT_REF_INCR(call->mth);
144
145 OT_CLS_T procClass = AtlGetClassFromProc(procCmd);
146
147 if (procClass == NULL) {
148 // just one proc
149 call->type = MkCallS_proc;
150 } else {
151 if (objc == 0) {
152 // DEFINED: instance or class method without my -> own method
153 call->type = MkCallS_own_method;
154 call->my = NULL;
155 } else {
156 OT_OBJ_T myO = objv[0];
157 if (MoxMyIsN(myO)) {
158 // instance method with my
160 call->my = myO;
161 OT_REF_INCR(myO);
162 objc--;objv++;
163 } else {
164 // CLASS method
165 call->type = MkCallS_static;
166 call->my = NULL;
167 }
168 }
169 }
170
171 // resolve additional arguments
172 if (objc > MkProcResolve_maxArgsLen) {
173 MkErrorSetV_2M(hdl, "expect max '%d' additional arguments to callback but got '%d' "
174 "with '%s'", MkProcResolve_maxArgsLen, objc, Tcl_GetString(argsO));
175 goto error;
176 } else if (objc > 0) {
177 call->args = Tcl_NewListObj(objc,objv);
178 OT_REF_INCR(call->args);
179 }
180
182 return MK_OK;
183
184error:
185 call->args = argsO;
186 return MkErrorStack_1M(hdl);
187}
#define MkProcResolve_maxArgsLen
#define AtlGetClassFromProc(cmdT)
#define MkErrorStack_1M(err)
#define MkErrorAppendC_2M(m,...)
#define MkErrorSetV_2M(err, printfmt,...)
#define MkErrorSetC_2M(err, message)

◆ atlmkkernel_ProcResolveAppendArgs()

static void atlmkkernel_ProcResolveAppendArgs ( struct MkCallS * call,
int * objcP,
OT_OBJ_T objv[] )
inlinestatic

Definition at line 544 of file LibMkKernel_atl.h.

548 {
549 assert(call != NULL);
550 assert(objcP != NULL);
551 assert(objv != NULL);
552
553 if (call->args == NULL) return;
554 int myobjc;
555 OT_OBJ_T *myobjv;
556 int objc = *objcP;
557 // call->args already checked to be a valid TCL-LIST
558 Tcl_ListObjGetElements(NULL,call->args,&myobjc,&myobjv);
559 for (int i=0; i<myobjc; i++) {
560//printLLngObj(objv[i])
561 objv[objc++] = myobjv[i];
562 }
563 *objcP = objc;
564}

◆ atlmkkernel_Self2PtrN()

static MK_MNG atlmkkernel_Self2PtrN ( OT_ENV_T interp,
OT_SELF_T myO )
inlinestatic

Definition at line 1363 of file LibMkKernel_atl.h.

1363 {
1364 OT_NS_T myP = MoxResolveN(myO);
1365 if (myP == NULL) return NULL;
1366 return Self2PtrNN(myP);
1367}

◆ atlmkkernel_Self2PtrNN()

static MK_MNG atlmkkernel_Self2PtrNN ( OT_NS_T nsP)
inlinestatic

Definition at line 1359 of file LibMkKernel_atl.h.

1359 {
1360 return nsP->clientData;
1361}

◆ atlmkkernel_STRN2VAL()

static OT_OBJ_T atlmkkernel_STRN2VAL ( MK_STRN val)
inlinestatic

Definition at line 1009 of file LibMkKernel_atl.h.

1009 {
1010 static MkThreadLocal OT_OBJ_T T_MK_NULL = NULL;
1011 if (T_MK_NULL == NULL) {
1012 T_MK_NULL = Tcl_NewStringObj(MK_NULL_STR,-1);
1013 Tcl_IncrRefCount(T_MK_NULL);
1014 }
1015 // mark=MK_NULL
1016 if (val==MK_NULL) {
1017 return T_MK_NULL;
1018 } else {
1019 return Tcl_NewStringObj(val,-1);
1020 }
1021}
#define MK_NULL_STR
the string "MK_NULL" value as MK_NULL_STR …
#define MK_NULL
The Programming-Language-Micro-Kernel (PLMK) NULL value as "MK_NULL" in Atl …
#define MkThreadLocal

◆ atlmkkernel_TestObject()

MK_ATL_EXTERN bool atlmkkernel_TestObject ( OT_Prefix_ARGS OT_OBJ_T,
OT_CLS_T clsO,
MK_OBJ * objP,
MkTestClassE * flagP )

Definition at line 537 of file LibMkKernel_atl.c.

543 {
544 assert(myO != NULL);
545 assert(clsO!= NULL);
546 Tcl_ResetResult(interp);
548 MOX_RT_T moxrt = amkrt->moxrt;
549 MK_OBJ myOBJ = NULL;
550
551 OT_NS_T myNs = MoxResolveN(myO);
552 if (myNs == NULL) {
553 // first check for "", "MK_NULL", ...
554 int len=0;
555 MK_STRN str = Tcl_GetStringFromObj(myO,&len);
556 if (len == 0 || MkStringIsNULL(MkStringCreate(len,str))) {
558 } else {
560 }
561 goto end;
562 }
563
564 myOBJ = Self2PtrNN(myNs);
565 if (myOBJ == NULL) {
566 if (MoxMyIsNN(myNs)) {
567 flag=MkTestClassE_NULL; goto end;
568 } else {
569 flag=MkTestClassE_NONE_OBJECT; goto end;
570 }
571 }
572
573 if (!MkObjCheck(myOBJ)) {
574 flag=MkTestClassE_INVALID_SIGNATURE; goto end;
575 }
576
577 MK_TYP clsTT = AtlClassDefGetTypN(clsO,0);
578 if (clsTT == NULL) {
579 flag=MkTestClassE_INTERNAL; goto end;
580 }
581
582 if (!__MkCheckTO(clsTT,myOBJ)) {
583 flag = MkTestClassE_WRONG_CLASS; goto end;
584 }
585
586 flag = MkTestClassE_OK;
587 if (objP) *objP = myOBJ;
588
589end:
590 if (flagP) *flagP = flag;
591 switch(flag) {
592 case MkTestClassE_NONE_OBJECT : return false;
593 default : return true;
594 }
595}
static bool MkStringIsNULL(MkStringR const strR)
check if strR is MK_NULL_STR return true or false …
#define __MkCheckTO(t, o)
static bool MkObjCheck(MK_MNGN mng)
check MkObjectS -> MkObjectS::signature …
@ MkTestClassE_NONE_OBJECT
@ MkTestClassE_INTERNAL
@ MkTestClassE_OK
@ MkTestClassE_INVALID_SIGNATURE
@ MkTestClassE_NULL
@ MkTestClassE_WRONG_CLASS

◆ atlmkkernel_UnknownSetup()

MK_ATL_EXTERN int atlmkkernel_UnknownSetup ( OT_ENV_T interp,
const OtObjProcDefS methodsDefs[],
const ClientData clientData )

"unknown" API

Definition at line 770 of file LibMkKernel_atl.c.

774 {
775
776 for (int i=0; methodsDefs[i].name != 0; i++) {
777 check_NULL(Tcl_CreateObjCommand(interp, methodsDefs[i].name, methodsDefs[i].callProc, clientData, NULL))
778 goto error;
779 }
780
781 return TCL_OK;
782error:
784 return TCL_ERROR;
785}

◆ Ot_DecrRefCount()

static void Ot_DecrRefCount ( OT_OBJ_T tclO)
inlinestatic

Definition at line 1268 of file LibMkKernel_atl.h.

1268 {
1269 if (tclO) Tcl_DecrRefCount(tclO);
1270}
+ Here is the caller graph for this function:

◆ Ot_GetStringFromObj()

static MkStringR Ot_GetStringFromObj ( OT_OBJ_T tclO)
inlinestatic

Definition at line 1262 of file LibMkKernel_atl.h.

1262 {
1263 int len = 0;
1264 char* str = Tcl_GetStringFromObj(tclO,&len);
1265 return MkStringCreate(len,str);
1266}

Variable Documentation

◆ amkrtR

__thread OT_MK_RT_S amkrtR
extern

Definition at line 1989 of file LibMkKernel_atl.c.

1989{0};