global_macros.h
00001 #ifndef _GLOBAL_MACROS_H
00002 #define _GLOBAL_MACROS_H
00003
00004
00005
00006
00007 #define DISALLOW_COPY_AND_ASSIGN(TypeName) \
00008 private: \
00009 TypeName(const TypeName&); \
00010 TypeName& operator=(const TypeName&)
00011
00012
00013
00014 #define ADD_PROPERTY(name, type) \
00015 protected: \
00016 Glib::Property<type> name; \
00017 public: \
00018 void set_ ## name(type value) {name.set_value(value);} \
00019 type get_ ## name() {return name.get_value();} \
00020 Glib::PropertyProxy<type> proxy_ ## name(){return name.get_proxy();}
00021
00022 #define ADD_TRANSPROPERTY(name, type) \
00023 protected: \
00024 TransProperty<type> name; \
00025 public: \
00026 void set_ ## name(type value) {name.set_value(value);} \
00027 type get_ ## name() {return name.get_value();}
00028
00029 #endif
00030
00031