Loading...
Searching...
No Matches
ccmqmsgque::MqFactoryCT< T > Class Template Reference

template wrapper for libmqmsgque::MqFactoryS More...

#include <MqFactoryC_cc.hh>

+ Inheritance diagram for ccmqmsgque::MqFactoryCT< T >:
+ Collaboration diagram for ccmqmsgque::MqFactoryCT< T >:

Public Member Functions

T * New ()
  C++: MqContextC* fct.New() C-API
create a new MqContextC from a MqFactoryC
 
MQ_CTXT Type ()
 
- Public Member Functions inherited from ccmqmsgque::MqFactoryC
 MqFactoryC (MQ_FCT hdl)
 
MQ_FCT getFCT (bool nullB=MK_NULL_NO) const
 return the LibMsgqueObject from current MqFactoryC instance
 
MQ_FCTN getFCTN (bool nullB=MK_NULL_NO) const
 (const) return the LibMsgqueObject from current MqFactoryC instance
 
bool Check () const
 check if pointer is still valid
 
MqFactoryCNext ()
  C++: MqFactoryC* fct.Next() C-API
get next instance from linked-list of MqFactoryS type
 
MqFactoryCPrev ()
  C++: MqFactoryC* fct.Prev() C-API
get previous instance from linked-list of MqFactoryS type
 
MK_STRN GetOriginalIdent () const
  C++: MK_STRN fct.GetOriginalIdent() C-API
helper function to return MqFactoryS::originalIdent
 
MqFactoryCDefault ()
  C++: MqFactoryC* fct.Default() C-API
set the default-attribute to the factory
 
MqFactoryCInitial ()
  C++: MqFactoryC* fct.Initial() C-API
set the initial-attribut to fct
 
void Log (const MkObjectC *fmtobj=NULL, MK_DBG debug=0, MK_STRN callfunc=__builtin_FUNCTION(), MK_I32 lvl=0) const
  C++: fct.Log(const MkObjectC* fmtobj = NULL, MK_DBG debug = 0, MK_STRN callfunc = __builtin_FUNCTION(), MK_I32 lvl = 0) C-API
log the MqFactoryC
 
void Log (const MkObjectC &fmtobj, MK_DBG debug=0, MK_STRN callfunc=__builtin_FUNCTION(), MK_I32 lvl=0) const
  C++: fct.Log(const MkObjectC* fmtobj = NULL, MK_DBG debug = 0, MK_STRN callfunc = __builtin_FUNCTION(), MK_I32 lvl = 0) C-API
log the MqFactoryC
 
MqFactoryCDup2 (MK_STRN ident) const
  C++: [constructor] MqFactoryC* fct.Dup2(MK_STRN ident) C-API
create a duplicate of the singleton object MqFactoryC using a new factory-identifer
 
MqFactoryCDup2 (const std::string &ident) const
  C++: [constructor] MqFactoryC* fct.Dup2(MK_STRN ident) C-API
create a duplicate of the singleton object MqFactoryC using a new factory-identifer
 
- Public Member Functions inherited from ccmkkernel::MkObjectC
MK_OBJ getOBJ (bool nullB=MK_NULL_NO) const
 
MK_OBJN getOBJN (bool nullB=MK_NULL_NO) const
 
bool Check () const
 
virtual ~MkObjectC ()
 
MK_MNG getMNG () const
 
MK_STRN ToNativeNameOfClass () const
 
MK_STR SysStrDup (MK_STRN str)
 
void SysFree (MK_PTR tgt)
 
void Sleep (unsigned int const sec)
 
void USleep (unsigned int const usec)
 
void HandleDelete ()
 
MK_HDL HandleGet ()
 
MkObjectCNext ()
 
MkObjectCPrev ()
 
void DbgDump (MK_STRN message="var", MK_STRN callfunc=__builtin_FUNCTION()) const
 
void DbgL (MK_STRN message, MK_DBG debug=0, MK_STRN callfunc=__builtin_FUNCTION(), MK_I32 lvl=0) const
 
void DbgL (const std::string &message, MK_DBG debug=0, MK_STRN callfunc=__builtin_FUNCTION(), MK_I32 lvl=0) const
 
void DbgLogC (MK_STRN callfunc=__builtin_FUNCTION()) const
 
void DbgO (MK_STRN callfunc=__builtin_FUNCTION()) const
 
void DbgSTACK (MK_I32 skip=0, MK_I32 num=-1, MK_STRN callfunc=__builtin_FUNCTION()) const
 
void LogC (MK_STRN message, MK_DBG debug=0, MK_STRN callfunc=__builtin_FUNCTION()) const
 
void LogC (const std::string &message, MK_DBG debug=0, MK_STRN callfunc=__builtin_FUNCTION()) const
 
void LogHEX (MK_STRN callfunc, MK_BNP data) const
 
void LogHEX (const std::string &callfunc, MK_BNP data) const
 
void LogV (MK_STRN callfunc, MK_DBG debug, MK_FST printfmt,...) const
 
void LogV (const std::string &callfunc, MK_DBG debug, MK_FST printfmt,...) const
 
void LogVL (MK_STRN callfunc, MK_DBG debug, MK_FST printfmt, va_list var_list) const
 
void LogVL (const std::string &callfunc, MK_DBG debug, MK_FST printfmt, va_list var_list) const
 
void Log (MkObjectC *fmtobj=NULL, MK_DBG debug=0, MK_STRN callfunc=__builtin_FUNCTION(), MK_I32 lvl=0) const
 
void Log (const MkObjectC &fmtobj, MK_DBG debug=0, MK_STRN callfunc=__builtin_FUNCTION(), MK_I32 lvl=0) const
 
void LogDetail (const MkObjectC *fmtobj=NULL, MK_DBG debug=0, MK_STRN callfunc=__builtin_FUNCTION(), MK_I32 lvl=0) const
 
void LogDetail (const MkObjectC &fmtobj, MK_DBG debug=0, MK_STRN callfunc=__builtin_FUNCTION(), MK_I32 lvl=0) const
 
void LogSimple (const MkObjectC *fmtobj=NULL, MK_DBG debug=0, MK_STRN callfunc=__builtin_FUNCTION(), MK_I32 lvl=0) const
 
void LogSimple (const MkObjectC &fmtobj, MK_DBG debug=0, MK_STRN callfunc=__builtin_FUNCTION(), MK_I32 lvl=0) const
 
MkErrorCErrorCatch (std::exception *exception=NULL, MK_STRN callfunc=__builtin_FUNCTION()) const
 
MkErrorCErrorCatch (const std::exception &exception, MK_STRN callfunc=__builtin_FUNCTION()) const
 
MkErrorCToError ()
 
MK_I32 HandleGetOfType ()
 
MK_BOOL IsNull ()
 
MK_STRN ToName () const
 
MK_STRN ToNameOfClass ()
 
MK_STRN ToNameOfType () const
 
MK_STRN ToString () const
 
MK_I32 RefGet ()
 
void SysKill (MK_I32 pid, MK_I32 signal)
 
MK_I32 SysGetPid ()
 
void Delete ()
 
void Dispose ()
 
void DeleteCallbackSetup (MK_STRN ident, MkObjectDeleteICB callback=NULL, MK_STRN filter=NULL)
 
void DeleteCallbackSetup (const std::string &ident, MkObjectDeleteICB callback=NULL, MK_STRN filter=NULL)
 
void DeleteCallbackSetup (MK_STRN ident, MkObjectDeleteCCB callback=NULL, MK_STRN filter=NULL)
 
void DeleteCallbackSetup (const std::string &ident, MkObjectDeleteCCB callback=NULL, MK_STRN filter=NULL)
 

Static Public Member Functions

static MqFactoryCT< T > * Add (MK_STRN ident)
 add a new MqFactoryC identified by factory-identifier and defined by factory-constructor … → C-API: FactoryAdd
 
static MqFactoryCT< T > * Get (MK_STRN ident="")
 
- Static Public Member Functions inherited from ccmqmsgque::MqFactoryC
static MqFactoryCMqFactoryC_ObjNew (MK_RT const mkrt, MQ_FCT hdl)
 return MqFactoryC from LibMsgqueObject
 
static MQ_FCT getFCT (MqFactoryC *clsHdl, bool nullB=MK_NULL_NO)
 return LibMsgqueObject from current MqFactoryC pointer
 
static MQ_FCTN getFCTN (const MqFactoryC *clsHdl, bool nullB=MK_NULL_NO)
 (const) return LibMsgqueObject from current MqFactoryC pointer
 
static MQ_FCT getFCT (const MqFactoryC &clsHdl, bool nullB=MK_NULL_NO)
 return LibMsgqueObject from current MqFactoryC reference
 
static MQ_FCTN getFCTN (const MqFactoryC &clsHdl, bool nullB=MK_NULL_NO)
 (const) return LibMsgqueObject from current MqFactoryC reference
 
static MqFactoryCHandleResolve (MK_HDL netHdl)
  C++: [static] MqFactoryC* MqFactoryC::HandleResolve(MK_HDL netHdl) C-API
Handle-Resolve-Slot - return a MqFactoryC from netHdl or MK_NULL if invalid…
 
static MqFactoryCInstances ()
  C++: [static] MqFactoryC* MqFactoryC::Instances() C-API
get head-instance from linked-list of MqFactoryS type …
 
static MqFactoryCGetNull ()
  C++: [static] MqFactoryC* MqFactoryC::GetNull() C-API
Null-Slot - return a MqFactoryC typed NULL instance …
 
static MqFactoryCGet (MK_STRN ident="")
  C++: [static] MqFactoryC* MqFactoryC::Get(MK_STRN ident = "") C-API
return the MqFactoryC
 
static MqFactoryCGetCalled (MK_STRN ident="")
  C++: [static] MqFactoryC* MqFactoryC::GetCalled(MK_STRN ident = "") C-API
returns the MqFactoryC identified by ident
 
static MqFactoryCGetCalled (const MkBufferListC *largs)
  C++: [static] MqFactoryC* MqFactoryC::GetCalled(const MkBufferListC* largs) C-API
returns the MqFactoryC identified as first argument in the largs MkBufferListC
 
static MqFactoryCGetCalled (const MkBufferListC &largs)
  C++: [static] MqFactoryC* MqFactoryC::GetCalled(const MkBufferListC* largs) C-API
returns the MqFactoryC identified as first argument in the largs MkBufferListC
 
static MK_STRN DefaultIdent ()
  C++: [static] MK_STRN MqFactoryC::DefaultIdent() C-API
return the factory-identifier of the default MqFactoryC
 
static MK_STRN InitialIdent ()
  C++: [static] MK_STRN MqFactoryC::InitialIdent() C-API
return the factory-identifier of the initial MqFactoryC
 
static void LogAll (MK_STRN callfunc=__builtin_FUNCTION())
  C++: [static] MqFactoryC::LogAll(MK_STRN callfunc = __builtin_FUNCTION()) C-API
log all "factories" to stderr
 
- Static Public Member Functions inherited from ccmkkernel::MkObjectC
static MkObjectCMkObjectC_ObjNew (MK_RT const mkrt, MK_OBJ hdl)
 
static MK_OBJ getOBJ (MkObjectC *clsHdl, bool nullB=MK_NULL_NO)
 
static MK_OBJN getOBJN (const MkObjectC *clsHdl, bool nullB=MK_NULL_NO)
 
static MK_OBJ getOBJ (const MkObjectC &clsHdl, bool nullB=MK_NULL_NO)
 
static MK_OBJN getOBJN (const MkObjectC &clsHdl, bool nullB=MK_NULL_NO)
 
static MkObjectCHandleResolve (MK_HDL netHdl)
 
static void HandleDeleteByNetHdl (MK_HDL netHdl)
 
static MkObjectCInstances ()
 
static MkObjectCGetNull ()
 
static void DbgM (MK_STRN message, MK_DBG debug=0, MK_STRN callfunc=__builtin_FUNCTION(), MK_I32 lvl=0)
 
static void DbgM (const std::string &message, MK_DBG debug=0, MK_STRN callfunc=__builtin_FUNCTION(), MK_I32 lvl=0)
 
static MK_I32 SysHashI32 (MK_STRN key, MK_NUM length=-1)
 
static MK_I32 SysHashI32 (const std::string &key, MK_NUM length=-1)
 
static MK_STRN SysHashSTR (MK_STRN key, MK_NUM length=-1)
 
static MK_STRN SysHashSTR (const std::string &key, MK_NUM length=-1)
 
static void DeleteCallbackCleanup (MK_STRN ident)
 
static void DeleteCallbackCleanup (const std::string &ident)
 
static void DeleteCallbackSetup (MK_STRN ident, MkObjectDeleteSCB callback=NULL, MK_STRN filter=NULL)
 
static void DeleteCallbackSetup (const std::string &ident, MkObjectDeleteSCB callback=NULL, MK_STRN filter=NULL)
 

Private Member Functions

 MqFactoryCT ()
 
 MqFactoryCT (MK_OBJ obj)
 

Static Private Member Functions

static MK_OBJ ObjectSelfCreate (MK_RT const mkrt, MK_TYP const type, MK_PTR const tmpl, MK_PTR const lnk)
 self-constructer : called if a new instance is required …
 
static void ObjectSelfDelete (MK_RT const mkrt, MK_PTR selfP, MK_PTR env)
 
static MK_PTR FactorySelfCreate (MK_RT const mkrt, MK_OBJ obj, MK_PTR dmy)
 
static void FactorySelfDelete (MK_RT const mkrt, MK_PTR selfptr, MK_PTR env)
 
static MqFactoryCT< T > * MqFactoryCT_ObjNew (MK_RT const mkrt, MQ_FCT fct)
 

Friends

class MqStaticC
 

Additional Inherited Members

- Public Types inherited from ccmkkernel::MkObjectC
typedef void(MkObjectC::*) MkObjectDeleteICB(MkObjectC *)
 
typedef void(*) MkObjectDeleteCCB(MkObjectC *, MkObjectC *)
 
typedef void(MkObjectC::* MkObjectDeleteICB) (MkObjectC *)
 
typedef void(* MkObjectDeleteCCB) (MkObjectC *, MkObjectC *)
 
- Static Public Attributes inherited from ccmqmsgque::MqFactoryC
static thread_local MqFactoryC MK_NULL_REF = {(MK_OBJ)0}
 
- Static Public Attributes inherited from ccmkkernel::MkObjectC
static thread_local MkObjectC MK_NULL_REF
 
- Protected Member Functions inherited from ccmkkernel::MkObjectC
void atomInit (MK_OBJ obj)
 
 MkObjectC ()
 
 MkObjectC (MK_OBJ obj)
 
void ErrorCheck (enum MkErrorE err, MK_STRN const caller=__builtin_FUNCTION(), MK_I32 const line=__builtin_LINE()) const
 
void ErrorCheck (MK_STRN const caller=__builtin_FUNCTION(), MK_I32 const line=__builtin_LINE()) const
 
- Static Protected Member Functions inherited from ccmkkernel::MkObjectC
static void ErrorCheck (MK_MNGN mng, enum MkErrorE err, MK_STRN const caller=__builtin_FUNCTION(), MK_I32 const line=__builtin_LINE())
 
static MK_PTR atomObjNew (MK_RT const mkrt, MK_OBJ obj)
 
static MK_PTR atomObjCreate (MK_RT const mkrt, MK_OBJ obj)
 
- Protected Attributes inherited from ccmkkernel::MkObjectC
MK_OBJ hdl
 

Detailed Description

template<class T>
class ccmqmsgque::MqFactoryCT< T >

template wrapper for libmqmsgque::MqFactoryS

Definition at line 277 of file MqFactoryC_cc.hh.

Constructor & Destructor Documentation

◆ MqFactoryCT() [1/2]

template<class T >
ccmqmsgque::MqFactoryCT< T >::MqFactoryCT ( )
inlineprivate

Definition at line 282 of file MqFactoryC_cc.hh.

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

◆ MqFactoryCT() [2/2]

template<class T >
ccmqmsgque::MqFactoryCT< T >::MqFactoryCT ( MK_OBJ obj)
inlineprivate

Definition at line 322 of file MqFactoryC_cc.hh.

Member Function Documentation

◆ Add()

template<class T >
static MqFactoryCT< T > * ccmqmsgque::MqFactoryCT< T >::Add ( MK_STRN ident)
inlinestatic

add a new MqFactoryC identified by factory-identifier and defined by factory-constructor … → C-API: FactoryAdd

Definition at line 331 of file MqFactoryC_cc.hh.

331 {
335 ));
336 if (ret == NULL) {
337 if (MkErrorCheckE_NULL()) {
339 } else {
340 throw MkConstructorNullExceptionC(ident);
341 }
342 }
343 return ret;
344 }
static MK_PTR FactorySelfCreate(MK_RT const mkrt, MK_OBJ obj, MK_PTR dmy)
static MqFactoryCT< T > * MqFactoryCT_ObjNew(MK_RT const mkrt, MQ_FCT fct)
static MK_OBJ ObjectSelfCreate(MK_RT const mkrt, MK_TYP const type, MK_PTR const tmpl, MK_PTR const lnk)
self-constructer : called if a new instance is required …
static void ObjectSelfDelete(MK_RT const mkrt, MK_PTR selfP, MK_PTR env)
static void FactorySelfDelete(MK_RT const mkrt, MK_PTR selfptr, MK_PTR env)
void Raise() const
static MkErrorC * DEFAULT()
#define MK_ERROR_FORMAT
#define MK_RT_CALL
#define MkRtSetup_NULL
#define MqFactoryTypeAdd(...)

◆ FactorySelfCreate()

template<class T >
static MK_PTR ccmqmsgque::MqFactoryCT< T >::FactorySelfCreate ( MK_RT const mkrt,
MK_OBJ obj,
MK_PTR dmy )
inlinestaticprivate

Definition at line 313 of file MqFactoryC_cc.hh.

313 {
314 return new MqFactoryCT<T>(obj);
315 }
+ Here is the caller graph for this function:

◆ FactorySelfDelete()

template<class T >
static void ccmqmsgque::MqFactoryCT< T >::FactorySelfDelete ( MK_RT const mkrt,
MK_PTR selfptr,
MK_PTR env )
inlinestaticprivate

Definition at line 317 of file MqFactoryC_cc.hh.

317 {
318 delete static_cast<MqFactoryCT<T>*>(selfptr);
319 }
+ Here is the caller graph for this function:

◆ Get()

template<class T >
static MqFactoryCT< T > * ccmqmsgque::MqFactoryCT< T >::Get ( MK_STRN ident = "")
inlinestatic

Definition at line 346 of file MqFactoryC_cc.hh.

346 {
348 }
#define MK_RT_NULL
MQ_EXTERN MQ_FCT MqFactoryGet(MK_STRN const ident)
return the MqFactoryC

◆ MqFactoryCT_ObjNew()

template<class T >
static MqFactoryCT< T > * ccmqmsgque::MqFactoryCT< T >::MqFactoryCT_ObjNew ( MK_RT const mkrt,
MQ_FCT fct )
inlinestaticprivate

Definition at line 324 of file MqFactoryC_cc.hh.

324 {
325 return static_cast<MqFactoryCT<T>*>(MkObjectC::atomObjNew(MK_RT_CALL MkOBJ(fct)));
326 }
static MK_PTR atomObjNew(MK_RT const mkrt, MK_OBJ obj)
#define MkOBJ(x)
+ Here is the caller graph for this function:

◆ New()

template<class T >
T * ccmqmsgque::MqFactoryCT< T >::New ( )
inlinevirtual

C++: MqContextC* fct.New() C-API
create a new MqContextC from a MqFactoryC

Reimplemented from ccmqmsgque::MqFactoryC.

Definition at line 351 of file MqFactoryC_cc.hh.

351 {
352 return static_cast<T*>(MqFactoryC::New());
353 }
virtual MqContextC * New()
C++: MqContextC* fct.New() → C-API create a new MqContextC from a MqFactoryC …

◆ ObjectSelfCreate()

template<class T >
static MK_OBJ ccmqmsgque::MqFactoryCT< T >::ObjectSelfCreate ( MK_RT const mkrt,
MK_TYP const type,
MK_PTR const tmpl,
MK_PTR const lnk )
inlinestaticprivate

self-constructer : called if a new instance is required …

Definition at line 289 of file MqFactoryC_cc.hh.

289 {
290 T* self = NULL;
291 try {
292
293//printV("type=%p, tmpl=%p", type, tmpl)
294//MkRuntimeC::Debug();
295
296 // !! attention !! if the constructor has a BUG the destructor is called and the "c++ obj" becomes unusable
297 self = new T(type, static_cast<MqContextC*>(tmpl));
298 if (self) self->Init();
299 } catch (const std::exception& ex) {
300//MkRuntimeC::Debug();
301 MkErrorC::DEFAULT()->Catch(ex)->Stack();
302 }
303//self->DbgLogC();
304 return self?self->hdl:NULL;
305 }
MkErrorC * Catch(std::exception *exception=NULL, MK_STRN callfunc=__builtin_FUNCTION())
MkErrorE Stack(MK_STRN callfunc=__builtin_FUNCTION(), MK_STRN callfile=__builtin_FILE(), MK_I32 callline=__builtin_LINE())
+ Here is the caller graph for this function:

◆ ObjectSelfDelete()

template<class T >
static void ccmqmsgque::MqFactoryCT< T >::ObjectSelfDelete ( MK_RT const mkrt,
MK_PTR selfP,
MK_PTR env )
inlinestaticprivate

Definition at line 307 of file MqFactoryC_cc.hh.

307 {
308 T* self = static_cast<T*>(selfP);
309//self->DbgLogC();
310 delete self;
311 }
+ Here is the caller graph for this function:

◆ Type()

template<class T >
MQ_CTXT ccmqmsgque::MqFactoryCT< T >::Type ( )
inline

Definition at line 355 of file MqFactoryC_cc.hh.

355 {
356 return (MQ_CTXT)getFCT()->fct_ctor.data;
357 }
struct MqCtxTypeS * MQ_CTXT
object context type datatype, use &XX->type to cast to MK_TYP
MQ_FCT getFCT(bool nullB=MK_NULL_NO) const
return the LibMsgqueObject from current MqFactoryC instance
MK_PTR data
additional data pointer for the fCall
struct MqFactoryCTorS fct_ctor
instance constructor interface

Friends And Related Symbol Documentation

◆ MqStaticC

template<class T >
friend class MqStaticC
friend

Definition at line 279 of file MqFactoryC_cc.hh.


The documentation for this class was generated from the following files: