libcommonc++
0.7
|
A manipulator that specifies the maximum number of bytes that can be read/written. More...
#include <DataEncoder.h++>
Public Member Functions | |
SetLimit (int64_t limit) | |
Construct a new SetLimit manipulator. More... | |
~SetLimit () | |
Destructor. More... | |
Protected Member Functions | |
void | apply (DataEncoder &encoder) const |
Apply the DataManipulator to a DataEncoder. More... | |
A manipulator that specifies the maximum number of bytes that can be read/written.
Attempts to read/write past this limit will raise an IOException.
SetLimit | ( | int64_t | limit | ) |
Construct a new SetLimit manipulator.
limit | The limit, in bytes. A value of 0 indicates no limit. |
~SetLimit | ( | ) |
Destructor.
|
protectedvirtual |
Apply the DataManipulator to a DataEncoder.
encoder | The target DataEncoder. |
IOException | If an I/O error occurs. |
Implements DataEncoder::Manipulator.