#include <relation.h>
Public Member Functions | |
virtual TypeId | GetInstanceTypeId () |
virtual void | AddKeyAttribute (attrdeftype attrdef) |
Adds a key attribute to the schema. | |
virtual Ptr< Tuple > | GetKey (Ptr< Tuple > tuple) |
Verifies if the tuple has all the key attributes of the given type and returns the key attributes as a Tuple. | |
virtual bool | KeyExists (Ptr< Tuple > tupleKey) |
Returns true if a tuple with the given key exists in the relation. | |
virtual Ptr< Tuple > | GetTupleForKey (Ptr< Tuple > tupleKey) |
Returns the tuple corresponding to the given key in the relation. | |
virtual int | Insert (Ptr< Tuple > tuple) |
Adds a tuple to the relation. | |
virtual void | Delete (Ptr< Tuple > tuple) |
Deletes a tuple from the relation. | |
virtual list< Ptr< Tuple > > | GetAllTuples () |
Returns all the tuples as a list. | |
virtual uint32_t | Count () |
Returns the number of tuples in the relation. | |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
This method returns the TypeId associated to ns3::Object. | |
static Ptr< Relation > | New (string name) |
Factory method to create a new relation with the given name. | |
Protected Attributes | |
map< string, ValueTypeId > | m_keyAttributes |
Map of key attributes. | |
TupleMap | m_tuples |
Map of tuples against key attributes. |
The RapidNet
AddKeyAttributes() are used to define the keys. A key Attribute is defined by the name and type of the Attribute. A relation must have at least one key Attribute. All tuples inserted must have those attributes of matching types and any other additional attributes.
Implementation note: This class maintains a map in which the value is the tuple and the key is another tuple that is contains only the key attributes of the corresponding tuple.
virtual TypeId ns3::rapidnet::Relation::GetInstanceTypeId | ( | ) | [inline, virtual] |
Reimplemented from ns3::rapidnet::RelationBase.
References GetTypeId().
static TypeId ns3::rapidnet::Relation::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::rapidnet::RelationBase.
Referenced by GetInstanceTypeId().