GCpp general purpose C++ library  version 1.0
GMacrosDefines.hh
Go to the documentation of this file.
1 //======================================================================
2 /*! \file GMacrosDefines.hh
3  *
4  * Define various macros.
5  */
6 //======================================================================
7 
8 #ifndef G_MACRO_DEFINES_HH
9 #define G_MACRO_DEFINES_HH
10 
11 //======================================================================
12 
13 /*! Affectation operation on a parent class \b T of the object \b obj.
14  */
15 #define G_AFFECT_MOTHER(T,obj) { T * _tmp_ = dynamic_cast<T *> (this);\
16  _tmp_->T::operator = (*( dynamic_cast<const T *> (&(obj)) ));}
17 
18 
19 //======================================================================
20 #endif