libcommonc++  0.7
DataEncoder::Align Class Reference

A manipulator that skips past enough bytes to re-align the data stream at a specified boundary. More...

#include <DataEncoder.h++>

Inheritance diagram for DataEncoder::Align:
Collaboration diagram for DataEncoder::Align:

Public Member Functions

 Align (size_t size)
 Construct a new Align manipulator. More...
 
 ~Align ()
 Destructor. More...
 

Protected Member Functions

void apply (DataEncoder &encoder) const
 Apply the DataManipulator to a DataEncoder. More...
 

Detailed Description

A manipulator that skips past enough bytes to re-align the data stream at a specified boundary.

When reading, the bytes are simply skipped; when writing, the bytes are filled with NULs.

Author
Mark Lindner

Constructor & Destructor Documentation

◆ Align()

Align ( size_t  size)

Construct a new Align manipulator.

Parameters
sizeThe alignment size. Typical values include 2, 4, or 8. Other values are allowed but are of limited usefulness.

◆ ~Align()

~Align ( )

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: