Siena Fast Forwarding Documentation (v. 2.0.1)
Classes | Public Member Functions | List of all members
siena::Message Class Referenceabstract

interface of a generic message in the attribute-based data model. More...

#include <attributes.h>

Classes

class  Iterator
 interface of a generic message iterator. More...
 

Public Member Functions

virtual ~Message ()
 virtual destructor
 
virtual Iteratorfirst () const =0
 returns an iterator over this message. More...
 
virtual Attributefind (const String &) const =0
 provides direct access to a given attribute. More...
 
virtual bool contains (const String &) const =0
 test existence of a given attribute.
 

Detailed Description

interface of a generic message in the attribute-based data model.

A message is a set of attributes. Individual attributes can be accessed sequentially through a Message::Iterator, or directly by name.

Examples:
forwarding_messages.cc, message_iteration.cc, and simple_attributes_types.h.

Member Function Documentation

virtual Attribute* siena::Message::find ( const String ) const
pure virtual

provides direct access to a given attribute.

Finds an attribute in a message based on the attribute's name. Applications must take care of deallocating the objects returned by this method.

Returns
the given attribute in this message, or NULL if such attribute does not exist.
Examples:
simple_attributes_types.h.
virtual Iterator* siena::Message::first ( ) const
pure virtual

returns an iterator over this message.

The iterator returned by this method must define a complete iteration through the message. The order of the iteration is implementation-dependent.

Returns
iterator pointing to the first attribute in this message, or NULL if this message is empty.
Examples:
message_iteration.cc, and simple_attributes_types.h.