theLink 10.0
Loading...
Searching...
No Matches
MqFactoryC_CC_API

MqFactoryC - the class known as fct or factory is used to provide an interface to create one or more new MqContextCMore...

+ Collaboration diagram for MqFactoryC_CC_API:

Topics

 MqFactoryC_Class_CC_API
 MqFactoryC - define the class …
 
 MqFactoryC_TOR_CC_API
 MqFactoryC - various functions to create, initialize and destroy a factory
 
 MqFactoryC_Get_CC_API
 MqFactoryC - various functions to 'get' data out of a factory
 
 MqFactoryC_Misc_CC_API
 MqFactoryC - various functions to work on a factory
 

Classes

struct  ccmqmsgque::MqFactoryC_A
 data used to define a factory → C-API: libmqmsgque::MqFactoryS More...
 
class  ccmqmsgque::MqFactoryC
 data used to define a factory → C-API: libmqmsgque::MqFactoryS More...
 
class  ccmqmsgque::MqFactoryCT< T >
 template wrapper for libmqmsgque::MqFactoryS More...
 

Functions

static MqFactoryCccmqmsgque::MqFactoryC::MqFactoryC_GetSelf (MQ_FCT hdl)
 
static MK_PTR ccmqmsgque::MqFactoryC::MqFactoryC_selfCreate (MK_RT_ARGS MK_OBJ obj, MK_PTR const env)
 
static void ccmqmsgque::MqFactoryC::MqFactoryC_selfDelete (MK_RT_ARGS MK_PTR self, MK_PTR env)
 
static void ccmqmsgque::MqFactoryC::MqFactoryC_selfUnlink (MK_RT_ARGS MK_PTR self, MK_PTR env)
 
void ccmqmsgque::MqFactoryC::MqFactoryC_Init (MQ_FCT hdl)
 
static MqFactoryCccmqmsgque::MqFactoryC::MqFactoryC_ObjCreate (MK_RT_ARGS MQ_FCT hdl)
 
 ccmqmsgque::MqFactoryC::MqFactoryC (MK_OBJ obj)
 
 ccmqmsgque::MqFactoryC::MqFactoryC (MQ_FCT hdl)
 
static MqFactoryCccmqmsgque::MqFactoryC::MqFactoryC_ObjNew (MK_RT_ARGS MQ_FCT hdl)
 return MqFactoryC from LibMsgqueObject
 
MQ_FCT ccmqmsgque::MqFactoryC::getFCT () const
 return the LibMsgqueObject from current MqFactoryC instance
 
MQ_FCT ccmqmsgque::MqFactoryC::getFCT__null_allow () const
 return the LibMsgqueObject from current MqFactoryC instance
 
MQ_FCTN ccmqmsgque::MqFactoryC::getFCTN () const
 (const) return the LibMsgqueObject from current MqFactoryC instance
 
MQ_FCTN ccmqmsgque::MqFactoryC::getFCTN__null_allow () const
 (const) return the LibMsgqueObject from current MqFactoryC instance
 
static MQ_FCT ccmqmsgque::MqFactoryC::getFCT (MqFactoryC *clsHdl)
 return LibMsgqueObject from current MqFactoryC pointer
 
static MQ_FCT ccmqmsgque::MqFactoryC::getFCT__null_allow (MqFactoryC *clsHdl)
 return LibMsgqueObject from current MqFactoryC pointer
 
static MQ_FCTN ccmqmsgque::MqFactoryC::getFCTN (const MqFactoryC *clsHdl)
 (const) return LibMsgqueObject from current MqFactoryC pointer
 
static MQ_FCTN ccmqmsgque::MqFactoryC::getFCTN__null_allow (const MqFactoryC *clsHdl)
 (const) return LibMsgqueObject from current MqFactoryC pointer
 
static MQ_FCT ccmqmsgque::MqFactoryC::getFCT (const MqFactoryC &clsHdl)
 return LibMsgqueObject from current MqFactoryC reference
 
static MQ_FCT ccmqmsgque::MqFactoryC::getFCT__null_allow (const MqFactoryC &clsHdl)
 return LibMsgqueObject from current MqFactoryC reference
 
static MQ_FCTN ccmqmsgque::MqFactoryC::getFCTN (const MqFactoryC &clsHdl)
 (const) return LibMsgqueObject from current MqFactoryC reference
 
static MQ_FCTN ccmqmsgque::MqFactoryC::getFCTN__null_allow (const MqFactoryC &clsHdl)
 (const) return LibMsgqueObject from current MqFactoryC reference
 
bool ccmqmsgque::MqFactoryC::Check () const
 check if pointer is still valid
 
 ccmqmsgque::MqFactoryC::MqFactoryC ()
 

Variables

static thread_local MqFactoryC ccmqmsgque::MqFactoryC::MK_NULL_REF = {(MK_OBJ)0}
 

Detailed Description

MqFactoryC - the class known as fct or factory is used to provide an interface to create one or more new MqContextC

The factory is an important part of the object management and has the following basic features:

  1. create/delete a MqContextC defined by a MqFactoryC
  2. infrastructure to host multiple MqFactoryC in a single executable
  3. provide an identifier used for factory-lookup and as an unique-application-name
  4. identification of a client and a server in an application-link

Without a factory only the pipe-feature without the child-feature is guaranteed to work. Other features may work, this depends of the "flexibility" of the programming-language.

The link between the MqFactoryS-identifier and the MqFactoryC is important for the future development of ccmqmsgque. Message-Routing, Service-Location and Persistent-Transactions depend on this feature.

The relationship between the MqFactoryC and the MqContextC is the same as the relationship between a type (MqFactoryS) and an object (MqContextS) of a regular programming language. The MqFactoryC define the type of the server and the MqContextC define a single object of the server process or thread.

                                     Application
|-------------------------------------------------------------------------------------|
|--------------- physical host 1 -----------------------|------ physical host 2 ------|
|-------- process-1 --------|-------- process-2 --------|-- process-3 --|---- … ------|
 thread-1     thread-2…      thread-1…     thread-2…      thread-1…       thread-…
  factory-A     factory-X     factory-Y…    factory-Z…
   object-1     object-1   object-…    …
   object-2     object-2   …
   object-3     object-3
   …              …

A server has a single MqFactoryC object per thread or process but multiple MqFactoryC objects per application. Decreasing the size and the complexity of a MqContextC object will improve the server performance. In future more fields, defined in the libmqmsgque::MqSetupS attribute of the the MqContextC object, will move into MqFactoryC object.

Function Documentation

◆ Check()

bool ccmqmsgque::MqFactoryC::Check ( ) const
inline

check if pointer is still valid

Definition at line 151 of file MqFactoryC_cc.hh.

151 {
152 return (hdl && MqFctCheck(hdl));
153 };
static bool MqFctCheck(MK_MNGN mng)
check MqFactoryS -> libmkkernel::MkObjectS::signature …

◆ getFCT() [1/3]

MQ_FCT ccmqmsgque::MqFactoryC::getFCT ( ) const
inline

return the LibMsgqueObject from current MqFactoryC instance

Definition at line 83 of file MqFactoryC_cc.hh.

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

◆ getFCT() [2/3]

static MQ_FCT ccmqmsgque::MqFactoryC::getFCT ( const MqFactoryC & clsHdl)
inlinestatic

return LibMsgqueObject from current MqFactoryC reference

Definition at line 131 of file MqFactoryC_cc.hh.

131 {
132 return clsHdl.getFCT();
133 };

◆ getFCT() [3/3]

static MQ_FCT ccmqmsgque::MqFactoryC::getFCT ( MqFactoryC * clsHdl)
inlinestatic

return LibMsgqueObject from current MqFactoryC pointer

Definition at line 107 of file MqFactoryC_cc.hh.

107 {
108 MQ_FCT ret = clsHdl ? reinterpret_cast<MQ_FCT>(clsHdl->hdl) : NULL;
109 if (unlikely(ret == NULL)) ClassHdlIsNullError(MqFactoryC);
110 return ret;
111 };

◆ getFCT__null_allow() [1/3]

MQ_FCT ccmqmsgque::MqFactoryC::getFCT__null_allow ( ) const
inline

return the LibMsgqueObject from current MqFactoryC instance

Definition at line 90 of file MqFactoryC_cc.hh.

90 {
91 return reinterpret_cast<MQ_FCT>(hdl);
92 };
+ Here is the caller graph for this function:

◆ getFCT__null_allow() [2/3]

static MQ_FCT ccmqmsgque::MqFactoryC::getFCT__null_allow ( const MqFactoryC & clsHdl)
inlinestatic

return LibMsgqueObject from current MqFactoryC reference

Definition at line 136 of file MqFactoryC_cc.hh.

136 {
137 return clsHdl.getFCT__null_allow();
138 };

◆ getFCT__null_allow() [3/3]

static MQ_FCT ccmqmsgque::MqFactoryC::getFCT__null_allow ( MqFactoryC * clsHdl)
inlinestatic

return LibMsgqueObject from current MqFactoryC pointer

Definition at line 114 of file MqFactoryC_cc.hh.

114 {
115 return clsHdl ? reinterpret_cast<MQ_FCT>(clsHdl->hdl) : NULL;
116 };

◆ getFCTN() [1/3]

MQ_FCTN ccmqmsgque::MqFactoryC::getFCTN ( ) const
inline

(const) return the LibMsgqueObject from current MqFactoryC instance

Definition at line 95 of file MqFactoryC_cc.hh.

95 {
96 MQ_FCTN ret = reinterpret_cast<MQ_FCTN>(hdl);
97 if (unlikely(ret == NULL)) InstHdlIsNullError();
98 return ret;
99 };
const struct MqFactoryS * MQ_FCTN
class-shortcut for const struct MqFactoryS *, all const shortcut using the XX_YYYC syntax (only for p...
+ Here is the caller graph for this function:

◆ getFCTN() [2/3]

static MQ_FCTN ccmqmsgque::MqFactoryC::getFCTN ( const MqFactoryC & clsHdl)
inlinestatic

(const) return LibMsgqueObject from current MqFactoryC reference

Definition at line 141 of file MqFactoryC_cc.hh.

141 {
142 return clsHdl.getFCTN();
143 };

◆ getFCTN() [3/3]

static MQ_FCTN ccmqmsgque::MqFactoryC::getFCTN ( const MqFactoryC * clsHdl)
inlinestatic

(const) return LibMsgqueObject from current MqFactoryC pointer

Definition at line 119 of file MqFactoryC_cc.hh.

119 {
120 MQ_FCTN ret = clsHdl ? reinterpret_cast<MQ_FCTN>(clsHdl->hdl) : NULL;
121 if (unlikely(ret == NULL)) ClassHdlIsNullError(MqFactoryC);
122 return ret;
123 };

◆ getFCTN__null_allow() [1/3]

MQ_FCTN ccmqmsgque::MqFactoryC::getFCTN__null_allow ( ) const
inline

(const) return the LibMsgqueObject from current MqFactoryC instance

Definition at line 102 of file MqFactoryC_cc.hh.

102 {
103 return reinterpret_cast<MQ_FCTN>(hdl);
104 };
+ Here is the caller graph for this function:

◆ getFCTN__null_allow() [2/3]

static MQ_FCTN ccmqmsgque::MqFactoryC::getFCTN__null_allow ( const MqFactoryC & clsHdl)
inlinestatic

(const) return LibMsgqueObject from current MqFactoryC reference

Definition at line 146 of file MqFactoryC_cc.hh.

146 {
147 return clsHdl.getFCTN__null_allow();
148 };

◆ getFCTN__null_allow() [3/3]

static MQ_FCTN ccmqmsgque::MqFactoryC::getFCTN__null_allow ( const MqFactoryC * clsHdl)
inlinestatic

(const) return LibMsgqueObject from current MqFactoryC pointer

Definition at line 126 of file MqFactoryC_cc.hh.

126 {
127 return clsHdl ? reinterpret_cast<MQ_FCTN>(clsHdl->hdl) : NULL;
128 };

◆ MqFactoryC() [1/3]

ccmqmsgque::MqFactoryC::MqFactoryC ( )
inlineprivate

Definition at line 159 of file MqFactoryC_cc.hh.

159{};
+ Here is the caller graph for this function:

◆ MqFactoryC() [2/3]

ccmqmsgque::MqFactoryC::MqFactoryC ( MK_OBJ obj)
inlineprivate

Definition at line 68 of file MqFactoryC_cc.hh.

◆ MqFactoryC() [3/3]

ccmqmsgque::MqFactoryC::MqFactoryC ( MQ_FCT hdl)
inline

Definition at line 74 of file MqFactoryC_cc.hh.

#define MqFactoryC_X2obj(x)

◆ MqFactoryC_GetSelf()

static MqFactoryC * ccmqmsgque::MqFactoryC::MqFactoryC_GetSelf ( MQ_FCT hdl)
inlinestaticprivate

Definition at line 39 of file MqFactoryC_cc.hh.

39 {
40 return (hdl != NULL ? static_cast<MqFactoryC*>((*MqFactoryC_X2obj(hdl)).self) : &MK_NULL_REF);
41 }
static thread_local MqFactoryC MK_NULL_REF

◆ MqFactoryC_Init()

void ccmqmsgque::MqFactoryC::MqFactoryC_Init ( MQ_FCT hdl)
inlineprivate

Definition at line 60 of file MqFactoryC_cc.hh.

void atomInit(MK_OBJ obj)

◆ MqFactoryC_ObjCreate()

static MqFactoryC * ccmqmsgque::MqFactoryC::MqFactoryC_ObjCreate ( MK_RT_ARGS MQ_FCT hdl)
inlinestaticprivate

Definition at line 63 of file MqFactoryC_cc.hh.

63 {
65 }
static MK_PTR atomObjCreate(MK_RT_ARGS MK_OBJ obj)
#define MK_RT_CALL
+ Here is the caller graph for this function:

◆ MqFactoryC_ObjNew()

static MqFactoryC * ccmqmsgque::MqFactoryC::MqFactoryC_ObjNew ( MK_RT_ARGS MQ_FCT hdl)
inlinestatic

return MqFactoryC from LibMsgqueObject

Definition at line 78 of file MqFactoryC_cc.hh.

78 {
80 }
static MK_PTR atomObjNew(MK_RT_ARGS MK_OBJ obj)
+ Here is the caller graph for this function:

◆ MqFactoryC_selfCreate()

static MK_PTR ccmqmsgque::MqFactoryC::MqFactoryC_selfCreate ( MK_RT_ARGS MK_OBJ obj,
MK_PTR const env )
inlinestaticprivate

Definition at line 46 of file MqFactoryC_cc.hh.

46 {
47 return new MqFactoryC(obj);
48 }
+ Here is the caller graph for this function:

◆ MqFactoryC_selfDelete()

static void ccmqmsgque::MqFactoryC::MqFactoryC_selfDelete ( MK_RT_ARGS MK_PTR self,
MK_PTR env )
inlinestaticprivate

Definition at line 51 of file MqFactoryC_cc.hh.

51 {
52 delete static_cast<MqFactoryC*>(self);
53 }
+ Here is the caller graph for this function:

◆ MqFactoryC_selfUnlink()

static void ccmqmsgque::MqFactoryC::MqFactoryC_selfUnlink ( MK_RT_ARGS MK_PTR self,
MK_PTR env )
inlinestaticprivate

Definition at line 55 of file MqFactoryC_cc.hh.

55 {
56 MqFactoryC* selfO = static_cast<MqFactoryC*>(self);
57 selfO->atomUnlink();
58 }
+ Here is the caller graph for this function:

Variable Documentation

◆ MK_NULL_REF

thread_local MqFactoryC ccmqmsgque::MqFactoryC::MK_NULL_REF = {(MK_OBJ)0}
static

Definition at line 35 of file MqFactoryC_cc.hh.