Changeset 48833 in vbox
- Timestamp:
- Oct 3, 2013 1:22:14 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/cpp/utils.h
r37491 r48833 97 97 } 98 98 99 100 /** 101 * Macro for generating a non-const getter version from a const getter. 102 * 103 * @param a_RetType The getter return type. 104 * @param a_Class The class name. 105 * @param a_Getter The getter name. 106 * @param a_ArgDecls The argument declaration for the getter method. 107 * @param a_ArgList The argument list for the call. 108 */ 109 #define RT_CPP_GETTER_UNCONST(a_RetType, a_Class, a_Getter, a_ArgDecls, a_ArgList) \ 110 a_RetType a_Getter a_ArgDecls \ 111 { \ 112 return static_cast< a_Class const *>(this)-> a_Getter a_ArgList; \ 113 } 114 115 116 /** 117 * Macro for generating a non-const getter version from a const getter, 118 * unconsting the return value as well. 119 * 120 * @param a_RetType The getter return type. 121 * @param a_Class The class name. 122 * @param a_Getter The getter name. 123 * @param a_ArgDecls The argument declaration for the getter method. 124 * @param a_ArgList The argument list for the call. 125 */ 126 #define RT_CPP_GETTER_UNCONST_RET(a_RetType, a_Class, a_Getter, a_ArgDecls, a_ArgList) \ 127 a_RetType a_Getter a_ArgDecls \ 128 { \ 129 return const_cast<a_RetType>(static_cast< a_Class const *>(this)-> a_Getter a_ArgList); \ 130 } 131 132 99 133 /** @} */ 100 134
Note:
See TracChangeset
for help on using the changeset viewer.