Public Member Functions | Static Public Member Functions | Friends | List of all members
ndn::LpPacketLite Class Reference
Inheritance diagram for ndn::LpPacketLite:
ndn_LpPacket

Public Member Functions

 LpPacketLite (struct ndn_LpPacketHeaderField *headerFields, size_t maxHeaderFields)
 Create an LpPacket to use the headerFieldsArray. More...
 
const BlobLitegetFragmentWireEncoding () const
 Get the fragment wire encoding. More...
 
size_t countHeaderFields () const
 Get the number of header fields. More...
 
const LpPacketHeaderFieldLitegetHeaderField (int index) const
 Get the header field at the given index. More...
 
LpPacketHeaderFieldLitegetHeaderField (int index)
 
void setFragmentWireEncoding (const BlobLite &fragmentWireEncoding)
 Set the fragment wire encoding. More...
 

Static Public Member Functions

static LpPacketLitedownCast (ndn_LpPacket &lpPacket)
 Downcast the reference to the ndn_LpPacket struct to an LpPacketLite. More...
 
static const LpPacketLitedownCast (const ndn_LpPacket &lpPacket)
 

Friends

class Tlv0_1_1WireFormatLite
 
class IncomingFaceIdLite
 
class NetworkNackLite
 

Constructor & Destructor Documentation

ndn::LpPacketLite::LpPacketLite ( struct ndn_LpPacketHeaderField * headerFields  ,
size_t  maxHeaderFields 
)

Create an LpPacket to use the headerFieldsArray.

Parameters
headerFieldsThe pre-allocated array of ndn_LpPacketHeaderField. This is an array of the underlying ndn_LpPacketHeaderField struct so that it doesn't run a default constructor unnecessarily.
maxHeaderFieldsThe number of elements in the allocated headerFields array.

Member Function Documentation

size_t ndn::LpPacketLite::countHeaderFields ( ) const
inline

Get the number of header fields.

This does not include the fragment.

Returns
The number of header fields.
static LpPacketLite& ndn::LpPacketLite::downCast ( ndn_LpPacket lpPacket)
inlinestatic

Downcast the reference to the ndn_LpPacket struct to an LpPacketLite.

Parameters
lpPacketA reference to the ndn_LpPacket struct.
Returns
The same reference as LpPacketLite.
const BlobLite& ndn::LpPacketLite::getFragmentWireEncoding ( ) const
inline

Get the fragment wire encoding.

Returns
The wire encoding, or an isNull Blob if not specified.
const LpPacketHeaderFieldLite& ndn::LpPacketLite::getHeaderField ( int  index) const
inline

Get the header field at the given index.

Parameters
indexThe index, starting from 0. It is an error if index is greater to or equal to countHeaderFields().
Returns
The header field at the index.
void ndn::LpPacketLite::setFragmentWireEncoding ( const BlobLite fragmentWireEncoding)
inline

Set the fragment wire encoding.

Parameters
fragmentWireEncodingThe fragment wire encoding or an isNull BlobLite if not specified.

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