Added convenience macro.

This commit is contained in:
Jens Luedicke
2011-01-22 01:43:53 +01:00
parent b51894a485
commit a326214482
2 changed files with 4 additions and 1 deletions

View File

@@ -52,6 +52,9 @@ public:
void *ptr;
};
#define REGISTER_MEMBER(Type, Attribute) \
this->register_setter<Type>(#Attribute, &Attribute);
class settable {
public:
void set_attribute(const std::string &attr, const std::string &value) {