nlsr::tlv::NameLsa Class Reference

Data abstraction for NameLsa. More...

#include <name-lsa.hpp>

Data Structures

class  Error
 

Public Types

typedef std::list< ndn::Name > NameList
 
typedef NameList::const_iterator iterator
 

Public Member Functions

 NameLsa ()
 
 NameLsa (const ndn::Block &block)
 
const LsaInfogetLsaInfo () const
 
NameLsasetLsaInfo (const LsaInfo &lsaInfo)
 
bool hasNames () const
 
const std::list< ndn::Name > & getNames () const
 
NameLsaaddName (const ndn::Name &name)
 
NameLsaclearNames ()
 
template<ndn::encoding::Tag TAG>
size_t wireEncode (ndn::EncodingImpl< TAG > &block) const
 Encodes the Name objects and some info using the method in TAG. More...
 
const ndn::Block & wireEncode () const
 Create a TLV encoding of this object. More...
 
void wireDecode (const ndn::Block &wire)
 Populate this object by decoding the one contained in the given block. More...
 
iterator begin () const
 
iterator end () const
 

Detailed Description

Data abstraction for NameLsa.

NameLsa := NAME-LSA-TYPE TLV-LENGTH LsaInfo Name+

See also
https://redmine.named-data.net/projects/nlsr/wiki/LSDB_DataSet

Definition at line 47 of file name-lsa.hpp.

Member Typedef Documentation

typedef NameList::const_iterator nlsr::tlv::NameLsa::iterator

Definition at line 61 of file name-lsa.hpp.

typedef std::list<ndn::Name> nlsr::tlv::NameLsa::NameList

Definition at line 60 of file name-lsa.hpp.

Constructor & Destructor Documentation

nlsr::tlv::NameLsa::NameLsa ( )

Definition at line 36 of file name-lsa.cpp.

nlsr::tlv::NameLsa::NameLsa ( const ndn::Block &  block)
explicit

Definition at line 41 of file name-lsa.cpp.

Here is the call graph for this function:

Member Function Documentation

NameLsa& nlsr::tlv::NameLsa::addName ( const ndn::Name &  name)
inline

Definition at line 95 of file name-lsa.hpp.

Here is the caller graph for this function:

NameLsa::iterator nlsr::tlv::NameLsa::begin ( ) const
inline

Definition at line 156 of file name-lsa.hpp.

Here is the caller graph for this function:

NameLsa& nlsr::tlv::NameLsa::clearNames ( )
inline

Definition at line 104 of file name-lsa.hpp.

Here is the call graph for this function:

NameLsa::iterator nlsr::tlv::NameLsa::end ( ) const
inline

Definition at line 162 of file name-lsa.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

const LsaInfo& nlsr::tlv::NameLsa::getLsaInfo ( ) const
inline

Definition at line 69 of file name-lsa.hpp.

Here is the caller graph for this function:

const std::list<ndn::Name>& nlsr::tlv::NameLsa::getNames ( ) const
inline

Definition at line 89 of file name-lsa.hpp.

bool nlsr::tlv::NameLsa::hasNames ( ) const
inline

Definition at line 83 of file name-lsa.hpp.

NameLsa& nlsr::tlv::NameLsa::setLsaInfo ( const LsaInfo lsaInfo)
inline

Definition at line 75 of file name-lsa.hpp.

Here is the caller graph for this function:

void nlsr::tlv::NameLsa::wireDecode ( const ndn::Block &  wire)

Populate this object by decoding the one contained in the given block.

Definition at line 90 of file name-lsa.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<ndn::encoding::Tag TAG>
size_t nlsr::tlv::NameLsa::wireEncode ( ndn::EncodingImpl< TAG > &  block) const

Encodes the Name objects and some info using the method in TAG.

This function will TLV-format the Name objects and some LSA info using the implementation speciifed by TAG. Usually this is called with an estimator first to guess how long the buffer needs to be, then with an encoder to do the real work. This process is automated by the other wireEncode.

See also
NameLsa::wireEncode()

Definition at line 48 of file name-lsa.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

const ndn::Block & nlsr::tlv::NameLsa::wireEncode ( ) const

Create a TLV encoding of this object.

Create a block containing the TLV encoding of this object. That involves two steps: estimating the size that the information will take up, and then creating a buffer of that size and encoding the information into it. Both steps are accomplished by NameLsa::wireEncode(ndn::EncodingImpl<TAG>&)

Definition at line 72 of file name-lsa.cpp.

Here is the caller graph for this function: