Public Member Functions | Static Public Member Functions | Friends | List of all members
ndn::DelegationSetLite::Delegation Class Reference
Inheritance diagram for ndn::DelegationSetLite::Delegation:
ndn_DelegationSet_Delegation

Public Member Functions

 Delegation (ndn_NameComponent *nameComponents, size_t maxNameComponents)
 Create a DelegationSetLite::Delegation with the pre-allocated nameComponents, and defaults for all the values. More...
 
int getPreference () const
 Get the preference number. More...
 
NameLitegetName ()
 Get the delegation name. More...
 
const NameLitegetName () const
 
void setPreference (int preference)
 
ndn_Error set (const Delegation &other)
 Set this delegation to have the values from the other delegation. More...
 

Static Public Member Functions

static DelegationdownCast (ndn_DelegationSet_Delegation &delegation)
 Downcast the reference to the ndn_DelegationSet_Delegation struct to a DelegationSetLite::Delegation. More...
 
static const DelegationdownCast (const ndn_DelegationSet_Delegation &delegation)
 

Friends

class Tlv0_1_1WireFormatLite
 

Constructor & Destructor Documentation

ndn::DelegationSetLite::Delegation::Delegation ( ndn_NameComponent nameComponents,
size_t  maxNameComponents 
)

Create a DelegationSetLite::Delegation with the pre-allocated nameComponents, and defaults for all the values.

Parameters
nameComponentsThe pre-allocated array of ndn_NameComponent. Instead of an array of NameLite::Component, this is an array of the underlying ndn_NameComponent struct so that it doesn't run the default constructor unnecessarily.
maxNameComponentsThe number of elements in the allocated nameComponents array.

Member Function Documentation

static Delegation& ndn::DelegationSetLite::Delegation::downCast ( ndn_DelegationSet_Delegation delegation)
inlinestatic

Downcast the reference to the ndn_DelegationSet_Delegation struct to a DelegationSetLite::Delegation.

Parameters
delegationA reference to the ndn_DelegationSet_Delegation struct.
Returns
The same reference as DelegationSetLite::Delegation.
NameLite& ndn::DelegationSetLite::Delegation::getName ( )
inline

Get the delegation name.

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

Get the preference number.

Returns
The preference number.
ndn_Error ndn::DelegationSetLite::Delegation::set ( const Delegation other)

Set this delegation to have the values from the other delegation.

Parameters
otherThe other DelegationSetLite::Delegation to get values from.
Returns
0 for success, or an error code if there is not enough room in this object's keyName components array.

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