[Orxonox-commit 617] r3149 - in branches/pch/src: core orxonox/gamestates orxonox/objects/collisionshapes orxonox/objects/quest orxonox/objects/worldentities orxonox/objects/worldentities/pawns util
rgrieder at orxonox.net
rgrieder at orxonox.net
Fri Jun 12 10:17:44 CEST 2009
Author: rgrieder
Date: 2009-06-12 10:17:44 +0200 (Fri, 12 Jun 2009)
New Revision: 3149
Added:
branches/pch/src/util/OrxAssert.h
Modified:
branches/pch/src/core/CommandLine.h
branches/pch/src/core/GameState.cc
branches/pch/src/core/XMLPort.h
branches/pch/src/orxonox/gamestates/GSClient.cc
branches/pch/src/orxonox/gamestates/GSRoot.cc
branches/pch/src/orxonox/gamestates/GSServer.cc
branches/pch/src/orxonox/objects/collisionshapes/CollisionShape.cc
branches/pch/src/orxonox/objects/collisionshapes/CompoundCollisionShape.cc
branches/pch/src/orxonox/objects/collisionshapes/WorldEntityCollisionShape.cc
branches/pch/src/orxonox/objects/quest/AddQuest.cc
branches/pch/src/orxonox/objects/quest/AddQuestHint.cc
branches/pch/src/orxonox/objects/quest/CompleteQuest.cc
branches/pch/src/orxonox/objects/quest/FailQuest.cc
branches/pch/src/orxonox/objects/quest/GlobalQuest.cc
branches/pch/src/orxonox/objects/quest/LocalQuest.cc
branches/pch/src/orxonox/objects/quest/QuestHint.cc
branches/pch/src/orxonox/objects/quest/QuestListener.cc
branches/pch/src/orxonox/objects/quest/QuestManager.cc
branches/pch/src/orxonox/objects/worldentities/Backlight.cc
branches/pch/src/orxonox/objects/worldentities/MobileEntity.cc
branches/pch/src/orxonox/objects/worldentities/StaticEntity.cc
branches/pch/src/orxonox/objects/worldentities/WorldEntity.cc
branches/pch/src/orxonox/objects/worldentities/pawns/SpaceShip.cc
branches/pch/src/util/Exception.h
Log:
Extracted OrxAssert from Exception.h to OrxAssert.h since it doesn't really have anything to do with exceptions.
Modified: branches/pch/src/core/CommandLine.h
===================================================================
--- branches/pch/src/core/CommandLine.h 2009-06-11 20:26:40 UTC (rev 3148)
+++ branches/pch/src/core/CommandLine.h 2009-06-12 08:17:44 UTC (rev 3149)
@@ -33,7 +33,7 @@
#include <map>
#include "util/Convert.h"
#include "util/Debug.h"
-#include "util/Exception.h"
+#include "util/OrxAssert.h"
#include "util/MultiType.h"
#define SetCommandLineArgument(name, defaultValue) \
Modified: branches/pch/src/core/GameState.cc
===================================================================
--- branches/pch/src/core/GameState.cc 2009-06-11 20:26:40 UTC (rev 3148)
+++ branches/pch/src/core/GameState.cc 2009-06-12 08:17:44 UTC (rev 3149)
@@ -33,9 +33,9 @@
*/
#include "GameState.h"
-#include <cassert>
#include "util/Debug.h"
#include "util/Exception.h"
+#include "util/OrxAssert.h"
#include "Clock.h"
namespace orxonox
Modified: branches/pch/src/core/XMLPort.h
===================================================================
--- branches/pch/src/core/XMLPort.h 2009-06-11 20:26:40 UTC (rev 3148)
+++ branches/pch/src/core/XMLPort.h 2009-06-12 08:17:44 UTC (rev 3149)
@@ -46,6 +46,7 @@
#include <tinyxml/ticpp.h>
#include "util/Debug.h"
#include "util/Exception.h"
+#include "util/OrxAssert.h"
#include "util/MultiType.h"
#include "XMLIncludes.h"
#include "Executor.h"
Modified: branches/pch/src/orxonox/gamestates/GSClient.cc
===================================================================
--- branches/pch/src/orxonox/gamestates/GSClient.cc 2009-06-11 20:26:40 UTC (rev 3148)
+++ branches/pch/src/orxonox/gamestates/GSClient.cc 2009-06-12 08:17:44 UTC (rev 3149)
@@ -28,6 +28,7 @@
#include "GSClient.h"
+#include "util/Exception.h"
#include "core/input/InputManager.h"
#include "core/Clock.h"
#include "core/CommandLine.h"
Modified: branches/pch/src/orxonox/gamestates/GSRoot.cc
===================================================================
--- branches/pch/src/orxonox/gamestates/GSRoot.cc 2009-06-11 20:26:40 UTC (rev 3148)
+++ branches/pch/src/orxonox/gamestates/GSRoot.cc 2009-06-12 08:17:44 UTC (rev 3149)
@@ -28,7 +28,6 @@
#include "GSRoot.h"
-#include "util/Exception.h"
#include "util/Debug.h"
#include "core/Clock.h"
#include "core/Game.h"
Modified: branches/pch/src/orxonox/gamestates/GSServer.cc
===================================================================
--- branches/pch/src/orxonox/gamestates/GSServer.cc 2009-06-11 20:26:40 UTC (rev 3148)
+++ branches/pch/src/orxonox/gamestates/GSServer.cc 2009-06-12 08:17:44 UTC (rev 3149)
@@ -28,6 +28,7 @@
#include "GSServer.h"
+#include "util/Debug.h"
#include "core/CommandLine.h"
#include "core/Game.h"
#include "core/GameMode.h"
Modified: branches/pch/src/orxonox/objects/collisionshapes/CollisionShape.cc
===================================================================
--- branches/pch/src/orxonox/objects/collisionshapes/CollisionShape.cc 2009-06-11 20:26:40 UTC (rev 3148)
+++ branches/pch/src/orxonox/objects/collisionshapes/CollisionShape.cc 2009-06-12 08:17:44 UTC (rev 3149)
@@ -30,7 +30,6 @@
#include "BulletCollision/CollisionShapes/btCollisionShape.h"
-#include "util/Exception.h"
#include "core/CoreIncludes.h"
#include "core/XMLPort.h"
#include "tools/BulletConversions.h"
Modified: branches/pch/src/orxonox/objects/collisionshapes/CompoundCollisionShape.cc
===================================================================
--- branches/pch/src/orxonox/objects/collisionshapes/CompoundCollisionShape.cc 2009-06-11 20:26:40 UTC (rev 3148)
+++ branches/pch/src/orxonox/objects/collisionshapes/CompoundCollisionShape.cc 2009-06-12 08:17:44 UTC (rev 3149)
@@ -30,7 +30,6 @@
#include "BulletCollision/CollisionShapes/btCompoundShape.h"
-#include "util/Exception.h"
#include "core/CoreIncludes.h"
#include "core/XMLPort.h"
#include "tools/BulletConversions.h"
Modified: branches/pch/src/orxonox/objects/collisionshapes/WorldEntityCollisionShape.cc
===================================================================
--- branches/pch/src/orxonox/objects/collisionshapes/WorldEntityCollisionShape.cc 2009-06-11 20:26:40 UTC (rev 3148)
+++ branches/pch/src/orxonox/objects/collisionshapes/WorldEntityCollisionShape.cc 2009-06-12 08:17:44 UTC (rev 3149)
@@ -30,7 +30,7 @@
#include "BulletCollision/CollisionShapes/btCompoundShape.h"
-#include "util/Exception.h"
+#include "util/OrxAssert.h"
#include "core/CoreIncludes.h"
#include "objects/worldentities/WorldEntity.h"
Modified: branches/pch/src/orxonox/objects/quest/AddQuest.cc
===================================================================
--- branches/pch/src/orxonox/objects/quest/AddQuest.cc 2009-06-11 20:26:40 UTC (rev 3148)
+++ branches/pch/src/orxonox/objects/quest/AddQuest.cc 2009-06-12 08:17:44 UTC (rev 3149)
@@ -36,7 +36,6 @@
#include <string>
#include "core/CoreIncludes.h"
-#include "util/Exception.h"
#include "orxonox/objects/infos/PlayerInfo.h"
#include "QuestManager.h"
Modified: branches/pch/src/orxonox/objects/quest/AddQuestHint.cc
===================================================================
--- branches/pch/src/orxonox/objects/quest/AddQuestHint.cc 2009-06-11 20:26:40 UTC (rev 3148)
+++ branches/pch/src/orxonox/objects/quest/AddQuestHint.cc 2009-06-12 08:17:44 UTC (rev 3149)
@@ -34,7 +34,6 @@
#include "AddQuestHint.h"
#include "core/CoreIncludes.h"
-#include "util/Exception.h"
#include "orxonox/objects/infos/PlayerInfo.h"
#include "QuestManager.h"
Modified: branches/pch/src/orxonox/objects/quest/CompleteQuest.cc
===================================================================
--- branches/pch/src/orxonox/objects/quest/CompleteQuest.cc 2009-06-11 20:26:40 UTC (rev 3148)
+++ branches/pch/src/orxonox/objects/quest/CompleteQuest.cc 2009-06-12 08:17:44 UTC (rev 3149)
@@ -34,7 +34,6 @@
#include "CompleteQuest.h"
#include "core/CoreIncludes.h"
-#include "util/Exception.h"
#include "orxonox/objects/infos/PlayerInfo.h"
#include "QuestManager.h"
Modified: branches/pch/src/orxonox/objects/quest/FailQuest.cc
===================================================================
--- branches/pch/src/orxonox/objects/quest/FailQuest.cc 2009-06-11 20:26:40 UTC (rev 3148)
+++ branches/pch/src/orxonox/objects/quest/FailQuest.cc 2009-06-12 08:17:44 UTC (rev 3149)
@@ -34,7 +34,6 @@
#include "FailQuest.h"
#include "core/CoreIncludes.h"
-#include "util/Exception.h"
#include "orxonox/objects/infos/PlayerInfo.h"
#include "QuestManager.h"
Modified: branches/pch/src/orxonox/objects/quest/GlobalQuest.cc
===================================================================
--- branches/pch/src/orxonox/objects/quest/GlobalQuest.cc 2009-06-11 20:26:40 UTC (rev 3148)
+++ branches/pch/src/orxonox/objects/quest/GlobalQuest.cc 2009-06-12 08:17:44 UTC (rev 3149)
@@ -36,7 +36,6 @@
#include "orxonox/objects/infos/PlayerInfo.h"
#include "core/CoreIncludes.h"
#include "core/Super.h"
-#include "util/Exception.h"
#include "QuestEffect.h"
Modified: branches/pch/src/orxonox/objects/quest/LocalQuest.cc
===================================================================
--- branches/pch/src/orxonox/objects/quest/LocalQuest.cc 2009-06-11 20:26:40 UTC (rev 3148)
+++ branches/pch/src/orxonox/objects/quest/LocalQuest.cc 2009-06-12 08:17:44 UTC (rev 3149)
@@ -35,7 +35,6 @@
#include "core/CoreIncludes.h"
#include "core/Super.h"
-#include "util/Exception.h"
#include "orxonox/objects/infos/PlayerInfo.h"
#include "QuestEffect.h"
Modified: branches/pch/src/orxonox/objects/quest/QuestHint.cc
===================================================================
--- branches/pch/src/orxonox/objects/quest/QuestHint.cc 2009-06-11 20:26:40 UTC (rev 3148)
+++ branches/pch/src/orxonox/objects/quest/QuestHint.cc 2009-06-12 08:17:44 UTC (rev 3149)
@@ -34,7 +34,6 @@
#include "QuestHint.h"
#include "core/CoreIncludes.h"
-#include "util/Exception.h"
#include "orxonox/objects/infos/PlayerInfo.h"
#include "QuestManager.h"
Modified: branches/pch/src/orxonox/objects/quest/QuestListener.cc
===================================================================
--- branches/pch/src/orxonox/objects/quest/QuestListener.cc 2009-06-11 20:26:40 UTC (rev 3148)
+++ branches/pch/src/orxonox/objects/quest/QuestListener.cc 2009-06-12 08:17:44 UTC (rev 3149)
@@ -35,7 +35,6 @@
#include "core/CoreIncludes.h"
#include "core/XMLPort.h"
-#include "util/Exception.h"
#include "Quest.h"
#include "QuestManager.h"
Modified: branches/pch/src/orxonox/objects/quest/QuestManager.cc
===================================================================
--- branches/pch/src/orxonox/objects/quest/QuestManager.cc 2009-06-11 20:26:40 UTC (rev 3148)
+++ branches/pch/src/orxonox/objects/quest/QuestManager.cc 2009-06-12 08:17:44 UTC (rev 3149)
@@ -37,7 +37,6 @@
#include "core/ConsoleCommand.h"
#include "core/input/InputManager.h"
-#include "util/Exception.h"
#include "gui/GUIManager.h"
#include "objects/infos/PlayerInfo.h"
#include "Quest.h"
Modified: branches/pch/src/orxonox/objects/worldentities/Backlight.cc
===================================================================
--- branches/pch/src/orxonox/objects/worldentities/Backlight.cc 2009-06-11 20:26:40 UTC (rev 3148)
+++ branches/pch/src/orxonox/objects/worldentities/Backlight.cc 2009-06-12 08:17:44 UTC (rev 3149)
@@ -36,7 +36,6 @@
#include "core/Executor.h"
#include "core/XMLPort.h"
#include "objects/Scene.h"
-#include "util/Exception.h"
namespace orxonox
{
Modified: branches/pch/src/orxonox/objects/worldentities/MobileEntity.cc
===================================================================
--- branches/pch/src/orxonox/objects/worldentities/MobileEntity.cc 2009-06-11 20:26:40 UTC (rev 3148)
+++ branches/pch/src/orxonox/objects/worldentities/MobileEntity.cc 2009-06-12 08:17:44 UTC (rev 3149)
@@ -33,7 +33,6 @@
#include "util/Debug.h"
#include "util/MathConvert.h"
-#include "util/Exception.h"
#include "core/CoreIncludes.h"
#include "core/XMLPort.h"
Modified: branches/pch/src/orxonox/objects/worldentities/StaticEntity.cc
===================================================================
--- branches/pch/src/orxonox/objects/worldentities/StaticEntity.cc 2009-06-11 20:26:40 UTC (rev 3148)
+++ branches/pch/src/orxonox/objects/worldentities/StaticEntity.cc 2009-06-12 08:17:44 UTC (rev 3149)
@@ -32,7 +32,7 @@
#include <OgreSceneNode.h>
#include "BulletDynamics/Dynamics/btRigidBody.h"
-#include "util/Exception.h"
+#include "util/OrxAssert.h"
#include "core/CoreIncludes.h"
namespace orxonox
Modified: branches/pch/src/orxonox/objects/worldentities/WorldEntity.cc
===================================================================
--- branches/pch/src/orxonox/objects/worldentities/WorldEntity.cc 2009-06-11 20:26:40 UTC (rev 3148)
+++ branches/pch/src/orxonox/objects/worldentities/WorldEntity.cc 2009-06-12 08:17:44 UTC (rev 3149)
@@ -34,7 +34,7 @@
#include <OgreSceneManager.h>
#include "BulletDynamics/Dynamics/btRigidBody.h"
-#include "util/Exception.h"
+#include "util/OrxAssert.h"
#include "util/Convert.h"
#include "core/CoreIncludes.h"
#include "core/XMLPort.h"
Modified: branches/pch/src/orxonox/objects/worldentities/pawns/SpaceShip.cc
===================================================================
--- branches/pch/src/orxonox/objects/worldentities/pawns/SpaceShip.cc 2009-06-11 20:26:40 UTC (rev 3148)
+++ branches/pch/src/orxonox/objects/worldentities/pawns/SpaceShip.cc 2009-06-12 08:17:44 UTC (rev 3149)
@@ -31,7 +31,6 @@
#include "BulletDynamics/Dynamics/btRigidBody.h"
#include "util/Math.h"
-#include "util/Exception.h"
#include "core/CoreIncludes.h"
#include "core/ConfigValueIncludes.h"
#include "core/Template.h"
Modified: branches/pch/src/util/Exception.h
===================================================================
--- branches/pch/src/util/Exception.h 2009-06-11 20:26:40 UTC (rev 3148)
+++ branches/pch/src/util/Exception.h 2009-06-12 08:17:44 UTC (rev 3149)
@@ -122,13 +122,4 @@
#define ThrowException(type, description) \
throw InternalHandleException(type##Exception(description, __LINE__, __FILE__, __FUNCTIONNAME__))
- // define an assert macro that can display a message
-#ifndef NDEBUG
-#define OrxAssert(Assertion, ErrorMessage) \
- Assertion ? ((void)0) : (void)(orxonox::OutputHandler::getOutStream().setOutputLevel(ORX_ERROR) << ErrorMessage << std::endl); \
- assert(Assertion)
-#else
-#define OrxAssert(condition, errorMessage) ((void)0)
-#endif
-
#endif /* _Exception_H__ */
Added: branches/pch/src/util/OrxAssert.h
===================================================================
--- branches/pch/src/util/OrxAssert.h (rev 0)
+++ branches/pch/src/util/OrxAssert.h 2009-06-12 08:17:44 UTC (rev 3149)
@@ -0,0 +1,52 @@
+/*
+ * ORXONOX - the hottest 3D action shooter ever to exist
+ * > www.orxonox.net <
+ *
+ *
+ * License notice:
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Author:
+ * Reto Grieder
+ * Co-authors:
+ * ...
+ *
+ */
+
+/**
+ at file
+ at brief
+ Declaration of custom assertion facilities
+*/
+
+#ifndef _OrxAssert_H__
+#define _OrxAssert_H__
+
+#include "UtilPrereqs.h"
+
+#include <cassert>
+#include "OutputHandler.h"
+
+// define an assert macro that can display a message
+#ifndef NDEBUG
+#define OrxAssert(Assertion, ErrorMessage) \
+ Assertion ? ((void)0) : (void)(orxonox::OutputHandler::getOutStream().setOutputLevel(ORX_ERROR) << ErrorMessage << std::endl); \
+ assert(Assertion)
+#else
+#define OrxAssert(condition, errorMessage) ((void)0)
+#endif
+
+#endif /* _OrxAssert_H__ */
Property changes on: branches/pch/src/util/OrxAssert.h
___________________________________________________________________
Added: svn:eol-style
+ native
More information about the Orxonox-commit
mailing list