#include <relation-base.h>
Public Member Functions | |
virtual TypeId | GetInstanceTypeId () |
virtual void | AddKeyAttribute (attrdeftype attribute)=0 |
Adds a key attribute to the schema. This method can be used by sub-classes for reading the list of key attributes. Sub-classes may also choose to not implement it by throwing an error. | |
virtual int | Insert (Ptr< Tuple > tuple)=0 |
Adds a tuple to the relation. | |
virtual void | Delete (Ptr< Tuple > tuple)=0 |
Deletes a tuple from the relation. | |
virtual void | InsertAll (list< Ptr< Tuple > > tuples) |
Adds all tuples in the list to the relation. | |
virtual list< Ptr< Tuple > > | GetAllTuples ()=0 |
Returns all the tuples as a list. | |
virtual uint32_t | Count ()=0 |
Returns the number of tuples in the relation. | |
virtual void | PrintAllTuples (ostream &os) |
Prints all the tuples to the given stream. | |
virtual Ptr< RelationBase > | Project (string newRelnName, list< string > attrNames, list< string > newNames=list< string >()) |
Implements a database project operation. | |
virtual Ptr< RelationBase > | Select (Ptr< Selector > selector) |
Implements a database select operation. | |
virtual Ptr< RelationBase > | Join (Ptr< Tuple > rTuple, list< string > lAttrs, list< string > rAttrs, bool qualify=false) |
Implements a database join operation. | |
virtual Ptr< RelationBase > | Join (Ptr< RelationBase > reln, list< string > lAttrNames, list< string > rAttrNames, bool qualify=false) |
Implements a database join operation. | |
virtual void | Assign (Ptr< Assignor > assignor) |
Invokes the given Assignor on all tuples of this relation. | |
Time | GetTimeToLive () |
Returns the time-to-live, i.e., the soft-state timeout duration for this relation. | |
void | SetTimeToLive (Time ttl) |
Sets the time-to-live, i.e., the soft-state timeout duration for this relation. | |
bool | IsSoftState () |
Returns true if this is a soft-state relation, i.e. the time-to-live is finite. | |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
This method returns the TypeId associated to ns3::Object. | |
Public Attributes | |
TriggerList | OnInsert |
The list of triggers that are invoked when a tuple is inserted. | |
TriggerList | OnDelete |
The list of triggers that are invoked when a tuple is deleted. | |
TriggerList | OnRefresh |
The list of triggers that are invoked when a tuple is refreshed. | |
Protected Attributes | |
Time | m_timeToLive |
Time-to-live (or TTL) for soft-state timeout. |
TempRelation is simply a list of tuples that is generated on applying a database operation like join, select, etc.
virtual TypeId ns3::rapidnet::RelationBase::GetInstanceTypeId | ( | ) | [inline, virtual] |
Implements ns3::ObjectBase.
Reimplemented in ns3::rapidnet::Relation, and ns3::rapidnet::TempRelation.
References GetTypeId().
static TypeId ns3::rapidnet::RelationBase::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.
Reimplemented in ns3::rapidnet::Relation, and ns3::rapidnet::TempRelation.
Referenced by GetInstanceTypeId().
virtual Ptr<RelationBase> ns3::rapidnet::RelationBase::Join | ( | Ptr< RelationBase > | reln, | |
list< string > | lAttrNames, | |||
list< string > | rAttrNames, | |||
bool | qualify = false | |||
) | [virtual] |
Implements a database join operation.
Joins this relation with the given relation.
reln | The relation to be joined with (on the right). | |
lAttrNames | The join attributes for this relation (on the left). | |
rAttrNames | The corresponding join attributes for the tuple. | |
qualify | If true, the attribute names in the resultant relation are qualified by their respective relation names. |
virtual Ptr<RelationBase> ns3::rapidnet::RelationBase::Join | ( | Ptr< Tuple > | rTuple, | |
list< string > | lAttrs, | |||
list< string > | rAttrs, | |||
bool | qualify = false | |||
) | [virtual] |
Implements a database join operation.
Joins this relation with the given tuple.
rTuple | The tuple to be joined with (on the right). | |
lAttrs | The join attributes for this relation (on the left). | |
rAttrs | The corresponding join attributes for the tuple. | |
qualify | If true, the attribute names in the resultant relation are qualified by their respective relation/tuple names. |
virtual Ptr<RelationBase> ns3::rapidnet::RelationBase::Project | ( | string | newRelnName, | |
list< string > | attrNames, | |||
list< string > | newNames = list< string >() | |||
) | [virtual] |
Implements a database project operation.
It creates and returns a new TempRelation object and inserts all the tuples in this relation to it by renaming them and their attributes
virtual Ptr<RelationBase> ns3::rapidnet::RelationBase::Select | ( | Ptr< Selector > | selector | ) | [virtual] |
Implements a database select operation.
Returns a new relation with only those tuples in this relation that satisfy the given Selector.