theKernel 10.0
|
MkBufferC - the abstract class known as buf or buffer is used to create and manage dynamic, generic, mixed typed data. … More...
Public Member Functions | |
MkBufferC | AppendC (string val) |
C#: → C-API append a single string to a MkBufferC object … | |
MkBufferC | AppendStringR (string val) |
C#: → C-API append a single string to a MkBufferC object … | |
int | Pop (string val) |
C#: → C-API delete str from the MkBufferC … | |
int | Push (string val) |
C#: → C-API add str to the MkBufferC … | |
new MkBufferC | Next () |
C#: → C-API get next instance from linked-list of MkBufferS type | |
new MkBufferC | Prev () |
C#: → C-API get previous instance from linked-list of MkBufferS type | |
MkBufferListC | GetBFL (MkBufferListC val_inout=null) |
C#: → C-API function to read an MkBufferListC from an MkBufferC object … | |
MkBufferC | GetBUF () |
C#: → C-API get a val_out from a MkBufferC … | |
byte[] | GetBIN () |
C#: doc_mk_cs_BufferGetBIN → C-API get a val_out from a MkBufferC … | |
bool | GetBOL () |
C#: doc_mk_cs_BufferGetBOL → C-API get a val_out from a MkBufferC … | |
double | GetDBL () |
C#: doc_mk_cs_BufferGetDBL → C-API get a val_out from a MkBufferC … | |
float | GetFLT () |
C#: doc_mk_cs_BufferGetFLT → C-API get a val_out from a MkBufferC … | |
short | GetI16 () |
C#: doc_mk_cs_BufferGetI16 → C-API get a val_out from a MkBufferC … | |
int | GetI32 () |
C#: doc_mk_cs_BufferGetI32 → C-API get a val_out from a MkBufferC … | |
long | GetI64 () |
C#: doc_mk_cs_BufferGetI64 → C-API get a val_out from a MkBufferC … | |
byte | GetI8 () |
C#: doc_mk_cs_BufferGetI8 → C-API get a val_out from a MkBufferC … | |
string | GetSTR () |
C#: doc_mk_cs_BufferGetSTR → C-API get a val_out from a MkBufferC … | |
string | GetStringR () |
C#: → C-API get a val_out from a MkBufferC … | |
char | GetType1 () |
C#: → C-API return the type from a MkBufferC as single character value … | |
MkTypeE | GetType2 () |
C#: → C-API return the MkTypeE from a MkBufferC … | |
string | GetType3 () |
C#: → C-API return the type from a MkBufferC as single character string … | |
bool | IsLocal () |
C#: → C-API Check if the MkBufferC is local (temporary), not local mean global … | |
void | LogS (string varname="buf", MkObjectC fmtobj=null, [CallerMemberName]string callfunc=null) |
C#: → C-API log the short MkBufferC object data to the MkLogFileC (default: stderr) … | |
MkBufferC | Copy (MkBufferC srce) |
C#: → C-API copy the MkBufferC from srce to dest … | |
MkBufferC | Reset () |
C#: → C-API reset a MkBufferC to the length zero … | |
MkBufferC | SizeAdd (int size) |
C#: → C-API add size storage to the buf … | |
MkBufferC | SizeNew (int size) |
C#: → C-API alloc min size storage to the buf … | |
MkBufferC | Temp () |
C#: → C-API create a temporary copy of the MkBufferC buf … | |
void | CastTo (MkTypeE typ) |
C#: → C-API change the type of an MkBufferC to type … | |
int | Cmp (MkBufferC buf2) |
C#: → C-API compare TWO MkBufferC objects like strcmp do it for strings … | |
void | ResetFull () |
C#: → C-API reset a MkBufferC to the length zero and free allocated storage… | |
MkBufferC | SetBIN (byte[] val) |
C#: doc_mk_cs_BufferSetBIN → C-API Set the MkBufferC to the val … | |
MkBufferC | SetBOL (bool val) |
C#: doc_mk_cs_BufferSetBOL → C-API Set the MkBufferC to the val … | |
MkBufferC | SetBUF (MkBufferC val) |
C#: → C-API Set the MkBufferC to the val … | |
MkBufferC | SetBinaryR (byte[] val) |
C#: → C-API Set the MkBufferC to the val … | |
MkBufferC | SetDBL (double val) |
C#: doc_mk_cs_BufferSetDBL → C-API Set the MkBufferC to the val … | |
MkBufferC | SetFLT (float val) |
C#: doc_mk_cs_BufferSetFLT → C-API Set the MkBufferC to the val … | |
MkBufferC | SetI16 (short val) |
C#: doc_mk_cs_BufferSetI16 → C-API Set the MkBufferC to the val … | |
MkBufferC | SetI32 (int val) |
C#: doc_mk_cs_BufferSetI32 → C-API Set the MkBufferC to the val … | |
MkBufferC | SetI64 (long val) |
C#: doc_mk_cs_BufferSetI64 → C-API Set the MkBufferC to the val … | |
MkBufferC | SetI8 (byte val) |
C#: doc_mk_cs_BufferSetI8 → C-API Set the MkBufferC to the val … | |
MkBufferC | SetSTR (string val) |
C#: doc_mk_cs_BufferSetSTR → C-API Set the MkBufferC to the val … | |
MkBufferC | SetStringR (string val) |
C#: → C-API Set the MkBufferC to the val … | |
MkBufferC | Merge () |
C#: → C-API Merge-Constructor - create a new MkBufferC as a merge from an existing object … | |
MkBufferC | Dup () |
C#: → C-API Dup-Constructor - create a new MkBufferC instance as copy from an existing MkBufferC instance | |
MkBufferC (int size=0) | |
CONSTRUCTOR. | |
object | ToObject () |
C#: → C-API return the native language object from a MkBufferC … | |
![]() | |
delegate void | MkObjectDeleteSCB (string typeName, int typeHdl, int objHdl) |
implements the csmkkernel API object: public version from MkObjectDeleteSCB as method | |
void | ErrorCheck (MkErrorE err) |
bool | Check () |
string | ToNameOfClass () |
C#: → C-API Class-Slot - returns the C#-Class-Name of the obj as string | |
void | HandleDelete () |
C#: → C-API Handle-Delete-Slot - delete a netObj from handle-storage … | |
bool | HandleExists () |
C#: → C-API check if obj has already a handle defined… | |
Int32 | HandleGet () |
C#: → C-API Handle-Get-Slot - returns a export-hdl to the MkObjectC useable for external storage | |
Int32 | HandleGetOfType () |
C#: → C-API Export-Slot - returns typeHdl of the obj . | |
Int32 | HandleGetOr0 () |
C#: → C-API return export-hdl or 0 in not created… | |
MkObjectC | Next () |
C#: → C-API get next instance from linked-list of MkObjectS type | |
MkObjectC | Prev () |
C#: → C-API get previous instance from linked-list of MkObjectS type | |
void | DbgDump (string message="var", [CallerMemberName]string callfunc=null) |
C#: → C-API debug: Dump a instance to stderr with LNG and MQ internal data… | |
void | DbgL (string message, int debug=0, [CallerMemberName]string callfunc=null, int lvl=0) |
C#: → C-API debug: write a instance-marker to the MkLogFileC (default: stderr) using the fmtobj as prefix … | |
void | DbgLogC ([CallerMemberName]string callfunc=null) |
C#: → C-API debug: write a short-obj-summary to MkLogFileC (default: stderr) … | |
void | DbgO ([CallerMemberName]string callfunc=null) |
C#: → C-API debug: write the object-details to MkLogFileC (default: stderr) … | |
void | DbgSTACK (int skip=0, int num=-1, [CallerMemberName]string callfunc=null) |
C#: → C-API debug: write the stack-trace to MkLogFileC (default: stderr) … | |
void | LogC (string message, int debug=0, [CallerMemberName]string callfunc=null) |
C#: → C-API write a logging-message to MkLogFileC (default: stderr) using the internal format … | |
void | LogHEX (string callfunc, byte[] data) |
C#: → C-API log binaray data as HEX into the MkLogFileC (default: stderr) … | |
void | Log (MkObjectC fmtobj=null, int debug=0, [CallerMemberName]string callfunc=null, int lvl=0) |
C#: → C-API Log-Slot - log a summary of an object to the MkLogFileC (default: stderr) target … | |
void | LogLong (MkObjectC fmtobj=null, int debug=0, [CallerMemberName]string callfunc=null, int lvl=0) |
C#: → C-API log the MkObjectS verbose into the MkLogFileC (default: stderr) … | |
void | LogShort (MkObjectC fmtobj=null, int debug=0, [CallerMemberName]string callfunc=null, int lvl=0) |
C#: → C-API log the MkObjectS into the MkLogFileC (default: stderr) … | |
void | LogType (MkObjectC fmtobj=null, int debug=0, [CallerMemberName]string callfunc=null, int lvl=0) |
C#: → C-API log the tyoe of the MkObjectS into the MkLogFileC (default: stderr) … | |
MkErrorC | ErrorCatch (Exception exception=null, [CallerMemberName]string callfunc=null) |
C#: → C-API convert a programming-language-error into an csmkkernel error … | |
MkErrorC | ToError () |
C#: → C-API Error-Slot - return an error-object pre initialized with obj data. | |
bool | IsNull () |
C#: → C-API ckeck if the object is null | |
string | ToName () |
C#: → C-API Info-Slot - returns brief information about the obj as a string | |
string | ToNameOfType () |
C#: → C-API Type-Slot - returns the LibMkKernel-Type-Name of the obj as a string | |
override string | ToString () |
C#: → C-API String-Slot - returns the string representation of the inst … | |
int | RefGet () |
MkRefGetP | |
void | SysKill (int pid, int signal) |
MkSysKill | |
int | SysGetPid () |
MkSysGetPid | |
void | Dispose () |
C#: → C-API Dispose-Slot - untie the connection between the Native-C#-Instance and the csmkkernel-Instance. | |
void | Delete () |
C#: → C-API Delete-Slot - delete an instance. | |
Static Protected Member Functions | |
static IntPtr | CTOR (int size=0) |
C#: → C-API Constructor - create a new MkBufferC with minimum size of internal storage … | |
![]() | |
static object | atomObjNew (Type type, ConstructorInfo ctor, IntPtr obj) |
static object | atomObjCreate (Type type, ConstructorInfo ctor, IntPtr obj) |
static IntPtr | atomSelfCreate (ConstructorInfo ctor, IntPtr obj, IntPtr env) |
static object | atomSelfNull (ConstructorInfo ctor) |
static void | atomSelfUnlink (IntPtr self, IntPtr env) |
static ConstructorInfo | getCtor (Type type) |
static string | Name (IntPtr mkrt, IntPtr obj) |
C#: → C-API Info-Slot - returns brief information about the obj as a string | |
Additional Inherited Members | |
![]() | |
MkObjectC (IntPtr obj) | |
MkObjectC () | |
virtual void | Dispose (bool disposing) |
Support IDisposable. | |
![]() | |
IntPtr | pmkrt = IntPtr.Zero |
![]() | |
![]() | |
![]() | |
IntPtr | hdl [get, set] |
IntPtr | hdl_null_allow [get, set] |
IntPtr | mkrt [get, set] |
MkBufferC - the abstract class known as buf or buffer is used to create and manage dynamic, generic, mixed typed data. …
The MkBufferC is used to store PRIMITIVE TYPE data. If csmkkernel is working on data… csmkkernel is working on an MkBufferC object or on a list of MkBufferC objects called MkBufferListC.
The ABSTRACT-CLASS used to store a native-type-data-item defined by PRIMITIVE TYPE …
C-Kernel-Details
The ABSTRACT-CLASS MkBufferS is used to store MkTypeE data in an MkBufferS::storage …
A new MkBufferS is always preallocated with the predefined ILS-storage (MkBufferS::ils_data), but can switch to a MALLOC-storage if the storage requirements of the user exceed the predefined MkBufferS::ilsS::size.
A MkBufferS never run out of storage.
The basic goal of the ILS-storage technology is to minimize the usage of MALLOC, this mean that the MkBufferS::ilsS::size should be large enought to be sufficient for the user needs.
The following conditions must always be met for the ILS memory:
MkBufferSPtr->ils_data - MkBufferSPtr
.The ABSTRACT-CLASS MkBufferS is missing the ILS-storage, the FINAL-CLASSES are:
command | synonmym |
---|---|
[constructor,static] MkBufferC MkBufferC.Create(int size = 0) | csmkkernel.MkBufferC(wide size = 0) |
[destructor] buf.Delete() | buf.Dispose() |
Example from server.cs
→ read a buffer-object and convert single-char-type-identifer to string.
private void BUF2 () { SendSTART(); for (int i=0; i<3; i++) { MkBufferC buf = ReadBUF(); SendSTR(buf.GetType1().ToString()); SendBUF(buf); } SendRETURN(); }
Definition at line 716 of file MkBufferC.cs.
|
inlinestatic |
Definition at line 34 of file MkBufferC.cs.