theKernel 10.0
Loading...
Searching...
No Matches
MkBufferStreamC_cc.hh
Go to the documentation of this file.
1
9/* LABEL-INIT */
10
11#pragma once
12
13#define MkBufferStreamC_selfCreate_overload
14
15namespace ccmkkernel {
16
17 class MkBufferStreamC;
18
25
28 class MkBufferStreamC : public MkObjectC {
29
30 friend class MkKernel;
31
32 private:
33 inline static MK_PTR MkBufferStreamC_selfCreateTLS (MK_OBJ obj);
34
35/* LABEL-START */
36
39
40 public:
41 static thread_local MkBufferStreamC MK_NULL_REF;
42
43 private:
44
45 static MkBufferStreamC* MkBufferStreamC_GetSelf (MK_BUS hdl) {
46 return (hdl != NULL ? static_cast<MkBufferStreamC*>((*MkBufferStreamC_X2obj(hdl)).self) : &MK_NULL_REF);
47 }
48
49 #ifdef MkBufferStreamC_selfCreate_overload
50 static MK_PTR MkBufferStreamC_selfCreate (MK_RT_ARGS MK_OBJ obj, MK_PTR const env);
51 #else
52 static MK_PTR MkBufferStreamC_selfCreate (MK_RT_ARGS MK_OBJ obj, MK_PTR const env) {
53 return new MkBufferStreamC(obj);
54 }
55 #endif
56
57 static void MkBufferStreamC_selfDelete (MK_RT_ARGS MK_PTR self, MK_PTR env) {
58 delete static_cast<MkBufferStreamC*>(self);
59 }
60
61 static void MkBufferStreamC_selfUnlink (MK_RT_ARGS MK_PTR self, MK_PTR env) {
62 MkBufferStreamC* selfO = static_cast<MkBufferStreamC*>(self);
63 selfO->atomUnlink();
64 }
65
66 void MkBufferStreamC_Init (MK_BUS hdl) { atomInit(MkBufferStreamC_X2obj(hdl)); };
67
68
69 static MkBufferStreamC* MkBufferStreamC_ObjCreate (MK_RT_ARGS MK_BUS hdl) {
70 return static_cast<MkBufferStreamC*>(MkObjectC::atomObjCreate(MK_RT_CALL MkBufferStreamC_X2obj(hdl)));
71 }
72
73#ifndef META_IS_MkObjectC
74 MkBufferStreamC (MK_OBJ obj) : MkObjectC(obj) {};
75#endif
76
77 public:
78
79#ifndef META_IS_MkObjectC
81#endif
82
87
89 MK_BUS getBUS() const {
90 MK_BUS ret = reinterpret_cast<MK_BUS>(hdl);
91 if (unlikely(ret == NULL)) InstHdlIsNullError();
92 return ret;
93 };
94
97 return reinterpret_cast<MK_BUS>(hdl);
98 };
99
101 MK_BUSN getBUSN() const {
102 MK_BUSN ret = reinterpret_cast<MK_BUSN>(hdl);
103 if (unlikely(ret == NULL)) InstHdlIsNullError();
104 return ret;
105 };
106
109 return reinterpret_cast<MK_BUSN>(hdl);
110 };
111
113 static MK_BUS getBUS(MkBufferStreamC* clsHdl) {
114 MK_BUS ret = clsHdl ? reinterpret_cast<MK_BUS>(clsHdl->hdl) : NULL;
116 return ret;
117 };
118
121 return clsHdl ? reinterpret_cast<MK_BUS>(clsHdl->hdl) : NULL;
122 };
123
125 static MK_BUSN getBUSN(const MkBufferStreamC* clsHdl) {
126 MK_BUSN ret = clsHdl ? reinterpret_cast<MK_BUSN>(clsHdl->hdl) : NULL;
128 return ret;
129 };
130
133 return clsHdl ? reinterpret_cast<MK_BUSN>(clsHdl->hdl) : NULL;
134 };
135
137 static MK_BUS getBUS(const MkBufferStreamC& clsHdl) {
138 return clsHdl.getBUS();
139 };
140
143 return clsHdl.getBUS__null_allow();
144 };
145
147 static MK_BUSN getBUSN(const MkBufferStreamC& clsHdl) {
148 return clsHdl.getBUSN();
149 };
150
153 return clsHdl.getBUSN__null_allow();
154 };
155
157 bool Check() const {
158 return (hdl && MkBusCheck(hdl));
159 };
160
161/* LABEL-END */
162
163 public:
164
165 inline MkBufferStreamC (const MkBufferStreamC* hdl);
166 inline MkBufferStreamC (const MkBufferStreamC& ref);
167 inline MkBufferStreamC& operator= (const MkBufferStreamC& buf);
168 inline MkBufferStreamC& operator= (const MkBufferStreamC* buf);
169
170 private:
171
172 //MkBufferStreamC () {};
173
174 public:
175
176 // BEGIN-MkBufferStreamC - created by 'cc_MqS.tcl -i NHI1_HOME/theKernel/c/gen/c_mkkernel.meta' - DO NOT change
177
181
182 public:
183
184 // doc-key: MkBufferStreamC,MkBufferStreamC-Class-Export,sc_,public
185
187 static MkBufferStreamC* HandleResolve (MK_HDL netHdl);
188
189 // doc-key: MkBufferStreamC,MkBufferStreamC-Class-Export,om_,public
190
191 // skip class-overload: MK_HDL HandleGet ()
192
194 // MkBufferStreamC_Class_CC_API
195
199
200 public:
201
202 // doc-key: MkBufferStreamC,MkBufferStreamC-Class-Introspection,oc_,public
203
206
209
210 // doc-key: MkBufferStreamC,MkBufferStreamC-Class-Introspection,sc_,public
211
213 static MkBufferStreamC* Instances ();
214
216 // MkBufferStreamC_Class_CC_API
217
221
222 public:
223
224 // doc-key: MkBufferStreamC,MkBufferStreamC-Class-Misc,sc_,public
225
227 static MkBufferStreamC* GetNull ();
228
230 // MkBufferStreamC_Class_CC_API
231
235
236 public:
237
238 // doc-key: MkBufferStreamC,MkBufferStreamC-Misc,oc_,public
239
241 MkBufferStreamC* Copy (const MkBufferStreamC* src) const;
242
244 MkBufferStreamC* Copy (const MkBufferStreamC& src) const;
245
248
250 MkBufferListC* ToBFL () const;
251
252 // doc-key: MkBufferStreamC,MkBufferStreamC-Misc,om_,public
253
254 // skip class-overload: void Log (const MkObjectC* fmtobj = NULL, MK_DBG debug = 0, MK_STRN callfunc = __builtin_FUNCTION(), MK_I32 lvl = 0) const
255
256 // skip class-overload: void Log (const MkObjectC& fmtobj, MK_DBG debug = 0, MK_STRN callfunc = __builtin_FUNCTION(), MK_I32 lvl = 0) const
257
259 void PosToStart ();
260
262 void ResetFull ();
263
264 // skip class-overload: MK_STRN ToString () const
265
267 // MkBufferStreamC_Misc_CC_API
268
272
273 public:
274
275 // doc-key: MkBufferStreamC,MkBufferStreamC-Read,oci,public
276
278 MkBufferListC* ReadALL (MkBufferListC* val_inout = NULL);
279
280 // doc-key: MkBufferStreamC,MkBufferStreamC-Read,oco,public
281
284
286 MkBufferC* ReadBUF ();
287
288 // doc-key: MkBufferStreamC,MkBufferStreamC-Read,om_,public
289
291 MkTypeE ReadGetNextType () const;
292
294 MK_NUM ReadGetNumItems () const;
295
297 MK_BOOL ReadItemExists () const;
298
300 void ReadL_END ();
301
303 void ReadL_START (MkBufferC* buf = NULL);
304
306 void ReadL_START (const MkBufferC& buf);
307
309 void ReadUndo ();
310
311 // doc-key: MkBufferStreamC,MkBufferStreamC-Read,omo,public
312
314 MK_BNP ReadBIN ();
315
317 MK_BOL ReadBOL ();
318
320 MK_DBL ReadDBL ();
321
323 MK_FLT ReadFLT ();
324
326 MK_I32 ReadI32 ();
327
329 MK_I64 ReadI64 ();
330
332 MK_I8 ReadI8 ();
333
335 MK_LONG ReadLONG ();
336
338 MK_STRN ReadSTR ();
339
341 // MkBufferStreamC_Read_CC_API
342
346
347 private:
348
349 // doc-key: MkBufferStreamC,MkBufferStreamC-TOR,sCc,private
350
352 static MK_OBJ CTOR (MK_NUM size = 0);
353
354 public:
355
356 // doc-key: MkBufferStreamC,MkBufferStreamC-TOR,oC_,public
357
360
361 // doc-key: MkBufferStreamC,MkBufferStreamC-TOR,oCx,public
362
364 MkBufferStreamC* Dup () const;
365
366 // doc-key: MkBufferStreamC,MkBufferStreamC-TOR,sCc,public
367
369 static MkBufferStreamC* Create (MK_NUM size = 0);
370
372 MkBufferStreamC (MK_NUM size = 0) : MkObjectC(CTOR(size)) {};
373
375 static MkBufferStreamC* Create1024 (MK_NUM size = 0);
376
378 static MkBufferStreamC* Create16384 (MK_NUM size = 0);
379
381 static MkBufferStreamC* Create256 (MK_NUM size = 0);
382
384 static MkBufferStreamC* Create64 (MK_NUM size = 0);
385
386 // doc-key: MkBufferStreamC,MkBufferStreamC-TOR,sc_,public
387
389 static MkBufferStreamC* CreateTLS (MK_STRN tlsName, MK_BOOL resetB = true);
390
392 static MkBufferStreamC* CreateTLS (const std::string& tlsName, MK_BOOL resetB = true);
393
395 // MkBufferStreamC_TOR_CC_API
396
400
401 public:
402
403 // doc-key: MkBufferStreamC,MkBufferStreamC-Write,om_,public
404
406 void WriteBFL (const MkBufferListC* bfl);
407
409 void WriteBFL (const MkBufferListC& bfl);
410
412 void WriteBIN (MK_BNP val);
413
415 void WriteBOL (MK_BOL val);
416
418 void WriteBUF (const MkBufferC* val);
419
421 void WriteBUF (const MkBufferC& val);
422
424 void WriteBUS_FLAT (const MkBufferStreamC* add);
425
427 void WriteBUS_FLAT (const MkBufferStreamC& add);
428
430 void WriteDBL (MK_DBL val);
431
433 void WriteFLT (MK_FLT val);
434
436 void WriteHDL (MK_I32 val);
437
439 void WriteI32 (MK_I32 val);
440
442 void WriteI64 (MK_I64 val);
443
445 void WriteI8 (MK_I8 val);
446
448 void WriteLONG (MK_LONG val);
449
451 void WriteL_END ();
452
454 void WriteL_FLAT (MkBufferListC* bfl);
455
457 void WriteL_FLAT (const MkBufferListC& bfl);
458
460 void WriteL_START ();
461
463 void WriteSTR (MK_STRN val, MK_NUM len = -1);
464
466 void WriteSTR (const std::string& val, MK_NUM len = -1);
467
469 void WriteV (MK_STRN fmt, ... );
470
472 void WriteV (const std::string& fmt, ... );
473
475 void WriteVL (MK_STRN fmt, va_list ap);
476
478 void WriteVL (const std::string& fmt, va_list ap);
479
481 // MkBufferStreamC_Write_CC_API
482
483 // END-MkBufferStreamC - created by 'cc_MqS.tcl -i NHI1_HOME/theKernel/c/gen/c_mkkernel.meta' - DO NOT change
484
486 };
487} // namespace ccmkkernel
#define InstHdlIsNullError()
#define ClassHdlIsNullError(cls)
The ABSTRACT-CLASS used to store a native-type-data-item defined by PRIMITIVE TYPE … → C-API: libm...
The CLASS used to store a list of MkBufferS items into a flat array… → C-API: libmkkernel::MkBuffe...
The ABSTRACT-CLASS MkBufferStreamS is used for package-based serialized IO … → C-API: libmkkernel:...
MkKernel PACKAGE - The package is the toplevel structure of the Programming-Language-Micro-Kernel (PL...
object header … → C-API: libmkkernel::MkObjectS
static thread_local MkBufferStreamC MK_NULL_REF
static MK_BUS getBUS(MkBufferStreamC *clsHdl)
return LibMsgqueObject from current MkBufferStreamC pointer
static MK_BUS getBUS(const MkBufferStreamC &clsHdl)
return LibMsgqueObject from current MkBufferStreamC reference
static MK_BUSN getBUSN(const MkBufferStreamC *clsHdl)
(const) return LibMsgqueObject from current MkBufferStreamC pointer
static MK_BUSN getBUSN__null_allow(const MkBufferStreamC &clsHdl)
(const) return LibMsgqueObject from current MkBufferStreamC reference
static MK_BUS getBUS__null_allow(MkBufferStreamC *clsHdl)
return LibMsgqueObject from current MkBufferStreamC pointer
MK_BUSN getBUSN() const
(const) return the LibMsgqueObject from current MkBufferStreamC instance
MK_BUS getBUS() const
return the LibMsgqueObject from current MkBufferStreamC instance
MK_BUSN getBUSN__null_allow() const
(const) return the LibMsgqueObject from current MkBufferStreamC instance
MK_BUS getBUS__null_allow() const
return the LibMsgqueObject from current MkBufferStreamC instance
static MkBufferStreamC * MkBufferStreamC_ObjNew(MK_RT_ARGS MK_BUS hdl)
return MkBufferStreamC from LibMsgqueObject
static MK_BUS getBUS__null_allow(const MkBufferStreamC &clsHdl)
return LibMsgqueObject from current MkBufferStreamC reference
bool Check() const
check if pointer is still valid
MkBufferStreamC & operator=(const MkBufferStreamC &buf)
static MK_BUSN getBUSN(const MkBufferStreamC &clsHdl)
(const) return LibMsgqueObject from current MkBufferStreamC reference
static MK_BUSN getBUSN__null_allow(const MkBufferStreamC *clsHdl)
(const) return LibMsgqueObject from current MkBufferStreamC pointer
static MkBufferStreamC * Instances()
C++: [static] MkBufferStreamC* MkBufferStreamC::Instances() → C-API get head-instance from linke...
MkBufferStreamC * Next()
C++: MkBufferStreamC* bus.Next() → C-API get next instance from linked-list of MkBufferStreamS ...
MkBufferStreamC * Prev()
C++: MkBufferStreamC* bus.Prev() → C-API get previous instance from linked-list of MkBufferStre...
static MkBufferStreamC * HandleResolve(MK_HDL netHdl)
C++: [static] MkBufferStreamC* MkBufferStreamC::HandleResolve(MK_HDL netHdl) → C-API Handle-Reso...
static MkBufferStreamC * GetNull()
C++: [static] MkBufferStreamC* MkBufferStreamC::GetNull() → C-API Null-Slot - return a MkBufferS...
struct MkBufferStreamS * MK_BUS
class-shortcut for struct MkBufferStreamS *, all shortcut using the XX_YYY syntax (only for public AP...
#define MkBufferStreamC_X2obj(x)
static bool MkBusCheck(MK_MNGN mng)
check MkBufferStreamS -> libmkkernel::MkObjectS::signature …
void PosToStart()
C++: bus.PosToStart() → C-API set the current-access-position to the start of MkBufferStreamC …
MkBufferStreamC * Copy(const MkBufferStreamC *src) const
C++: MkBufferStreamC* bus.Copy(const MkBufferStreamC* src) → C-API copy the MkBufferStreamC fro...
void ResetFull()
C++: bus.ResetFull() → C-API reset a MkBufferStreamC to the length zero and free allocated stor...
MkBufferStreamC * Reset()
C++: MkBufferStreamC* bus.Reset() → C-API reset a MkBufferStreamC to the length zero …
MkBufferListC * ToBFL() const
C++: MkBufferListC* bus.ToBFL() → C-API convert the bus into a MkBufferListC …
MkBufferC * ReadBUF()
C++: MkBufferC* bus.ReadBUF() → C-API read a val_out from the MkBufferStreamC …
MK_STRN ReadSTR()
C++: doc_mk_cc_BufferStreamReadSTR → C-API read a val_out from the MkBufferStreamC …
void ReadL_START(MkBufferC *buf=NULL)
C++: bus.ReadL_START(MkBufferC* buf = NULL) → C-API START read a list-item-type from the MkBuff...
MK_LONG ReadLONG()
C++: MK_LONG bus.ReadLONG() → C-API read the long native object from the MkBufferStreamC …
MK_FLT ReadFLT()
C++: doc_mk_cc_BufferStreamReadFLT → C-API read a val_out from the MkBufferStreamC …
void ReadUndo()
C++: bus.ReadUndo() → C-API undo the last MkBufferStreamC READ function call …
void ReadL_END()
C++: bus.ReadL_END() → C-API END read a list-item-type from the MkBufferStreamC …
MK_NUM ReadGetNumItems() const
C++: MK_NUM bus.ReadGetNumItems() → C-API get the number of items left in the MkBufferStreamC …
MK_BOOL ReadItemExists() const
C++: MK_BOOL bus.ReadItemExists() → C-API check if an item exists in the read-data-package …
MK_I8 ReadI8()
C++: doc_mk_cc_BufferStreamReadI8 → C-API read a val_out from the MkBufferStreamC …
MK_BOL ReadBOL()
C++: doc_mk_cc_BufferStreamReadBOL → C-API read a val_out from the MkBufferStreamC …
MkBufferListC * ReadALL(MkBufferListC *val_inout=NULL)
C++: MkBufferListC* bus.ReadALL(MkBufferListC* val_inout = NULL) → C-API get a temporary MkBuff...
MkBufferListC * ReadBFL()
C++: MkBufferListC* bus.ReadBFL() → C-API read a MkBufferListC from the MkBufferStreamC …
MkTypeE ReadGetNextType() const
C++: MkTypeE bus.ReadGetNextType() → C-API get the type (MkTypeE) of the next Item in the MkBuf...
MK_DBL ReadDBL()
C++: doc_mk_cc_BufferStreamReadDBL → C-API read a val_out from the MkBufferStreamC …
MK_BNP ReadBIN()
C++: doc_mk_cc_BufferStreamReadBIN → C-API read a val_out from the MkBufferStreamC …
MK_I32 ReadI32()
C++: doc_mk_cc_BufferStreamReadI32 → C-API read a val_out from the MkBufferStreamC …
MK_I64 ReadI64()
C++: doc_mk_cc_BufferStreamReadI64 → C-API read a val_out from the MkBufferStreamC …
MkBufferStreamC * Merge()
C++: [constructor] MkBufferStreamC* bus.Merge() → C-API Merge-Constructor - create a new MkBuffe...
static MkBufferStreamC * Create256(MK_NUM size=0)
C++: [constructor,static] MkBufferStreamC* MkBufferStreamC::Create256(MK_NUM size = 0) → C-API c...
static MkBufferStreamC * Create(MK_NUM size=0)
C++: [constructor,static] MkBufferStreamC* MkBufferStreamC::Create(MK_NUM size = 0) → C-API crea...
MkBufferStreamC * Dup() const
C++: [constructor] MkBufferStreamC* src.Dup() → C-API Dup-Constructor - create a new MkBufferStr...
MkBufferStreamC(MK_NUM size=0)
C++: [constructor,static] MkBufferStreamC* MkBufferStreamC::Create(MK_NUM size = 0) → C-API crea...
static MkBufferStreamC * CreateTLS(MK_STRN tlsName, MK_BOOL resetB=true)
C++: [static] MkBufferStreamC* MkBufferStreamC::CreateTLS(MK_STRN tlsName, MK_BOOL resetB = true) → ...
static MkBufferStreamC * Create64(MK_NUM size=0)
C++: [constructor,static] MkBufferStreamC* MkBufferStreamC::Create64(MK_NUM size = 0) → C-API ca...
static MkBufferStreamC * Create1024(MK_NUM size=0)
C++: [constructor,static] MkBufferStreamC* MkBufferStreamC::Create1024(MK_NUM size = 0) → C-API ...
static MkBufferStreamC * Create16384(MK_NUM size=0)
C++: [constructor,static] MkBufferStreamC* MkBufferStreamC::Create16384(MK_NUM size = 0) → C-API ...
void WriteBOL(MK_BOL val)
C++: doc_mk_cc_BufferStreamWriteBOL → C-API write a PRIMITIVE TYPE into the MkBufferStreamC …
void WriteV(MK_STRN fmt,...)
C++: bus.WriteV(MK_STRN fmt, ... ) → C-API write format-string into the MkBufferStreamC …
void WriteBUS_FLAT(const MkBufferStreamC *add)
C++: bus.WriteBUS_FLAT(const MkBufferStreamC* add) → C-API write a MkBufferStreamC into the MkB...
void WriteBUF(const MkBufferC *val)
C++: bus.WriteBUF(const MkBufferC* val) → C-API write a PRIMITIVE TYPE into the MkBufferStrea...
void WriteFLT(MK_FLT val)
C++: doc_mk_cc_BufferStreamWriteFLT → C-API write a PRIMITIVE TYPE into the MkBufferStreamC …
void WriteI32(MK_I32 val)
C++: doc_mk_cc_BufferStreamWriteI32 → C-API write a PRIMITIVE TYPE into the MkBufferStreamC …
void WriteBFL(const MkBufferListC *bfl)
C++: bus.WriteBFL(const MkBufferListC* bfl) → C-API write a MkBufferListC into the MkBufferStre...
void WriteL_START()
C++: bus.WriteL_START() → C-API START write a list-item-type into the MkBufferStreamC …
void WriteBIN(MK_BNP val)
C++: doc_mk_cc_BufferStreamWriteBIN → C-API write a PRIMITIVE TYPE into the MkBufferStreamC …
void WriteVL(MK_STRN fmt, va_list ap)
C++: bus.WriteVL(MK_STRN fmt, va_list ap) → C-API write format-string into the MkBufferStreamC ...
void WriteLONG(MK_LONG val)
C++: bus.WriteLONG(MK_LONG val) → C-API write the long native object into the MkBufferStreamC …
void WriteL_FLAT(MkBufferListC *bfl)
C++: bus.WriteL_FLAT(MkBufferListC* bfl) → C-API write a MkBufferListC FLAT into the MkBufferSt...
void WriteSTR(MK_STRN val, MK_NUM len=-1)
C++: doc_mk_cc_BufferStreamWriteSTR → C-API write a PRIMITIVE TYPE into the MkBufferStreamC …
void WriteI8(MK_I8 val)
C++: doc_mk_cc_BufferStreamWriteI8 → C-API write a PRIMITIVE TYPE into the MkBufferStreamC …
void WriteL_END()
C++: bus.WriteL_END() → C-API END write a list-item-type into the MkBufferStreamC …
void WriteI64(MK_I64 val)
C++: doc_mk_cc_BufferStreamWriteI64 → C-API write a PRIMITIVE TYPE into the MkBufferStreamC …
void WriteHDL(MK_I32 val)
C++: bus.WriteHDL(MK_I32 val) → C-API write the handle into the MkBufferStreamC …
void WriteDBL(MK_DBL val)
C++: doc_mk_cc_BufferStreamWriteDBL → C-API write a PRIMITIVE TYPE into the MkBufferStreamC …
#define unlikely(x)
MkTypeE
basic data-types supported by Programming-Language-Micro-Kernel (PLMK) …
double MK_DBL
8 byte double data-type
unsigned char MK_BOL
1 byte boolean data-type
signed char MK_I8
1 byte byte data-type
float MK_FLT
4 byte float data-type
signed long long MK_I64
8 byte wide integer data-type
long MK_LONG
4/8 byte long data-type
bool MK_BOOL
real bool data-type
int32_t MK_HDL
4 byte int handle data-type
int32_t MK_NUM
array size data-type ('num' items in array …
signed int MK_I32
4 byte integer data-type
MK_PTRB * MK_PTR
generic pointer data-type
const MK_STRB * MK_STRN
constant string pointer data-type
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
std::pair< MK_SIZE, MK_BINN > MK_BNP
The ABSTRACT-CLASS MkBufferStreamS is used for package-based serialized IO … → C-API: libmkkernel:...
The ABSTRACT-CLASS MkBufferStreamS is used for package-based serialized IO …