public: \
class_name(); \
typedef class_name self_type; \
typedef class_name##_t base_type; \
static self_type* DownCast(base_type* ptr) { return static_cast<self_type*>(ptr); } \
static const self_type* DownCast(const base_type* ptr) \
{ return static_cast<const self_type*>(ptr); } \
static self_type& DownCast(base_type& ref) { return static_cast<self_type&>(ref); } \
static const self_type& DownCast(const base_type& ref) \
{ return static_cast<const self_type&>(ref); } \
private: \
NW_G3D_DISALLOW_COPY_AND_ASSIGN(class_name) \