A source that can accept input step by step, and can close input explicitly. More...
#include <ndn-cxx/security/transform/step-source.hpp>
Public Member Functions | |
void | end () |
Close the input interface and directly notify the next module the end of input. More... | |
void | operator>> (unique_ptr< Sink > sink) |
Connect to the last transformation module. More... | |
Source & | operator>> (unique_ptr< Transform > transform) |
Connect to an intermediate transformation module. More... | |
size_t | write (span< const uint8_t > buf) |
Accept input data and directly write input into next transformation module. More... | |
Protected Member Functions | |
void | appendChain (unique_ptr< Downstream > tail) |
Connect to the next transformation module. More... | |
size_t | getIndex () const |
Get the source module index (should always be 0). More... | |
Downstream * | getNext () |
void | pump () |
Pump all data into next transformation module. More... | |
Protected Attributes | |
unique_ptr< Downstream > | m_next |
A source that can accept input step by step, and can close input explicitly.
This source will not send data into the transformation chain when the chain is constructed. Input will be explicitly sent into the chain using write(...) and will be closed explicitly using end().
StepSource ss; ss >> transform1() >> transform2() >> sinkStream(...); ss.write(...); ... ss.write(...); ss.end();
Definition at line 43 of file step-source.hpp.
|
protectedinherited |
Connect to the next transformation module.
Definition at line 54 of file transform-base.cpp.
void ndn::security::transform::StepSource::end | ( | ) |
Close the input interface and directly notify the next module the end of input.
Definition at line 33 of file step-source.cpp.
|
inlineprotectedinherited |
Get the source module index (should always be 0).
Definition at line 306 of file transform-base.hpp.
|
inlineprotectedinherited |
Definition at line 166 of file transform-base.hpp.
|
inherited |
Connect to the last transformation module.
This method will trigger the source to pump data into the transformation pipeline.
Definition at line 149 of file transform-base.cpp.
|
inherited |
Connect to an intermediate transformation module.
Definition at line 139 of file transform-base.cpp.
|
protectedinherited |
Pump all data into next transformation module.
Definition at line 133 of file transform-base.cpp.
size_t ndn::security::transform::StepSource::write | ( | span< const uint8_t > | buf | ) |
Accept input data and directly write input into next transformation module.
One can keep calling this method to until end() is called, which indicates the end of input. After that, calling this method will cause Error.
Definition at line 27 of file step-source.cpp.
|
protectedinherited |
Definition at line 172 of file transform-base.hpp.