ndn::security::transform::BufferSource Class Reference

A source taking one or more memory buffers as input. More...

#include <ndn-cxx/security/transform/buffer-source.hpp>

+ Inheritance diagram for ndn::security::transform::BufferSource:
+ Collaboration diagram for ndn::security::transform::BufferSource:

Public Member Functions

 BufferSource (const uint8_t *buf, size_t size)
 Take a buffer buf with size size as input. More...
 
 BufferSource (const std::string &string)
 Take string as input. More...
 
 BufferSource (const Buffer &buffer)
 Take buffer as input. More...
 
 BufferSource (InputBuffers buffers)
 Take buffers as input. More...
 
Sourceoperator>> (unique_ptr< Transform > transform)
 Connect to an intermediate transformation module. More...
 
void operator>> (unique_ptr< Sink > sink)
 Connect to the last transformation module. More...
 

Protected Member Functions

void appendChain (unique_ptr< Downstream > tail)
 connect to next transformation module More...
 
size_t getIndex () const
 Get the source module index (should always be 0). More...
 
DownstreamgetNext ()
 
void pump ()
 Pump all data into next transformation module. More...
 

Protected Attributes

unique_ptr< Downstreamm_next
 

Detailed Description

A source taking one or more memory buffers as input.

Definition at line 36 of file buffer-source.hpp.

Constructor & Destructor Documentation

◆ BufferSource() [1/4]

ndn::security::transform::BufferSource::BufferSource ( const uint8_t *  buf,
size_t  size 
)

Take a buffer buf with size size as input.

Caller must not destroy the buffer before the transformation is completed.

Definition at line 28 of file buffer-source.cpp.

◆ BufferSource() [2/4]

ndn::security::transform::BufferSource::BufferSource ( const std::string &  string)
explicit

Take string as input.

Caller must not destroy the string before the transformation is completed.

Definition at line 33 of file buffer-source.cpp.

◆ BufferSource() [3/4]

ndn::security::transform::BufferSource::BufferSource ( const Buffer buffer)
explicit

Take buffer as input.

Caller must not destroy the buffer before the transformation is completed.

Definition at line 38 of file buffer-source.cpp.

◆ BufferSource() [4/4]

ndn::security::transform::BufferSource::BufferSource ( InputBuffers  buffers)
explicit

Take buffers as input.

Caller must not destroy any of the input buffers before the transformation is completed.

Definition at line 43 of file buffer-source.cpp.

Member Function Documentation

◆ appendChain()

void ndn::security::transform::Upstream::appendChain ( unique_ptr< Downstream tail)
protectedinherited

connect to next transformation module

Definition at line 67 of file transform-base.cpp.

◆ getIndex()

size_t ndn::security::transform::Source::getIndex ( ) const
inlineprotectedinherited

Get the source module index (should always be 0).

Definition at line 320 of file transform-base.hpp.

◆ getNext()

Downstream* ndn::security::transform::Upstream::getNext ( )
inlineprotectedinherited

Definition at line 174 of file transform-base.hpp.

◆ operator>>() [1/2]

Source & ndn::security::transform::Source::operator>> ( unique_ptr< Transform transform)
inherited

Connect to an intermediate transformation module.

Definition at line 166 of file transform-base.cpp.

◆ operator>>() [2/2]

void ndn::security::transform::Source::operator>> ( unique_ptr< Sink sink)
inherited

Connect to the last transformation module.

This method will trigger the source to pump data into the transformation pipeline.

Definition at line 176 of file transform-base.cpp.

◆ pump()

void ndn::security::transform::Source::pump ( )
protectedinherited

Pump all data into next transformation module.

Definition at line 160 of file transform-base.cpp.

Member Data Documentation

◆ m_next

unique_ptr<Downstream> ndn::security::transform::Upstream::m_next
protectedinherited

Definition at line 180 of file transform-base.hpp.