Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

GeneralMacros.h

Go to the documentation of this file.
00001 #ifndef GENERAL_MACROS_H_
00002 #define GENERAL_MACROS_H_
00003 
00004 #include <iostream>
00005 
00006 //! A printing shortcut for boolean attributes
00007 #define PRINT_ATTRS(AttrName, BooleanVal) \
00008     std::cout << AttrName << ": " << (BooleanVal ? "true" : "false") << std::endl;
00009 
00010 //! Disallows the copy constructor
00011 #define DISALLOW_COPY(TypeName) TypeName(const TypeName&)
00012 
00013 //! Disallows the assignment operator
00014 #define DISALLOW_ASSIGN(TypeName) TypeName& operator=(const TypeName&)
00015 
00016 //! Disallows both the copy constructor and the assignment operator
00017 #define DISALLOW_COPY_ASSIGN(TypeName)  \
00018             DISALLOW_COPY(TypeName);    \
00019             DISALLOW_ASSIGN(TypeName)
00020 
00021 //! Disallows a class from being instantiated
00022 #define DISALLOW_INSTANTIATION(TypeName)    \
00023             DISALLOW_COPY_ASSIGN(TypeName); \
00024             TypeName();                     \
00025             ~TypeName();
00026 
00027 #endif // GENERAL_MACROS_H_

Tekkotsu v5.1CVS
Generated Mon May 9 04:58:41 2016 by Doxygen 1.6.3