6 #ifndef OPENDDS_DCPS_VALUE_HELPER_H 7 #define OPENDDS_DCPS_VALUE_HELPER_H 21 template <
typename IntType>
34 const bool min_value = value == min;
35 if (min_value) ++
value;
37 if (min_value) o <<
" - 1";
41 #if ACE_SIZEOF_LONG_DOUBLE != 16 53 o << std::hex << std::setw(bytes * 2) << std::setfill(
'0') <<
value;
57 template <
typename CharType>
70 inline unsigned char_value<char>(
char value)
72 return reinterpret_cast<unsigned char&
>(
value);
76 template <
typename CharType>
84 return o << '\\' << static_cast<char>(
value);
101 if (cvalue <= UCHAR_MAX && isprint(cvalue)) {
102 return o << static_cast<char>(
value);
104 return hex_value(o <<
"\\x", cvalue,
sizeof(CharType) == 1 ? 1 : 2);
107 template <
typename CharType>
110 for (
size_t i = 0; value[i] != 0; ++i) {
111 char_helper<CharType>(o, value[i]);
116 template <
typename CharType>
119 for (
size_t i = 0; i != length; ++i) {
120 char_helper<CharType>(o, value[i]);
const LogLevel::Value value
std::ostream & hex_value(std::ostream &o, unsigned value, size_t bytes)
ACE_CDR::Boolean operator<<(Serializer &serializer, CoherentChangeControl &value)
Marshal/Insertion into a buffer.
std::ostream & signed_int_helper(std::ostream &o, IntType value, IntType min)
std::ostream & string_helper(std::ostream &o, const CharType *value)
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
unsigned char_value(CharType value)
The Internal API and Implementation of OpenDDS.
std::ostream & char_helper(std::ostream &o, CharType value)