Itasca C++ Interface
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
itasca::INoticeManager Class Referenceabstract

Interface to the notification system. More...

#include <inoticemanager.h>

Public Member Functions

virtual uint32 reserve (const string &name)=0
 
virtual bool release (uint32 u)=0
 
virtual bool check (const string &name)=0
 Checks to see if string name has already been reserved (given and ID number).
 
virtual uint32 find (const string &name)=0
 
virtual void tag (uint32 u, bool modelChanged=true)=0
 Tags ID u as having been changed, which will be sent out in the next notify() call.
 
virtual void notify ()=0
 
virtual uint32 getUpdateInterval () const =0
 Returns the Update Interval notice - sent to indicate that an update interval has occurred during cycling.
 
virtual uint32 getFISHSymbolNotice () const =0
 Returns the notice code used to indicate that a FISH symbol has changed.

 

Public Attributes

shared::Signal< const std::set< uint32 > & > notification
 
shared::Signal< uint64 > cycleCompleted
 

Detailed Description

Interface to the notification system.

This is a central place for change notifications to occur. The idea is that the engine can quickly tag things as being changed, but the notification to the GUI (or whoever) doesn't happen until later. Then at distinct times (for efficiency) the GUI can be notified of all the changes at once. This allows every zone (for instance) to notify the system that stresses have changed, without burdening the GUI (and engine) with 20,000 notification messages. The basic idea is that tag() is fast, and notify() is slow.

This class is used by registering a notification type (identified by a string), which returns an ID uniquely identifying that notice.

To indicate that something has changed, call the tag() method with the ID returned from reserve(). The notify() method notifies all observers of all changes since the last notify() call.

Member Function Documentation

◆ find()

virtual uint32 itasca::INoticeManager::find ( const string & name)
pure virtual

Returns the ID number associated with a given name.
Throws an exception if name has not been reserved().

◆ notify()

virtual void itasca::INoticeManager::notify ( )
pure virtual

Notifies all observers of changes (in tag() calls) since the last notify() call.
Emits signal notification(uint32 level,const quint &mask);

◆ release()

virtual bool itasca::INoticeManager::release ( uint32 u)
pure virtual

Releases an ID back to the Notice Mananger so it can be re-used.
This is helpful to create notices for things that may later be deleted.
This way the ID pool doesn't constantly increase, causing extra overhead.

◆ reserve()

virtual uint32 itasca::INoticeManager::reserve ( const string & name)
pure virtual

Returns a unique ID given a name (like "table" or "zone stress").
If name has already been registered an exception will be thrown.
This ID should be stored somewhere for fast reference later.


The documentation for this class was generated from the following file: