theKernel 10.0
Loading...
Searching...
No Matches
MkBufferC_inline_cc.hh
Go to the documentation of this file.
1
9/* LABEL-NO */
10
11namespace ccmkkernel {
12
13/*
14 inline MK_PTR MkBufferC::MkBufferC_selfCreateTLS(MK_OBJ obj) {
15 return new MkBufferC(obj);
16 }
17
18 inline MK_PTR MkBufferC::MkBufferC_selfCreate (MK_RT_ARGS MK_OBJ obj, MK_PTR const env) {
19 MK_BUF buf = reinterpret_cast<MK_BUF>(obj);
20 return MkOBJ_R(buf).obj_protect.isLocal ? MkBufferC_selfCreateTLS(obj) : new MkBufferC(obj);
21 }
22*/
23
24 inline MkBufferC::MkBufferC (const MkBufferC *copy) {
25 if (copy == NULL) throw MkReferenceNullExceptionC("MkBufferC");
26 MkRtSetup_O(copy->hdl);
28 }
29
30 inline MkBufferC::MkBufferC (const MkBufferC& copy) {
31 MkRtSetup_O(copy.hdl);
33 }
34
36 MkRtSetup_O(copy.hdl);
37 MkObjCopy(hdl,copy.hdl);
38 return *this;
39 }
40
42 if (copy == NULL) throw MkReferenceNullExceptionC("MkBufferC");
43 MkRtSetup_O(copy->hdl);
44 MkObjCopy(hdl,copy->hdl);
45 return *this;
46 }
47
48 // -------------------------------------------------------------------------------
49
51 return this;
52 }
53
54 // BEGIN-MkBufferC - created by 'cc_MqC.tcl -i NHI1_HOME/theKernel/c/gen/c_mkkernel.meta' - DO NOT change
55
59
60 // doc-key: MkBufferC,MkBufferC-Access,oc_
61
64 MK_UNUSED auto buf = getBUF();
65 MK_BUF __retVal__L = MkBufferAppendC(buf, val);
66 return MkBufferC::MkBufferC_ObjNew(MK_RT_CALL __retVal__L);
67 }
68
70 inline MkBufferC* MkBufferC::AppendC (const std::string& val) {
71 MK_UNUSED auto buf = getBUF();
72 const MK_STRN val_hdl = val.c_str();
73 MK_BUF __retVal__L = MkBufferAppendC(buf, val_hdl);
74 return MkBufferC::MkBufferC_ObjNew(MK_RT_CALL __retVal__L);
75 }
76
78 inline MkBufferC* MkBufferC::AppendStringR (const std::string& val) {
79 MK_UNUSED auto buf = getBUF();
80 const MkStringR val_ref = MkStringCreate((MK_NUM)val.size(),val.c_str());
81 MK_BUF __retVal__L = MkBufferAppendStringR(buf, val_ref);
82 return MkBufferC::MkBufferC_ObjNew(MK_RT_CALL __retVal__L);
83 }
84
85 // doc-key: MkBufferC,MkBufferC-Access,om_
86
88 inline MK_I32 MkBufferC::AppendV (MK_FST printfmt, ... ) {
89 MK_UNUSED auto buf = getBUF();
90 va_list ap;
91 va_start (ap, printfmt);
92 MK_I32 __retVal__L = MkBufferAppendVL(buf, printfmt, ap);
93 va_end (ap);
94 return __retVal__L;
95 }
96
98 inline MK_I32 MkBufferC::AppendVL (MK_FST printfmt, va_list var_list) {
99 MK_UNUSED auto buf = getBUF();
100 MK_I32 __retVal__L = MkBufferAppendVL(buf, printfmt, var_list);
101 return __retVal__L;
102 }
103
106 MK_UNUSED auto buf = getBUF();
107 MK_NUM __retVal__L = MkBufferPop(buf, val);
108 return __retVal__L;
109 }
110
112 inline MK_NUM MkBufferC::Pop (const std::string& val) {
113 MK_UNUSED auto buf = getBUF();
114 const MK_STRN val_hdl = val.c_str();
115 MK_NUM __retVal__L = MkBufferPop(buf, val_hdl);
116 return __retVal__L;
117 }
118
121 MK_UNUSED auto buf = getBUF();
122 MK_NUM __retVal__L = MkBufferPush(buf, val);
123 return __retVal__L;
124 }
125
127 inline MK_NUM MkBufferC::Push (const std::string& val) {
128 MK_UNUSED auto buf = getBUF();
129 const MK_STRN val_hdl = val.c_str();
130 MK_NUM __retVal__L = MkBufferPush(buf, val_hdl);
131 return __retVal__L;
132 }
133
134 // doc-key: MkBufferC,MkBufferC-Access,omo
135
138
140 // MkBufferC_Access_CC_API
141
145
146 // doc-key: MkBufferC,MkBufferC-Class-Export,sc_
147
151 MK_BUF __retVal__L = MkBufferHandleResolve(netHdl);
152 return MkBufferC::MkBufferC_ObjNew(MK_RT_CALL __retVal__L);
153 }
154
155 // doc-key: MkBufferC,MkBufferC-Class-Export,om_
156
157 // skip class-overload: HandleGet = MkBufferHandleGet → MkObjectHandleGet
158
160 // MkBufferC_Class_CC_API
161
165
166 // doc-key: MkBufferC,MkBufferC-Class-Introspection,oc_
167
170 MK_UNUSED auto buf = getBUF();
171 MK_BUF __retVal__L = MkBufferNext(buf);
172 return MkBufferC::MkBufferC_ObjNew(MK_RT_CALL __retVal__L);
173 }
174
177 MK_UNUSED auto buf = getBUF();
178 MK_BUF __retVal__L = MkBufferPrev(buf);
179 return MkBufferC::MkBufferC_ObjNew(MK_RT_CALL __retVal__L);
180 }
181
182 // doc-key: MkBufferC,MkBufferC-Class-Introspection,sc_
183
187 MK_BUF __retVal__L = MkBufferInstances();
188 return MkBufferC::MkBufferC_ObjNew(MK_RT_CALL __retVal__L);
189 }
190
192 // MkBufferC_Class_CC_API
193
197
198 // doc-key: MkBufferC,MkBufferC-Class-Misc,sc_
199
203 MK_BUF __retVal__L = MkBufferGetNull();
204 return MkBufferC::MkBufferC_ObjNew(MK_RT_CALL __retVal__L);
205 }
206
208 // MkBufferC_Class_CC_API
209
213
214 // doc-key: MkBufferC,MkBufferC-Get,oci
215
217 inline MkBufferListC* MkBufferC::GetBFL (MkBufferListC* val_inout) const {
218 MK_UNUSED auto buf = getBUFN();
219 MK_BFL val_inout_hdl = MkBufferListC::getBFL__null_allow(val_inout);
220 enum MkErrorE errVal = MkBufferGetBFL(buf, &val_inout_hdl);
221 MkErrorC_Check(buf, errVal);
223 }
224
225 // doc-key: MkBufferC,MkBufferC-Get,oco
226
229 MK_UNUSED auto buf = getBUF();
230 MK_BUF val_out;
231 enum MkErrorE errVal = MkBufferGetBUF(buf, &val_out);
232 MkErrorC_Check(buf, errVal);
234 }
235
236 // doc-key: MkBufferC,MkBufferC-Get,omo
237
239 inline MK_BNP MkBufferC::GetBIN () const {
240 MK_UNUSED auto buf = getBUFN();
241 MkBinaryR val_out_ref;
242 enum MkErrorE errVal = MkBufferGetBIN(buf, &val_out_ref);
243 ErrorCheck(errVal);
244 MK_BNP val_out = std::make_pair(val_out_ref.size,val_out_ref.data);
245 return val_out;
246 }
247
249 inline MK_BOL MkBufferC::GetBOL () const {
250 MK_UNUSED auto buf = getBUFN();
251 MK_BOL val_out;
252 enum MkErrorE errVal = MkBufferGetBOL(buf, &val_out);
253 MkErrorC_Check(buf, errVal);
254 return val_out != 0;
255 }
256
258 inline MK_DBL MkBufferC::GetDBL () const {
259 MK_UNUSED auto buf = getBUFN();
260 MK_DBL val_out;
261 enum MkErrorE errVal = MkBufferGetDBL(buf, &val_out);
262 MkErrorC_Check(buf, errVal);
263 return val_out;
264 }
265
267 inline MK_FLT MkBufferC::GetFLT () const {
268 MK_UNUSED auto buf = getBUFN();
269 MK_FLT val_out;
270 enum MkErrorE errVal = MkBufferGetFLT(buf, &val_out);
271 MkErrorC_Check(buf, errVal);
272 return val_out;
273 }
274
276 inline MK_I16 MkBufferC::GetI16 () const {
277 MK_UNUSED auto buf = getBUFN();
278 MK_I16 val_out;
279 enum MkErrorE errVal = MkBufferGetI16(buf, &val_out);
280 MkErrorC_Check(buf, errVal);
281 return val_out;
282 }
283
285 inline MK_I32 MkBufferC::GetI32 () const {
286 MK_UNUSED auto buf = getBUFN();
287 MK_I32 val_out;
288 enum MkErrorE errVal = MkBufferGetI32(buf, &val_out);
289 MkErrorC_Check(buf, errVal);
290 return val_out;
291 }
292
294 inline MK_I64 MkBufferC::GetI64 () const {
295 MK_UNUSED auto buf = getBUFN();
296 MK_I64 val_out;
297 enum MkErrorE errVal = MkBufferGetI64(buf, &val_out);
298 MkErrorC_Check(buf, errVal);
299 return val_out;
300 }
301
303 inline MK_I8 MkBufferC::GetI8 () const {
304 MK_UNUSED auto buf = getBUFN();
305 MK_I8 val_out;
306 enum MkErrorE errVal = MkBufferGetI8(buf, &val_out);
307 MkErrorC_Check(buf, errVal);
308 return (MK_I8)val_out;
309 }
310
312 inline MK_STRN MkBufferC::GetSTR () const {
313 MK_UNUSED auto buf = getBUFN();
314 MK_STRN val_out;
315 enum MkErrorE errVal = MkBufferGetSTR(buf, &val_out);
316 MkErrorC_Check(buf, errVal);
317 return val_out;
318 }
319
321 inline std::string MkBufferC::GetStringR () const {
322 MK_UNUSED auto buf = getBUFN();
323 MkStringR val_out_ref;
324 enum MkErrorE errVal = MkBufferGetStringR(buf, &val_out_ref);
325 ErrorCheck(errVal);
326 const std::string& val_out = std::string(val_out_ref.ptr,val_out_ref.len);
327 return val_out;
328 }
329
331 // MkBufferC_Get_CC_API
332
336
337 // doc-key: MkBufferC,MkBufferC-Info,om_
338
340 inline MK_STRB MkBufferC::GetType1 () const {
341 MK_UNUSED auto buf = getBUFN();
342 MK_STRB __retVal__L = MkBufferGetType1(buf);
343 return __retVal__L;
344 }
345
347 inline MkTypeE MkBufferC::GetType2 () const {
348 MK_UNUSED auto buf = getBUFN();
349 enum MkTypeE __retVal__L = MkBufferGetType2(buf);
350 return __retVal__L;
351 }
352
354 inline MK_STRN MkBufferC::GetType3 () const {
355 MK_UNUSED auto buf = getBUFN();
356 MK_STRN __retVal__L = MkBufferGetType3(buf);
357 return __retVal__L;
358 }
359
361 inline MK_BOOL MkBufferC::IsLocal () const {
362 MK_UNUSED auto buf = getBUFN();
363 MK_BOOL __retVal__L = MkBufferIsLocal(buf);
364 return __retVal__L;
365 }
366
367 // skip class-overload: Log = MkBufferLog → MkObjectLog
368
369 // skip class-overload: Log = MkBufferLog → MkObjectLog
370
372 inline void MkBufferC::LogS (MK_STRN varname, const MkObjectC* fmtobj, MK_STRN callfunc) const {
373 MK_UNUSED auto buf = getBUFN();
374 MK_OBJN fmtobj_hdl = MkObjectC::getOBJN__null_allow(fmtobj);
375 if (callfunc == NULL) {callfunc = __builtin_FUNCTION();}
376 MkBufferLogS(buf, varname, fmtobj_hdl, callfunc);
377 }
378
380 // MkBufferC_Info_CC_API
381
385
386 // doc-key: MkBufferC,MkBufferC-Misc,oc_
387
389 inline MkBufferC* MkBufferC::Copy (const MkBufferC* srce) const {
390 MK_UNUSED auto buf = getBUF();
391 MK_BUFN srce_hdl = MkBufferC::getBUFN(srce);
392 MK_BUF __retVal__L = MkBufferCopy(buf, srce_hdl);
393 return MkBufferC::MkBufferC_ObjNew(MK_RT_CALL __retVal__L);
394 }
395
397 inline MkBufferC* MkBufferC::Copy (const MkBufferC& srce) const {
398 MK_UNUSED auto buf = getBUF();
399 const MK_BUFN srce_hdl = MkBufferC::getBUFN(srce);
400 MK_BUF __retVal__L = MkBufferCopy(buf, srce_hdl);
401 return MkBufferC::MkBufferC_ObjNew(MK_RT_CALL __retVal__L);
402 }
403
406 MK_UNUSED auto buf = getBUF();
407 MK_BUF __retVal__L = MkBufferReset(buf);
408 return MkBufferC::MkBufferC_ObjNew(MK_RT_CALL __retVal__L);
409 }
410
413 MK_UNUSED auto buf = getBUF();
414 MK_BUF __retVal__L = MkBufferSizeAdd(buf, size);
415 return MkBufferC::MkBufferC_ObjNew(MK_RT_CALL __retVal__L);
416 }
417
420 MK_UNUSED auto buf = getBUF();
421 MK_BUF __retVal__L = MkBufferSizeNew(buf, size);
422 return MkBufferC::MkBufferC_ObjNew(MK_RT_CALL __retVal__L);
423 }
424
426 inline MkBufferC* MkBufferC::Temp () const {
427 MK_UNUSED auto buf = getBUFN();
428 MK_BUF __retVal__L = MkBufferTemp(buf);
429 return MkBufferC::MkBufferC_ObjNew(MK_RT_CALL __retVal__L);
430 }
431
432 // doc-key: MkBufferC,MkBufferC-Misc,om_
433
435 inline void MkBufferC::CastTo (MkTypeE typ) {
436 MK_UNUSED auto buf = getBUF();
437 enum MkErrorE errVal = MkBufferCastTo(buf, typ);
438 MkErrorC_Check(buf, errVal);
439 }
440
442 inline MK_I32 MkBufferC::Cmp (const MkBufferC* buf2) const {
443 MK_UNUSED auto buf1 = getBUFN();
444 MK_BUFN buf2_hdl = MkBufferC::getBUFN(buf2);
445 MK_I32 __retVal__L = MkBufferCmp(buf1, buf2_hdl);
446 return __retVal__L;
447 }
448
450 inline MK_I32 MkBufferC::Cmp (const MkBufferC& buf2) const {
451 MK_UNUSED auto buf1 = getBUFN();
452 const MK_BUFN buf2_hdl = MkBufferC::getBUFN(buf2);
453 MK_I32 __retVal__L = MkBufferCmp(buf1, buf2_hdl);
454 return __retVal__L;
455 }
456
458 inline void MkBufferC::ResetFull () {
459 MK_UNUSED auto buf = getBUF();
461 }
462
463 // skip class-overload: ToString = MkBufferToString → MkObjectToString
464
466 // MkBufferC_Misc_CC_API
467
471
472 // doc-key: MkBufferC,MkBufferC-Set,oc_
473
476 MK_UNUSED auto buf = getBUF();
477 const MkBinaryR val_ref = MkBinaryCreate(val.first,val.second);
478 MK_BUF __retVal__L = MkBufferSetBIN(buf, val_ref);
479 return MkBufferC::MkBufferC_ObjNew(MK_RT_CALL __retVal__L);
480 }
481
484 MK_UNUSED auto buf = getBUF();
485 MK_BUF __retVal__L = MkBufferSetBOL(buf, (MK_BOL)(val?1:0));
486 return MkBufferC::MkBufferC_ObjNew(MK_RT_CALL __retVal__L);
487 }
488
490 inline MkBufferC* MkBufferC::SetBUF (const MkBufferC* val) {
491 MK_UNUSED auto buf = getBUF();
492 MK_BUFN val_hdl = MkBufferC::getBUFN(val);
493 MK_BUF __retVal__L = MkBufferSetBUF(buf, val_hdl);
494 return MkBufferC::MkBufferC_ObjNew(MK_RT_CALL __retVal__L);
495 }
496
498 inline MkBufferC* MkBufferC::SetBUF (const MkBufferC& val) {
499 MK_UNUSED auto buf = getBUF();
500 const MK_BUFN val_hdl = MkBufferC::getBUFN(val);
501 MK_BUF __retVal__L = MkBufferSetBUF(buf, val_hdl);
502 return MkBufferC::MkBufferC_ObjNew(MK_RT_CALL __retVal__L);
503 }
504
507 MK_UNUSED auto buf = getBUF();
508 const MkBinaryR val_ref = MkBinaryCreate(val.first,val.second);
509 MK_BUF __retVal__L = MkBufferSetBinaryR(buf, val_ref);
510 return MkBufferC::MkBufferC_ObjNew(MK_RT_CALL __retVal__L);
511 }
512
515 MK_UNUSED auto buf = getBUF();
516 MK_BUF __retVal__L = MkBufferSetDBL(buf, val);
517 return MkBufferC::MkBufferC_ObjNew(MK_RT_CALL __retVal__L);
518 }
519
522 MK_UNUSED auto buf = getBUF();
523 MK_BUF __retVal__L = MkBufferSetFLT(buf, val);
524 return MkBufferC::MkBufferC_ObjNew(MK_RT_CALL __retVal__L);
525 }
526
529 MK_UNUSED auto buf = getBUF();
530 MK_BUF __retVal__L = MkBufferSetI16(buf, val);
531 return MkBufferC::MkBufferC_ObjNew(MK_RT_CALL __retVal__L);
532 }
533
536 MK_UNUSED auto buf = getBUF();
537 MK_BUF __retVal__L = MkBufferSetI32(buf, val);
538 return MkBufferC::MkBufferC_ObjNew(MK_RT_CALL __retVal__L);
539 }
540
543 MK_UNUSED auto buf = getBUF();
544 MK_BUF __retVal__L = MkBufferSetI64(buf, val);
545 return MkBufferC::MkBufferC_ObjNew(MK_RT_CALL __retVal__L);
546 }
547
550 MK_UNUSED auto buf = getBUF();
551 MK_BUF __retVal__L = MkBufferSetI8(buf, (MK_I8)(val));
552 return MkBufferC::MkBufferC_ObjNew(MK_RT_CALL __retVal__L);
553 }
554
557 MK_UNUSED auto buf = getBUF();
558 MK_BUF __retVal__L = MkBufferSetSTR(buf, val);
559 return MkBufferC::MkBufferC_ObjNew(MK_RT_CALL __retVal__L);
560 }
561
563 inline MkBufferC* MkBufferC::SetSTR (const std::string& val) {
564 MK_UNUSED auto buf = getBUF();
565 const MK_STRN val_hdl = val.c_str();
566 MK_BUF __retVal__L = MkBufferSetSTR(buf, val_hdl);
567 return MkBufferC::MkBufferC_ObjNew(MK_RT_CALL __retVal__L);
568 }
569
571 inline MkBufferC* MkBufferC::SetStringR (const std::string& val) {
572 MK_UNUSED auto buf = getBUF();
573 const MkStringR val_ref = MkStringCreate((MK_NUM)val.size(),val.c_str());
574 MK_BUF __retVal__L = MkBufferSetStringR(buf, val_ref);
575 return MkBufferC::MkBufferC_ObjNew(MK_RT_CALL __retVal__L);
576 }
577
579 inline MkBufferC* MkBufferC::SetV (MK_FST val, ... ) {
580 MK_UNUSED auto buf = getBUF();
581 va_list ap;
582 va_start (ap, val);
583 MK_BUF __retVal__L = MkBufferSetVL(buf, val, ap);
584 va_end (ap);
585 return MkBufferC::MkBufferC_ObjNew(MK_RT_CALL __retVal__L);
586 }
587
589 inline MkBufferC* MkBufferC::SetVL (MK_FST val, va_list var_list) {
590 MK_UNUSED auto buf = getBUF();
591 MK_BUF __retVal__L = MkBufferSetVL(buf, val, var_list);
592 return MkBufferC::MkBufferC_ObjNew(MK_RT_CALL __retVal__L);
593 }
594
596 // MkBufferC_Set_CC_API
597
601
602 // doc-key: MkBufferC,MkBufferC-TOR,oC_
603
606 MK_UNUSED auto buf = getBUF();
607 MK_BUF __retVal__L = MkBufferMerge(buf);
608 if (__retVal__L == NULL) {
609 throw MkInitError("MkBufferC::Merge");
610 }
611 return MkBufferC::MkBufferC_ObjCreate(MK_RT_CALL __retVal__L);
612 }
613
614 // doc-key: MkBufferC,MkBufferC-TOR,oCx
615
617 inline MkBufferC* MkBufferC::Dup () const {
618 MK_UNUSED auto buf = getBUFN();
619 MK_BUF __retVal__L = MkBufferDup(buf);
620 if (__retVal__L == NULL) {
621 throw MkInitError("MkBufferC::Dup");
622 }
623 return MkBufferC::MkBufferC_ObjCreate(MK_RT_CALL __retVal__L);
624 }
625
626 // doc-key: MkBufferC,MkBufferC-TOR,sCc
627
629 inline MK_OBJ MkBufferC::CTOR (MK_NUM size) {
631 MK_BUF __retVal__L = MkBufferCreate(NULL, size);
632 if (__retVal__L == NULL) {
633 throw MkInitError("MkBufferC::CTOR");
634 }
635 return (MK_OBJ)__retVal__L;
636 }
637
641 MK_BUF __retVal__L = MkBufferCreate(NULL, size);
642 if (__retVal__L == NULL) {
643 throw MkInitError("MkBufferC::Create");
644 }
645 return MkBufferC::MkBufferC_ObjCreate(MK_RT_CALL __retVal__L);
646 }
647
651 MK_BUF __retVal__L = MkBufferCreate1024(size);
652 if (__retVal__L == NULL) {
653 throw MkInitError("MkBufferC::Create1024");
654 }
655 return MkBufferC::MkBufferC_ObjCreate(MK_RT_CALL __retVal__L);
656 }
657
661 MK_BUF __retVal__L = MkBufferCreate256(size);
662 if (__retVal__L == NULL) {
663 throw MkInitError("MkBufferC::Create256");
664 }
665 return MkBufferC::MkBufferC_ObjCreate(MK_RT_CALL __retVal__L);
666 }
667
671 MK_BUF __retVal__L = MkBufferCreate64(size);
672 if (__retVal__L == NULL) {
673 throw MkInitError("MkBufferC::Create64");
674 }
675 return MkBufferC::MkBufferC_ObjCreate(MK_RT_CALL __retVal__L);
676 }
677
681 const MkBinaryR val_ref = MkBinaryCreate(val.first,val.second);
682 MK_BUF __retVal__L = MkBufferCreateBIN(val_ref);
683 if (__retVal__L == NULL) {
684 throw MkInitError("MkBufferC::CreateBIN");
685 }
686 return MkBufferC::MkBufferC_ObjCreate(MK_RT_CALL __retVal__L);
687 }
688
692 MK_BUF __retVal__L = MkBufferCreateBOL((MK_BOL)(val?1:0));
693 if (__retVal__L == NULL) {
694 throw MkInitError("MkBufferC::CreateBOL");
695 }
696 return MkBufferC::MkBufferC_ObjCreate(MK_RT_CALL __retVal__L);
697 }
698
702 MK_BUFN val_hdl = MkBufferC::getBUFN(val);
703 MK_BUF __retVal__L = MkBufferCreateBUF(val_hdl);
704 if (__retVal__L == NULL) {
705 throw MkInitError("MkBufferC::CreateBUF");
706 }
707 return MkBufferC::MkBufferC_ObjCreate(MK_RT_CALL __retVal__L);
708 }
709
713 const MK_BUFN val_hdl = MkBufferC::getBUFN(val);
714 MK_BUF __retVal__L = MkBufferCreateBUF(val_hdl);
715 if (__retVal__L == NULL) {
716 throw MkInitError("MkBufferC::CreateBUF");
717 }
718 return MkBufferC::MkBufferC_ObjCreate(MK_RT_CALL __retVal__L);
719 }
720
724 MK_BUF __retVal__L = MkBufferCreateDBL(val);
725 if (__retVal__L == NULL) {
726 throw MkInitError("MkBufferC::CreateDBL");
727 }
728 return MkBufferC::MkBufferC_ObjCreate(MK_RT_CALL __retVal__L);
729 }
730
734 MK_BUF __retVal__L = MkBufferCreateFLT(val);
735 if (__retVal__L == NULL) {
736 throw MkInitError("MkBufferC::CreateFLT");
737 }
738 return MkBufferC::MkBufferC_ObjCreate(MK_RT_CALL __retVal__L);
739 }
740
744 MK_BUF __retVal__L = MkBufferCreateI16(val);
745 if (__retVal__L == NULL) {
746 throw MkInitError("MkBufferC::CreateI16");
747 }
748 return MkBufferC::MkBufferC_ObjCreate(MK_RT_CALL __retVal__L);
749 }
750
754 MK_BUF __retVal__L = MkBufferCreateI32(val);
755 if (__retVal__L == NULL) {
756 throw MkInitError("MkBufferC::CreateI32");
757 }
758 return MkBufferC::MkBufferC_ObjCreate(MK_RT_CALL __retVal__L);
759 }
760
764 MK_BUF __retVal__L = MkBufferCreateI64(val);
765 if (__retVal__L == NULL) {
766 throw MkInitError("MkBufferC::CreateI64");
767 }
768 return MkBufferC::MkBufferC_ObjCreate(MK_RT_CALL __retVal__L);
769 }
770
774 MK_BUF __retVal__L = MkBufferCreateI8((MK_I8)(val));
775 if (__retVal__L == NULL) {
776 throw MkInitError("MkBufferC::CreateI8");
777 }
778 return MkBufferC::MkBufferC_ObjCreate(MK_RT_CALL __retVal__L);
779 }
780
784 MK_BUF __retVal__L = MkBufferCreateSTR(val);
785 if (__retVal__L == NULL) {
786 throw MkInitError("MkBufferC::CreateSTR");
787 }
788 return MkBufferC::MkBufferC_ObjCreate(MK_RT_CALL __retVal__L);
789 }
790
792 inline MkBufferC* MkBufferC::CreateSTR (const std::string& val) {
794 const MK_STRN val_hdl = val.c_str();
795 MK_BUF __retVal__L = MkBufferCreateSTR(val_hdl);
796 if (__retVal__L == NULL) {
797 throw MkInitError("MkBufferC::CreateSTR");
798 }
799 return MkBufferC::MkBufferC_ObjCreate(MK_RT_CALL __retVal__L);
800 }
801
802 // doc-key: MkBufferC,MkBufferC-TOR,sc_
803
805 inline MkBufferC* MkBufferC::CreateTLS (MK_STRN tlsName, MK_BOOL resetB) {
807 MK_BUF __retVal__L = MkBufferCreateTLS(tlsName, resetB);
808 return MkBufferC::MkBufferC_ObjNew(MK_RT_CALL __retVal__L);
809 }
810
812 inline MkBufferC* MkBufferC::CreateTLS (const std::string& tlsName, MK_BOOL resetB) {
814 const MK_STRN tlsName_hdl = tlsName.c_str();
815 MK_BUF __retVal__L = MkBufferCreateTLS(tlsName_hdl, resetB);
816 return MkBufferC::MkBufferC_ObjNew(MK_RT_CALL __retVal__L);
817 }
818
820 // MkBufferC_TOR_CC_API
821
822 // END-MkBufferC - created by 'cc_MqC.tcl -i NHI1_HOME/theKernel/c/gen/c_mkkernel.meta' - DO NOT change
823
824} // END - namespace "ccmkkernel"
#define MkErrorC_Check(errObj, errVal)
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...
constructor return MK_NULL
object header … → C-API: libmkkernel::MkObjectS
reference argument is MK_NULL
MK_NUM Pop(MK_STRN val)
C++: MK_NUM buf.Pop(MK_STRN val) → C-API delete str from the MkBufferC …
MkBufferC * AppendStringR(const std::string &val)
C++: MkBufferC* buf.AppendStringR(const std::string& val) → C-API append a single string to a M...
MK_I32 AppendV(MK_FST printfmt,...)
C++: MK_I32 buf.AppendV(MK_FST printfmt, ... ) → C-API append a single string with format and ....
MK_I32 AppendVL(MK_FST printfmt, va_list var_list)
C++: MK_I32 buf.AppendVL(MK_FST printfmt, va_list var_list) → C-API append a single string with...
MkBufferC * AppendC(MK_STRN val)
C++: MkBufferC* buf.AppendC(MK_STRN val) → C-API append a single string to a MkBufferC object …
MkBufferC * ToObject()
C++: MkBufferC* buf.ToObject() → C-API return the native language object from a MkBufferC …
MK_NUM Push(MK_STRN val)
C++: MK_NUM buf.Push(MK_STRN val) → C-API add str to the MkBufferC …
#define MkBufferAppendVL(...)
#define MkBufferAppendC(...)
#define MkBufferAppendStringR(...)
#define MkBufferPush(...)
#define MkBufferPop(...)
static MkBufferC * MkBufferC_ObjNew(MK_RT_ARGS MK_BUF hdl)
return MkBufferC from LibMsgqueObject
MK_BUF getBUF() const
return the LibMsgqueObject from current MkBufferC instance
MK_BUFN getBUFN() const
(const) return the LibMsgqueObject from current MkBufferC instance
MkBufferC & operator=(const MkBufferC &buf)
MkBufferC * Prev()
C++: MkBufferC* buf.Prev() → C-API get previous instance from linked-list of MkBufferS type
static MkBufferC * HandleResolve(MK_HDL netHdl)
C++: [static] MkBufferC* MkBufferC::HandleResolve(MK_HDL netHdl) → C-API Handle-Resolve-Slot - r...
static MkBufferC * Instances()
C++: [static] MkBufferC* MkBufferC::Instances() → C-API get head-instance from linked-list of Mk...
MkBufferC * Next()
C++: MkBufferC* buf.Next() → C-API get next instance from linked-list of MkBufferS type
static MkBufferC * GetNull()
C++: [static] MkBufferC* MkBufferC::GetNull() → C-API Null-Slot - return a MkBufferC typed NULL ...
#define MkBufferInstances()
static MK_BUF MkBufferGetNull(void)
Null-Slot - return a MkBufferC typed NULL instance …
#define MkBufferHandleResolve(...)
static MK_BUF MkBufferPrev(MK_BUF const buf)
get previous instance from linked-list of MkBufferS type
static MK_BUF MkBufferNext(MK_BUF const buf)
get next instance from linked-list of MkBufferS type
MK_DBL GetDBL() const
C++: doc_mk_cc_BufferGetDBL → C-API get a val_out from a MkBufferC …
MK_I32 GetI32() const
C++: doc_mk_cc_BufferGetI32 → C-API get a val_out from a MkBufferC …
MK_FLT GetFLT() const
C++: doc_mk_cc_BufferGetFLT → C-API get a val_out from a MkBufferC …
MkBufferListC * GetBFL(MkBufferListC *val_inout=NULL) const
C++: MkBufferListC* buf.GetBFL(MkBufferListC* val_inout = NULL) → C-API function to read an MkB...
MK_I64 GetI64() const
C++: doc_mk_cc_BufferGetI64 → C-API get a val_out from a MkBufferC …
MkBufferC * GetBUF()
C++: MkBufferC* buf.GetBUF() → C-API get a val_out from a MkBufferC …
MK_BOL GetBOL() const
C++: doc_mk_cc_BufferGetBOL → C-API get a val_out from a MkBufferC …
MK_I8 GetI8() const
C++: doc_mk_cc_BufferGetI8 → C-API get a val_out from a MkBufferC …
MK_STRN GetSTR() const
C++: doc_mk_cc_BufferGetSTR → C-API get a val_out from a MkBufferC …
std::string GetStringR() const
C++: std::string buf.GetStringR() → C-API get a val_out from a MkBufferC …
MK_BNP GetBIN() const
C++: doc_mk_cc_BufferGetBIN → C-API get a val_out from a MkBufferC …
MK_I16 GetI16() const
C++: doc_mk_cc_BufferGetI16 → C-API get a val_out from a MkBufferC …
#define MkBufferGetStringR(...)
#define MkBufferGetSTR(...)
#define MkBufferGetFLT(...)
#define MkBufferGetI16(...)
#define MkBufferGetBIN(...)
#define MkBufferGetBFL(...)
#define MkBufferGetBUF(...)
#define MkBufferGetBOL(...)
#define MkBufferGetI32(...)
#define MkBufferGetDBL(...)
#define MkBufferGetI64(...)
#define MkBufferGetI8(...)
void LogS(MK_STRN varname="buf", const MkObjectC *fmtobj=NULL, MK_STRN callfunc=__builtin_FUNCTION()) const
C++: buf.LogS(MK_STRN varname = "buf", const MkObjectC* fmtobj = NULL, MK_STRN callfunc = __builtin_...
MK_BOOL IsLocal() const
C++: MK_BOOL buf.IsLocal() → C-API Check if the MkBufferC is local (temporary),...
MK_STRB GetType1() const
C++: MK_STRB buf.GetType1() → C-API return the type from a MkBufferC as single character value ...
MK_STRN GetType3() const
C++: MK_STRN buf.GetType3() → C-API return the type from a MkBufferC as single character string...
MkTypeE GetType2() const
C++: MkTypeE buf.GetType2() → C-API return the MkTypeE from a MkBufferC …
#define MkBufferGetType3(...)
#define MkBufferLogS(...)
#define MkBufferIsLocal(...)
#define MkBufferGetType1(...)
#define MkBufferGetType2(...)
void ResetFull()
C++: buf.ResetFull() → C-API reset a MkBufferC to the length zero and free allocated storage…
MkBufferC * Temp() const
C++: MkBufferC* buf.Temp() → C-API create a temporary copy of the MkBufferC buf …
MkBufferC * Reset()
C++: MkBufferC* buf.Reset() → C-API reset a MkBufferC to the length zero …
MkBufferC * Copy(const MkBufferC *srce) const
C++: MkBufferC* buf.Copy(const MkBufferC* srce) → C-API copy the MkBufferC from srce to dest …
MK_I32 Cmp(const MkBufferC *buf2) const
C++: MK_I32 buf1.Cmp(const MkBufferC* buf2) → C-API compare TWO MkBufferC objects like strcmp d...
void CastTo(MkTypeE typ)
C++: buf.CastTo(MkTypeE typ) → C-API change the type of an MkBufferC to type …
MkBufferC * SizeNew(MK_NUM size)
C++: MkBufferC* buf.SizeNew(MK_NUM size) → C-API alloc min size storage to the buf …
MkBufferC * SizeAdd(MK_NUM size)
C++: MkBufferC* buf.SizeAdd(MK_NUM size) → C-API add size storage to the buf …
#define MkBufferCmp(...)
#define MkBufferCopy(...)
#define MkBufferTemp(...)
#define MkBufferSizeAdd(...)
#define MkBufferCastTo(...)
#define MkBufferResetFull(...)
#define MkBufferReset(...)
#define MkBufferSizeNew(...)
MkBufferC * SetFLT(MK_FLT val)
C++: doc_mk_cc_BufferSetFLT → C-API Set the MkBufferC to the val …
MkBufferC * SetVL(MK_FST val, va_list var_list)
C++: MkBufferC* buf.SetVL(MK_FST val, va_list var_list) → C-API set the MkBufferC using a va_li...
MkBufferC * SetI64(MK_I64 val)
C++: doc_mk_cc_BufferSetI64 → C-API Set the MkBufferC to the val …
MkBufferC * SetV(MK_FST val,...)
C++: MkBufferC* buf.SetV(MK_FST val, ... ) → C-API set the MkBufferC using a ....
MkBufferC * SetI32(MK_I32 val)
C++: doc_mk_cc_BufferSetI32 → C-API Set the MkBufferC to the val …
MkBufferC * SetDBL(MK_DBL val)
C++: doc_mk_cc_BufferSetDBL → C-API Set the MkBufferC to the val …
MkBufferC * SetBOL(MK_BOL val)
C++: doc_mk_cc_BufferSetBOL → C-API Set the MkBufferC to the val …
MkBufferC * SetI16(MK_I16 val)
C++: doc_mk_cc_BufferSetI16 → C-API Set the MkBufferC to the val …
MkBufferC * SetStringR(const std::string &val)
C++: MkBufferC* buf.SetStringR(const std::string& val) → C-API Set the MkBufferC to the val …
MkBufferC * SetSTR(MK_STRN val)
C++: doc_mk_cc_BufferSetSTR → C-API Set the MkBufferC to the val …
MkBufferC * SetBUF(const MkBufferC *val)
C++: MkBufferC* buf.SetBUF(const MkBufferC* val) → C-API Set the MkBufferC to the val …
MkBufferC * SetBinaryR(MK_BNP val)
C++: MkBufferC* buf.SetBinaryR(MK_BNP val) → C-API Set the MkBufferC to the val …
MkBufferC * SetBIN(MK_BNP val)
C++: doc_mk_cc_BufferSetBIN → C-API Set the MkBufferC to the val …
MkBufferC * SetI8(MK_I8 val)
C++: doc_mk_cc_BufferSetI8 → C-API Set the MkBufferC to the val …
#define MkBufferSetDBL(...)
#define MkBufferSetStringR(...)
#define MkBufferSetBOL(...)
#define MkBufferSetBIN(...)
#define MkBufferSetI64(...)
#define MkBufferSetI16(...)
#define MkBufferSetBUF(...)
#define MkBufferSetFLT(...)
#define MkBufferSetSTR(...)
#define MkBufferSetBinaryR(...)
#define MkBufferSetI8(...)
#define MkBufferSetVL(...)
#define MkBufferSetI32(...)
static MkBufferC * Create256(MK_NUM size=0)
C++: [constructor,static] MkBufferC* MkBufferC::Create256(MK_NUM size = 0) → C-API call the Buff...
static MkBufferC * Create(MK_NUM size=0)
C++: [constructor,static] MkBufferC* MkBufferC::Create(MK_NUM size = 0) → C-API Constructor - cr...
static MkBufferC * CreateI64(MK_I64 val)
C++: doc_mk_cc_BufferCreateI64 → C-API Constructor - create a new MkBufferC with an PRIMITIVE ...
static MkBufferC * CreateBUF(const MkBufferC *val)
C++: [constructor,static] MkBufferC* MkBufferC::CreateBUF(const MkBufferC* val) → C-API Constr...
static MkBufferC * CreateFLT(MK_FLT val)
C++: doc_mk_cc_BufferCreateFLT → C-API Constructor - create a new MkBufferC with an PRIMITIVE ...
static MkBufferC * CreateI32(MK_I32 val)
C++: doc_mk_cc_BufferCreateI32 → C-API Constructor - create a new MkBufferC with an PRIMITIVE ...
static MkBufferC * Create64(MK_NUM size=0)
C++: [constructor,static] MkBufferC* MkBufferC::Create64(MK_NUM size = 0) → C-API call the Buffe...
static MkBufferC * CreateTLS(MK_STRN tlsName, MK_BOOL resetB=true)
C++: [static] MkBufferC* MkBufferC::CreateTLS(MK_STRN tlsName, MK_BOOL resetB = true) → C-API sa...
static MkBufferC * CreateBOL(MK_BOL val)
C++: doc_mk_cc_BufferCreateBOL → C-API Constructor - create a new MkBufferC with an PRIMITIVE ...
static MkBufferC * CreateSTR(MK_STRN val)
C++: doc_mk_cc_BufferCreateSTR → C-API Constructor - create a new MkBufferC with an PRIMITIVE ...
MkBufferC * Dup() const
C++: [constructor] MkBufferC* buf.Dup() → C-API Dup-Constructor - create a new MkBufferC instanc...
static MkBufferC * CreateDBL(MK_DBL val)
C++: doc_mk_cc_BufferCreateDBL → C-API Constructor - create a new MkBufferC with an PRIMITIVE ...
static MkBufferC * Create1024(MK_NUM size=0)
C++: [constructor,static] MkBufferC* MkBufferC::Create1024(MK_NUM size = 0) → C-API call the Buf...
MkBufferC * Merge()
C++: [constructor] MkBufferC* buf.Merge() → C-API Merge-Constructor - create a new MkBufferC as ...
static MkBufferC * CreateBIN(MK_BNP val)
C++: doc_mk_cc_BufferCreateBIN → C-API Constructor - create a new MkBufferC with an PRIMITIVE ...
static MkBufferC * CreateI16(MK_I16 val)
C++: doc_mk_cc_BufferCreateI16 → C-API Constructor - create a new MkBufferC with an PRIMITIVE ...
static MkBufferC * CreateI8(MK_I8 val)
C++: doc_mk_cc_BufferCreateI8 → C-API Constructor - create a new MkBufferC with an PRIMITIVE TYP...
#define MkBufferCreateSTR(...)
#define MkBufferCreateBOL(...)
#define MkBufferCreateTLS(...)
#define MkBufferMerge(...)
#define MkBufferCreate1024(...)
#define MkBufferCreate(...)
#define MkBufferCreateDBL(...)
#define MkBufferCreateI32(...)
#define MkBufferCreateFLT(...)
#define MkBufferCreateI16(...)
#define MkBufferCreateBUF(...)
#define MkBufferCreateBIN(...)
#define MkBufferCreateI64(...)
#define MkBufferCreateI8(...)
#define MkBufferCreate256(...)
#define MkBufferCreate64(...)
#define MkBufferDup(...)
static MkBufferListC * MkBufferListC_ObjNew(MK_RT_ARGS MK_BFL hdl)
return MkBufferListC from LibMsgqueObject
MK_BFL getBFL__null_allow() const
return the LibMsgqueObject from current MkBufferListC instance
static MkBinaryR MkBinaryCreate(MK_SIZE size, MK_BINN data)
create a binary from data and size ...
#define MK_UNUSED
mark unnused variables and functions
MkTypeE
basic data-types supported by Programming-Language-Micro-Kernel (PLMK) …
MkErrorE
collection for the different error-codes …
static MkStringR MkStringCreate(MK_NUM len, MK_STRN str)
create a str from ptr and len ...
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
MK_STRB const * MK_FST
const format string pointer 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 …
char MK_STRB
string type data-type
signed short int MK_I16
2 byte short data-type
signed int MK_I32
4 byte integer data-type
const MK_STRB * MK_STRN
constant string pointer data-type
void ErrorCheck(enum MkErrorE err, MK_STRN const caller=__builtin_FUNCTION(), MK_I32 const line=__builtin_LINE()) const
MK_OBJN getOBJN__null_allow() const
(const) return the LibMsgqueObject from current MkObjectC instance
void atomInit(MK_OBJ obj)
struct MkObjectS * MK_OBJ
class-shortcut for struct MkObjectS *, all shortcut using the XX_YYY syntax (only for public API) …
#define MkObjCopy(...)
#define MkObjDup(...)
#define MkRtSetup_O(o)
#define MK_RT_CALL
#define MkRtSetup_NULL
namespace for the CcMkKernel "C++"-API
std::pair< MK_SIZE, MK_BINN > MK_BNP
binary data default format …
MK_BINN data
pointer to the binary data
MK_SIZE size
size of the data pointer
The CLASS used to store a list of MkBufferS items into a flat array…
The ABSTRACT-CLASS used to store a native-type-data-item defined by PRIMITIVE TYPE …
string data default format …
MK_NUM len
len of the string data
MK_STRN ptr
pointer to the string data