@@ -129,12 +129,10 @@ CC_DEPRECATED_ATTRIBUTE static __TYPE__* node() \
129
129
* If you need protected or private, please declare.
130
130
*/
131
131
#define CC_PROPERTY_READONLY (varType, varName, funName )\
132
- protected: varType varName; \
133
- public: virtual varType get##funName(void ) const ;
132
+ protected: varType varName; public: virtual varType get##funName(void ) const ;
134
133
135
134
#define CC_PROPERTY_READONLY_PASS_BY_REF (varType, varName, funName )\
136
- protected: varType varName;\
137
- public: virtual const varType& get##funName(void ) const ;
135
+ protected: varType varName; public: virtual const varType& get##funName(void ) const ;
138
136
139
137
/* * @def CC_PROPERTY
140
138
* It is used to declare a protected variable.
@@ -149,14 +147,10 @@ public: virtual const varType& get##funName(void) const;
149
147
* If you need protected or private, please declare.
150
148
*/
151
149
#define CC_PROPERTY (varType, varName, funName )\
152
- protected: varType varName;\
153
- public: virtual varType get##funName(void ) const ;\
154
- public: virtual void set##funName(varType var);
150
+ protected: varType varName; public: virtual varType get##funName(void ) const ; virtual void set##funName(varType var);
155
151
156
152
#define CC_PROPERTY_PASS_BY_REF (varType, varName, funName )\
157
- protected: varType varName;\
158
- public: virtual const varType& get##funName(void ) const ;\
159
- public: virtual void set##funName(const varType& var);
153
+ protected: varType varName; public: virtual const varType& get##funName(void ) const ; virtual void set##funName(const varType& var);
160
154
161
155
/* * @def CC_SYNTHESIZE_READONLY
162
156
* It is used to declare a protected variable. We can use getter to read the variable.
@@ -169,12 +163,10 @@ public: virtual void set##funName(const varType& var);
169
163
* If you need protected or private, please declare.
170
164
*/
171
165
#define CC_SYNTHESIZE_READONLY (varType, varName, funName )\
172
- protected: varType varName;\
173
- public: virtual varType get##funName(void ) const { return varName; }
166
+ protected: varType varName; public: virtual inline varType get##funName(void ) const { return varName; }
174
167
175
168
#define CC_SYNTHESIZE_READONLY_PASS_BY_REF (varType, varName, funName )\
176
- protected: varType varName;\
177
- public: virtual const varType& get##funName(void ) const { return varName; }
169
+ protected: varType varName; public: virtual inline const varType& get##funName(void ) const { return varName; }
178
170
179
171
/* * @def CC_SYNTHESIZE
180
172
* It is used to declare a protected variable.
@@ -189,19 +181,13 @@ public: virtual const varType& get##funName(void) const { return varName; }
189
181
* If you need protected or private, please declare.
190
182
*/
191
183
#define CC_SYNTHESIZE (varType, varName, funName )\
192
- protected: varType varName;\
193
- public: virtual varType get##funName(void ) const { return varName; }\
194
- public: virtual void set##funName(varType var){ varName = var; }
184
+ protected: varType varName; public: virtual inline varType get##funName(void ) const { return varName; } virtual inline void set##funName(varType var){ varName = var; }
195
185
196
186
#define CC_SYNTHESIZE_PASS_BY_REF (varType, varName, funName )\
197
- protected: varType varName;\
198
- public: virtual const varType& get##funName(void ) const { return varName; }\
199
- public: virtual void set##funName(const varType& var){ varName = var; }
187
+ protected: varType varName; public: virtual inline const varType& get##funName(void ) const { return varName; } virtual inline void set##funName(const varType& var){ varName = var; }
200
188
201
189
#define CC_SYNTHESIZE_RETAIN (varType, varName, funName ) \
202
- private: varType varName; \
203
- public: virtual varType get##funName(void ) const { return varName; } \
204
- public: virtual void set##funName(varType var) \
190
+ private: varType varName; public: virtual inline varType get##funName(void ) const { return varName; } virtual inline void set##funName(varType var) \
205
191
{ \
206
192
if (varName != var) \
207
193
{ \
0 commit comments