39 typedef unsigned short Port;
45 static void fillBufferAndAddSpaces(
Byte* buffer,
size_t size,
Byte filler,
const char* data,
size_t dataSize);
49 fillBufferAndAddSpaces(buffer, size, filler, data.
items(), data.
size());
52 static void fillBufferAndAddSpaces(
Byte* buffer,
size_t size,
Byte filler,
Byte value);
56 template <
size_t N, Byte FILLER = 0>
85 return std::string ((
const char*)data, strnlen((
const char*)data, N));
91 return StrRef((
const char*)data, strnlen((
const char*)data, N));
95 operator StrRef() const ONIXS_BATS_BOE_NOEXCEPT
111 return ( 0 == memcmp(data, other.
data, N));
117 return ( 0 != memcmp(data, other.
data, N));
146 std::ostream& operator << (std::ostream& stream, const String<N>& value)
148 stream <<
'\'' << value.
toString () <<
'\'';
156 str.append((
const char*)value.
data, strnlen((
const char*)value.
data, N));
207 struct ONIXS_CBOE_CFE_BOE_API
Unit 210 Unit(Binary1 number, Binary4 sequence);
225 size_t serializeTo(
unsigned char*) const ONIXS_BATS_BOE_NOEXCEPT;
233 :
std::runtime_error(
"Not implemented")
ASCII encoded, right-padded with filler.
StrRef constructStrRef(const char(&value)[Size])
static void fillBufferAndAddSpaces(Byte *buffer, size_t size, Byte filler, const char *data, size_t dataSize)
StrRef toStrRef() const ONIXS_BATS_BOE_NOEXCEPT
Constructs StrRef instance.
Provides efficient way of accessing text-based field values.
String(const std::string &value)
void toStr(std::string &str, const FixedPointDecimal< Mantissa, Exponent > &number)
Serializes fixed-point decimal into a string.
#define ONIXS_CBOE_CFE_BOE_DECLARE_T0_STR_FUNCTIONS(Type)
std::string toString() const
Returns string representation.
NotImplementedException()
FixedPointDecimal< Int64, IntegralConstant< Int8,-4 > > BinaryPrice
Binary Price.
UInt8 Byte
Alias for Byte.
bool operator==(const FixedPointDecimal< Mantissa, Exponent > &left, const FixedPointDecimal< Mantissa, Exponent > &right)
Compares two fixed-point decimals.
const Char * items() const ONIXS_BATS_BOE_NOEXCEPT
Read-only content.
bool operator!=(const FixedPointDecimal< Mantissa, Exponent > &left, const FixedPointDecimal< Mantissa, Exponent > &right)
Compares two fixed-point decimals.
StrRef toStrRef(const std::string &str)
Constructs StrRef instance over std::string content.
static void fillBufferAndAddSpaces(Byte *buffer, size_t size, Byte filler, StrRef data)
size_t size() const ONIXS_BATS_BOE_NOEXCEPT
Number of chars.