theKernel 10.0
Loading...
Searching...
No Matches
MkBufferC_CC_API

MkBufferC - the abstract class known as buf or buffer is used to create and manage dynamic, generic, mixed typed data. … More...

+ Collaboration diagram for MkBufferC_CC_API:

Topics

 MkBufferC_TOR_CC_API
 MkBufferC - various functions to create, initialize and destroy a MkBufferC
 
 MkBufferC_Get_CC_API
 MkBufferC - various functions to get buffer-data
 
 MkBufferC_Set_CC_API
 MkBufferC - various functions to set buffer-data
 
 MkBufferC_Info_CC_API
 MkBufferC - various functions to get information out of buffer-data
 
 MkBufferC_Access_CC_API
 MkBufferC - various functions to access buffer-data
 
 MkBufferC_Misc_CC_API
 MkBufferC - various functions to work on buffer-data
 
 MkBufferC_Introspection_CC_API
 
 MkBufferC_Class_CC_API
 MkBufferC - define the class …
 

Classes

struct  ccmkkernel::MkBufferC_A
 The ABSTRACT-CLASS used to store a native-type-data-item defined by PRIMITIVE TYPE … → C-API: libmkkernel::MkBufferS More...
 
class  ccmkkernel::MkBufferC
 The ABSTRACT-CLASS used to store a native-type-data-item defined by PRIMITIVE TYPE … → C-API: libmkkernel::MkBufferS More...
 

Functions

 ccmkkernel::MkBufferC::MkBufferC (MK_BUF hdl)
 
static MkBufferCccmkkernel::MkBufferC::MkBufferC_ObjNew (MK_RT_ARGS MK_BUF hdl)
 return MkBufferC from LibMsgqueObject
 
MK_BUF ccmkkernel::MkBufferC::getBUF () const
 return the LibMsgqueObject from current MkBufferC instance
 
MK_BUF ccmkkernel::MkBufferC::getBUF__null_allow () const
 return the LibMsgqueObject from current MkBufferC instance
 
MK_BUFN ccmkkernel::MkBufferC::getBUFN () const
 (const) return the LibMsgqueObject from current MkBufferC instance
 
MK_BUFN ccmkkernel::MkBufferC::getBUFN__null_allow () const
 (const) return the LibMsgqueObject from current MkBufferC instance
 
static MK_BUF ccmkkernel::MkBufferC::getBUF (MkBufferC *clsHdl)
 return LibMsgqueObject from current MkBufferC pointer
 
static MK_BUF ccmkkernel::MkBufferC::getBUF__null_allow (MkBufferC *clsHdl)
 return LibMsgqueObject from current MkBufferC pointer
 
static MK_BUFN ccmkkernel::MkBufferC::getBUFN (const MkBufferC *clsHdl)
 (const) return LibMsgqueObject from current MkBufferC pointer
 
static MK_BUFN ccmkkernel::MkBufferC::getBUFN__null_allow (const MkBufferC *clsHdl)
 (const) return LibMsgqueObject from current MkBufferC pointer
 
static MK_BUF ccmkkernel::MkBufferC::getBUF (const MkBufferC &clsHdl)
 return LibMsgqueObject from current MkBufferC reference
 
static MK_BUF ccmkkernel::MkBufferC::getBUF__null_allow (const MkBufferC &clsHdl)
 return LibMsgqueObject from current MkBufferC reference
 
static MK_BUFN ccmkkernel::MkBufferC::getBUFN (const MkBufferC &clsHdl)
 (const) return LibMsgqueObject from current MkBufferC reference
 
static MK_BUFN ccmkkernel::MkBufferC::getBUFN__null_allow (const MkBufferC &clsHdl)
 (const) return LibMsgqueObject from current MkBufferC reference
 
bool ccmkkernel::MkBufferC::Check () const
 check if pointer is still valid
 
 ccmkkernel::MkBufferC::MkBufferC (const MkBufferC *hdl)
 
 ccmkkernel::MkBufferC::MkBufferC (const MkBufferC &ref)
 
MkBufferCccmkkernel::MkBufferC::operator= (const MkBufferC &buf)
 
MkBufferCccmkkernel::MkBufferC::operator= (const MkBufferC *buf)
 

Variables

static thread_local MkBufferC ccmkkernel::MkBufferC::MK_NULL_REF = {(MK_OBJ)0}
 

Detailed Description

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 ccmkkernel is working on data… ccmkkernel is working on an MkBufferC object or on a list of MkBufferC objects called MkBufferListC.

MkBufferC* CLASS

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:

The ABSTRACT-CLASS MkBufferS is missing the ILS-storage, the FINAL-CLASSES are:

MkBuffer64C, MkBuffer256C and MkBuffer1024C

See also
MkBufferListC, MkBufferStreamC

MkBufferC* CTOR / DTOR

command synonmym
[constructor,static] MkBufferC* MkBufferC::Create(MK_NUM size = 0) ccmkkernel::MkBufferC(MK_SIZE size = 0)
[destructor] buf.Delete() delete buf

Example from server.cc read a buffer-object and convert single-char-type-identifer to string.

      void BUF2 () {
	SendSTART();
	for (int i=0; i<3; i++) {
          // using a reference or a pointer to avoid a "copy", ReadBUF never return NULL
	  const MkBufferC& buf = *ReadBUF();
          // GetType3 is "const", return the type as "string"
	  SendSTR(buf.GetType3());
	  SendBUF(buf);
	}
	SendRETURN();
      }
See also
BufferGetType1 BufferGetType2 BufferGetType3

Function Documentation

◆ Check()

bool ccmkkernel::MkBufferC::Check ( ) const
inline

check if pointer is still valid

Definition at line 154 of file MkBufferC_cc.hh.

154 {
155 return (hdl && MkBufCheck(hdl));
156 };
static bool MkBufCheck(MK_MNGN mng)
check MkBufferS -> libmkkernel::MkObjectS::signature …

◆ getBUF() [1/3]

MK_BUF ccmkkernel::MkBufferC::getBUF ( ) const
inline

return the LibMsgqueObject from current MkBufferC instance

Definition at line 86 of file MkBufferC_cc.hh.

86 {
87 MK_BUF ret = reinterpret_cast<MK_BUF>(hdl);
88 if (unlikely(ret == NULL)) InstHdlIsNullError();
89 return ret;
90 };
#define InstHdlIsNullError()
struct MkBufferS * MK_BUF
class-shortcut for struct MkBufferS *, all shortcut using the XX_YYY syntax (only for public API) …
#define unlikely(x)
+ Here is the caller graph for this function:

◆ getBUF() [2/3]

static MK_BUF ccmkkernel::MkBufferC::getBUF ( const MkBufferC & clsHdl)
inlinestatic

return LibMsgqueObject from current MkBufferC reference

Definition at line 134 of file MkBufferC_cc.hh.

134 {
135 return clsHdl.getBUF();
136 };

◆ getBUF() [3/3]

static MK_BUF ccmkkernel::MkBufferC::getBUF ( MkBufferC * clsHdl)
inlinestatic

return LibMsgqueObject from current MkBufferC pointer

Definition at line 110 of file MkBufferC_cc.hh.

110 {
111 MK_BUF ret = clsHdl ? reinterpret_cast<MK_BUF>(clsHdl->hdl) : NULL;
112 if (unlikely(ret == NULL)) ClassHdlIsNullError(MkBufferC);
113 return ret;
114 };
#define ClassHdlIsNullError(cls)

◆ getBUF__null_allow() [1/3]

MK_BUF ccmkkernel::MkBufferC::getBUF__null_allow ( ) const
inline

return the LibMsgqueObject from current MkBufferC instance

Definition at line 93 of file MkBufferC_cc.hh.

93 {
94 return reinterpret_cast<MK_BUF>(hdl);
95 };
+ Here is the caller graph for this function:

◆ getBUF__null_allow() [2/3]

static MK_BUF ccmkkernel::MkBufferC::getBUF__null_allow ( const MkBufferC & clsHdl)
inlinestatic

return LibMsgqueObject from current MkBufferC reference

Definition at line 139 of file MkBufferC_cc.hh.

139 {
140 return clsHdl.getBUF__null_allow();
141 };

◆ getBUF__null_allow() [3/3]

static MK_BUF ccmkkernel::MkBufferC::getBUF__null_allow ( MkBufferC * clsHdl)
inlinestatic

return LibMsgqueObject from current MkBufferC pointer

Definition at line 117 of file MkBufferC_cc.hh.

117 {
118 return clsHdl ? reinterpret_cast<MK_BUF>(clsHdl->hdl) : NULL;
119 };

◆ getBUFN() [1/3]

MK_BUFN ccmkkernel::MkBufferC::getBUFN ( ) const
inline

(const) return the LibMsgqueObject from current MkBufferC instance

Definition at line 98 of file MkBufferC_cc.hh.

98 {
99 MK_BUFN ret = reinterpret_cast<MK_BUFN>(hdl);
100 if (unlikely(ret == NULL)) InstHdlIsNullError();
101 return ret;
102 };
const struct MkBufferS * MK_BUFN
class-shortcut for const struct MkBufferS *, all const shortcut using the XX_YYYC syntax (only for pu...
+ Here is the caller graph for this function:

◆ getBUFN() [2/3]

static MK_BUFN ccmkkernel::MkBufferC::getBUFN ( const MkBufferC & clsHdl)
inlinestatic

(const) return LibMsgqueObject from current MkBufferC reference

Definition at line 144 of file MkBufferC_cc.hh.

144 {
145 return clsHdl.getBUFN();
146 };

◆ getBUFN() [3/3]

static MK_BUFN ccmkkernel::MkBufferC::getBUFN ( const MkBufferC * clsHdl)
inlinestatic

(const) return LibMsgqueObject from current MkBufferC pointer

Definition at line 122 of file MkBufferC_cc.hh.

122 {
123 MK_BUFN ret = clsHdl ? reinterpret_cast<MK_BUFN>(clsHdl->hdl) : NULL;
124 if (unlikely(ret == NULL)) ClassHdlIsNullError(MkBufferC);
125 return ret;
126 };

◆ getBUFN__null_allow() [1/3]

MK_BUFN ccmkkernel::MkBufferC::getBUFN__null_allow ( ) const
inline

(const) return the LibMsgqueObject from current MkBufferC instance

Definition at line 105 of file MkBufferC_cc.hh.

105 {
106 return reinterpret_cast<MK_BUFN>(hdl);
107 };
+ Here is the caller graph for this function:

◆ getBUFN__null_allow() [2/3]

static MK_BUFN ccmkkernel::MkBufferC::getBUFN__null_allow ( const MkBufferC & clsHdl)
inlinestatic

(const) return LibMsgqueObject from current MkBufferC reference

Definition at line 149 of file MkBufferC_cc.hh.

149 {
150 return clsHdl.getBUFN__null_allow();
151 };

◆ getBUFN__null_allow() [3/3]

static MK_BUFN ccmkkernel::MkBufferC::getBUFN__null_allow ( const MkBufferC * clsHdl)
inlinestatic

(const) return LibMsgqueObject from current MkBufferC pointer

Definition at line 129 of file MkBufferC_cc.hh.

129 {
130 return clsHdl ? reinterpret_cast<MK_BUFN>(clsHdl->hdl) : NULL;
131 };

◆ MkBufferC() [1/3]

ccmkkernel::MkBufferC::MkBufferC ( const MkBufferC & ref)
inline

Definition at line 30 of file MkBufferC_inline_cc.hh.

30 {
31 MkRtSetup_O(copy.hdl);
33 }
void atomInit(MK_OBJ obj)
#define MkObjDup(...)
#define MkRtSetup_O(o)

◆ MkBufferC() [2/3]

ccmkkernel::MkBufferC::MkBufferC ( const MkBufferC * hdl)
inline

Definition at line 24 of file MkBufferC_inline_cc.hh.

24 {
25 if (copy == NULL) throw MkReferenceNullExceptionC("MkBufferC");
26 MkRtSetup_O(copy->hdl);
27 MkObjectC::atomInit(MkObjDup(copy->hdl));
28 }

◆ MkBufferC() [3/3]

ccmkkernel::MkBufferC::MkBufferC ( MK_BUF hdl)
inline

Definition at line 77 of file MkBufferC_cc.hh.

◆ MkBufferC_ObjNew()

static MkBufferC * ccmkkernel::MkBufferC::MkBufferC_ObjNew ( MK_RT_ARGS MK_BUF hdl)
inlinestatic

return MkBufferC from LibMsgqueObject

Definition at line 81 of file MkBufferC_cc.hh.

81 {
82 return (hdl ? static_cast<MkBufferC*>(MkObjectC::atomObjNew(MK_RT_CALL MkBufferC_X2obj(hdl))) : &MK_NULL_REF);
83 }
static thread_local MkBufferC MK_NULL_REF
static MK_PTR atomObjNew(MK_RT_ARGS MK_OBJ obj)
#define MK_RT_CALL
+ Here is the caller graph for this function:

◆ operator=() [1/2]

MkBufferC & ccmkkernel::MkBufferC::operator= ( const MkBufferC & buf)
inline

Definition at line 35 of file MkBufferC_inline_cc.hh.

35 {
36 MkRtSetup_O(copy.hdl);
37 MkObjCopy(hdl,copy.hdl);
38 return *this;
39 }
#define MkObjCopy(...)

◆ operator=() [2/2]

MkBufferC & ccmkkernel::MkBufferC::operator= ( const MkBufferC * buf)
inline

Definition at line 41 of file MkBufferC_inline_cc.hh.

41 {
42 if (copy == NULL) throw MkReferenceNullExceptionC("MkBufferC");
43 MkRtSetup_O(copy->hdl);
44 MkObjCopy(hdl,copy->hdl);
45 return *this;
46 }

Variable Documentation

◆ MK_NULL_REF

thread_local MkBufferC ccmkkernel::MkBufferC::MK_NULL_REF = {(MK_OBJ)0}
static

Definition at line 38 of file MkBufferC_cc.hh.