summaryrefslogtreecommitdiff
path: root/inc/MoniTool_Macros.hxx
blob: 16225e6414d30e18c76bf9ffdb190fe0abe81ee8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// File:	MoniTool_Macros.hxx
// Created:	Mon Nov 22 17:23:11 1999
// Author:	data exchange team
//		<det@kinox>

// Taken from Interface_Macros to avoid cyclic dependency from Shape Healing

#ifndef MoniTool_Macros_HeaderFile
#define MoniTool_Macros_HeaderFile

// Interface General purpose Macros
// Their use is not required, but it gets some program parts easier :
// DownCasting, with or without Declaration

//  DownCasting to a "Handle" already declared
#define GetCasted(atype,start)  Handle(atype)::DownCast(start)

//  DownCasting with Declaration :
//  - Declares the variable result
//  - then performs DownCasting
//  - after it, result can be used as a new variable
#define DeclareAndCast(atype,result,start) \
 Handle(atype) result = Handle(atype)::DownCast(start)

#define FastCast(atype,result,start) \
 Handle(atype) result;  result = (*(Handle(atype)*))& start


#endif