Go to the documentation of this file.
5 #ifndef PDFTRON_H_CPPCommonCommon
6 #define PDFTRON_H_CPPCommonCommon
8 #include <C/Common/TRN_Types.h>
13 #define REX(action) { TRN_Exception ex=action; if(ex!=0) throw Common::Exception(ex); }
14 #define DREX(impl, destroy_action) \
19 #define DREX_NO_IMPL(destroy_action) destroy_action
21 #define RetObj(ex) TRN_Obj result; REX(ex); return SDF::Obj(result);
22 #define RetBool(ex) TRN_Bool result; REX(ex); return TBToB(result);
23 #define RetInt(ex) int result; REX(ex); return result;
24 #define RetCCS(ex) const char* result; REX(ex); return result;
25 #define RetDbl(ex) double result; REX(ex); return result;
26 #define RetStr(ex) TRN_UString result; REX(ex); return UString(result);
28 #define RetPC(ex) TRN_PatternColor result; REX(ex); return PatternColor(result);
29 #define RetFont(ex) TRN_Font result; REX(ex); return Font(result);
30 #define RetRec(ex) TRN_Rect result; REX(ex); return *((Rect*)&result);
31 #define RetMtx(ex) TRN_Matrix2D result; REX(ex); return *((Common::Matrix2D*)&result)
32 #define RetCPT(ex) TRN_ColorPt result; TRN_ColorPtInit(0,0,0,0, &result); REX(ex); return *((ColorPt*)&result)
33 #define RetFDFField(ex) TRN_FDFField result; REX(ex); return *((FDFField*)&result)
35 #endif // PDFTRON_H_CPPCommonCommon