Loading...
Searching...
No Matches
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)
#define | DREX(impl, destroy_action)
#define | DREX_NO_IMPL(destroy_action)
#define | RetObj(ex)
#define | RetBool(ex)
#define | RetInt(ex)
#define | RetCCS(ex)
#define | RetDbl(ex)
#define | RetStr(ex)
#define | RetPC(ex)
#define | RetFont(ex)
#define | RetRec(ex)
#define | RetMtx(ex)
#define | RetCPT(ex)
#define | RetFDFField(ex)

## Macro Definition Documentation

## ◆ DREX

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

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

Definition at line 14 of file Common.h.

## ◆ DREX_NO_IMPL

#define DREX_NO_IMPL | ( |  | destroy_action | ) |

Value:
destroy_action

Definition at line 19 of file Common.h.

## ◆ RetBool

#define RetBool | ( |  | ex | ) |

Value:
TRN_Bool result; REX(ex); return TBToB(result);
REX
#define REX(action)
Definition Common.h:13

Definition at line 22 of file Common.h.

## ◆ RetCCS

#define RetCCS | ( |  | ex | ) |

Value:
const char* result; REX(ex); return result;

Definition at line 24 of file Common.h.

## ◆ RetCPT

#define RetCPT | ( |  | ex | ) |

Value:
TRN_ColorPt result; TRN_ColorPtInit(0,0,0,0, &result); REX(ex); return *((ColorPt*)&result)

Definition at line 32 of file Common.h.

## ◆ RetDbl

#define RetDbl | ( |  | ex | ) |

Value:
double result; REX(ex); return result;

Definition at line 25 of file Common.h.

## ◆ RetFDFField

#define RetFDFField | ( |  | ex | ) |

Value:
TRN_FDFField result; REX(ex); return *((FDFField*)&result)

Definition at line 33 of file Common.h.

## ◆ RetFont

#define RetFont | ( |  | ex | ) |

Value:
TRN_Font result; REX(ex); return Font(result);

Definition at line 29 of file Common.h.

## ◆ RetInt

#define RetInt | ( |  | ex | ) |

Value:
int result; REX(ex); return result;

Definition at line 23 of file Common.h.

## ◆ RetMtx

#define RetMtx | ( |  | ex | ) |

Value:
TRN_Matrix2D result; REX(ex); return *((Common::Matrix2D*)&result)

Definition at line 31 of file Common.h.

## ◆ RetObj

#define RetObj | ( |  | ex | ) |

Value:
TRN_Obj result; REX(ex); return SDF::Obj(result);

Definition at line 21 of file Common.h.

## ◆ RetPC

#define RetPC | ( |  | ex | ) |

Value:
TRN_PatternColor result; REX(ex); return PatternColor(result);

Definition at line 28 of file Common.h.

## ◆ RetRec

#define RetRec | ( |  | ex | ) |

Value:
TRN_Rect result; REX(ex); return *((Rect*)&result);

Definition at line 30 of file Common.h.

## ◆ RetStr

#define RetStr | ( |  | ex | ) |

Value:
TRN_UString result; REX(ex); return UString(result);

Definition at line 26 of file Common.h.

## ◆ REX

#define REX | ( |  | action | ) |

Value:
{ TRN_Exception ex=action; if(ex!=0) throw Common::Exception(ex); }

Definition at line 13 of file Common.h.