Dacons LLP Mailit for C/C++ Version 1.0.8

Emai::Object< ObjectType > Class Template Reference

EmaiObject wrapper class. More...

#include <EmaiObject.hpp>

List of all members.

Public Member Functions

void AddRef ()
 Increments reference count value of the object by 1.
void Release ()
 Decreases reference count value of the object by 1. If reference count become zero the object is destroyed and memory occupied by the object is freed This function returns EmaiErrIncorrectParameter error if caller trys to destroy (set reference count to zero) message part objects which are owned by message object.
EmaiUint32 RefCount ()
 Returns reference count value of the object.
void SetUserData (EmaiUint32 inKey, const void *inData, EmaiUint32 inDataSize)
 Allows to save user data to library object.
void GetUserData (EmaiUint32 inKey, void *outData, EmaiUint32 &ioDataSize)
 Allows to retrieve user data from library object stored in object earlier using EmaiObjectSetUserData.
 operator ObjectType () const

Protected Types

typedef Object< ObjectType > Parent

Protected Member Functions

 Object ()
 ~Object ()
 Object (ObjectType inObject, bool inAddRef)
 Object (const Object &inCopy)
Objectoperator= (const Object &inCopy)

Protected Attributes

ObjectType mObject


Detailed Description

template<class ObjectType>
class Emai::Object< ObjectType >

EmaiObject wrapper class.

Definition at line 32 of file EmaiObject.hpp.


Member Function Documentation

template<class ObjectType>
EmaiUint32 Emai::Object< ObjectType >::RefCount (  )  [inline]

Returns reference count value of the object.

Returns:
on successful function exit contains reference count value of the object

Definition at line 182 of file EmaiObject.hpp.

References Emai::CheckErrorCode(), EmaiObjectGetRefCount(), and Emai::Object< ObjectType >::mObject.

00183 {
00184     EmaiUint32 refCount = 0;
00185     CheckErrorCode(EmaiObjectGetRefCount(mObject, &refCount));
00186     return refCount;
00187 }

template<class ObjectType>
void Emai::Object< ObjectType >::SetUserData ( EmaiUint32  inKey,
const void *  inData,
EmaiUint32  inDataSize 
) [inline]

Allows to save user data to library object.

Parameters:
inKey - key used to identify the data
inData - pointer to data to be copied into object. If inData is NULL the function will remove data from the object, inDataSize value is ignored in this case
inDataSize - size of the data in bytes

Definition at line 191 of file EmaiObject.hpp.

References Emai::CheckErrorCode(), EmaiObjectSetUserData(), and Emai::Object< ObjectType >::mObject.

00196 {
00197     CheckErrorCode(EmaiObjectSetUserData(mObject, inKey, inData, inDataSize));
00198 }

template<class ObjectType>
void Emai::Object< ObjectType >::GetUserData ( EmaiUint32  inKey,
void *  outData,
EmaiUint32 &  ioDataSize 
) [inline]

Allows to retrieve user data from library object stored in object earlier using EmaiObjectSetUserData.

Parameters:
inKey - key used to identify the data
outData - pointer to memory where retrieved data should be stored. If NULL ioDataSize contains size of the data stored under key inKey
ioDataSize - size of the outData block in bytes, on exit contains size of the data copied in outData (if non-NULL) or size of the data (if outData is NULL)
Parameters:
outData  can be NULL

Definition at line 202 of file EmaiObject.hpp.

References Emai::CheckErrorCode(), EmaiObjectGetUserData(), and Emai::Object< ObjectType >::mObject.

00207 {
00208     CheckErrorCode(EmaiObjectGetUserData(mObject, inKey, outData, &ioDataSize));
00209 }


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