Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 5, 2010, 12:42:54 PM (14 years ago)
Author:
dafrick
Message:

Started work on edit mode. ConsoleCommand is not yet working.
Some additional cleanup. All the NotificationQueues generated by the NotificationManager now are destroyed upon destruction of the NotificationManager.
Removed NotificationQueue from level files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/notifications/src/modules/notifications/NotificationManager.h

    r7349 r7354  
    4040#include <map>
    4141#include <string>
     42#include <vector>
    4243
    4344#include "util/Singleton.h"
    4445#include "core/OrxonoxClass.h"
    4546
    46 namespace orxonox
    47 {
     47namespace orxonox // tolua_export
     48{ // tolua_export
     49
    4850    /**
    4951    @brief
     
    5355        Damian 'Mozork' Frick
    5456    */
    55     class _NotificationsExport NotificationManager : public Singleton<NotificationManager>, public OrxonoxClass
    56     {
     57    class _NotificationsExport NotificationManager  // tolua_export
     58        : public Singleton<NotificationManager>, public OrxonoxClass
     59    { // tolua_export
    5760            friend class Singleton<NotificationManager>;
    5861        public:
    5962            NotificationManager();
    6063            virtual ~NotificationManager();
     64
     65            virtual void preDestroy(void);
     66
     67            static NotificationManager& getInstance() { return Singleton<NotificationManager>::getInstance(); } // tolua_export
    6168
    6269            static const std::string ALL; //!< Static string to indicate a sender that sends to all NotificationListeners.
     
    8087                { return this->getNotifications(listener, map, std::time(0)-timeDelay, std::time(0)); }
    8188
     89            void enterEditMode(void);
     90
     91            void createQueue(const std::string& name, const std::string& targets, unsigned int size, unsigned int displayTime); // tolua_export
     92
    8293        private:
    8394            static NotificationManager* singletonPtr_s;
    8495
    85             NotificationQueue* queue_; //!< Initial, first, NotificationQueue.
     96            std::vector<NotificationQueue*> queues_; //!< The list of NotificationQueues created by the NotificationManager.
    8697
    8798            int highestIndex_; //!< This variable holds the highest index (resp. key) in notificationLists_s, to secure that no key appears twice.
     
    94105            bool removeNotification(Notification* notification, std::multimap<std::time_t, Notification*>& map); //!< Helper method that removes an input notification form an input map.
    95106
    96     };
     107    }; // tolua_export
    97108
    98 }
     109} // tolua_export
    99110
    100111#endif /* _NotificationManager_H__ */
Note: See TracChangeset for help on using the changeset viewer.