Blame view

include/grmMacroGenerator.h 1.04 KB
84788f22   Pierre Lassalle   Add the GRM Remot...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/*=========================================================================

  Program: Macro Generator used by the Generic Region Merging Library but can be used
           for other libraries.
  Language: C++
  author: Lassalle Pierre
  contact: lassallepierre34@gmail.com


  Copyright (c) Centre National d'Etudes Spatiales. All rights reserved


     This software is distributed WITHOUT ANY WARRANTY; without even
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
     PURPOSE.  See the above copyright notices for more information.

=========================================================================*/
a8831db3   Pierre Lassalle   Header fixes.
18
19
#ifndef MG_H
#define MG_H
84788f22   Pierre Lassalle   Add the GRM Remot...
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46

// Generate automatically get/set methods
#define GRMGetMacro(type, name) \
	type Get##name() \
	{\
		return m_##name; \
	}

#define GRMSetMacro(type, name) \
	void Set##name(type v) \
	{ \
		m_##name = v; \
	}

#define GRMGetRefMacro(type, name) \
	type& Get##name() \
	{\
		return m_##name; \
	}

#define GRMGetConstMacro(type, name) \
	const type Get##name() \
	{\
		return m_##name; \
	}

#endif