ApparatusFramework::MsgMgr Class Reference
[Kernel Services]

#include <KernelServices/common/current/include/MsgMgr.h>

Inheritance diagram for ApparatusFramework::MsgMgr:
ApparatusFramework::Monitor

List of all members.

Public Member Functions

MsgreserveMsg ()
void releaseMsg (Msg *pMsg)
void changeRefCount (Msg *pMsg, int delta)

Static Public Member Functions

static MsgMgrCreate ()
static MsgMgrDefault ()
static bool IsCreated ()

Detailed Description

MsgMgr The class implements a manager for kernel messages. It provides services to reserve and to release messages. The manager is implemented as a monitor and serializes the accesses to its internal resources.

Definition at line 67 of file MsgMgr.h.


Member Function Documentation

void ApparatusFramework::MsgMgr::changeRefCount ( Msg pMsg,
int  delta 
)

Allows to modify the Msg::m_refCount. This method is here, because the mutex is here in the MsgMgr (only one mutex for all messages).

Parameters:
pMsg Message where the m_refCount has to be modified.
delta Delta for m_refCount.
static MsgMgr* ApparatusFramework::MsgMgr::Create (  )  [static]

singleton methods Creates an instance of the singleton if none exists yet. The object is created in static memory.

Returns:
A pointer to the created singleton instance.
static MsgMgr* ApparatusFramework::MsgMgr::Default (  )  [static]

References an instance that has been previously created.

Returns:
A pointer to the singleton instance.
static bool ApparatusFramework::MsgMgr::IsCreated (  )  [static]

States whether an instance of this singleton has been created.

Returns:
True if an instance has been created, false otherwise.
void ApparatusFramework::MsgMgr::releaseMsg ( Msg pMsg  ) 

Releases a previously reserved message and returns it to the pool of free messages. If the message was not previously reserved via this manager, an error is generated.

Parameters:
pMsg Message to release.
Msg* ApparatusFramework::MsgMgr::reserveMsg (  ) 

messages handling Reserves a kernel message and returns a pointer to it. If no message is free, null is returned.

Returns:
Pointer to the reserved message. If none found the value is null.
© 2004-2010 bbv Software Services AG / Apparatus Services