Changeset 2459 for code/branches/presentation/src/util
- Timestamp:
- Dec 15, 2008, 12:53:05 AM (16 years ago)
- Location:
- code/branches/presentation
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation
- Property svn:mergeinfo changed
-
code/branches/presentation/src/util
- Property svn:mergeinfo changed
/code/branches/physics/src/util (added) merged: 2192,2298,2305,2424 /code/branches/physics_merge/src/util (added) merged: 2442
- Property svn:mergeinfo changed
-
code/branches/presentation/src/util/Exception.cc
- Property svn:mergeinfo changed
/code/branches/gui/src/core/Exception.cc reverse-merged: 1638,1664 /code/branches/physics/src/util/Exception.cc (added) merged: 2192 /code/branches/physics_merge/src/util/Exception.cc (added) merged: 2442
- Property svn:mergeinfo changed
-
code/branches/presentation/src/util/Exception.h
- Property svn:mergeinfo changed
r2420 r2459 82 82 const char* filename, const char* functionName) \ 83 83 : Exception(description, lineNumber, filename, functionName) \ 84 { \ 85 /* Let the catcher decide whether to display the message below level 4 \ 86 Note: Don't place this code in Exception c'tor because getTypeName() \ 87 is still pure virtual at that time. */ \ 88 COUT(4) << this->getFullDescription() << std::endl; \ 89 } \ 84 { } \ 90 85 \ 91 86 ExceptionName##Exception(const std::string& description) \ 92 87 : Exception(description) \ 93 { COUT(4) << this->getFullDescription() << std::endl; }\88 { } \ 94 89 \ 95 90 ~ExceptionName##Exception() throw() { } \ … … 103 98 CREATE_ORXONOX_EXCEPTION(FileNotFound); 104 99 CREATE_ORXONOX_EXCEPTION(Argument); 100 CREATE_ORXONOX_EXCEPTION(PhysicsViolation); 101 CREATE_ORXONOX_EXCEPTION(ParseError); 105 102 CREATE_ORXONOX_EXCEPTION(PluginsNotFound); 106 103 CREATE_ORXONOX_EXCEPTION(InitialisationFailed); … … 111 108 } 112 109 113 #define ThrowException(Type, Description) \ 114 throw Type##Exception(Description, __LINE__, __FILE__, __FUNCTIONNAME__) 110 /** 111 @brief 112 Helper function that creates an exception, displays the message, but doesn't throw it. 113 */ 114 template <class T> 115 inline const T& InternalHandleException(const T& exception) 116 { 117 // let the catcher decide whether to display the message below level 4 118 COUT(4) << exception.getFullDescription() << std::endl; 119 return exception; 120 } 121 122 #define ThrowException(type, description) \ 123 throw InternalHandleException(type##Exception(description, __LINE__, __FILE__, __FUNCTIONNAME__)) 115 124 116 125 // define an assert macro that can display a message -
code/branches/presentation/src/util/Integers.h
r1755 r2459 49 49 typedef unsigned __int32 uint32_t; 50 50 typedef unsigned __int64 uint64_t; 51 #el if ORXONOX_COMPILER == ORXONOX_COMPILER_GCC52 # include "inttypes.h"51 #else 52 # include <inttypes.h> 53 53 #endif 54 54 -
code/branches/presentation/src/util/Math.h
r2171 r2459 63 63 namespace orxonox 64 64 { 65 typedef Ogre::Radian Radian; 66 typedef Ogre::Degree Degree; 67 typedef Ogre::Vector2 Vector2; 68 typedef Ogre::Vector3 Vector3; 69 typedef Ogre::Vector4 Vector4; 70 typedef Ogre::Matrix3 Matrix3; 71 typedef Ogre::Matrix4 Matrix4; 72 typedef Ogre::Quaternion Quaternion; 73 typedef Ogre::ColourValue ColourValue; 65 using Ogre::Radian; 66 using Ogre::Degree; 67 using Ogre::Vector2; 68 using Ogre::Vector3; 69 using Ogre::Vector4; 70 using Ogre::Matrix3; 71 using Ogre::Matrix4; 72 using Ogre::Quaternion; 73 using Ogre::ColourValue; 74 75 // Also define our own transform space enum 76 namespace TransformSpace 77 { 78 /** 79 @brief 80 Enumeration denoting the spaces which a transform can be relative to. 81 */ 82 enum Space 83 { 84 /// Transform is relative to the local space 85 Local, 86 /// Transform is relative to the space of the parent node 87 Parent, 88 /// Transform is relative to world space 89 World 90 }; 91 } 74 92 75 93 _UtilExport std::ostream& operator<<(std::ostream& out, const orxonox::Radian& radian); … … 174 192 inline T zeroise() 175 193 { 176 BOOST_STATIC_ASSERT(sizeof(T) == 0); 177 return T(); 194 // Default, raise a compiler error without including large boost header cascade. 195 T temp(); 196 *********temp; // If you reach this code, you abused zeroise()! 197 return temp; 178 198 } 179 199 -
code/branches/presentation/src/util/SignalHandler.cc
- Property svn:mergeinfo changed
/code/branches/core3/src/orxonox/SignalHandler.cc reverse-merged: 1607,1678 /code/branches/physics_merge/src/util/SignalHandler.cc (added) merged: 2442 /code/trunk/src/util/SignalHandler.cc (added) merged: 1913-2085
- Property svn:mergeinfo changed
-
code/branches/presentation/src/util/SignalHandler.h
- Property svn:mergeinfo changed
/code/branches/core3/src/orxonox/SignalHandler.h reverse-merged: 1607 /code/branches/physics_merge/src/util/SignalHandler.h (added) merged: 2442 /code/trunk/src/util/SignalHandler.h (added) merged: 1913-2085
- Property svn:mergeinfo changed
Note: See TracChangeset
for help on using the changeset viewer.