BloombergLP::bslx::TestOutStream::TestOutStream

Create an empty test output stream with capacity and version selector.

Synopsis

Declared in <bslx_testoutstream.h>

TestOutStream(
    int versionSelector,
    std::size_t initialCapacity,
    bslma::Allocator* basicAllocator = 0);

Description

Create an empty output byte stream having an initial buffer capacity of at least the specified initialCapacity (in bytes) and that will use the specified (compile-time-defined) versionSelector as needed (see {Versioning}). Optionally specify a basicAllocator used to supply memory. If basicAllocator is 0, the currently installed default allocator is used. Note that the versionSelector is expected to be formatted as "YYYYMMDD", a date representation.

Parameters

NameDescription
versionSelectorcompile-time version selector (e.g., YYYYMMDD)
initialCapacityinitial buffer capacity in bytes
basicAllocatormemory allocator; null uses the default