Go to the source code of this file.
|
#define | XN_SETBITMASK(x) (1 << x-1) |
|
#define | XN_RET_IF_NULL(x, y) |
|
#define | XN_IS_STATUS_OK_RET(x, y) |
|
#define | XN_IS_STATUS_OK_GOCLEANUP_RET(x, y) |
|
#define | XN_IS_STATUS_OK(x) XN_IS_STATUS_OK_RET(x, x) |
|
#define | XN_IS_STATUS_OK_ASSERT(x) |
|
#define | XN_IS_STATUS_OK_GOCLEANUP(x) |
|
#define | XN_IS_BOOL_OK_RET(x, y) |
|
#define | XN_IS_BOOL_OK_GOCLEANUP_RET(x, y) |
|
#define | XN_GOCLEANUP_RET(x, y) |
|
#define | XN_VALIDATE_PTR(x, y) |
|
#define | XN_CHECK_INPUT_OVERFLOW(x, y) |
|
#define | XN_CHECK_OUTPUT_OVERFLOW(x, y) |
|
#define | XN_DISABLE_COPY_AND_ASSIGN(TypeName) |
|
#define | XN_REFERENCE_VARIABLE(x) ((void)x) |
|
#define XN_CHECK_INPUT_OVERFLOW |
( |
|
x, |
|
|
|
y |
|
) |
| |
Value:if (x > y) \
{ \
return (XN_STATUS_INPUT_BUFFER_OVERFLOW); \
}
Returns an output overflow error if x is beyond y
#define XN_CHECK_OUTPUT_OVERFLOW |
( |
|
x, |
|
|
|
y |
|
) |
| |
Value:if (x > y) \
{ \
return (XN_STATUS_OUTPUT_BUFFER_OVERFLOW); \
}
Returns an input overflow error if x is beyond y
#define XN_DISABLE_COPY_AND_ASSIGN |
( |
|
TypeName | ) |
|
Value:TypeName(const TypeName&); \
void operator=(const TypeName&);
Disables Copy ctor and assignment operator. Should be placed under "private:" section.
#define XN_GOCLEANUP_RET |
( |
|
x, |
|
|
|
y |
|
) |
| |
Value:x = y; \
goto ErrorCleanUp;
Jumps to the ErrorCleanUp label if X isn't XN_STATUS_OK and returns Y.
#define XN_IS_BOOL_OK_GOCLEANUP_RET |
( |
|
x, |
|
|
|
y |
|
) |
| |
Value:
{ \
goto ErrorCleanUp; \
}
Jumps to the ErrorCleanUp label if X isn't XN_STATUS_OK and returns Y.
#define XN_IS_BOOL_OK_RET |
( |
|
x, |
|
|
|
y |
|
) |
| |
Value:Returns Y if X isn't XN_STATUS_OK.
Returns X if X isn't XN_STATUS_OK.
#define XN_IS_STATUS_OK_ASSERT |
( |
|
x | ) |
|
#define XN_IS_STATUS_OK_GOCLEANUP |
( |
|
x | ) |
|
Value:
{ \
goto ErrorCleanUp; \
}
Jumps to the ErrorCleanUp label if X isn't XN_STATUS_OK.
#define XN_IS_STATUS_OK_GOCLEANUP_RET |
( |
|
x, |
|
|
|
y |
|
) |
| |
Value:
{ \
x = y; \
goto ErrorCleanUp; \
}
Jumps to the ErrorCleanUp label if X isn't XN_STATUS_OK and return Y.
#define XN_IS_STATUS_OK_RET |
( |
|
x, |
|
|
|
y |
|
) |
| |
Value:Returns Y if X isn't XN_STATUS_OK.
#define XN_REFERENCE_VARIABLE |
( |
|
x | ) |
((void)x) |
Disables the "local variable is initialized but not referenced" warning (if you need to use this variable in an assert
#define XN_RET_IF_NULL |
( |
|
x, |
|
|
|
y |
|
) |
| |
Value:if (x == NULL) \
{ \
return (y); \
}
Returns Y if X is NULL.
#define XN_SETBITMASK |
( |
|
x | ) |
(1 << x-1) |
Returns the (x)th power of 2.
#define XN_VALIDATE_PTR |
( |
|
x, |
|
|
|
y |
|
) |
| |
Value:if (x == NULL) \
{ \
return (y); \
}
Returns Y if X is null.