fesa::NotificationIDManager Class Reference

#include <NotificationIDManager.h>

List of all members.

Public Member Functions

void save ()
 saves notification id collection TODO specify where the file is located
uint32_t createNotificationID (const std::set< std::string > &notifiedProperties, const std::set< std::string > &deviceNames, const std::string &classname)
 This method creates a notification ID and puts it into the collection.
const std::map< uint32_t,
NotificationID * > & 
getNotificationIDCol ()
 returns the notification id collection

Static Public Member Functions

static NotificationIDManagergetInstance ()
 returns the single instance of this class

Private Member Functions

 NotificationIDManager ()
 private default constructor in singleton design pattern
 NotificationIDManager (const NotificationIDManager &other)
 private copy constructor in singleton design pattern
NotificationIDManageroperator= (const NotificationIDManager &other)
 ~NotificationIDManager ()
void storeNotificationIDCollection ()
 this method stores the notification ids into the file
void loadNotificationIDCollection ()
 this method loads the notification ids from a file
void load ()
 loads notification id collection from file

Static Private Member Functions

static void releaseInstance ()
 releases the singleton instance. Method only called by the Abstract Equipment, therefore private and friend

Private Attributes

std::map< uint32_t,
NotificationID * > 
notificationIDCol_
 this attribute stores all the notifications ids MutexProtection is not needed here, since the RTActions are generated in the same thread

Static Private Attributes

static NotificationIDManagertheInstance_ = NULL
 single instance of notification id generator

Friends

class AbstractEquipment
 Necessary to call private method releaseInstance from class AbstractEquipment.

Detailed Description

Definition at line 25 of file NotificationIDManager.h.


Constructor & Destructor Documentation

fesa::NotificationIDManager::NotificationIDManager (  )  [private]

private default constructor in singleton design pattern

Definition at line 30 of file NotificationIDManager.cpp.

Referenced by getInstance().

fesa::NotificationIDManager::NotificationIDManager ( const NotificationIDManager other  )  [private]

private copy constructor in singleton design pattern

fesa::NotificationIDManager::~NotificationIDManager (  )  [private]

Destructor

Definition at line 34 of file NotificationIDManager.cpp.


Member Function Documentation

uint32_t fesa::NotificationIDManager::createNotificationID ( const std::set< std::string > &  notifiedProperties,
const std::set< std::string > &  deviceNames,
const std::string &  classname 
)

This method creates a notification ID and puts it into the collection.

Parameters:
notifiedProperties the properties that will be notified
deviceCol the devices that will be notified
classname the class that contains the properties and devices
Returns:
the id of the notification

Definition at line 243 of file NotificationIDManager.cpp.

References fesa::NotificationID::getIDKey(), and notificationIDCol_.

Referenced by fesa::AbstractRTAction::AbstractRTAction().

NotificationIDManager * fesa::NotificationIDManager::getInstance (  )  [static]
const std::map< uint32_t, NotificationID * > & fesa::NotificationIDManager::getNotificationIDCol (  ) 

returns the notification id collection

Returns:
notification ID collection
Exceptions:
throws FesaErrorGetNotificationIDCollection exception if the notification id collection file cannot be loaded

Definition at line 160 of file NotificationIDManager.cpp.

References getInstance(), load(), notificationIDCol_, fesa::splitRealTimeOnly, fesa::splitServerOnly, and fesa::unsplit.

Referenced by fesa::SubscriptionTreeManager::initNotifications().

void fesa::NotificationIDManager::load (  )  [private]
void fesa::NotificationIDManager::loadNotificationIDCollection (  )  [private]

this method loads the notification ids from a file

Definition at line 174 of file NotificationIDManager.cpp.

References fesa::XMLParser::extractElements(), FesaErrorLoadNotificationIDCollection, fesa::StringUtilities::fromString(), getInstance(), and notificationIDCol_.

Referenced by load().

NotificationIDManager& fesa::NotificationIDManager::operator= ( const NotificationIDManager other  )  [private]

Private = operator in singleton design pattern

void fesa::NotificationIDManager::releaseInstance (  )  [static, private]

releases the singleton instance. Method only called by the Abstract Equipment, therefore private and friend

Definition at line 47 of file NotificationIDManager.cpp.

References theInstance_.

Referenced by fesa::AbstractEquipment::~AbstractEquipment().

void fesa::NotificationIDManager::save (  ) 
void fesa::NotificationIDManager::storeNotificationIDCollection (  )  [private]

Friends And Related Function Documentation

friend class AbstractEquipment [friend]

Necessary to call private method releaseInstance from class AbstractEquipment.

Definition at line 70 of file NotificationIDManager.h.


Member Data Documentation

this attribute stores all the notifications ids MutexProtection is not needed here, since the RTActions are generated in the same thread

Definition at line 76 of file NotificationIDManager.h.

Referenced by createNotificationID(), getNotificationIDCol(), loadNotificationIDCollection(), and storeNotificationIDCollection().

single instance of notification id generator

Definition at line 81 of file NotificationIDManager.h.

Referenced by getInstance(), and releaseInstance().


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

Generated on 18 Jan 2013 for Fesa by  doxygen 1.6.1