ns3::rapidnet::Tuple Class Reference
[RapidNet Library]

A RapidNet tuple. A RapidNet tuple is a collection of. More...

#include <tuple.h>

Inheritance diagram for ns3::rapidnet::Tuple:

Inheritance graph
[legend]
Collaboration diagram for ns3::rapidnet::Tuple:

Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual TypeId GetInstanceTypeId ()
virtual uint32_t GetSerializedSize (void) const
 Returns the size in bytes when serialized.
virtual void Serialize (Buffer::Iterator &start) const
 Serializes the object for transmitting over the network inside a RapidNet header.
virtual uint32_t Deserialize (Buffer::Iterator &end)
 De-serializes the object that is embedded in a RapidNet header received from the network.
virtual string ToString () const
 Returns the string representation of the TupleAttribute.
virtual void AddAttribute (Ptr< TupleAttribute > attr)
 Adds a new attribute if it does not already exists. Throws an error otherwise.
virtual void OverwriteAttribute (Ptr< TupleAttribute > attr)
 Adds the attribute if it does not already exists. If it already exists, then it is overwritten with the given attribute object.
virtual void AddAttributes (list< Ptr< TupleAttribute > > attributes)
 Adds the attribute objects in the given list to the tuple.
virtual bool RemoveAttribute (string name)
 Returns true if an attribute is found and removed, false otherwise.
virtual Ptr< TupleAttributeGetAttribute (string name)
 Returns the attribute with the given name if one exists. Throws an error otherwise.
virtual bool HasAttribute (string name)
 Returns true if the tuple has an attribute with the given name. Returns false otherwise.
virtual map< string, Ptr
< TupleAttribute > > & 
GetAllAttributes ()
 Returns all the attributes as a map, keyed by their names.
virtual bool Matches (Ptr< Tuple > tuple)
 Checks if the given list attribute values match with the current tuple.
virtual Ptr< TupleProject (string newTupleName, list< string > attrNames, list< string > newNames=list< string >())
 Performs a project operation and returns a new tuple with the given name and the requested attributes that are renamed correspondingly with the given new names.
virtual void Assign (Ptr< Assignor > assignor)
 Invokes the given Assignor with this tuple as the argument.
virtual Ptr< TupleSelect (Ptr< Selector > selector)
 Invokes the given Selector with this tuple as the argument.
virtual bool Equals (Ptr< Tuple > tuple)
 Returns true if this tuple is equal to the given tuple.
virtual bool IsEmpty ()
 Returns true if this is an empty tuple.

Static Public Member Functions

static TypeId GetTypeId (void)
 This method returns the TypeId associated to ns3::Object.
static Ptr< TupleNew (string name="no-name")
 Factory method to create a new tuple with the given name or a default name and no attributes.
static Ptr< TupleNew (string name, list< Ptr< TupleAttribute > > attributes)
 Factory method to create a new tuple with the given name and the attributes in the given list added to it.
static Ptr< TupleNewEmpty ()
 Creates and returns a new special tuple called the empty tuple.

Protected Attributes

Time m_timestamp
 Timestamp used for soft-state timeout.
uint32_t m_refCount
 Reference counter used for hard-state.


Detailed Description

A RapidNet tuple. A RapidNet tuple is a collection of.

See also:
TupleAttribute objects that are mapped by their name.
Each TupleAttribute object is a name-value pair. The RapidNet tuple is like a row in a database table. Tuple objects are either stored in the
See also:
Database or they are sent over the network by serializing them within

RapidNetHeader objects.

Tuples also have names. If stored in a database, the tuple has the same name as the table object. See
See also:
Relation.

Member Function Documentation

virtual TypeId ns3::rapidnet::Tuple::GetInstanceTypeId (  )  [inline, virtual]

Returns:
the TypeId associated to the most-derived type of this instance.
This method is typically implemented by ns3::Object::GetInstanceTypeId but some classes which derive from ns3::ObjectBase directly have to implement it themselves.

Implements ns3::ObjectBase.

References GetTypeId().

static TypeId ns3::rapidnet::Tuple::GetTypeId ( void   )  [static]

This method returns the TypeId associated to ns3::Object.

No Attributes defined for this type.
No TraceSources defined for this type.

Reimplemented from ns3::Object.

Referenced by GetInstanceTypeId().

static Ptr<Tuple> ns3::rapidnet::Tuple::NewEmpty (  )  [inline, static]

Creates and returns a new special tuple called the empty tuple.

This tuple has a dummy name and no attributes. If a Selector condition evaluates to false, then an empty tuple is returned.

References New().

virtual Ptr<Tuple> ns3::rapidnet::Tuple::Select ( Ptr< Selector selector  )  [virtual]

Invokes the given Selector with this tuple as the argument.

If the selector evaluates to true then this tuple is returned. Otherwise, an "empty" tuple is returned. See NewEmpty().


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

Generated on Fri Apr 9 15:01:12 2010 for NS-3 by  doxygen 1.5.8