All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ndn::Data Class Reference

#include <data.hpp>

Inheritance diagram for ndn::Data:
[legend]
Collaboration diagram for ndn::Data:
[legend]

Data Structures

class  Error
 

Public Member Functions

 Data ()
 Create an empty Data object. More...
 
 Data (const Name &name)
 Create a new Data object with the given name. More...
 
 Data (const Block &wire)
 Create a new Data object from wire encoding. More...
 
 ~Data ()
 The destructor. More...
 
template<bool T>
size_t wireEncode (EncodingImpl< T > &block, bool unsignedPortion=false) const
 Fast encoding or block size estimation. More...
 
const BlockwireEncode () const
 Encode to a wire format. More...
 
void wireDecode (const Block &wire)
 Decode from the wire format. More...
 
bool hasWire () const
 Check if already has wire. More...
 
const NamegetName () const
 
void setName (const Name &name)
 Set name to a copy of the given Name. More...
 
const MetaInfogetMetaInfo () const
 
void setMetaInfo (const MetaInfo &metaInfo)
 Set metaInfo to a copy of the given MetaInfo. More...
 
uint32_t getContentType () const
 
void setContentType (uint32_t type)
 
const time::milliseconds & getFreshnessPeriod () const
 
void setFreshnessPeriod (const time::milliseconds &freshnessPeriod)
 
const name::ComponentgetFinalBlockId () const
 
void setFinalBlockId (const name::Component &finalBlockId)
 
const BlockgetContent () const
 Get content Block. More...
 
void setContent (const uint8_t *content, size_t contentLength)
 Set the content to a copy of the data in the vector. More...
 
void setContent (const Block &content)
 
void setContent (const ConstBufferPtr &contentValue)
 
const SignaturegetSignature () const
 
void setSignature (const Signature &signature)
 Set the signature to a copy of the given signature. More...
 
void setSignatureValue (const Block &value)
 
nfd::LocalControlHeadergetLocalControlHeader ()
 
const nfd::LocalControlHeadergetLocalControlHeader () const
 
uint64_t getIncomingFaceId () const
 
void setIncomingFaceId (uint64_t incomingFaceId)
 
bool operator== (const Data &other) const
 
bool operator!= (const Data &other) const
 

Friends

class nfd::LocalControlHeader
 

Detailed Description

Definition at line 21 of file data.hpp.

Constructor & Destructor Documentation

ndn::Data::Data ( )
inline

Create an empty Data object.

Definition at line 224 of file data.hpp.

ndn::Data::Data ( const Name name)
inline

Create a new Data object with the given name.

Parameters
nameA reference to the name which is copied.

Definition at line 230 of file data.hpp.

ndn::Data::Data ( const Block wire)
inlineexplicit

Create a new Data object from wire encoding.

Definition at line 49 of file data.hpp.

ndn::Data::~Data ( )
inline

The destructor.

Definition at line 236 of file data.hpp.

Member Function Documentation

const Block & ndn::Data::getContent ( ) const
inline

Get content Block.

To access content value, one can use value()/value_size() or value_begin()/value_end() methods of the Block class

Definition at line 411 of file data.hpp.

uint32_t ndn::Data::getContentType ( ) const
inline

Definition at line 372 of file data.hpp.

const name::Component & ndn::Data::getFinalBlockId ( ) const
inline

Definition at line 398 of file data.hpp.

const time::milliseconds & ndn::Data::getFreshnessPeriod ( ) const
inline

Definition at line 385 of file data.hpp.

uint64_t ndn::Data::getIncomingFaceId ( ) const
inline

Definition at line 484 of file data.hpp.

nfd::LocalControlHeader & ndn::Data::getLocalControlHeader ( )
inline

Definition at line 472 of file data.hpp.

const nfd::LocalControlHeader & ndn::Data::getLocalControlHeader ( ) const
inline

Definition at line 478 of file data.hpp.

const MetaInfo & ndn::Data::getMetaInfo ( ) const
inline

Definition at line 359 of file data.hpp.

const Name & ndn::Data::getName ( ) const
inline

Definition at line 346 of file data.hpp.

const Signature & ndn::Data::getSignature ( ) const
inline

Definition at line 450 of file data.hpp.

bool ndn::Data::hasWire ( ) const
inline

Check if already has wire.

Definition at line 340 of file data.hpp.

bool ndn::Data::operator!= ( const Data other) const
inline

Definition at line 517 of file data.hpp.

bool ndn::Data::operator== ( const Data other) const
inline

Definition at line 508 of file data.hpp.

void ndn::Data::setContent ( const uint8_t *  content,
size_t  contentLength 
)
inline

Set the content to a copy of the data in the vector.

Parameters
contentA vector whose contents are copied.
Returns
This Data so that you can chain calls to update values.

Definition at line 422 of file data.hpp.

void ndn::Data::setContent ( const Block content)
inline

Definition at line 438 of file data.hpp.

void ndn::Data::setContent ( const ConstBufferPtr contentValue)
inline

Definition at line 430 of file data.hpp.

void ndn::Data::setContentType ( uint32_t  type)
inline

Definition at line 378 of file data.hpp.

void ndn::Data::setFinalBlockId ( const name::Component finalBlockId)
inline

Definition at line 404 of file data.hpp.

void ndn::Data::setFreshnessPeriod ( const time::milliseconds &  freshnessPeriod)
inline

Definition at line 391 of file data.hpp.

void ndn::Data::setIncomingFaceId ( uint64_t  incomingFaceId)
inline

Definition at line 490 of file data.hpp.

void ndn::Data::setMetaInfo ( const MetaInfo metaInfo)
inline

Set metaInfo to a copy of the given MetaInfo.

Parameters
metaInfoThe MetaInfo which is copied.
Returns
This Data so that you can chain calls to update values.

Definition at line 365 of file data.hpp.

void ndn::Data::setName ( const Name name)
inline

Set name to a copy of the given Name.

Parameters
nameThe Name which is copied.
Returns
This Data so that you can chain calls to update values.

Definition at line 352 of file data.hpp.

void ndn::Data::setSignature ( const Signature signature)
inline

Set the signature to a copy of the given signature.

Parameters
signatureThe signature object which is cloned.

Definition at line 456 of file data.hpp.

void ndn::Data::setSignatureValue ( const Block value)
inline

Definition at line 463 of file data.hpp.

void ndn::Data::wireDecode ( const Block wire)
inline

Decode from the wire format.

Decode the input using a particular wire format and update this Data.

Parameters
inputThe input byte array to be decoded.

Definition at line 306 of file data.hpp.

template<bool T>
size_t ndn::Data::wireEncode ( EncodingImpl< T > &  block,
bool  unsignedPortion = false 
) const
inline

Fast encoding or block size estimation.

Definition at line 242 of file data.hpp.

const Block & ndn::Data::wireEncode ( ) const
inline

Encode to a wire format.

Definition at line 286 of file data.hpp.

Friends And Related Function Documentation

friend class nfd::LocalControlHeader
friend

Definition at line 220 of file data.hpp.