libcommonc++  0.7
DataEncoder::SetLimit Class Reference

A manipulator that specifies the maximum number of bytes that can be read/written. More...

#include <DataEncoder.h++>

Inheritance diagram for DataEncoder::SetLimit:
Collaboration diagram for DataEncoder::SetLimit:

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...
 

Detailed Description

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.

Author
Mark Lindner

Constructor & Destructor Documentation

◆ SetLimit()

SetLimit ( int64_t  limit)

Construct a new SetLimit manipulator.

Parameters
limitThe limit, in bytes. A value of 0 indicates no limit.

◆ ~SetLimit()

~SetLimit ( )

Destructor.

Member Function Documentation

◆ apply()

void apply ( DataEncoder encoder) const
protectedvirtual

Apply the DataManipulator to a DataEncoder.

Parameters
encoderThe target DataEncoder.
Exceptions
IOExceptionIf an I/O error occurs.

Implements DataEncoder::Manipulator.


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