global_macros.h

00001 #ifndef _GLOBAL_MACROS_H
00002 #define _GLOBAL_MACROS_H
00003 
00004 /* A macro to disallow the copy constructor and operator= functions.
00005  * This should be used in the private: declarations for a class.
00006  * For more info see http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml */
00007 #define DISALLOW_COPY_AND_ASSIGN(TypeName) \
00008 private: \
00009     TypeName(const TypeName&);               \
00010     TypeName& operator=(const TypeName&)
00011 
00012 
00013 /* Macro for Gtk properties definition in classes */
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 //   Glib::PropertyProxy_ReadOnly<type> property_ ## name(){return Glib::PropertyProxy_ReadOnly<type>(this,"name");} const

Документация по UniWidgets. Последние изменения: Fri Oct 10 09:57:49 2014. Создано системой  doxygen 1.5.9