- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Macros
Common.h File Reference
`#include <C/Common/TRN_Types.h>`
`#include <Common/BasicTypes.h>`
`#include <Common/Exception.h>`
`#include <string.h>`

Go to the source code of this file.

## Macros
#define | REX(action) { TRN_Exception ex=action; if(ex!=0) throw Common::Exception(ex); }
#define | DREX(impl, destroy_action)
#define | DREX_NO_IMPL(destroy_action) destroy_action
#define | RetObj(ex) TRN_Obj result; REX(ex); return SDF::Obj(result);
#define | RetBool(ex) TRN_Bool result; REX(ex); return TBToB(result);
#define | RetInt(ex) int result; REX(ex); return result;
#define | RetCCS(ex) const char* result; REX(ex); return result;
#define | RetDbl(ex) double result; REX(ex); return result;
#define | RetStr(ex) TRN_UString result; REX(ex); return UString(result);
#define | RetPC(ex) TRN_PatternColor result; REX(ex); return PatternColor(result);
#define | RetFont(ex) TRN_Font result; REX(ex); return Font(result);
#define | RetRec(ex) TRN_Rect result; REX(ex); return *((Rect*)&result);
#define | RetMtx(ex) TRN_Matrix2D result; REX(ex); return *((Common::Matrix2D*)&result)
#define | RetCPT(ex) TRN_ColorPt result; TRN_ColorPtInit(0,0,0,0, &result); REX(ex); return *((ColorPt*)&result)
#define | RetFDFField(ex) TRN_FDFField result; REX(ex); return *((FDFField*)&result)

## Macro Definition Documentation

#define DREX | ( |  | impl,
|  |  | destroy_action
| ) |  |

Value:
if (impl) {\
destroy_action;\
impl = 0;\
}

Definition at line 14 of file Common.h.

#define DREX_NO_IMPL | ( |  | destroy_action | ) | destroy_action

Definition at line 19 of file Common.h.

#define RetBool | ( |  | ex | ) | TRN_Bool result; REX(ex); return TBToB(result);

Definition at line 22 of file Common.h.

#define RetCCS | ( |  | ex | ) | const char* result; REX(ex); return result;

Definition at line 24 of file Common.h.

#define RetCPT | ( |  | ex | ) | TRN_ColorPt result; TRN_ColorPtInit(0,0,0,0, &result); REX(ex); return *((ColorPt*)&result)

Definition at line 32 of file Common.h.

#define RetDbl | ( |  | ex | ) | double result; REX(ex); return result;

Definition at line 25 of file Common.h.

#define RetFDFField | ( |  | ex | ) | TRN_FDFField result; REX(ex); return *((FDFField*)&result)

Definition at line 33 of file Common.h.

#define RetFont | ( |  | ex | ) | TRN_Font result; REX(ex); return Font(result);

Definition at line 29 of file Common.h.

#define RetInt | ( |  | ex | ) | int result; REX(ex); return result;

Definition at line 23 of file Common.h.

#define RetMtx | ( |  | ex | ) | TRN_Matrix2D result; REX(ex); return *((Common::Matrix2D*)&result)

Definition at line 31 of file Common.h.

#define RetObj | ( |  | ex | ) | TRN_Obj result; REX(ex); return SDF::Obj(result);

Definition at line 21 of file Common.h.

#define RetPC | ( |  | ex | ) | TRN_PatternColor result; REX(ex); return PatternColor(result);

Definition at line 28 of file Common.h.

#define RetRec | ( |  | ex | ) | TRN_Rect result; REX(ex); return *((Rect*)&result);

Definition at line 30 of file Common.h.

#define RetStr | ( |  | ex | ) | TRN_UString result; REX(ex); return UString(result);

Definition at line 26 of file Common.h.

#define REX | ( |  | action | ) | { TRN_Exception ex=action; if(ex!=0) throw Common::Exception(ex); }

Definition at line 13 of file Common.h.