fesa::NotificationID Class Reference

This class provides an unique notification identifier. The ID is generated from the className, the devices specified by the selection criterion, and the properties that will be notified. More...

#include <NotificationID.h>

List of all members.

Public Member Functions

 NotificationID (uint32_t idKey, const std::string &className, const std::set< std::string > &deviceCol, const std::set< std::string > &notifiedPropertyCol)
 ~NotificationID ()
const std::string & getClassName ()
const std::set< std::string > & getPropertyCol ()
const std::set< std::string > & getDeviceCol ()
uint32_t getIDKey ()
bool contains (const std::string &propName, const std::string &deviceName)
 This method checks whether the notification ID contains the given combination of property and device.
void addDevice (const std::string &deviceName)
 Adds a new device name to be notified.
void addProperty (const std::string &propertyName)
 This method adds a new property name to be notified.

Private Attributes

uint32_t idKey_
 key to identify the notification
std::string className_
 name of class that is notified
std::set< std::string > deviceCol_
 names of the devices that will be notified
std::set< std::string > notifiedPropertyCol_
 properties that will be notified

Detailed Description

This class provides an unique notification identifier. The ID is generated from the className, the devices specified by the selection criterion, and the properties that will be notified.

Definition at line 19 of file NotificationID.h.


Constructor & Destructor Documentation

fesa::NotificationID::NotificationID ( uint32_t  idKey,
const std::string &  className,
const std::set< std::string > &  deviceCol,
const std::set< std::string > &  notifiedPropertyCol 
)

/brief Constructor /param idKey the identifier of the notification /param className name of the class that contains the properties that will be notified /param deviceCol names of the devices that will be notified /param notifiedPropertyCol names of the properties that will be notified

Definition at line 18 of file NotificationID.cpp.

fesa::NotificationID::~NotificationID (  ) 

Destructor

Definition at line 27 of file NotificationID.cpp.


Member Function Documentation

void fesa::NotificationID::addDevice ( const std::string &  deviceName  )  [inline]

Adds a new device name to be notified.

Parameters:
deviceName the name of the device

Definition at line 107 of file NotificationID.h.

References deviceCol_.

void fesa::NotificationID::addProperty ( const std::string &  propertyName  )  [inline]

This method adds a new property name to be notified.

Parameters:
propertyName the name of the property

Definition at line 112 of file NotificationID.h.

References notifiedPropertyCol_.

bool fesa::NotificationID::contains ( const std::string &  propName,
const std::string &  deviceName 
)

This method checks whether the notification ID contains the given combination of property and device.

Parameters:
propName the name of the property
deviceName the name of the device
Returns:
true if the pair is contained, otherwise false

Definition at line 31 of file NotificationID.cpp.

References deviceCol_, and notifiedPropertyCol_.

Referenced by fesa::Notification::contains().

const std::string & fesa::NotificationID::getClassName (  )  [inline]

/brief returns the className corresponding to this NotificationID /return the className as const ref

Definition at line 117 of file NotificationID.h.

References className_.

const std::set< std::string > & fesa::NotificationID::getDeviceCol (  )  [inline]

/brief returns the set of devices corresponding to this NotificationID /return const ref to the property collection

Definition at line 127 of file NotificationID.h.

References deviceCol_.

uint32_t fesa::NotificationID::getIDKey (  )  [inline]

/brief returns the unique ID key, which identifies the notification ID and is the same for the server and the real-time side /return the key

Definition at line 132 of file NotificationID.h.

References idKey_.

Referenced by fesa::NotificationIDManager::createNotificationID(), and fesa::Notification::printDebugState().

const std::set< std::string > & fesa::NotificationID::getPropertyCol (  )  [inline]

/brief returns the set of properties corresponding to this notification ID /return const ref to the property collection

Definition at line 122 of file NotificationID.h.

References notifiedPropertyCol_.


Member Data Documentation

std::string fesa::NotificationID::className_ [private]

name of class that is notified

Definition at line 92 of file NotificationID.h.

Referenced by getClassName().

std::set<std::string> fesa::NotificationID::deviceCol_ [private]

names of the devices that will be notified

Definition at line 97 of file NotificationID.h.

Referenced by addDevice(), contains(), and getDeviceCol().

uint32_t fesa::NotificationID::idKey_ [private]

key to identify the notification

Definition at line 87 of file NotificationID.h.

Referenced by getIDKey().

std::set<std::string> fesa::NotificationID::notifiedPropertyCol_ [private]

properties that will be notified

Definition at line 102 of file NotificationID.h.

Referenced by addProperty(), contains(), and getPropertyCol().


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

Generated on 18 Jan 2013 for Fesa by  doxygen 1.6.1