Siena C++ API Documentation
Author: Antonio Carzaniga

Siena C++ API documentation (v. 0.4.3)

- Main Page
- Classes
- Files
- Examples

- Class List
- Class Hierarchy
- Class Members

# Notification Class Reference

`#include <Siena.h>`

List of all members.

## Public Member Functions
| Notification ()
| Notification (const Notification &)
Notification & | operator= (const string &)

## Detailed Description

event notification

See also:
  AttributeSet

A notification in Siena is a set of named attributes. `Notification` represents an event notification. Attribute names are standard C++ `string`s while attribute values are `AttributeValue`s. A name uniquely identifies an attribute in an `Notification`.

An `Notification` is implemented as a `map<string, AttributeValue>`, therefore All the functions of the standard `map` template can be used to manipulate an `Notification`. For instance:

            Notification e;
            // ...
            // prints out attribute names of e
            //
            for(Notification::iterator i = e.begin(); i != e.end(); ++i)
                cout << (*i).first;

Of course, every operation on an `Notification` can take advantage of the access functions and assignment operators of `AttributeValue`.

            Notification e;

            e["stock"] = "XYZ";
            e["price"] = 12.34
            e["quantity"] = 567;

            int q = e["quantity"];

The structure of names and types of an `Notification` is completely arbitrary for Siena. In other words, Siena does not require any pre-defined attribute. It is up to applications to agree on sets of names, types, and semantics of attributes.

Examples:

  publisher.cc, and subscriber.cc.

## Constructor & Destructor Documentation

Notification::Notification | ( |  | ) |

construct an empty notification

Notification::Notification | ( | const Notification & |  | ) |

copy constructor

## Member Function Documentation

Notification& Notification::operator= | ( | const string & |  | ) |

fills in the attributes of this notification from a string representation of a notification

         Notification e;

         e = "{ dest = \"MXP\" price = 850 }";

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

- Siena.h

Copyright © 2001 University of Colorado.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". This documentation is authored and maintained by Antonio Carzaniga