NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
ndn::security::transform::Transform Class Referenceabstract

Abstraction of an intermediate transformation module. More...

#include <transform-base.hpp>

Inheritance diagram for ndn::security::transform::Transform:
Collaboration diagram for ndn::security::transform::Transform:

Protected Types

typedef std::vector< uint8_t > OBuffer
 

Protected Member Functions

 Transform ()
 
void flushOutputBuffer ()
 Read the content from output buffer and write it into next module. More...
 
void flushAllOutput ()
 Read the all the content from output buffer and write it into next module. More...
 
void setOutputBuffer (unique_ptr< OBuffer > buffer)
 Set output buffer to buffer. More...
 
bool isOutputBufferEmpty () const
 Check if output buffer is empty. More...
 
- Protected Member Functions inherited from ndn::security::transform::Upstream
 Upstream ()
 
void appendChain (unique_ptr< Downstream > tail)
 connect to next transformation module More...
 
DownstreamgetNext ()
 
- Protected Member Functions inherited from ndn::security::transform::Downstream
 Downstream ()
 

Additional Inherited Members

- Public Member Functions inherited from ndn::security::transform::Upstream
virtual ~Upstream ()=default
 
- Public Member Functions inherited from ndn::security::transform::Downstream
virtual ~Downstream ()=default
 
size_t write (const uint8_t *buf, size_t size)
 Accept input data and perform transformation. More...
 
void end ()
 Close the input interface of a module. More...
 
bool isEnd () const
 Check if the input interface of a module is closed. More...
 
void setIndex (size_t index)
 Set the module index. More...
 
size_t getIndex () const
 Get the module index. More...
 
- Protected Attributes inherited from ndn::security::transform::Upstream
unique_ptr< Downstreamm_next
 

Detailed Description

Abstraction of an intermediate transformation module.

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

Member Typedef Documentation

◆ OBuffer

typedef std::vector<uint8_t> ndn::security::transform::Transform::OBuffer
protected

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

Constructor & Destructor Documentation

◆ Transform()

ndn::security::transform::Transform::Transform ( )
protected

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

Member Function Documentation

◆ flushOutputBuffer()

void ndn::security::transform::Transform::flushOutputBuffer ( )
protected

Read the content from output buffer and write it into next module.

It is not guaranteed that all the content in output buffer will be flushed to next module.

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

References isOutputBufferEmpty(), and ndn::security::transform::Upstream::m_next.

Referenced by flushAllOutput().

◆ flushAllOutput()

void ndn::security::transform::Transform::flushAllOutput ( )
protected

Read the all the content from output buffer and write it into next module.

Postcondition
isOutputBufferEmpty() returns true.

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

References flushOutputBuffer(), and isOutputBufferEmpty().

◆ setOutputBuffer()

void ndn::security::transform::Transform::setOutputBuffer ( unique_ptr< OBuffer buffer)
protected

Set output buffer to buffer.

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

References isOutputBufferEmpty(), and nonstd::optional_lite::std11::move().

◆ isOutputBufferEmpty()

bool ndn::security::transform::Transform::isOutputBufferEmpty ( ) const
protected

Check if output buffer is empty.

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

Referenced by flushAllOutput(), flushOutputBuffer(), and setOutputBuffer().


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