sipxportlib  Version 3.3
Classes | Macros
UtlSerialized.h File Reference

Go to the source code of this file.

Classes

class  UtlSerialized
 

Macros

#define UTL_SERIALIZED_SIZE   1024
 
Manipulators
#define SERIALIZE_POD_DEFINE(type)
 

Macro Definition Documentation

#define UTL_SERIALIZED_SIZE   1024
#define SERIALIZE_POD_DEFINE (   type)
Value:
inline OsStatus serialize(type val) \
{ \
if (sizeof(type) > getFreeSize()) \
{ \
return OS_LIMIT_REACHED; \
} \
*(type*)mpEnd = val; \
mpEnd += sizeof(type); \
mSize += sizeof(type); \
return OS_SUCCESS; \
} \
inline OsStatus deserialize(type &val) \
{ \
if (sizeof(type) > getSize() - (mpEnd-mData)) \
{ \
return OS_NO_MORE_DATA; \
} \
val = *(type*)mpEnd; \
mpEnd += sizeof(type); \
return OS_SUCCESS; \
}
Definition: OsStatus.h:30
OsStatus
Definition: OsStatus.h:27
Definition: OsStatus.h:41
Definition: OsStatus.h:35