theKernel 10.0
Loading...
Searching...
No Matches
MkLogFileC_py.c File Reference

tag: nhi1-release-250425 More...

+ Include dependency graph for MkLogFileC_py.c:

Go to the source code of this file.

Macros

#define META_FILE_NAME   "MkLogFileC_py.c"
 
#define OT_CLASS   (&NS(MkLogFileCR))
 
#define OT_CLASS_NAME   "MkLogFileC"
 
#define OT_LNG2META(O)
 
#define OT_retObj_CONSTR(mng)
 
#define OT_SETUP_hdl   OT_SETUP_hdl_tmpl(MkLogFileC)
 
#define OT_SETUP_hdl__null_allow   OT_SETUP_hdl_tmpl__null_allow(MkLogFileC)
 
#define OT_SETUP_hdl_constr
 
#define OT_SETUP_hdl_destr   OT_SETUP_hdl_tmpl__null_allow(MkLogFileC)
 
#define OT_SETUP_hdl_static
 
#define OT_SETUP_hdl_static_constr   OT_SETUP_hdl_static
 
#define SetupRtFromObj_X(hdl)
 
#define SetupRtFromObj_XN(hdl)
 
#define MkLogFileCTT   MK(MkKernelThreadState).MkLogFileCTT
 
#define ClassInit
 
#define META_CONTEXT_S   hdl->error
 
#define Open_doc   "MkLogFileC MkLogFileC.Open(fmtobj:MkObjectC, file:string)"
 
#define new_doc   "MkLogFileC MkLogFileC.new(fmtobj:MkObjectC, file:string)"
 
#define GetNull_doc   "MkLogFileC MkLogFileC.GetNull()"
 
#define HandleResolve_doc   "MkLogFileC MkLogFileC.HandleResolve(netHdl:MK_HDL)"
 
#define Instances_doc   "MkLogFileC MkLogFileC.Instances()"
 
#define Next_doc   "MkLogFileC lfl.Next()"
 
#define Prev_doc   "MkLogFileC lfl.Prev()"
 
#define WriteC_doc   "lfl.WriteC(text:string) (const)"
 
#define GetFile_doc   "string lfl.GetFile() (const)"
 

Functions

static OT_OBJ_T pymkkernel_MkLogFileC_CTOR (MK_RT mkrt, OT_CLS_T type, MK_LFL hdl)
 
static MK_PTR pymkkernel_MkLogFileC_selfCreate (MK_RT mkrt, MK_OBJ const obj, MK_PTR const env)
 
static void pymkkernel_MkLogFileC_selfDelete (MK_RT mkrt, MK_PTR self, MK_PTR const env)
 
static void pymkkernel_MkLogFileC_selfUnlink (MK_RT mkrt, MK_PTR self, MK_PTR const env)
 
static OT_ProcRet pymkkernel_MkLogFileC_HandleResolve (OtClass_ARGS)
  Python: [static] MkLogFileC MkLogFileC.HandleResolve(netHdl:MK_HDL) C-API
Handle-Resolve-Slot - return a MkLogFileC from netHdl or None if invalid…
 
MK_DEPRECATED static MK_UNUSED OT_ProcRet pymkkernel_MkLogFileC_HandleGet (MkLogFileC_ARGS)
 
static OT_ProcRet pymkkernel_MkLogFileC_Next (MkLogFileC_ARGS)
  Python: MkLogFileC lfl.Next() C-API
get next instance from linked-list of MkLogFileS type
 
static OT_ProcRet pymkkernel_MkLogFileC_Prev (MkLogFileC_ARGS)
  Python: MkLogFileC lfl.Prev() C-API
get previous instance from linked-list of MkLogFileS type
 
static OT_ProcRet pymkkernel_MkLogFileC_Instances (OtClass_ARGS)
  Python: [static] MkLogFileC MkLogFileC.Instances() C-API
get head-instance from linked-list of MkLogFileS type …
 
static OT_ProcRet pymkkernel_MkLogFileC_GetNull (OtClass_ARGS)
  Python: [static] MkLogFileC MkLogFileC.GetNull() C-API
Null-Slot - return a MkLogFileC typed NULL instance …
 
static OT_ProcRet pymkkernel_MkLogFileC_Open (OtClass_ARGS)
  Python: [constructor,static] MkLogFileC MkLogFileC.Open(fmtobj:MkObjectC, file:string) C-API
open the log-file in append mode …
 
static OT_ProcRet pymkkernel_MkLogFileC_new (CONSTR_ARGS)
  Python: [constructor,static] MkLogFileC MkLogFileC.new(fmtobj:MkObjectC, file:string) C-API
open the log-file in append mode …
 
static OT_ProcRet pymkkernel_MkLogFileC_WriteC (MkLogFileC_ARGS)
  Python: lfl.WriteC(text:string) C-API
write to log-file
 
static OT_ProcRet pymkkernel_MkLogFileC_GetFile (MkLogFileC_ARGS)
  Python: string lfl.GetFile() C-API
get the log-file
 
int pymkkernel_pMkLogFileC_Init (MK_RT mkrt, PyObject *m)
 

Variables

static PyMethodDef pymkkernel_MkLogFileC_Methods []
 
OT_CLASS_TYPE_REF pymkkernel_MkLogFileCR
 

Detailed Description

tag: nhi1-release-250425

Definition in file MkLogFileC_py.c.

Macro Definition Documentation

◆ ClassInit

#define ClassInit
Value:
/* if not already done, initialize NEW META type */ \
\
/* protect against double call */ \
if (MkLogFileCTT->selfCreate == NS(MkLogFileC_selfCreate)) return MK_OK; \
\
/* add "selfCreate" and "selfDelete" feature to the META-Class */ \
MkLogFileCTT->selfCreate = NS(MkLogFileC_selfCreate); \
MkLogFileCTT->selfDelete = NS(MkLogFileC_selfDelete); \
MkLogFileCTT->selfUnlink = NS(MkLogFileC_selfUnlink); \
\
if (!PyType_HasFeature(OT_CLASS,Py_TPFLAGS_READY)) { \
NS(MkLogFileCR).tp_base = MkLogFileC_base; \
OtErrorCheckLng (PyType_Ready(OT_CLASS)); \
} \
OtErrorCheckLng(PyModule_AddObjectRef(m, "MkLogFileC", (PyObject *)OT_CLASS)); \
\
/* define the "NULL" object */ \
MkLogFileC_MK_NULL = Py_NewRef(MK(AtomCreate) (MK_RT_CALL OT_CLASS, NULL /*obj*/));
#define MK(n)
#define MkLogFileC_MK_NULL
#define NS(n)
#define MkLogFileC_base
#define MkLogFileCTT
#define OT_CLASS
@ MK_OK
(persistent) everything is OK.
#define MkLogFileSTT
instance-type as MkTypeS-class-type (cast from MkLogFileST into MkTypeS) …
#define MK_RT_CALL
define a MkLogFileC object …

Definition at line 65 of file MkLogFileC_py.c.

65#define ClassInit \
66 /* if not already done, initialize NEW META type */ \
67 if (MkLogFileCTT == NULL) MkLogFileCTT = MkLogFileSTT; \
68 \
69 /* protect against double call */ \
70 if (MkLogFileCTT->selfCreate == NS(MkLogFileC_selfCreate)) return MK_OK; \
71 \
72 /* add "selfCreate" and "selfDelete" feature to the META-Class */ \
73 MkLogFileCTT->selfCreate = NS(MkLogFileC_selfCreate); \
74 MkLogFileCTT->selfDelete = NS(MkLogFileC_selfDelete); \
75 MkLogFileCTT->selfUnlink = NS(MkLogFileC_selfUnlink); \
76 \
77 if (!PyType_HasFeature(OT_CLASS,Py_TPFLAGS_READY)) { \
78 NS(MkLogFileCR).tp_base = MkLogFileC_base; \
79 OtErrorCheckLng (PyType_Ready(OT_CLASS)); \
80 } \
81 OtErrorCheckLng(PyModule_AddObjectRef(m, "MkLogFileC", (PyObject *)OT_CLASS)); \
82 \
83 /* define the "NULL" object */ \
84 MkLogFileC_MK_NULL = Py_NewRef(MK(AtomCreate) (MK_RT_CALL OT_CLASS, NULL /*obj*/));

◆ GetFile_doc

#define GetFile_doc   "string lfl.GetFile() (const)"

Definition at line 116 of file MkLogFileC_py.c.

◆ GetNull_doc

#define GetNull_doc   "MkLogFileC MkLogFileC.GetNull()"

Definition at line 103 of file MkLogFileC_py.c.

◆ HandleResolve_doc

#define HandleResolve_doc   "MkLogFileC MkLogFileC.HandleResolve(netHdl:MK_HDL)"

Definition at line 104 of file MkLogFileC_py.c.

◆ Instances_doc

#define Instances_doc   "MkLogFileC MkLogFileC.Instances()"

Definition at line 105 of file MkLogFileC_py.c.

◆ META_CONTEXT_S

#define META_CONTEXT_S   hdl->error

Definition at line 88 of file MkLogFileC_py.c.

◆ META_FILE_NAME

#define META_FILE_NAME   "MkLogFileC_py.c"

Definition at line 11 of file MkLogFileC_py.c.

◆ MkLogFileCTT

#define MkLogFileCTT   MK(MkKernelThreadState).MkLogFileCTT

Definition at line 40 of file MkLogFileC_py.c.

◆ new_doc

#define new_doc   "MkLogFileC MkLogFileC.new(fmtobj:MkObjectC, file:string)"

Definition at line 100 of file MkLogFileC_py.c.

◆ Next_doc

#define Next_doc   "MkLogFileC lfl.Next()"

Definition at line 108 of file MkLogFileC_py.c.

◆ Open_doc

#define Open_doc   "MkLogFileC MkLogFileC.Open(fmtobj:MkObjectC, file:string)"

doc definition

Definition at line 99 of file MkLogFileC_py.c.

◆ OT_CLASS

#define OT_CLASS   (&NS(MkLogFileCR))

Definition at line 16 of file MkLogFileC_py.c.

◆ OT_CLASS_NAME

#define OT_CLASS_NAME   "MkLogFileC"

Definition at line 17 of file MkLogFileC_py.c.

◆ OT_LNG2META

#define OT_LNG2META ( O)
Value:
#define VAL2MNG(val)
static MK_LFL MkLfl(MK_MNG mng)
cast a unknown-object into an MkLogFileS pointer or NULL if not possible

Definition at line 19 of file MkLogFileC_py.c.

◆ OT_retObj_CONSTR

#define OT_retObj_CONSTR ( mng)
Value:
OT_retObj_SET(NS(MkLogFileC_CTOR)(MK_RT_CALL (PyTypeObject*)class,mng))
#define OT_retObj_SET(val)

Definition at line 21 of file MkLogFileC_py.c.

◆ OT_SETUP_hdl

#define OT_SETUP_hdl   OT_SETUP_hdl_tmpl(MkLogFileC)

Definition at line 23 of file MkLogFileC_py.c.

◆ OT_SETUP_hdl__null_allow

#define OT_SETUP_hdl__null_allow   OT_SETUP_hdl_tmpl__null_allow(MkLogFileC)

Definition at line 24 of file MkLogFileC_py.c.

◆ OT_SETUP_hdl_constr

#define OT_SETUP_hdl_constr
Value:
struct MkLogFileS * MK_LFL
class-shortcut for struct MkLogFileS *, all shortcut using the XX_YYY syntax (only for public API) …
#define AllRtSetup_NULL
#define MK_RT_UNUSED

Definition at line 25 of file MkLogFileC_py.c.

25#define OT_SETUP_hdl_constr MK_RT_UNUSED AllRtSetup_NULL; \
26 MK_LFL hdl = (MK_LFL) OT_CLASS;

◆ OT_SETUP_hdl_destr

#define OT_SETUP_hdl_destr   OT_SETUP_hdl_tmpl__null_allow(MkLogFileC)

Definition at line 27 of file MkLogFileC_py.c.

◆ OT_SETUP_hdl_static

#define OT_SETUP_hdl_static
Value:
__attribute__((unused)) MK_TYP hdl = MkLogFileC##_TT;
MkTypeS - class known as typ or type is used as class-base for a Managed-Object-Technology (MOT) type...

Definition at line 28 of file MkLogFileC_py.c.

28#define OT_SETUP_hdl_static MK_RT_UNUSED AllRtSetup_NULL; \
29 __attribute__((unused)) MK_TYP hdl = MkLogFileC##_TT;

◆ OT_SETUP_hdl_static_constr

#define OT_SETUP_hdl_static_constr   OT_SETUP_hdl_static

Definition at line 31 of file MkLogFileC_py.c.

◆ Prev_doc

#define Prev_doc   "MkLogFileC lfl.Prev()"

Definition at line 109 of file MkLogFileC_py.c.

◆ SetupRtFromObj_X

#define SetupRtFromObj_X ( hdl)
Value:
#define AllRtSetup_X(x)

Definition at line 34 of file MkLogFileC_py.c.

◆ SetupRtFromObj_XN

#define SetupRtFromObj_XN ( hdl)
Value:
#define AllRtSetup_XN(x)

Definition at line 35 of file MkLogFileC_py.c.

◆ WriteC_doc

#define WriteC_doc   "lfl.WriteC(text:string) (const)"

Definition at line 113 of file MkLogFileC_py.c.

Function Documentation

◆ pymkkernel_MkLogFileC_CTOR()

static OT_OBJ_T pymkkernel_MkLogFileC_CTOR ( MK_RT mkrt,
OT_CLS_T type,
MK_LFL hdl )
inlinestatic

Definition at line 44 of file MkLogFileC_py.c.

44 {
45 return MK(AtomCreate)(MK_RT_CALL type,MkLogFileC_X2obj(hdl));
46}
#define MkLogFileC_X2obj(x)

◆ pymkkernel_MkLogFileC_selfCreate()

static MK_PTR pymkkernel_MkLogFileC_selfCreate ( MK_RT mkrt,
MK_OBJ const obj,
MK_PTR const env )
static

Definition at line 51 of file MkLogFileC_py.c.

51 {
52 return MK(AtomCreate) (MK_RT_CALL OT_CLASS,obj);
53}

◆ pymkkernel_MkLogFileC_selfDelete()

static void pymkkernel_MkLogFileC_selfDelete ( MK_RT mkrt,
MK_PTR self,
MK_PTR const env )
static

Definition at line 55 of file MkLogFileC_py.c.

55 {
56 MK(AtomDeleteHard) (MK_RT_CALL OT_SELF);
57}
#define OT_SELF

◆ pymkkernel_MkLogFileC_selfUnlink()

static void pymkkernel_MkLogFileC_selfUnlink ( MK_RT mkrt,
MK_PTR self,
MK_PTR const env )
static

Definition at line 59 of file MkLogFileC_py.c.

59 {
60 MkObjectC_Obj *selfO = (MkObjectC_Obj*) self;
61 selfO->hdl = NULL;
62}
PyObject_HEAD MK_OBJ hdl

◆ pymkkernel_pMkLogFileC_Init()

int pymkkernel_pMkLogFileC_Init ( MK_RT mkrt,
PyObject * m )

Definition at line 389 of file MkLogFileC_py.c.

390{
391
393
394 return 0;
395error:
396 return -1;
397}
#define ClassInit

Variable Documentation

◆ pymkkernel_MkLogFileC_Methods

PyMethodDef pymkkernel_MkLogFileC_Methods[]
static

Object definition

Definition at line 339 of file MkLogFileC_py.c.

339 {
340
341 // BEGIN-CLASS - created by 'py_MqS.tcl -i NHI1_HOME/theKernel/c/gen/c_mkkernel.meta' - DO NOT change
342
343 // doc-key: MkLogFileC,MkLogFile,sCo
344 { "Open" , (PyCFunction) NS(MkLogFileC_Open) , METH_VARARGS|METH_CLASS , Open_doc },
345
346 // doc-key: MkLogFileC,MkLogFile,sc_
347 { "GetNull" , (PyCFunction) NS(MkLogFileC_GetNull) , METH_NOARGS|METH_CLASS , GetNull_doc },
348 { "HandleResolve" , (PyCFunction) NS(MkLogFileC_HandleResolve) , METH_O|METH_CLASS , HandleResolve_doc },
349 { "Instances" , (PyCFunction) NS(MkLogFileC_Instances) , METH_NOARGS|METH_CLASS , Instances_doc },
350
351 // END-CLASS - created by 'py_MqS.tcl -i NHI1_HOME/theKernel/c/gen/c_mkkernel.meta' - DO NOT change
352
353 // BEGIN-OBJ - created by 'py_MqS.tcl -i NHI1_HOME/theKernel/c/gen/c_mkkernel.meta' - DO NOT change
354
355 // doc-key: MkLogFileC,MkLogFile,oc_
356 { "Next" , (PyCFunction) NS(MkLogFileC_Next) , METH_NOARGS , Next_doc },
357 { "Prev" , (PyCFunction) NS(MkLogFileC_Prev) , METH_NOARGS , Prev_doc },
358
359 // doc-key: MkLogFileC,MkLogFile,om_
360 // skip class-overload: MkLogFileHandleGet → HandleGet, NS(MkLogFileC_HandleGet)
361 { "WriteC" , (PyCFunction) NS(MkLogFileC_WriteC) , METH_O , WriteC_doc },
362
363 // doc-key: MkLogFileC,MkLogFile,omo
364 { "GetFile" , (PyCFunction) NS(MkLogFileC_GetFile) , METH_NOARGS , GetFile_doc },
365
366 // END-OBJ - created by 'py_MqS.tcl -i NHI1_HOME/theKernel/c/gen/c_mkkernel.meta' - DO NOT change
367
368 {NULL, NULL, 0, NULL} /* Sentinel */
369};
#define Instances_doc
#define GetFile_doc
#define GetNull_doc
#define WriteC_doc
#define Next_doc
#define HandleResolve_doc
#define Prev_doc
#define Open_doc

◆ pymkkernel_MkLogFileCR

OT_CLASS_TYPE_REF pymkkernel_MkLogFileCR
Initial value:
= {
PyVarObject_HEAD_INIT(NULL, 0)
.tp_name = "pymkkernel.MkLogFileC",
.tp_doc = "PyMkKernel MkLogFileC Type",
.tp_basicsize = sizeof(MkLogFileC_Obj),
.tp_itemsize = 0,
.tp_flags = Py_TPFLAGS_DEFAULT,
.tp_base = NULL
}
struct MkLogFileC_Obj MkLogFileC_Obj
static PyMethodDef pymkkernel_MkLogFileC_Methods[]
static OT_ProcRet pymkkernel_MkLogFileC_new(CONSTR_ARGS)
Python: [constructor,static] MkLogFileC MkLogFileC.new(fmtobj:MkObjectC, file:string) → C-API op...

Public API

Definition at line 377 of file MkLogFileC_py.c.

377 {
378 PyVarObject_HEAD_INIT(NULL, 0)
379 .tp_name = "pymkkernel.MkLogFileC",
380 .tp_doc = "PyMkKernel MkLogFileC Type",
381 .tp_basicsize = sizeof(MkLogFileC_Obj),
382 .tp_itemsize = 0,
383 .tp_new = NS(MkLogFileC_new),
384 .tp_methods = NS(MkLogFileC_Methods),
385 .tp_flags = Py_TPFLAGS_DEFAULT,
386 .tp_base = NULL
387 };