12using System.Reflection;
13using System.Runtime.InteropServices;
14using System.Runtime.CompilerServices;
15using System.Collections.Generic;
16using System.Threading;
24 public partial class MkBufferStreamC
26 public partial class MkBufferStreamC : MkObjectC
29 private readonly
static ConstructorInfo ctor =
getCtor(typeof(MkBufferStreamC));
30 private readonly
static ThreadLocal<MkBufferStreamC> MK_NULL =
new ThreadLocal<MkBufferStreamC>(() => {
42 private static IntPtr MkBufferStreamC_SelfCreate (IntPtr
mkrt, IntPtr obj, IntPtr env) {
46 private static void MkBufferStreamC_SelfUnlink (IntPtr
mkrt, IntPtr
self, IntPtr env) {
50 internal static void SetupThreadBUS (IntPtr
mkrt) {
51 Mk.MkCsTypeUpdate(
mkrt, MkCsTypeLookupE.BUS, MkBufferStreamC_SelfCreate, MkBufferStreamC_SelfUnlink);
54 #if !META_STATIC_OVERWRITE
56 static MkBufferStreamC() {
59 SetupThreadBUS(IntPtr.Zero);
65 internal MkBufferStreamC (IntPtr bufP) : base(bufP) {
74 public partial class MkBufferStreamC {
84 IntPtr __retVal__L =
Mk.MkBufferStreamHandleResolve(IntPtr.Zero, netHdl);
96 public partial class MkBufferStreamC {
106 IntPtr __retVal__L =
Mk.MkBufferStreamNext(
hdl);
112 IntPtr __retVal__L =
Mk.MkBufferStreamPrev(
hdl);
120 IntPtr __retVal__L =
Mk.MkBufferStreamInstances(IntPtr.Zero);
128 public partial class MkBufferStreamC {
138 IntPtr __retVal__L =
Mk.MkBufferStreamGetNull();
146 public partial class MkBufferStreamC {
157 IntPtr __retVal__L =
Mk.MkBufferStreamCopy(
mkrt,
hdl, src_hdl);
163 IntPtr __retVal__L =
Mk.MkBufferStreamReset(
mkrt,
hdl);
169 IntPtr __retVal__L =
Mk.MkBufferStreamToBFL(
mkrt,
hdl);
193 public partial class MkBufferStreamC {
237 Int32 __retVal__L =
Mk.MkBufferStreamReadGetNumItems(
mkrt,
hdl);
243 bool __retVal__L =
Mk.MkBufferStreamReadItemExists(
mkrt,
hdl);
270 Mk.MkBinaryR val_out_ref;
273 byte[] val_out =
new byte[(int)val_out_ref.size];
274 Marshal.Copy(val_out_ref.data,val_out,0,(
int)val_out_ref.size);
323 return (
byte)val_out;
339 return Marshal.PtrToStringAnsi(val_out);
346 public partial class MkBufferStreamC {
356 IntPtr __retVal__L =
Mk.MkBufferStreamMerge(
mkrt,
hdl);
357 if (__retVal__L == IntPtr.Zero) {
367 IntPtr __retVal__L =
Mk.MkBufferStreamDup(
mkrt,
hdl);
368 if (__retVal__L == IntPtr.Zero) {
377 protected static IntPtr
CTOR (
int size = 0) {
378 IntPtr __retVal__L =
Mk.MkBufferStreamCreate(IntPtr.Zero, IntPtr.Zero, size);
379 if (__retVal__L == IntPtr.Zero) {
382 return (IntPtr)__retVal__L;
390 IntPtr __retVal__L =
Mk.MkBufferStreamCreate(IntPtr.Zero, IntPtr.Zero, size);
391 if (__retVal__L == IntPtr.Zero) {
399 IntPtr __retVal__L =
Mk.MkBufferStreamCreate1024(IntPtr.Zero, size);
400 if (__retVal__L == IntPtr.Zero) {
401 throw new MkInitError(
"MkBufferStreamC.Create1024");
408 IntPtr __retVal__L =
Mk.MkBufferStreamCreate16384(IntPtr.Zero, size);
409 if (__retVal__L == IntPtr.Zero) {
410 throw new MkInitError(
"MkBufferStreamC.Create16384");
417 IntPtr __retVal__L =
Mk.MkBufferStreamCreate256(IntPtr.Zero, size);
418 if (__retVal__L == IntPtr.Zero) {
419 throw new MkInitError(
"MkBufferStreamC.Create256");
426 IntPtr __retVal__L =
Mk.MkBufferStreamCreate64(IntPtr.Zero, size);
427 if (__retVal__L == IntPtr.Zero) {
437 IntPtr tlsName_cstr = Marshal.StringToHGlobalAnsi(tlsName);
438 IntPtr __retVal__L =
Mk.MkBufferStreamCreateTLS(IntPtr.Zero, tlsName_cstr, resetB);
439 Marshal.FreeHGlobal(tlsName_cstr);
447 public partial class MkBufferStreamC {
464 var val_size = Marshal.SizeOf(val[0]) * val.Length;
465 var val_data = Marshal.AllocHGlobal(val_size);
466 Marshal.Copy(val,0,val_data,val_size);
555 IntPtr val_cstr = Marshal.StringToHGlobalAnsi(val);
557 Marshal.FreeHGlobal(val_cstr);
MkBufferC - the abstract class known as buf or buffer is used to create and manage dynamic,...
static MkBufferC MkBufferC_ObjNew(IntPtr hdl)
MkBufferListC - the class known as bfl or buffer-list is used to create and manage a list of MkBuffer...
static MkBufferListC MkBufferListC_ObjNew(IntPtr hdl)
MkBufferStreamC - the abstract class known as bus or stream is a subclass of MkBufferC and is used fo...
static MkBufferStreamC MkBufferStreamC_ObjNew(IntPtr hdl)
MkErrorC - the class known as err or error is used to create and manage an error message …
static void Check(IntPtr ctx, MkErrorE err)
static object atomObjNew(Type type, ConstructorInfo ctor, IntPtr obj)
static IntPtr getOBJ_null_allow(MkObjectC obj)
static object atomObjCreate(Type type, ConstructorInfo ctor, IntPtr obj)
static void atomSelfUnlink(IntPtr self, IntPtr env)
static object atomSelfNull(ConstructorInfo ctor)
static IntPtr getOBJ(string cls, MkObjectC obj)
static ConstructorInfo getCtor(Type type)
static IntPtr atomSelfCreate(ConstructorInfo ctor, IntPtr obj, IntPtr env)
static Mk.MkBinaryR MkBinaryCreate(long size, IntPtr data)
new static MkBufferStreamC Instances()
C#: [static] MkBufferStreamC MkBufferStreamC.Instances() → C-API get head-instance from linked-l...
new static MkBufferStreamC GetNull()
C#: [static] MkBufferStreamC MkBufferStreamC.GetNull() → C-API Null-Slot - return a MkBufferStre...
new MkBufferStreamC Prev()
C#: MkBufferStreamC bus.Prev() → C-API get previous instance from linked-list of MkBufferStream...
new static MkBufferStreamC HandleResolve(Int32 netHdl)
C#: [static] MkBufferStreamC MkBufferStreamC.HandleResolve(Int32 netHdl) → C-API Handle-Resolve-...
new MkBufferStreamC Next()
C#: MkBufferStreamC bus.Next() → C-API get next instance from linked-list of MkBufferStreamS ty...
MkBufferListC ToBFL()
C#: MkBufferListC bus.ToBFL() → C-API convert the bus into a MkBufferListC …
MkBufferStreamC Copy(MkBufferStreamC src)
C#: MkBufferStreamC bus.Copy(MkBufferStreamC src) → C-API copy the MkBufferStreamC from src to ...
void PosToStart()
C#: bus.PosToStart() → C-API set the current-access-position to the start of MkBufferStreamC …
void ResetFull()
C#: bus.ResetFull() → C-API reset a MkBufferStreamC to the length zero and free allocated stora...
MkBufferStreamC Reset()
C#: MkBufferStreamC bus.Reset() → C-API reset a MkBufferStreamC to the length zero …
bool ReadItemExists()
C#: bool bus.ReadItemExists() → C-API check if an item exists in the read-data-package …
MkBufferListC ReadALL(MkBufferListC val_inout=null)
C#: MkBufferListC bus.ReadALL(MkBufferListC val_inout = null) → C-API get a temporary MkBufferL...
byte[] ReadBIN()
C#: doc_mk_cs_BufferStreamReadBIN → C-API read a val_out from the MkBufferStreamC …
void ReadL_END()
C#: bus.ReadL_END() → C-API END read a list-item-type from the MkBufferStreamC …
int ReadI32()
C#: doc_mk_cs_BufferStreamReadI32 → C-API read a val_out from the MkBufferStreamC …
MkBufferC ReadBUF()
C#: MkBufferC bus.ReadBUF() → C-API read a val_out from the MkBufferStreamC …
long ReadLONG()
C#: long bus.ReadLONG() → C-API read the long native object from the MkBufferStreamC …
string ReadSTR()
C#: doc_mk_cs_BufferStreamReadSTR → C-API read a val_out from the MkBufferStreamC …
long ReadI64()
C#: doc_mk_cs_BufferStreamReadI64 → C-API read a val_out from the MkBufferStreamC …
MkBufferListC ReadBFL()
C#: MkBufferListC bus.ReadBFL() → C-API read a MkBufferListC from the MkBufferStreamC …
bool ReadBOL()
C#: doc_mk_cs_BufferStreamReadBOL → C-API read a val_out from the MkBufferStreamC …
double ReadDBL()
C#: doc_mk_cs_BufferStreamReadDBL → C-API read a val_out from the MkBufferStreamC …
MkTypeE ReadGetNextType()
C#: MkTypeE bus.ReadGetNextType() → C-API get the type (MkTypeE) of the next Item in the MkBuff...
void ReadL_START(MkBufferC buf=null)
C#: bus.ReadL_START(MkBufferC buf = null) → C-API START read a list-item-type from the MkBuffer...
int ReadGetNumItems()
C#: int bus.ReadGetNumItems() → C-API get the number of items left in the MkBufferStreamC …
float ReadFLT()
C#: doc_mk_cs_BufferStreamReadFLT → C-API read a val_out from the MkBufferStreamC …
void ReadUndo()
C#: bus.ReadUndo() → C-API undo the last MkBufferStreamC READ function call …
byte ReadI8()
C#: doc_mk_cs_BufferStreamReadI8 → C-API read a val_out from the MkBufferStreamC …
MkBufferStreamC(int size=0)
CONSTRUCTOR.
static MkBufferStreamC CreateTLS(string tlsName, bool resetB=true)
C#: [static] MkBufferStreamC MkBufferStreamC.CreateTLS(string tlsName, bool resetB = true) → C-API ...
MkBufferStreamC Dup()
C#: [constructor] MkBufferStreamC src.Dup() → C-API Dup-Constructor - create a new MkBufferStrea...
static MkBufferStreamC Create(int size=0)
C#: [constructor,static] MkBufferStreamC MkBufferStreamC.Create(int size = 0) → C-API create and...
static MkBufferStreamC Create256(int size=0)
C#: [constructor,static] MkBufferStreamC MkBufferStreamC.Create256(int size = 0) → C-API call th...
static MkBufferStreamC Create64(int size=0)
C#: [constructor,static] MkBufferStreamC MkBufferStreamC.Create64(int size = 0) → C-API call the...
static IntPtr CTOR(int size=0)
C#: [constructor,static] MkBufferStreamC MkBufferStreamC.Create(int size = 0) → C-API create and...
MkBufferStreamC Merge()
C#: [constructor] MkBufferStreamC bus.Merge() → C-API Merge-Constructor - create a new MkBufferS...
static MkBufferStreamC Create1024(int size=0)
C#: [constructor,static] MkBufferStreamC MkBufferStreamC.Create1024(int size = 0) → C-API call t...
static MkBufferStreamC Create16384(int size=0)
C#: [constructor,static] MkBufferStreamC MkBufferStreamC.Create16384(int size = 0) → C-API call ...
void WriteDBL(double val)
C#: doc_mk_cs_BufferStreamWriteDBL → C-API write a PRIMITIVE TYPE into the MkBufferStreamC …
void WriteBIN(byte[] val)
C#: doc_mk_cs_BufferStreamWriteBIN → C-API write a PRIMITIVE TYPE into the MkBufferStreamC …
void WriteHDL(int val)
C#: bus.WriteHDL(int val) → C-API write the handle into the MkBufferStreamC …
void WriteI64(long val)
C#: doc_mk_cs_BufferStreamWriteI64 → C-API write a PRIMITIVE TYPE into the MkBufferStreamC …
void WriteI32(int val)
C#: doc_mk_cs_BufferStreamWriteI32 → C-API write a PRIMITIVE TYPE into the MkBufferStreamC …
void WriteLONG(long val)
C#: bus.WriteLONG(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 MkBufferStre...
void WriteBFL(MkBufferListC bfl)
C#: bus.WriteBFL(MkBufferListC bfl) → C-API write a MkBufferListC into the MkBufferStreamC …
void WriteBUS_FLAT(MkBufferStreamC add)
C#: bus.WriteBUS_FLAT(MkBufferStreamC add) → C-API write a MkBufferStreamC into the MkBufferStr...
void WriteSTR(string val, int len=-1)
C#: doc_mk_cs_BufferStreamWriteSTR → C-API write a PRIMITIVE TYPE into the MkBufferStreamC …
void WriteFLT(float val)
C#: doc_mk_cs_BufferStreamWriteFLT → C-API write a PRIMITIVE TYPE into the MkBufferStreamC …
void WriteBUF(MkBufferC val)
C#: bus.WriteBUF(MkBufferC val) → C-API write a PRIMITIVE TYPE into the MkBufferStreamC …
void WriteBOL(bool val)
C#: doc_mk_cs_BufferStreamWriteBOL → 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 WriteI8(byte val)
C#: doc_mk_cs_BufferStreamWriteI8 → C-API write a PRIMITIVE TYPE into the MkBufferStreamC …
void WriteL_START()
C#: bus.WriteL_START() → C-API START write a list-item-type into the MkBufferStreamC …
void ErrorCheck(MkErrorE err)
#define MK_NULL
The Programming-Language-Micro-Kernel (PLMK) NULL value as null in C# …
MkErrorE
→ C-API: MkErrorE → C-API: MkErrorE
MkTypeE
→ C-API: MkTypeE → C-API: MkTypeE