theKernel 10.0
Loading...
Searching...
No Matches
MkBufferC.java
Go to the documentation of this file.
1
9/* LABEL-INIT */
10package jvmkkernel;
11
12/* LABEL-START */
13
18public class MkBufferC extends MkObjectC {
19
20 static {
22 }
23
24 private MkBufferC (long mng, boolean dummy) {
25 super(mng,dummy);
26 }
27
28/* LABEL-END */
29
30 // INTERNAL
31
32 // PUBLIC
33
34 // BEGIN-MkBufferC - created by 'jv_MqS.tcl -i NHI1_HOME/theKernel/c/gen/c_mkkernel.meta' - DO NOT change
35
39
40 // doc-key: MkBufferC,MkBufferC-Access,oc_
41
43 public native MkBufferC AppendC (String val);
44
46 public native MkBufferC AppendStringR (String val);
47
48 // doc-key: MkBufferC,MkBufferC-Access,om_
49
51 public native int Pop (String val);
52
54 public native int Push (String val);
55
56 // doc-key: MkBufferC,MkBufferC-Access,omo
57
58 // skip template-required: public native Object ToObject ()
59
61 // MkBufferC_Access_JV_API
62
66
67 // doc-key: MkBufferC,MkBufferC-Class-Export,sc_
68
70 public native static MkBufferC HandleResolve (int netHdl);
71
72 // doc-key: MkBufferC,MkBufferC-Class-Export,om_
73
74 // skip class-overload: public native int HandleGet ()
75
77 // MkBufferC_Class_JV_API
78
82
83 // doc-key: MkBufferC,MkBufferC-Class-Introspection,oc_
84
86 public native MkBufferC Next ();
87
89 public native MkBufferC Prev ();
90
91 // doc-key: MkBufferC,MkBufferC-Class-Introspection,sc_
92
94 public native static MkBufferC Instances ();
95
97 // MkBufferC_Class_JV_API
98
102
103 // doc-key: MkBufferC,MkBufferC-Class-Misc,sc_
104
106 public native static MkBufferC GetNull ();
107
109 // MkBufferC_Class_JV_API
110
114
115 // doc-key: MkBufferC,MkBufferC-Get,oci
116
118 public native MkBufferListC GetBFL (MkBufferListC val_inout);
119
122 return GetBFL ((MkBufferListC) null);
123 }
124
125 // doc-key: MkBufferC,MkBufferC-Get,oco
126
128 public native MkBufferC GetBUF ();
129
130 // doc-key: MkBufferC,MkBufferC-Get,omo
131
133 public native byte[] GetBIN ();
134
136 public native boolean GetBOL ();
137
139 public native double GetDBL ();
140
142 public native float GetFLT ();
143
145 public native short GetI16 ();
146
148 public native int GetI32 ();
149
151 public native long GetI64 ();
152
154 public native byte GetI8 ();
155
157 public native String GetSTR ();
158
160 public native String GetStringR ();
161
163 // MkBufferC_Get_JV_API
164
168
169 // doc-key: MkBufferC,MkBufferC-Info,om_
170
172 public native char GetType1 ();
173
175 public native MkTypeE GetType2 ();
176
178 public native String GetType3 ();
179
181 public native boolean IsLocal ();
182
183 // skip class-overload: public native void Log (MkObjectC fmtobj, int debug, String callfunc, int lvl)
184
186 public native void LogS (String varname, MkObjectC fmtobj, String callfunc);
187
189 public void LogS () {
190 LogS ("buf", (MkObjectC) null, null);
191 }
192
194 public void LogS (String varname) {
195 LogS (varname, (MkObjectC) null, null);
196 }
197
199 public void LogS (String varname, MkObjectC fmtobj) {
200 LogS (varname, fmtobj, null);
201 }
202
204 public void Log () {
205 Log ((MkObjectC) null, 0, null, 0);
206 }
207
209 public void Log (MkObjectC fmtobj) {
210 Log (fmtobj, 0, null, 0);
211 }
212
214 public void Log (MkObjectC fmtobj, int debug) {
215 Log (fmtobj, debug, null, 0);
216 }
217
219 public void Log (MkObjectC fmtobj, int debug, String callfunc) {
220 Log (fmtobj, debug, callfunc, 0);
221 }
222
224 // MkBufferC_Info_JV_API
225
229
230 // doc-key: MkBufferC,MkBufferC-Misc,oc_
231
233 public native MkBufferC Copy (MkBufferC srce);
234
236 public native MkBufferC Reset ();
237
239 public native MkBufferC SizeAdd (int size);
240
242 public native MkBufferC SizeNew (int size);
243
245 public native MkBufferC Temp ();
246
247 // doc-key: MkBufferC,MkBufferC-Misc,om_
248
250 public native void CastTo (MkTypeE typ);
251
253 public native int Cmp (MkBufferC buf2);
254
256 public native void ResetFull ();
257
258 // skip class-overload: public native String ToString ()
259
261 // MkBufferC_Misc_JV_API
262
266
267 // doc-key: MkBufferC,MkBufferC-Set,oc_
268
270 public native MkBufferC SetBIN (byte[] val);
271
273 public native MkBufferC SetBOL (boolean val);
274
276 public native MkBufferC SetBUF (MkBufferC val);
277
279 public native MkBufferC SetBinaryR (byte[] val);
280
282 public native MkBufferC SetDBL (double val);
283
285 public native MkBufferC SetFLT (float val);
286
288 public native MkBufferC SetI16 (short val);
289
291 public native MkBufferC SetI32 (int val);
292
294 public native MkBufferC SetI64 (long val);
295
297 public native MkBufferC SetI8 (byte val);
298
300 public native MkBufferC SetSTR (String val);
301
303 public native MkBufferC SetStringR (String val);
304
306 // MkBufferC_Set_JV_API
307
311
312 // doc-key: MkBufferC,MkBufferC-TOR,oC_
313
315 public native MkBufferC Merge ();
316
317 // doc-key: MkBufferC,MkBufferC-TOR,oCx
318
320 public native MkBufferC Dup ();
321
322 // doc-key: MkBufferC,MkBufferC-TOR,sCc
323
325 private native static long CTOR (int size);
326
328 private static long CTOR () {
329 return CTOR (0);
330 }
331
333 public native static MkBufferC Create (int size);
334
336 public MkBufferC (int size) {
337 this(CTOR(size), true);
338 }
339
341 public native static MkBufferC Create1024 (int size);
342
344 public static MkBufferC Create1024 () {
345 return Create1024 (0);
346 }
347
349 public native static MkBufferC Create256 (int size);
350
352 public static MkBufferC Create256 () {
353 return Create256 (0);
354 }
355
357 public native static MkBufferC Create64 (int size);
358
360 public static MkBufferC Create64 () {
361 return Create64 (0);
362 }
363
365 public native static MkBufferC CreateBIN (byte[] val);
366
368 public native static MkBufferC CreateBOL (boolean val);
369
371 public native static MkBufferC CreateBUF (MkBufferC val);
372
374 public native static MkBufferC CreateDBL (double val);
375
377 public native static MkBufferC CreateFLT (float val);
378
380 public native static MkBufferC CreateI16 (short val);
381
383 public native static MkBufferC CreateI32 (int val);
384
386 public native static MkBufferC CreateI64 (long val);
387
389 public native static MkBufferC CreateI8 (byte val);
390
392 public native static MkBufferC CreateSTR (String val);
393
395 public static MkBufferC Create () {
396 return Create (0);
397 }
398
400 public MkBufferC () {
401 this(CTOR(0), true);
402 }
403
404 // doc-key: MkBufferC,MkBufferC-TOR,sc_
405
407 public native static MkBufferC CreateTLS (String tlsName, boolean resetB);
408
410 public static MkBufferC CreateTLS (String tlsName) {
411 return CreateTLS (tlsName, true);
412 }
413
415 // MkBufferC_TOR_JV_API
416
417 // END-MkBufferC - created by 'jv_MqS.tcl -i NHI1_HOME/theKernel/c/gen/c_mkkernel.meta' - DO NOT change
418
419// ########################################################################################
420// OVERLOAD
421
422 public Object ToObject () {
423 Object ret = null;
424 switch (GetType1()) {
425 case 'O': ret = GetBOL(); break;
426 case 'Y': ret = GetI8(); break;
427 case 'S': ret = GetI16(); break;
428 case 'I': ret = GetI32(); break;
429 case 'W': ret = GetI64(); break;
430 case 'F': ret = GetFLT(); break;
431 case 'D': ret = GetDBL(); break;
432 case 'C': ret = GetSTR(); break;
433 case 'B': ret = GetBIN(); break;
434 case 'L': {
435 // java has !! NO !! destructor -> memory leak if bfl is NOT detroyed
436 MkBufferListC bfl = GetBFL().Dup();
437 try {
438 ret = bfl.ToList();
439 } finally {
440 bfl.close();
441 }
442 break;
443 }
444 case 'T': {
445 MkErrorC.DEFAULT().SetC("INTERNAL ERROR: type 'TRA' not supported");
446 break;
447 }
448 }
449 return ret;
450 }
451
452}
453
MkBufferC - the abstract class known as buf or buffer is used to create and manage dynamic,...
MkBufferListC - the class known as bfl or buffer-list is used to create and manage a list of MkBuffer...
MkErrorC - the class known as err or error is used to create and manage an error message …
Definition MkErrorC.java:18
MkKernel PACKAGE - The package is the toplevel structure of the Programming-Language-Micro-Kernel (PL...
MkObjectC - class known as obj or object is used as base-class type for a Programming-Language-Micro-...
Java: enum MkTypeE → C-API
Definition MkTypeE.java:16
native MkBufferC AppendC(String val)
Java: MkBufferC buf.AppendC(String val) → C-API append a single string to a MkBufferC object …
native int Push(String val)
Java: int buf.Push(String val) → C-API add str to the MkBufferC …
native MkBufferC AppendStringR(String val)
Java: MkBufferC buf.AppendStringR(String val) → C-API append a single string to a MkBufferC obj...
native int Pop(String val)
Java: int buf.Pop(String val) → C-API delete str from the MkBufferC …
static native MkBufferC GetNull()
Java: [static] MkBufferC MkBufferC.GetNull() → C-API Null-Slot - return a MkBufferC typed NULL i...
native MkBufferC Next()
Java: MkBufferC buf.Next() → C-API get next instance from linked-list of MkBufferS type
native MkBufferC Prev()
Java: MkBufferC buf.Prev() → C-API get previous instance from linked-list of MkBufferS type
static native MkBufferC HandleResolve(int netHdl)
Java: [static] MkBufferC MkBufferC.HandleResolve(int netHdl) → C-API Handle-Resolve-Slot - retur...
static native MkBufferC Instances()
Java: [static] MkBufferC MkBufferC.Instances() → C-API get head-instance from linked-list of MkB...
native byte[] GetBIN()
Java: doc_mk_jv_BufferGetBIN → C-API get a val_out from a MkBufferC …
native String GetStringR()
Java: String buf.GetStringR() → C-API get a val_out from a MkBufferC …
native MkBufferListC GetBFL(MkBufferListC val_inout)
Java: MkBufferListC buf.GetBFL(?MkBufferListC val_inout = null?) → C-API function to read an Mk...
native float GetFLT()
Java: doc_mk_jv_BufferGetFLT → C-API get a val_out from a MkBufferC …
native int GetI32()
Java: doc_mk_jv_BufferGetI32 → C-API get a val_out from a MkBufferC …
native MkBufferC GetBUF()
Java: MkBufferC buf.GetBUF() → C-API get a val_out from a MkBufferC …
MkBufferListC GetBFL()
Java: MkBufferListC buf.GetBFL(?MkBufferListC val_inout = null?) → C-API function to read an Mk...
native boolean GetBOL()
Java: doc_mk_jv_BufferGetBOL → C-API get a val_out from a MkBufferC …
native double GetDBL()
Java: doc_mk_jv_BufferGetDBL → C-API get a val_out from a MkBufferC …
native short GetI16()
Java: doc_mk_jv_BufferGetI16 → C-API get a val_out from a MkBufferC …
native String GetSTR()
Java: doc_mk_jv_BufferGetSTR → C-API get a val_out from a MkBufferC …
native byte GetI8()
Java: doc_mk_jv_BufferGetI8 → C-API get a val_out from a MkBufferC …
native long GetI64()
Java: doc_mk_jv_BufferGetI64 → C-API get a val_out from a MkBufferC …
native boolean IsLocal()
Java: boolean buf.IsLocal() → C-API Check if the MkBufferC is local (temporary),...
void LogS()
Java: buf.LogS(?String varname = "buf"?, ?MkObjectC fmtobj = null?, ?String callfunc = null?...
void LogS(String varname, MkObjectC fmtobj)
Java: buf.LogS(?String varname = "buf"?, ?MkObjectC fmtobj = null?, ?String callfunc = null?...
void Log(MkObjectC fmtobj, int debug, String callfunc)
Java: buf.Log(?MkObjectC fmtobj = null?, ?int debug = 0?, ?String callfunc = null?...
native MkTypeE GetType2()
Java: MkTypeE buf.GetType2() → C-API return the MkTypeE from a MkBufferC …
void LogS(String varname)
Java: buf.LogS(?String varname = "buf"?, ?MkObjectC fmtobj = null?, ?String callfunc = null?...
void Log(MkObjectC fmtobj, int debug)
Java: buf.Log(?MkObjectC fmtobj = null?, ?int debug = 0?, ?String callfunc = null?...
native char GetType1()
Java: char buf.GetType1() → C-API return the type from a MkBufferC as single character value …
native void LogS(String varname, MkObjectC fmtobj, String callfunc)
Java: buf.LogS(?String varname = "buf"?, ?MkObjectC fmtobj = null?, ?String callfunc = null?...
native String GetType3()
Java: String buf.GetType3() → C-API return the type from a MkBufferC as single character string...
void Log(MkObjectC fmtobj)
Java: buf.Log(?MkObjectC fmtobj = null?, ?int debug = 0?, ?String callfunc = null?...
void Log()
Java: buf.Log(?MkObjectC fmtobj = null?, ?int debug = 0?, ?String callfunc = null?...
native MkBufferC Temp()
Java: MkBufferC buf.Temp() → C-API create a temporary copy of the MkBufferC buf …
native void CastTo(MkTypeE typ)
Java: buf.CastTo(MkTypeE typ) → C-API change the type of an MkBufferC to type …
native MkBufferC Copy(MkBufferC srce)
Java: MkBufferC buf.Copy(MkBufferC srce) → C-API copy the MkBufferC from srce to dest …
native int Cmp(MkBufferC buf2)
Java: int buf1.Cmp(MkBufferC buf2) → C-API compare TWO MkBufferC objects like strcmp do it for ...
native MkBufferC SizeNew(int size)
Java: MkBufferC buf.SizeNew(int size) → C-API alloc min size storage to the buf …
native void ResetFull()
Java: buf.ResetFull() → C-API reset a MkBufferC to the length zero and free allocated storage…
native MkBufferC SizeAdd(int size)
Java: MkBufferC buf.SizeAdd(int size) → C-API add size storage to the buf …
native MkBufferC Reset()
Java: MkBufferC buf.Reset() → C-API reset a MkBufferC to the length zero …
native MkBufferC SetBUF(MkBufferC val)
Java: MkBufferC buf.SetBUF(MkBufferC val) → C-API Set the MkBufferC to the val …
native MkBufferC SetI8(byte val)
Java: doc_mk_jv_BufferSetI8 → C-API Set the MkBufferC to the val …
native MkBufferC SetI32(int val)
Java: doc_mk_jv_BufferSetI32 → C-API Set the MkBufferC to the val …
native MkBufferC SetStringR(String val)
Java: MkBufferC buf.SetStringR(String val) → C-API Set the MkBufferC to the val …
native MkBufferC SetI64(long val)
Java: doc_mk_jv_BufferSetI64 → C-API Set the MkBufferC to the val …
native MkBufferC SetBIN(byte[] val)
Java: doc_mk_jv_BufferSetBIN → C-API Set the MkBufferC to the val …
native MkBufferC SetDBL(double val)
Java: doc_mk_jv_BufferSetDBL → C-API Set the MkBufferC to the val …
native MkBufferC SetI16(short val)
Java: doc_mk_jv_BufferSetI16 → C-API Set the MkBufferC to the val …
native MkBufferC SetSTR(String val)
Java: doc_mk_jv_BufferSetSTR → C-API Set the MkBufferC to the val …
native MkBufferC SetBOL(boolean val)
Java: doc_mk_jv_BufferSetBOL → C-API Set the MkBufferC to the val …
native MkBufferC SetBinaryR(byte[] val)
Java: MkBufferC buf.SetBinaryR(byte[] val) → C-API Set the MkBufferC to the val …
native MkBufferC SetFLT(float val)
Java: doc_mk_jv_BufferSetFLT → C-API Set the MkBufferC to the val …
static native MkBufferC CreateSTR(String val)
Java: doc_mk_jv_BufferCreateSTR → C-API Constructor - create a new MkBufferC with an PRIMITIVE...
native MkBufferC Dup()
Java: [constructor] MkBufferC buf.Dup() → C-API Dup-Constructor - create a new MkBufferC instanc...
static native MkBufferC CreateFLT(float val)
Java: doc_mk_jv_BufferCreateFLT → C-API Constructor - create a new MkBufferC with an PRIMITIVE...
native MkBufferC Merge()
Java: [constructor] MkBufferC buf.Merge() → C-API Merge-Constructor - create a new MkBufferC as ...
static native MkBufferC Create(int size)
Java: [constructor,static] MkBufferC MkBufferC.Create(?int size = 0?) → C-API Constructor - crea...
static MkBufferC Create()
Java: [constructor,static] MkBufferC MkBufferC.Create(?int size = 0?) → C-API Constructor - crea...
static MkBufferC Create256()
Java: [constructor,static] MkBufferC MkBufferC.Create256(?int size = 0?) → C-API call the Buffer...
static native MkBufferC CreateTLS(String tlsName, boolean resetB)
Java: [static] MkBufferC MkBufferC.CreateTLS(String tlsName, ?boolean resetB = true?...
MkBufferC()
Java: [constructor,static] MkBufferC MkBufferC.Create(?int size = 0?) → C-API Constructor - crea...
MkBufferC(int size)
Java: [constructor,static] MkBufferC MkBufferC.Create(?int size = 0?) → C-API Constructor - crea...
static native MkBufferC CreateDBL(double val)
Java: doc_mk_jv_BufferCreateDBL → C-API Constructor - create a new MkBufferC with an PRIMITIVE...
static MkBufferC CreateTLS(String tlsName)
Java: [static] MkBufferC MkBufferC.CreateTLS(String tlsName, ?boolean resetB = true?...
static native MkBufferC CreateBIN(byte[] val)
Java: doc_mk_jv_BufferCreateBIN → C-API Constructor - create a new MkBufferC with an PRIMITIVE...
static native MkBufferC CreateI8(byte val)
Java: doc_mk_jv_BufferCreateI8 → C-API Constructor - create a new MkBufferC with an PRIMITIVE TY...
static MkBufferC Create1024()
Java: [constructor,static] MkBufferC MkBufferC.Create1024(?int size = 0?) → C-API call the Buffe...
static native MkBufferC CreateI32(int val)
Java: doc_mk_jv_BufferCreateI32 → C-API Constructor - create a new MkBufferC with an PRIMITIVE...
static native MkBufferC CreateBOL(boolean val)
Java: doc_mk_jv_BufferCreateBOL → C-API Constructor - create a new MkBufferC with an PRIMITIVE...
static native MkBufferC CreateI64(long val)
Java: doc_mk_jv_BufferCreateI64 → C-API Constructor - create a new MkBufferC with an PRIMITIVE...
static native MkBufferC Create64(int size)
Java: [constructor,static] MkBufferC MkBufferC.Create64(?int size = 0?) → C-API call the BufferC...
static native MkBufferC CreateBUF(MkBufferC val)
Java: [constructor,static] MkBufferC MkBufferC.CreateBUF(MkBufferC val) → C-API Constructor - ...
static native MkBufferC CreateI16(short val)
Java: doc_mk_jv_BufferCreateI16 → C-API Constructor - create a new MkBufferC with an PRIMITIVE...
static native MkBufferC Create1024(int size)
Java: [constructor,static] MkBufferC MkBufferC.Create1024(?int size = 0?) → C-API call the Buffe...
static native MkBufferC Create256(int size)
Java: [constructor,static] MkBufferC MkBufferC.Create256(?int size = 0?) → C-API call the Buffer...
static MkBufferC Create64()
Java: [constructor,static] MkBufferC MkBufferC.Create64(?int size = 0?) → C-API call the BufferC...
native MkBufferListC Dup()
Java: [constructor] MkBufferListC bfl.Dup() → C-API Dup-Constructor - create a new MkBufferListC...
native void SetC(String message, String callfunc, int errnum)
Java: err.SetC(String message, ?String callfunc = null?, ?int errnum = -1?) → C-API 'set' and '...
static native MkErrorC DEFAULT()
Java: [static] MkErrorC MkErrorC.DEFAULT() → C-API default-system-error - default-error …
static void Setup()
Java: [static] Setup() → C-API setup jvmkkernel internal memory …