8#ifndef INCLUDED_BSLSTL_IOMANIP
9#define INCLUDED_BSLSTL_IOMANIP
128#include <bslstl_string.h>
141 using std::resetiosflags;
144 using std::setiosflags;
145 using std::setprecision;
148#ifdef BSLS_LIBRARYFEATURES_HAS_CPP11_BASELINE_LIBRARY
149 using std::get_money;
150 using std::put_money;
153#ifdef BSLS_LIBRARYFEATURES_HAS_CPP11_MISCELLANEOUS_UTILITIES
158#ifndef BDE_OMIT_INTERNAL_DEPRECATED
161# if !defined(BSLS_PLATFORM_CMP_MSVC) && __cplusplus < 201703L
164 using std::bad_exception;
165 using std::basic_ios;
166 using std::basic_iostream;
167 using std::basic_istream;
168 using std::basic_ostream;
169 using std::basic_streambuf;
170 using std::bidirectional_iterator_tag;
172 using std::ctype_base;
173 using std::ctype_byname;
174 using std::exception;
175 using std::forward_iterator_tag;
176 using std::input_iterator_tag;
178 using std::istreambuf_iterator;
183 using std::numpunct_byname;
184 using std::ostreambuf_iterator;
185 using std::output_iterator_tag;
186 using std::random_access_iterator_tag;
187 using std::set_terminate;
188 using std::set_unexpected;
190 using std::terminate;
191 using std::terminate_handler;
192 using std::uncaught_exception;
193 using std::unexpected;
194 using std::unexpected_handler;
195 using std::use_facet;
199#if defined BSLS_LIBRARYFEATURES_HAS_CPP17_BASELINE_LIBRARY
207#if defined BSLS_LIBRARYFEATURES_HAS_CPP17_BASELINE_LIBRARY
231template <
class t_CHAR_TYPE,
class t_CHAR_TRAITS,
class t_ALLOC>
232class IoManip_QuotedStringFormatter {
243 t_CHAR_TYPE d_escape;
250 explicit IoManip_QuotedStringFormatter(
260 t_CHAR_TYPE delim()
const;
263 t_CHAR_TYPE escape()
const;
289template <
class t_CHAR_TYPE,
class t_CHAR_TRAITS>
290class IoManip_QuotedStringViewFormatter {
298 t_CHAR_TYPE d_escape;
306 explicit IoManip_QuotedStringViewFormatter(
317 const t_CHAR_TYPE *
data()
const;
320 t_CHAR_TYPE delim()
const;
323 t_CHAR_TYPE escape()
const;
334template <
class t_CHAR_TYPE,
class t_CHAR_TRAITS,
class t_ALLOC>
335std::basic_istream<t_CHAR_TYPE, t_CHAR_TRAITS>&
operator>>(
336 std::basic_istream<t_CHAR_TYPE, t_CHAR_TRAITS>& input,
337 const IoManip_QuotedStringFormatter<t_CHAR_TYPE,
343template <
class t_CHAR_TYPE,
class t_CHAR_TRAITS,
class t_ALLOC>
344std::basic_ostream<t_CHAR_TYPE, t_CHAR_TRAITS>&
operator<<(
345 std::basic_ostream<t_CHAR_TYPE, t_CHAR_TRAITS>& output,
346 const IoManip_QuotedStringFormatter<t_CHAR_TYPE,
352template <
class t_CHAR_TYPE,
class t_CHAR_TRAITS>
353std::basic_ostream<t_CHAR_TYPE, t_CHAR_TRAITS>&
operator<<(
354 std::basic_ostream<t_CHAR_TYPE, t_CHAR_TRAITS>& output,
355 const IoManip_QuotedStringViewFormatter<t_CHAR_TYPE,
356 t_CHAR_TRAITS>&
object);
363#ifdef BSLS_LIBRARYFEATURES_HAS_CPP17_BASELINE_LIBRARY
370template <
class t_CHAR_TYPE,
class t_CHAR_TRAITS,
class t_ALLOC>
384template <
class t_CHAR_TYPE,
class t_CHAR_TRAITS,
class t_ALLOC>
385BloombergLP::bslstl::IoManip_QuotedStringFormatter<t_CHAR_TYPE,
394#ifndef BSLSTL_STRING_VIEW_IS_ALIASED
395template <
class t_CHAR_TYPE,
class t_CHAR_TRAITS>
396BloombergLP::bslstl::IoManip_QuotedStringViewFormatter<t_CHAR_TYPE,
414#ifdef BSLS_LIBRARYFEATURES_HAS_CPP17_BASELINE_LIBRARY
420template <
class t_CHAR_TYPE,
class t_CHAR_TRAITS,
class t_ALLOC>
423 IoManip_QuotedStringFormatter<t_CHAR_TYPE, t_CHAR_TRAITS, t_ALLOC>::
424 IoManip_QuotedStringFormatter(
435template <
class t_CHAR_TYPE,
class t_CHAR_TRAITS,
class t_ALLOC>
438BloombergLP::bslstl::IoManip_QuotedStringFormatter<t_CHAR_TYPE,
440 t_ALLOC>::delim()
const
445template <
class t_CHAR_TYPE,
class t_CHAR_TRAITS,
class t_ALLOC>
448BloombergLP::bslstl::IoManip_QuotedStringFormatter<t_CHAR_TYPE,
450 t_ALLOC>::escape()
const
455template <
class t_CHAR_TYPE,
class t_CHAR_TRAITS,
class t_ALLOC>
458BloombergLP::bslstl::IoManip_QuotedStringFormatter<t_CHAR_TYPE,
460 t_ALLOC>::str()
const
470template <
class t_CHAR_TYPE,
class t_CHAR_TRAITS>
472BloombergLP::bslstl::IoManip_QuotedStringViewFormatter<t_CHAR_TYPE,
474 IoManip_QuotedStringViewFormatter(
485template <
class t_CHAR_TYPE,
class t_CHAR_TRAITS>
488BloombergLP::bslstl::IoManip_QuotedStringViewFormatter<t_CHAR_TYPE,
489 t_CHAR_TRAITS>::data()
492 return d_str.
c_str();
495template <
class t_CHAR_TYPE,
class t_CHAR_TRAITS>
498BloombergLP::bslstl::IoManip_QuotedStringViewFormatter<t_CHAR_TYPE,
499 t_CHAR_TRAITS>::delim()
505template <
class t_CHAR_TYPE,
class t_CHAR_TRAITS>
508BloombergLP::bslstl::IoManip_QuotedStringViewFormatter<t_CHAR_TYPE,
509 t_CHAR_TRAITS>::escape()
516template <
class t_CHAR_TYPE,
class t_CHAR_TRAITS,
class t_ALLOC>
517std::basic_istream<t_CHAR_TYPE, t_CHAR_TRAITS>&
518BloombergLP::bslstl::operator>>(
519 std::basic_istream<t_CHAR_TYPE, t_CHAR_TRAITS>& input,
520 const IoManip_QuotedStringFormatter<t_CHAR_TYPE,
524 std::basic_string<t_CHAR_TYPE, t_CHAR_TRAITS> temp;
525 input >> std::quoted(temp,
object.delim(),
object.escape());
526 *
object.str() = temp;
530template <
class t_CHAR_TYPE,
class t_CHAR_TRAITS,
class t_ALLOC>
531std::basic_ostream<t_CHAR_TYPE, t_CHAR_TRAITS>&
532BloombergLP::bslstl::operator<<(
533 std::basic_ostream<t_CHAR_TYPE, t_CHAR_TRAITS>& output,
534 const IoManip_QuotedStringFormatter<t_CHAR_TYPE,
538 output << std::quoted(
object.str()->c_str(),
544template <
class t_CHAR_TYPE,
class t_CHAR_TRAITS>
545std::basic_ostream<t_CHAR_TYPE, t_CHAR_TRAITS>&
546BloombergLP::bslstl::operator<<(
547 std::basic_ostream<t_CHAR_TYPE, t_CHAR_TRAITS>& output,
548 const IoManip_QuotedStringViewFormatter<t_CHAR_TYPE, t_CHAR_TRAITS>&
object)
550 output << std::quoted(
object.
data(),
object.delim(),
object.escape());
558template <
class t_CHAR_TYPE,
class t_CHAR_TRAITS,
class t_ALLOC>
565 return bsl::quoted(value.
c_str(), delim, escape);
568template <
class t_CHAR_TYPE,
class t_CHAR_TRAITS,
class t_ALLOC>
569BloombergLP::bslstl::IoManip_QuotedStringFormatter<t_CHAR_TYPE,
576 return BloombergLP::bslstl::IoManip_QuotedStringFormatter<t_CHAR_TYPE,
583#ifndef BSLSTL_STRING_VIEW_IS_ALIASED
584template <
class t_CHAR_TYPE,
class t_CHAR_TRAITS>
585BloombergLP::bslstl::IoManip_QuotedStringViewFormatter<t_CHAR_TYPE,
594 return BloombergLP::bslstl::IoManip_QuotedStringViewFormatter<
596 t_CHAR_TRAITS>(value,
Definition bslstl_stringview.h:471
Definition bslstl_string.h:1252
const CHAR_TYPE * c_str() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_string.h:7405
bsl::ostream & operator<<(bsl::ostream &stream, const bdlat_AttributeInfo &attributeInfo)
#define BSLS_IDENT(str)
BSLS_IDENT() - insert string into .comment binary segment (if supported)
Definition bsls_ident.h:238
BitArray operator>>(const BitArray &array, bsl::size_t numBits)
Definition bdlat_valuetypefunctions.h:939
BSLS_KEYWORD_CONSTEXPR CONTAINER::value_type * data(CONTAINER &container)
Definition bslstl_iterator.h:1325
Definition bslstl_algorithm.h:84