8#ifndef INCLUDED_BSLX_BYTEOUTSTREAM
9#define INCLUDED_BSLX_BYTEOUTSTREAM
180#include <bslscm_version.h>
191#include <bsl_cstddef.h>
192#include <bsl_iosfwd.h>
193#include <bsl_string.h>
194#include <bsl_vector.h>
217 int d_versionSelector;
260 bsl::size_t initialCapacity,
618 operator const void *()
const;
629 const char *
data()
const;
637 bsl::size_t
length()
const;
664void ByteOutStream::validate()
671ByteOutStream::ByteOutStream(
int versionSelector,
673: d_buffer(basicAllocator)
674, d_versionSelector(versionSelector)
680ByteOutStream::ByteOutStream(
int versionSelector,
681 bsl::size_t initialCapacity,
683: d_buffer(basicAllocator)
684, d_versionSelector(versionSelector)
687 d_buffer.
reserve(initialCapacity);
747 const bsl::size_t n = d_buffer.
size();
776 const bsl::size_t n = d_buffer.
size();
805 const bsl::size_t n = d_buffer.
size();
834 const bsl::size_t n = d_buffer.
size();
863 const bsl::size_t n = d_buffer.
size();
878 return putInt32(
static_cast<int>(value));
892 const bsl::size_t n = d_buffer.
size();
907 return putInt24(
static_cast<int>(value));
921 const bsl::size_t n = d_buffer.
size();
936 return putInt16(
static_cast<int>(value));
950 const bsl::size_t n = d_buffer.
size();
965 return putInt8(
static_cast<int>(value));
981 const bsl::size_t n = d_buffer.
size();
1004 const bsl::size_t n = d_buffer.
size();
1034 const bsl::size_t n = d_buffer.
size();
1062 const bsl::size_t n = d_buffer.
size();
1090 const bsl::size_t n = d_buffer.
size();
1118 const bsl::size_t n = d_buffer.
size();
1146 const bsl::size_t n = d_buffer.
size();
1174 const bsl::size_t n = d_buffer.
size();
1202 const bsl::size_t n = d_buffer.
size();
1230 const bsl::size_t n = d_buffer.
size();
1256 const bsl::size_t n = d_buffer.
size();
1283 const bsl::size_t n = d_buffer.
size();
1309 const bsl::size_t n = d_buffer.
size();
1336 const bsl::size_t n = d_buffer.
size();
1362 const bsl::size_t n = d_buffer.
size();
1389 const bsl::size_t n = d_buffer.
size();
1415 const bsl::size_t n = d_buffer.
size();
1442 const bsl::size_t n = d_buffer.
size();
1468 const bsl::size_t n = d_buffer.
size();
1495 const bsl::size_t n = d_buffer.
size();
1524 const bsl::size_t n = d_buffer.
size();
1551 const bsl::size_t n = d_buffer.
size();
1565ByteOutStream::operator
const void *()
const
1567 return isValid() ? this : 0;
1573 return d_versionSelector;
1579 return d_buffer.
begin();
1591 return d_buffer.
size();
1595template <
class TYPE>
Definition bslstl_string.h:1281
size_type size() const BSLS_KEYWORD_NOEXCEPT
Return the number of elements in this vector.
Definition bslstl_vector.h:2664
iterator begin() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_vector.h:2511
VALUE_TYPE * data() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_vector.h:2587
Definition bslstl_vector.h:1025
void reserve(size_type newCapacity)
Definition bslstl_vector.h:3690
void swap(vector &other) BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(AllocatorTraits void clear() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_vector.h:1712
void resize(size_type newSize)
Definition bslstl_vector.h:3616
Definition bslma_allocator.h:457
Definition bslx_byteoutstream.h:212
ByteOutStream & putUint8(unsigned int value)
Definition bslx_byteoutstream.h:963
ByteOutStream & putArrayInt56(const bsls::Types::Int64 *values, int numValues)
Definition bslx_byteoutstream.h:1075
ByteOutStream & putUint64(bsls::Types::Uint64 value)
Definition bslx_byteoutstream.h:760
ByteOutStream & putArrayUint8(const char *values, int numValues)
Definition bslx_byteoutstream.h:1455
ByteOutStream & putArrayInt8(const char *values, int numValues)
Definition bslx_byteoutstream.h:1402
ByteOutStream & putArrayUint32(const unsigned int *values, int numValues)
Definition bslx_byteoutstream.h:1269
ByteOutStream & putUint48(bsls::Types::Uint64 value)
Definition bslx_byteoutstream.h:818
ByteOutStream & putVersion(int version)
Definition bslx_byteoutstream.h:716
ByteOutStream & putUint40(bsls::Types::Uint64 value)
Definition bslx_byteoutstream.h:847
ByteOutStream & putInt24(int value)
Definition bslx_byteoutstream.h:882
ByteOutStream & putArrayInt16(const short *values, int numValues)
Definition bslx_byteoutstream.h:1349
~ByteOutStream()
Destroy this object.
Definition bslx_byteoutstream.h:691
void invalidate()
Definition bslx_byteoutstream.h:697
ByteOutStream & putArrayUint64(const bsls::Types::Uint64 *values, int numValues)
Definition bslx_byteoutstream.h:1047
ByteOutStream & putInt56(bsls::Types::Int64 value)
Definition bslx_byteoutstream.h:766
bool isValid() const
Definition bslx_byteoutstream.h:1583
ByteOutStream & putInt48(bsls::Types::Int64 value)
Definition bslx_byteoutstream.h:795
ByteOutStream & putInt8(int value)
Definition bslx_byteoutstream.h:940
ByteOutStream & putArrayUint40(const bsls::Types::Uint64 *values, int numValues)
Definition bslx_byteoutstream.h:1215
ByteOutStream & putArrayUint24(const unsigned int *values, int numValues)
Definition bslx_byteoutstream.h:1322
ByteOutStream & putArrayUint16(const unsigned short *values, int numValues)
Definition bslx_byteoutstream.h:1375
ByteOutStream & putArrayInt24(const int *values, int numValues)
Definition bslx_byteoutstream.h:1296
void reserveCapacity(bsl::size_t newCapacity)
Definition bslx_byteoutstream.h:722
ByteOutStream & putArrayInt32(const int *values, int numValues)
Definition bslx_byteoutstream.h:1243
ByteOutStream & putUint16(unsigned int value)
Definition bslx_byteoutstream.h:934
bsl::size_t length() const
Return the number of bytes in this stream.
Definition bslx_byteoutstream.h:1589
friend bsl::ostream & operator<<(bsl::ostream &, const ByteOutStream &)
ByteOutStream & putInt40(bsls::Types::Int64 value)
Definition bslx_byteoutstream.h:824
ByteOutStream & putArrayInt48(const bsls::Types::Int64 *values, int numValues)
Definition bslx_byteoutstream.h:1131
ByteOutStream & putArrayFloat32(const float *values, int numValues)
Definition bslx_byteoutstream.h:1537
ByteOutStream & putInt32(int value)
Definition bslx_byteoutstream.h:853
ByteOutStream & putLength(int length)
Definition bslx_byteoutstream.h:703
ByteOutStream & putString(const bsl::string &value)
ByteOutStream & putArrayUint56(const bsls::Types::Uint64 *values, int numValues)
Definition bslx_byteoutstream.h:1103
ByteOutStream & putFloat32(float value)
Definition bslx_byteoutstream.h:994
const char * data() const
Definition bslx_byteoutstream.h:1577
ByteOutStream & putUint24(unsigned int value)
Definition bslx_byteoutstream.h:905
ByteOutStream & putUint32(unsigned int value)
Definition bslx_byteoutstream.h:876
ByteOutStream & putArrayUint48(const bsls::Types::Uint64 *values, int numValues)
Definition bslx_byteoutstream.h:1159
int bdexVersionSelector() const
Definition bslx_byteoutstream.h:1571
ByteOutStream & putArrayInt64(const bsls::Types::Int64 *values, int numValues)
Definition bslx_byteoutstream.h:1019
ByteOutStream & putInt16(int value)
Definition bslx_byteoutstream.h:911
ByteOutStream & putArrayFloat64(const double *values, int numValues)
Definition bslx_byteoutstream.h:1510
ByteOutStream & putUint56(bsls::Types::Uint64 value)
Definition bslx_byteoutstream.h:789
ByteOutStream & putArrayInt40(const bsls::Types::Int64 *values, int numValues)
Definition bslx_byteoutstream.h:1187
ByteOutStream & putInt64(bsls::Types::Int64 value)
Definition bslx_byteoutstream.h:737
void reset()
Definition bslx_byteoutstream.h:728
ByteOutStream & putFloat64(double value)
Definition bslx_byteoutstream.h:971
#define BSLS_ASSERT_SAFE(X)
Definition bsls_assert.h:1762
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition balxml_encoderoptions.h:68
STREAM & bdexStreamOut(STREAM &stream, const TYPE &value)
Definition bslx_outstreamfunctions.h:992
Definition bslx_byteinstream.h:377
bsl::ostream & operator<<(bsl::ostream &stream, const ByteInStream &object)
Definition bslma_usesbslmaallocator.h:343
unsigned long long Uint64
Definition bsls_types.h:137
long long Int64
Definition bsls_types.h:132
static void putArrayInt24(char *buffer, const int *values, int numValues)
static void putInt16(char *buffer, int value)
Definition bslx_marshallingutil.h:949
static void putInt24(char *buffer, int value)
Definition bslx_marshallingutil.h:933
static void putArrayInt48(char *buffer, const bsls::Types::Int64 *values, int numValues)
static void putArrayFloat64(char *buffer, const double *values, int numValues)
static void putArrayInt32(char *buffer, const int *values, int numValues)
static void putFloat64(char *buffer, double value)
Definition bslx_marshallingutil.h:974
static void putArrayInt8(char *buffer, const char *values, int numValues)
Definition bslx_marshallingutil.h:1436
static void putArrayInt40(char *buffer, const bsls::Types::Int64 *values, int numValues)
@ k_SIZEOF_INT8
Definition bslx_marshallingutil.h:279
@ k_SIZEOF_INT48
Definition bslx_marshallingutil.h:274
@ k_SIZEOF_FLOAT64
Definition bslx_marshallingutil.h:280
@ k_SIZEOF_INT64
Definition bslx_marshallingutil.h:272
@ k_SIZEOF_INT24
Definition bslx_marshallingutil.h:277
@ k_SIZEOF_INT56
Definition bslx_marshallingutil.h:273
@ k_SIZEOF_INT16
Definition bslx_marshallingutil.h:278
@ k_SIZEOF_FLOAT32
Definition bslx_marshallingutil.h:281
@ k_SIZEOF_INT40
Definition bslx_marshallingutil.h:275
@ k_SIZEOF_INT32
Definition bslx_marshallingutil.h:276
static void putFloat32(char *buffer, float value)
Definition bslx_marshallingutil.h:995
static void putInt8(char *buffer, int value)
Definition bslx_marshallingutil.h:964
static void putArrayInt56(char *buffer, const bsls::Types::Int64 *values, int numValues)
static void putArrayInt64(char *buffer, const bsls::Types::Int64 *values, int numValues)
static void putInt64(char *buffer, bsls::Types::Int64 value)
Definition bslx_marshallingutil.h:838
static void putInt32(char *buffer, int value)
Definition bslx_marshallingutil.h:916
static void putArrayInt16(char *buffer, const short *values, int numValues)
static void putArrayFloat32(char *buffer, const float *values, int numValues)
static void putInt56(char *buffer, bsls::Types::Int64 value)
Definition bslx_marshallingutil.h:859
static void putInt48(char *buffer, bsls::Types::Int64 value)
Definition bslx_marshallingutil.h:879
static void putInt40(char *buffer, bsls::Types::Int64 value)
Definition bslx_marshallingutil.h:898