[Orxonox-commit 2457] r7164 - in code/trunk/src/modules: . notifications questsystem

dafrick at orxonox.net dafrick at orxonox.net
Sat Aug 14 23:56:57 CEST 2010


Author: dafrick
Date: 2010-08-14 23:56:56 +0200 (Sat, 14 Aug 2010)
New Revision: 7164

Added:
   code/trunk/src/modules/notifications/
   code/trunk/src/modules/notifications/NotificationsPrecompiledHeaders.h
   code/trunk/src/modules/notifications/NotificationsPrereqs.h
Removed:
   code/trunk/src/modules/questsystem/notifications/
Modified:
   code/trunk/src/modules/CMakeLists.txt
   code/trunk/src/modules/notifications/CMakeLists.txt
   code/trunk/src/modules/notifications/Notification.h
   code/trunk/src/modules/notifications/NotificationManager.h
   code/trunk/src/modules/notifications/NotificationOverlay.h
   code/trunk/src/modules/notifications/NotificationQueue.h
   code/trunk/src/modules/questsystem/CMakeLists.txt
   code/trunk/src/modules/questsystem/QuestsystemPrereqs.h
Log:
Moving notifications to own module.


Modified: code/trunk/src/modules/CMakeLists.txt
===================================================================
--- code/trunk/src/modules/CMakeLists.txt	2010-08-11 06:55:13 UTC (rev 7163)
+++ code/trunk/src/modules/CMakeLists.txt	2010-08-14 21:56:56 UTC (rev 7164)
@@ -26,10 +26,11 @@
 
 ################ Sub Directories ################
 
+ADD_SUBDIRECTORY(designtools)
+ADD_SUBDIRECTORY(notifications)
 ADD_SUBDIRECTORY(objects)
 ADD_SUBDIRECTORY(overlays)
 ADD_SUBDIRECTORY(pickup)
 ADD_SUBDIRECTORY(pong)
 ADD_SUBDIRECTORY(questsystem)
 ADD_SUBDIRECTORY(weapons)
-ADD_SUBDIRECTORY(designtools)

Modified: code/trunk/src/modules/notifications/CMakeLists.txt
===================================================================
--- code/trunk/src/modules/questsystem/notifications/CMakeLists.txt	2010-08-11 06:55:13 UTC (rev 7163)
+++ code/trunk/src/modules/notifications/CMakeLists.txt	2010-08-14 21:56:56 UTC (rev 7164)
@@ -1,6 +1,18 @@
-ADD_SOURCE_FILES(QUESTSYSTEM_SRC_FILES
+SET_SOURCE_FILES(NOTIFICATIONS_SRC_FILES
   Notification.cc
   NotificationManager.cc
   NotificationOverlay.cc
   NotificationQueue.cc
 )
+
+ORXONOX_ADD_LIBRARY(notifications
+  MODULE
+  FIND_HEADER_FILES
+  TOLUA_FILES
+  PCH_FILE
+    NotificationsPrecompiledHeaders.h
+  LINK_LIBRARIES
+    orxonox
+    overlays
+  SOURCE_FILES ${NOTIFICATIONS_SRC_FILES}
+)

Modified: code/trunk/src/modules/notifications/Notification.h
===================================================================
--- code/trunk/src/modules/questsystem/notifications/Notification.h	2010-08-11 06:55:13 UTC (rev 7163)
+++ code/trunk/src/modules/notifications/Notification.h	2010-08-14 21:56:56 UTC (rev 7164)
@@ -34,7 +34,7 @@
 #ifndef _Notification_H__
 #define _Notification_H__
 
-#include "questsystem/QuestsystemPrereqs.h"
+#include "notifications/NotificationsPrereqs.h"
 
 #include <string>
 #include "core/BaseObject.h"
@@ -48,7 +48,7 @@
     @author
         Damian 'Mozork' Frick
     */
-    class _QuestsystemExport Notification : public BaseObject
+    class _NotificationsExport Notification : public BaseObject
     {
         public:
             Notification(BaseObject* creator);

Modified: code/trunk/src/modules/notifications/NotificationManager.h
===================================================================
--- code/trunk/src/modules/questsystem/notifications/NotificationManager.h	2010-08-11 06:55:13 UTC (rev 7163)
+++ code/trunk/src/modules/notifications/NotificationManager.h	2010-08-14 21:56:56 UTC (rev 7164)
@@ -34,7 +34,7 @@
 #ifndef _NotificationManager_H__
 #define _NotificationManager_H__
 
-#include "questsystem/QuestsystemPrereqs.h"
+#include "notifications/NotificationsPrereqs.h"
 
 #include <ctime>
 #include <map>
@@ -52,7 +52,7 @@
     @author
         Damian 'Mozork' Frick
     */
-    class _QuestsystemExport NotificationManager : public Singleton<NotificationManager>, public OrxonoxClass
+    class _NotificationsExport NotificationManager : public Singleton<NotificationManager>, public OrxonoxClass
     {
             friend class Singleton<NotificationManager>;
         public:

Modified: code/trunk/src/modules/notifications/NotificationOverlay.h
===================================================================
--- code/trunk/src/modules/questsystem/notifications/NotificationOverlay.h	2010-08-11 06:55:13 UTC (rev 7163)
+++ code/trunk/src/modules/notifications/NotificationOverlay.h	2010-08-14 21:56:56 UTC (rev 7164)
@@ -35,7 +35,7 @@
 #ifndef _NotificationOverlay_H__
 #define _NotificationOverlay_H__
 
-#include "questsystem/QuestsystemPrereqs.h"
+#include "notifications/NotificationsPrereqs.h"
 
 #include <string>
 #include "overlays/OverlayText.h"
@@ -45,11 +45,11 @@
 
     /**
     @brief
-        The NotificationOverlay is used to display single Notifications, then bundled in a NotificationQUeue.
+        The NotificationOverlay is used to display single Notifications, then bundled in a NotificationQueue.
     @author
         Damian 'Mozork' Frick
     */
-    class _QuestsystemExport NotificationOverlay : public OverlayText
+    class _NotificationsExport NotificationOverlay : public OverlayText
     {
 
         public:

Modified: code/trunk/src/modules/notifications/NotificationQueue.h
===================================================================
--- code/trunk/src/modules/questsystem/notifications/NotificationQueue.h	2010-08-11 06:55:13 UTC (rev 7163)
+++ code/trunk/src/modules/notifications/NotificationQueue.h	2010-08-14 21:56:56 UTC (rev 7164)
@@ -34,7 +34,7 @@
 #ifndef _NotificationOueue_H__
 #define _NotificationOueue_H__
 
-#include "questsystem/QuestsystemPrereqs.h"
+#include "notifications/NotificationsPrereqs.h"
 
 #include <ctime>
 #include <map>
@@ -73,19 +73,19 @@
         Be aware that the NotificationQueue must be inside the <Level></Level> tags or bad things will happen.
         <NotificationQueue
             name = "SuperQueue" //Name of your OverlayQueue.
-            maxSize = "5" //The maximum size of Notifications displayed.
-            notificationLength = "64" //The maximum number of characters of a Notification, that are displayed. (Default is 5)
+            maxSize = "5" //The maximum number of Notifications displayed. (Default is 5)
+            notificationLength = "64" //The maximum number of characters of a Notification, that are displayed. (Default is 64)
             displayTime = "30" //The time a Notification is displayed in seconds. (Default is 30)
             targets = "target1, target2" //The senders this NotificationQueue displays Notifications from. (all, if all Notifications should be displayed.)
             font = "VeraMono" //The font (Default is VeraMono)
             fontSize = '0.4' //The font size. (Default is 0.025)
-            position = "0.0, .0.0" //The position of the NotificationQueue. (Default is 0.0,0.0)
+            position = "0.0, 0.0" //The position of the NotificationQueue. (Default is 0.0,0.0)
         />
     @author
         Damian 'Mozork' Frick
     */
 
-    class _QuestsystemExport NotificationQueue : public OverlayGroup, public Tickable, public NotificationListener
+    class _NotificationsExport NotificationQueue : public OverlayGroup, public Tickable, public NotificationListener
     {
 
         public:
@@ -161,7 +161,7 @@
 
         private:
             static const int DEFAULT_SIZE = 5; //!< The default maximum number of Notifications displayed.
-            static const int DEFAULT_LENGTH = 64; //!< The default maximum number of Notifications displayed.
+            static const int DEFAULT_LENGTH = 64; //!< The default maximum number of characters displayed.
             static const int DEFAULT_DISPLAY_TIME = 30; //!< The default display time.
             static const float DEFAULT_FONT_SIZE; //!< The default font size.
 

Added: code/trunk/src/modules/notifications/NotificationsPrereqs.h
===================================================================
--- code/trunk/src/modules/notifications/NotificationsPrereqs.h	                        (rev 0)
+++ code/trunk/src/modules/notifications/NotificationsPrereqs.h	2010-08-14 21:56:56 UTC (rev 7164)
@@ -0,0 +1,73 @@
+/*
+ *   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:
+ *      Damian 'Mozork' Frick
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+ at file
+ at brief
+    Shared library macros, enums, constants and forward declarations for the questsystem module
+*/
+
+#ifndef _NotificationsPrereqs_H__
+#define _NotificationsPrereqs_H__
+
+#include "OrxonoxConfig.h"
+#include "OrxonoxPrereqs.h"
+
+//-----------------------------------------------------------------------
+// Shared library settings
+//-----------------------------------------------------------------------
+
+#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(NOTIFICATIONS_STATIC_BUILD)
+#  ifdef NOTIFICATIONS_SHARED_BUILD
+#    define _NotificationsExport __declspec(dllexport)
+#  else
+#    if defined( __MINGW32__ )
+#      define _NotificationsExport
+#    else
+#      define _NotificationsExport __declspec(dllimport)
+#    endif
+#  endif
+#elif defined ( ORXONOX_GCC_VISIBILITY )
+#  define _NotificationsExport  __attribute__ ((visibility("default")))
+#else
+#  define _NotificationsExport
+#endif
+
+//-----------------------------------------------------------------------
+// Forward declarations
+//-----------------------------------------------------------------------
+
+namespace orxonox
+{
+    class Notification;
+    class NotificationManager;
+    class NotificationOverlay;
+    class NotificationQueue;
+}
+
+#endif /* _NotificationsPrereqs_H__ */

Modified: code/trunk/src/modules/questsystem/CMakeLists.txt
===================================================================
--- code/trunk/src/modules/questsystem/CMakeLists.txt	2010-08-11 06:55:13 UTC (rev 7163)
+++ code/trunk/src/modules/questsystem/CMakeLists.txt	2010-08-14 21:56:56 UTC (rev 7164)
@@ -18,8 +18,6 @@
   QuestNotification.cc
 )
 
-ADD_SUBDIRECTORY(notifications)
-
 ORXONOX_ADD_LIBRARY(questsystem
   MODULE
   FIND_HEADER_FILES
@@ -32,7 +30,7 @@
     QuestsystemPrecompiledHeaders.h
   LINK_LIBRARIES
     orxonox
+    notifications
     objects
-    overlays
   SOURCE_FILES ${QUESTSYSTEM_SRC_FILES}
 )

Modified: code/trunk/src/modules/questsystem/QuestsystemPrereqs.h
===================================================================
--- code/trunk/src/modules/questsystem/QuestsystemPrereqs.h	2010-08-11 06:55:13 UTC (rev 7163)
+++ code/trunk/src/modules/questsystem/QuestsystemPrereqs.h	2010-08-14 21:56:56 UTC (rev 7164)
@@ -81,12 +81,6 @@
     class QuestListener;
     class QuestManager;
     class QuestNotification;
-
-    // notifications
-    class Notification;
-    class NotificationManager;
-    class NotificationOverlay;
-    class NotificationQueue;
 }
 
 #endif /* _QuestsystemPrereqs_H__ */




More information about the Orxonox-commit mailing list