M
Manzanita
Hi.
In order to reduce the size of my headers and join definitions of
variables and definitions of inline functions, i use a macro i saw in
this group for all built-in types and types with assignment operator.
#define ATRIBUTO( type, x) \
private: \
type x; \
public: \
type & Get##x() { return x; } \
type Get##x() { return x; } const \
void Set##x( type value ) { x = value; } \
class A{
ATRIBUTO(char, caracter);
};
1.- Can be flawed this macro?.
2.- Is there any workaround so that the names of the functions are
expanded to a name with the first letter following Set or Get capital?, i
mean:
GetCaracter and SetCaracter instead of Getcarater and Setcaracter.
I want to use caracter rather than Caracter inside the member
functions of A.
Thank you in advance and excuse my bad english.
In order to reduce the size of my headers and join definitions of
variables and definitions of inline functions, i use a macro i saw in
this group for all built-in types and types with assignment operator.
#define ATRIBUTO( type, x) \
private: \
type x; \
public: \
type & Get##x() { return x; } \
type Get##x() { return x; } const \
void Set##x( type value ) { x = value; } \
class A{
ATRIBUTO(char, caracter);
};
1.- Can be flawed this macro?.
2.- Is there any workaround so that the names of the functions are
expanded to a name with the first letter following Set or Get capital?, i
mean:
GetCaracter and SetCaracter instead of Getcarater and Setcaracter.
I want to use caracter rather than Caracter inside the member
functions of A.
Thank you in advance and excuse my bad english.