Public Member Functions | List of all members
ndn::DelegationSet::Delegation Class Reference

A DelegationSet::Delegation holds a preference number and delegation name. More...

#include <delegation-set.hpp>

Public Member Functions

 Delegation (int preference, const Name &name)
 Create a new DelegationSet::Delegation with the given values. More...
 
 Delegation (const DelegationSetLite::Delegation &delegationLite)
 Create a new DelegationSet::Delegation by copying from delegationLite. More...
 
int getPreference () const
 Get the preference number. More...
 
const NamegetName () const
 Get the delegation name. More...
 
int compare (const Delegation &other)
 Compare this Delegation with other according to the ordering, based first on the preference number, then on the delegation name. More...
 
void get (DelegationSetLite::Delegation &delegationLite) const
 Set delegationLite to point to the values in this delegation, without copying any memory. More...
 

Detailed Description

A DelegationSet::Delegation holds a preference number and delegation name.

Constructor & Destructor Documentation

ndn::DelegationSet::Delegation::Delegation ( int  preference,
const Name name 
)
inline

Create a new DelegationSet::Delegation with the given values.

Parameters
preferenceThe preference number.
nameThe delegation name. This makes a copy of the name.
ndn::DelegationSet::Delegation::Delegation ( const DelegationSetLite::Delegation delegationLite)

Create a new DelegationSet::Delegation by copying from delegationLite.

Parameters
delegationLiteA DelegationSetLite::Delegation object.

Member Function Documentation

int ndn::DelegationSet::Delegation::compare ( const Delegation other)

Compare this Delegation with other according to the ordering, based first on the preference number, then on the delegation name.

Parameters
otherThe other Delegation to compare with.
Returns
0 If they compare equal, -1 if this Delegation comes before other in the ordering, or 1 if this Delegation comes after.
void ndn::DelegationSet::Delegation::get ( DelegationSetLite::Delegation delegationLite) const

Set delegationLite to point to the values in this delegation, without copying any memory.

WARNING: The resulting pointers in delegationLite are invalid after a further use of this object which could reallocate memory.

Parameters
delegationLiteA DelegationSetLite::Delegation where the name components array is already allocated.
const Name& ndn::DelegationSet::Delegation::getName ( ) const
inline

Get the delegation name.

Returns
The delegation name.
int ndn::DelegationSet::Delegation::getPreference ( ) const
inline

Get the preference number.

Returns
The preference number.

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