8#ifndef INCLUDED_BSLSTL_IOMANIP
9#define INCLUDED_BSLSTL_IOMANIP
126#include <bslstl_string.h>
139 using std::resetiosflags;
142 using std::setiosflags;
143 using std::setprecision;
146#ifdef BSLS_LIBRARYFEATURES_HAS_CPP11_BASELINE_LIBRARY
147 using std::get_money;
148 using std::put_money;
151#ifdef BSLS_LIBRARYFEATURES_HAS_CPP11_MISCELLANEOUS_UTILITIES
156#ifndef BDE_OMIT_INTERNAL_DEPRECATED
159# if !defined(BSLS_PLATFORM_CMP_MSVC) && __cplusplus < 201703L
162 using std::bad_exception;
163 using std::basic_ios;
164 using std::basic_iostream;
165 using std::basic_istream;
166 using std::basic_ostream;
167 using std::basic_streambuf;
168 using std::bidirectional_iterator_tag;
170 using std::ctype_base;
171 using std::ctype_byname;
172 using std::exception;
173 using std::forward_iterator_tag;
174 using std::input_iterator_tag;
176 using std::istreambuf_iterator;
181 using std::numpunct_byname;
182 using std::ostreambuf_iterator;
183 using std::output_iterator_tag;
184 using std::random_access_iterator_tag;
185 using std::set_terminate;
186 using std::set_unexpected;
188 using std::terminate;
189 using std::terminate_handler;
190 using std::uncaught_exception;
191 using std::unexpected;
192 using std::unexpected_handler;
193 using std::use_facet;
197#if defined BSLS_LIBRARYFEATURES_HAS_CPP17_BASELINE_LIBRARY
205#if defined BSLS_LIBRARYFEATURES_HAS_CPP17_BASELINE_LIBRARY
227template <
class t_CHAR_TYPE,
class t_CHAR_TRAITS,
class t_ALLOC>
228class IoManip_QuotedStringFormatter {
239 t_CHAR_TYPE d_escape;
246 explicit IoManip_QuotedStringFormatter(
256 t_CHAR_TYPE delim()
const;
259 t_CHAR_TYPE escape()
const;
283template <
class t_CHAR_TYPE,
class t_CHAR_TRAITS>
284class IoManip_QuotedStringViewFormatter {
292 t_CHAR_TYPE d_escape;
300 explicit IoManip_QuotedStringViewFormatter(
311 const t_CHAR_TYPE *
data()
const;
314 t_CHAR_TYPE delim()
const;
317 t_CHAR_TYPE escape()
const;
327template <
class t_CHAR_TYPE,
class t_CHAR_TRAITS,
class t_ALLOC>
328std::basic_istream<t_CHAR_TYPE, t_CHAR_TRAITS>&
operator>>(
329 std::basic_istream<t_CHAR_TYPE, t_CHAR_TRAITS>& input,
330 const IoManip_QuotedStringFormatter<t_CHAR_TYPE,
336template <
class t_CHAR_TYPE,
class t_CHAR_TRAITS,
class t_ALLOC>
337std::basic_ostream<t_CHAR_TYPE, t_CHAR_TRAITS>&
operator<<(
338 std::basic_ostream<t_CHAR_TYPE, t_CHAR_TRAITS>& output,
339 const IoManip_QuotedStringFormatter<t_CHAR_TYPE,
345template <
class t_CHAR_TYPE,
class t_CHAR_TRAITS>
346std::basic_ostream<t_CHAR_TYPE, t_CHAR_TRAITS>&
operator<<(
347 std::basic_ostream<t_CHAR_TYPE, t_CHAR_TRAITS>& output,
348 const IoManip_QuotedStringViewFormatter<t_CHAR_TYPE,
349 t_CHAR_TRAITS>&
object);
356#ifdef BSLS_LIBRARYFEATURES_HAS_CPP17_BASELINE_LIBRARY
363template <
class t_CHAR_TYPE,
class t_CHAR_TRAITS,
class t_ALLOC>
377template <
class t_CHAR_TYPE,
class t_CHAR_TRAITS,
class t_ALLOC>
378BloombergLP::bslstl::IoManip_QuotedStringFormatter<t_CHAR_TYPE,
387#ifndef BSLS_LIBRARYFEATURES_HAS_CPP20_BASELINE_LIBRARY
388template <
class t_CHAR_TYPE,
class t_CHAR_TRAITS>
389BloombergLP::bslstl::IoManip_QuotedStringViewFormatter<t_CHAR_TYPE,
407#ifdef BSLS_LIBRARYFEATURES_HAS_CPP17_BASELINE_LIBRARY
413template <
class t_CHAR_TYPE,
class t_CHAR_TRAITS,
class t_ALLOC>
416 IoManip_QuotedStringFormatter<t_CHAR_TYPE, t_CHAR_TRAITS, t_ALLOC>::
417 IoManip_QuotedStringFormatter(
428template <
class t_CHAR_TYPE,
class t_CHAR_TRAITS,
class t_ALLOC>
431BloombergLP::bslstl::IoManip_QuotedStringFormatter<t_CHAR_TYPE,
433 t_ALLOC>::delim()
const
438template <
class t_CHAR_TYPE,
class t_CHAR_TRAITS,
class t_ALLOC>
441BloombergLP::bslstl::IoManip_QuotedStringFormatter<t_CHAR_TYPE,
443 t_ALLOC>::escape()
const
448template <
class t_CHAR_TYPE,
class t_CHAR_TRAITS,
class t_ALLOC>
451BloombergLP::bslstl::IoManip_QuotedStringFormatter<t_CHAR_TYPE,
453 t_ALLOC>::str()
const
463template <
class t_CHAR_TYPE,
class t_CHAR_TRAITS>
465BloombergLP::bslstl::IoManip_QuotedStringViewFormatter<t_CHAR_TYPE,
467 IoManip_QuotedStringViewFormatter(
478template <
class t_CHAR_TYPE,
class t_CHAR_TRAITS>
481BloombergLP::bslstl::IoManip_QuotedStringViewFormatter<t_CHAR_TYPE,
482 t_CHAR_TRAITS>::data()
485 return d_str.
c_str();
488template <
class t_CHAR_TYPE,
class t_CHAR_TRAITS>
491BloombergLP::bslstl::IoManip_QuotedStringViewFormatter<t_CHAR_TYPE,
492 t_CHAR_TRAITS>::delim()
498template <
class t_CHAR_TYPE,
class t_CHAR_TRAITS>
501BloombergLP::bslstl::IoManip_QuotedStringViewFormatter<t_CHAR_TYPE,
502 t_CHAR_TRAITS>::escape()
509template <
class t_CHAR_TYPE,
class t_CHAR_TRAITS,
class t_ALLOC>
510std::basic_istream<t_CHAR_TYPE, t_CHAR_TRAITS>&
511BloombergLP::bslstl::operator>>(
512 std::basic_istream<t_CHAR_TYPE, t_CHAR_TRAITS>& input,
513 const IoManip_QuotedStringFormatter<t_CHAR_TYPE,
517 std::basic_string<t_CHAR_TYPE, t_CHAR_TRAITS> temp;
518 input >> std::quoted(temp,
object.delim(),
object.escape());
519 *
object.str() = temp;
523template <
class t_CHAR_TYPE,
class t_CHAR_TRAITS,
class t_ALLOC>
524std::basic_ostream<t_CHAR_TYPE, t_CHAR_TRAITS>&
525BloombergLP::bslstl::operator<<(
526 std::basic_ostream<t_CHAR_TYPE, t_CHAR_TRAITS>& output,
527 const IoManip_QuotedStringFormatter<t_CHAR_TYPE,
531 output << std::quoted(
object.str()->c_str(),
537template <
class t_CHAR_TYPE,
class t_CHAR_TRAITS>
538std::basic_ostream<t_CHAR_TYPE, t_CHAR_TRAITS>&
539BloombergLP::bslstl::operator<<(
540 std::basic_ostream<t_CHAR_TYPE, t_CHAR_TRAITS>& output,
541 const IoManip_QuotedStringViewFormatter<t_CHAR_TYPE, t_CHAR_TRAITS>&
object)
543 output << std::quoted(
object.
data(),
object.delim(),
object.escape());
551template <
class t_CHAR_TYPE,
class t_CHAR_TRAITS,
class t_ALLOC>
558 return bsl::quoted(value.
c_str(), delim, escape);
561template <
class t_CHAR_TYPE,
class t_CHAR_TRAITS,
class t_ALLOC>
562BloombergLP::bslstl::IoManip_QuotedStringFormatter<t_CHAR_TYPE,
569 return BloombergLP::bslstl::IoManip_QuotedStringFormatter<t_CHAR_TYPE,
576#ifndef BSLS_LIBRARYFEATURES_HAS_CPP20_BASELINE_LIBRARY
577template <
class t_CHAR_TYPE,
class t_CHAR_TRAITS>
578BloombergLP::bslstl::IoManip_QuotedStringViewFormatter<t_CHAR_TYPE,
587 return BloombergLP::bslstl::IoManip_QuotedStringViewFormatter<
589 t_CHAR_TRAITS>(value,
Definition bslstl_stringview.h:441
Definition bslstl_string.h:1281
const CHAR_TYPE * c_str() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_string.h:6705
bsl::ostream & operator<<(bsl::ostream &stream, const bdlat_AttributeInfo &attributeInfo)
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
BitArray operator>>(const BitArray &array, bsl::size_t numBits)
Definition bdlb_printmethods.h:283
BSLS_KEYWORD_CONSTEXPR CONTAINER::value_type * data(CONTAINER &container)
Definition bslstl_iterator.h:1231
Definition bslstl_algorithm.h:82
void swap(TYPE &a, TYPE &b)