VR-Exchange 2.4 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
addAttribute.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2012 VT MAK
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
12 #ifdef DtDEC_ATTRIBUTE
13 #undef DtDEC_ATTRIBUTE
14 #endif
15 
49 #define DtDEC_ATTRIBUTE(T, N, n) \
50  public : \
51  void set##N(const T& val) { my##N = val;}\
52  const T& n() const { return my##N;} \
53  T& n() { return my##N;} \
54  protected: \
55  T my##N;
56 
92 #define DtDEC_ATTRIBUTE_OVERLOAD( Type, Name, name, Attribute ) \
93  public : \
94  void set##Name( const Type& value ) \
95  { \
96  my##Attribute = value; \
97  } \
98  const Type& name() const \
99  { \
100  return my##Attribute; \
101  } \
102  Type& name() \
103  { \
104  return my##Attribute; \
105  } \
106 protected: \
107  enum{} /*enum{} is used so the macro and end with a simicolon. */

Document ID: Generated on Thu Jul 23 10:25:22 EDT 2015 from SVN revision 155065
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)