theKernel 10.0
Loading...
Searching...
No Matches
MkLogFileC_cc.hh
Go to the documentation of this file.
1
9/* LABEL-INIT */
10
11#pragma once
12
13namespace ccmkkernel {
14
15 class MkLogFileC;
16
19 typedef struct {
23
26 class MkLogFileC : public MkObjectC {
27
28 friend class MkKernel;
29
30/* LABEL-START */
31
34
35 public:
36 static thread_local MkLogFileC MK_NULL_REF;
37
38 private:
39
40 static MkLogFileC* MkLogFileC_GetSelf (MK_LFL hdl) {
41 return (hdl != NULL ? static_cast<MkLogFileC*>((*MkLogFileC_X2obj(hdl)).self) : &MK_NULL_REF);
42 }
43
44 #ifdef MkLogFileC_selfCreate_overload
45 static MK_PTR MkLogFileC_selfCreate (MK_RT_ARGS MK_OBJ obj, MK_PTR const env);
46 #else
47 static MK_PTR MkLogFileC_selfCreate (MK_RT_ARGS MK_OBJ obj, MK_PTR const env) {
48 return new MkLogFileC(obj);
49 }
50 #endif
51
52 static void MkLogFileC_selfDelete (MK_RT_ARGS MK_PTR self, MK_PTR env) {
53 delete static_cast<MkLogFileC*>(self);
54 }
55
56 static void MkLogFileC_selfUnlink (MK_RT_ARGS MK_PTR self, MK_PTR env) {
57 MkLogFileC* selfO = static_cast<MkLogFileC*>(self);
58 selfO->atomUnlink();
59 }
60
61 void MkLogFileC_Init (MK_LFL hdl) { atomInit(MkLogFileC_X2obj(hdl)); };
62
63
64 static MkLogFileC* MkLogFileC_ObjCreate (MK_RT_ARGS MK_LFL hdl) {
65 return static_cast<MkLogFileC*>(MkObjectC::atomObjCreate(MK_RT_CALL MkLogFileC_X2obj(hdl)));
66 }
67
68#ifndef META_IS_MkObjectC
69 MkLogFileC (MK_OBJ obj) : MkObjectC(obj) {};
70#endif
71
72 public:
73
74#ifndef META_IS_MkObjectC
76#endif
77
82
84 MK_LFL getLFL() const {
85 MK_LFL ret = reinterpret_cast<MK_LFL>(hdl);
86 if (unlikely(ret == NULL)) InstHdlIsNullError();
87 return ret;
88 };
89
92 return reinterpret_cast<MK_LFL>(hdl);
93 };
94
96 MK_LFLN getLFLN() const {
97 MK_LFLN ret = reinterpret_cast<MK_LFLN>(hdl);
98 if (unlikely(ret == NULL)) InstHdlIsNullError();
99 return ret;
100 };
101
104 return reinterpret_cast<MK_LFLN>(hdl);
105 };
106
108 static MK_LFL getLFL(MkLogFileC* clsHdl) {
109 MK_LFL ret = clsHdl ? reinterpret_cast<MK_LFL>(clsHdl->hdl) : NULL;
110 if (unlikely(ret == NULL)) ClassHdlIsNullError(MkLogFileC);
111 return ret;
112 };
113
116 return clsHdl ? reinterpret_cast<MK_LFL>(clsHdl->hdl) : NULL;
117 };
118
120 static MK_LFLN getLFLN(const MkLogFileC* clsHdl) {
121 MK_LFLN ret = clsHdl ? reinterpret_cast<MK_LFLN>(clsHdl->hdl) : NULL;
122 if (unlikely(ret == NULL)) ClassHdlIsNullError(MkLogFileC);
123 return ret;
124 };
125
127 static MK_LFLN getLFLN__null_allow(const MkLogFileC* clsHdl) {
128 return clsHdl ? reinterpret_cast<MK_LFLN>(clsHdl->hdl) : NULL;
129 };
130
132 static MK_LFL getLFL(const MkLogFileC& clsHdl) {
133 return clsHdl.getLFL();
134 };
135
137 static MK_LFL getLFL__null_allow(const MkLogFileC& clsHdl) {
138 return clsHdl.getLFL__null_allow();
139 };
140
142 static MK_LFLN getLFLN(const MkLogFileC& clsHdl) {
143 return clsHdl.getLFLN();
144 };
145
147 static MK_LFLN getLFLN__null_allow(const MkLogFileC& clsHdl) {
148 return clsHdl.getLFLN__null_allow();
149 };
150
152 bool Check() const {
153 return (hdl && MkLflCheck(hdl));
154 };
155
156/* LABEL-END */
157
158 private:
159
160 MkLogFileC () {};
161
162 public:
163
164 // BEGIN-MkLogFileC - created by 'cc_MqS.tcl -i NHI1_HOME/theKernel/c/gen/c_mkkernel.meta' - DO NOT change
165
169
170 public:
171
172 // doc-key: MkLogFileC,MkLogFileC-Class-Export,sc_,public
173
175 static MkLogFileC* HandleResolve (MK_HDL netHdl);
176
177 // doc-key: MkLogFileC,MkLogFileC-Class-Export,om_,public
178
179 // skip class-overload: MK_HDL HandleGet ()
180
182 // MkLogFileC_Class_CC_API
183
187
188 public:
189
190 // doc-key: MkLogFileC,MkLogFileC-Class-Introspection,oc_,public
191
193 MkLogFileC* Next ();
194
196 MkLogFileC* Prev ();
197
198 // doc-key: MkLogFileC,MkLogFileC-Class-Introspection,sc_,public
199
201 static MkLogFileC* Instances ();
202
204 // MkLogFileC_Class_CC_API
205
209
210 public:
211
212 // doc-key: MkLogFileC,MkLogFileC-Class-Misc,sc_,public
213
215 static MkLogFileC* GetNull ();
216
218 // MkLogFileC_Class_CC_API
219
223
224 private:
225
226 // doc-key: MkLogFileC,MkLogFileC-TOR,sCo,private
227
229 static MK_OBJ CTOR (const MkObjectC* fmtobj, MK_STRN file);
230
232 static MK_OBJ CTOR (const MkObjectC* fmtobj, const std::string& file);
233
234 public:
235
236 // doc-key: MkLogFileC,MkLogFileC-TOR,sCo,public
237
239 static MkLogFileC* Open (const MkObjectC* fmtobj, MK_STRN file);
240
242 MkLogFileC (const MkObjectC* fmtobj, MK_STRN file) : MkObjectC(CTOR(fmtobj, file)) {};
243
245 static MkLogFileC* Open (const MkObjectC* fmtobj, const std::string& file);
246
248 MkLogFileC (const MkObjectC* fmtobj, const std::string& file) : MkObjectC(CTOR(fmtobj, file)) {};
249
251 // MkLogFileC_TOR_CC_API
252
256
257 public:
258
259 // doc-key: MkLogFileC,MkLogFileC-Write,om_,public
260
262 void WriteC (MK_STRN text) const;
263
265 void WriteC (const std::string& text) const;
266
268 void WriteV (MK_FST printfmt, ... ) const __attribute__ ((format (printf, 2, 3)));
269
271 void WriteVL (MK_FST printfmt, va_list var_list) const;
272
273 // doc-key: MkLogFileC,MkLogFileC-Write,omo,public
274
276 MK_STRN GetFile () const;
277
279 // MkLogFileC_Write_CC_API
280
281 // END-MkLogFileC - created by 'cc_MqS.tcl -i NHI1_HOME/theKernel/c/gen/c_mkkernel.meta' - DO NOT change
282
284 };
285} // namespace ccmkkernel
#define InstHdlIsNullError()
#define ClassHdlIsNullError(cls)
MkKernel PACKAGE - The package is the toplevel structure of the Programming-Language-Micro-Kernel (PL...
define a MkLogFileC object … → C-API: libmkkernel::MkLogFileS
object header … → C-API: libmkkernel::MkObjectS
#define unlikely(x)
MK_STRB const * MK_FST
const format string pointer data-type
int32_t MK_HDL
4 byte int handle data-type
int32_t MK_NUM
array size data-type ('num' items in array …
MK_PTRB * MK_PTR
generic pointer data-type
const MK_STRB * MK_STRN
constant string pointer data-type
static MkLogFileC * MkLogFileC_ObjNew(MK_RT_ARGS MK_LFL hdl)
return MkLogFileC from LibMsgqueObject
bool Check() const
check if pointer is still valid
MK_LFLN getLFLN__null_allow() const
(const) return the LibMsgqueObject from current MkLogFileC instance
static MK_LFLN getLFLN(const MkLogFileC &clsHdl)
(const) return LibMsgqueObject from current MkLogFileC reference
MK_LFL getLFL__null_allow() const
return the LibMsgqueObject from current MkLogFileC instance
static MK_LFLN getLFLN__null_allow(const MkLogFileC &clsHdl)
(const) return LibMsgqueObject from current MkLogFileC reference
static MK_LFL getLFL(const MkLogFileC &clsHdl)
return LibMsgqueObject from current MkLogFileC reference
MK_LFLN getLFLN() const
(const) return the LibMsgqueObject from current MkLogFileC instance
static thread_local MkLogFileC MK_NULL_REF
MK_LFL getLFL() const
return the LibMsgqueObject from current MkLogFileC instance
static MK_LFL getLFL__null_allow(MkLogFileC *clsHdl)
return LibMsgqueObject from current MkLogFileC pointer
static MK_LFL getLFL(MkLogFileC *clsHdl)
return LibMsgqueObject from current MkLogFileC pointer
static MK_LFLN getLFLN(const MkLogFileC *clsHdl)
(const) return LibMsgqueObject from current MkLogFileC pointer
static MK_LFLN getLFLN__null_allow(const MkLogFileC *clsHdl)
(const) return LibMsgqueObject from current MkLogFileC pointer
static MK_LFL getLFL__null_allow(const MkLogFileC &clsHdl)
return LibMsgqueObject from current MkLogFileC reference
static MkLogFileC * GetNull()
C++: [static] MkLogFileC* MkLogFileC::GetNull() → C-API Null-Slot - return a MkLogFileC typed NU...
MkLogFileC * Prev()
C++: MkLogFileC* lfl.Prev() → C-API get previous instance from linked-list of MkLogFileS type
MkLogFileC * Next()
C++: MkLogFileC* lfl.Next() → C-API get next instance from linked-list of MkLogFileS type
static MkLogFileC * Instances()
C++: [static] MkLogFileC* MkLogFileC::Instances() → C-API get head-instance from linked-list of ...
static MkLogFileC * HandleResolve(MK_HDL netHdl)
C++: [static] MkLogFileC* MkLogFileC::HandleResolve(MK_HDL netHdl) → C-API Handle-Resolve-Slot -...
struct MkLogFileS * MK_LFL
class-shortcut for struct MkLogFileS *, all shortcut using the XX_YYY syntax (only for public API) …
#define MkLogFileC_X2obj(x)
static bool MkLflCheck(MK_MNGN mng)
check MkLogFileS -> libmkkernel::MkObjectS::signature …
static MkLogFileC * Open(const MkObjectC *fmtobj, MK_STRN file)
C++: [constructor,static] MkLogFileC* MkLogFileC::Open(const MkObjectC* fmtobj, MK_STRN file) → C-AP...
MkLogFileC(const MkObjectC *fmtobj, const std::string &file)
C++: [constructor,static] MkLogFileC* MkLogFileC::Open(const MkObjectC* fmtobj, MK_STRN file) → C-AP...
MkLogFileC(const MkObjectC *fmtobj, MK_STRN file)
C++: [constructor,static] MkLogFileC* MkLogFileC::Open(const MkObjectC* fmtobj, MK_STRN file) → C-AP...
void WriteVL(MK_FST printfmt, va_list var_list) const
C++: lfl.WriteVL(MK_FST printfmt, va_list var_list) → C-API write to log-file …
MK_STRN GetFile() const
C++: MK_STRN lfl.GetFile() → C-API get the log-file …
void WriteC(MK_STRN text) const
C++: lfl.WriteC(MK_STRN text) → C-API write to log-file …
void WriteV(MK_FST printfmt,...) const
C++: lfl.WriteV(MK_FST printfmt, ... ) → C-API write to log-file …
static MK_PTR atomObjCreate(MK_RT_ARGS MK_OBJ obj)
void atomInit(MK_OBJ obj)
static MK_PTR atomObjNew(MK_RT_ARGS MK_OBJ obj)
struct MkObjectS * MK_OBJ
class-shortcut for struct MkObjectS *, all shortcut using the XX_YYY syntax (only for public API) …
#define MK_RT_CALL
#define MK_RT_ARGS
namespace for the CcMkKernel "C++"-API
define a MkLogFileC object … → C-API: libmkkernel::MkLogFileS
define a MkLogFileC object …