Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Core

Adapter
Adapter Traits
Serialization

The core component contains types that are used by all protocols.

When generating a protocol-specific encoded output, the result is written to an output buffer. Several types of output buffers can be used, such as arrays, strings, and I/O streams. As these have different interfaces, each type is wrapped by an adapter. Custom output buffer types can be added with adapter traits. The output buffer is passed via the constructor of the protocol generator.

Trial.Protocol has support for a number of commonly used output buffer types. Using any of these requires the inclusion of an associated header file as shown in the table below.

Type

Header file

CharT[N]

<trial/protocol/buffer/array.hpp>

std::array<CharT, N>

<trial/protocol/buffer/array.hpp>

std::basic_ostream<CharT>

<trial/protocol/buffer/ostream.hpp>

std::basic_string<CharT>

<trial/protocol/buffer/string.hpp>

std::vector<CharT>

<trial/protocol/buffer/vector.hpp>

where CharT can be char or unsigned char. Wide characters are not supported.

Support for other output buffer types can be added via adapter traits.


PrevUpHomeNext