BDE 4.39.x Production Release
Loading...
Searching...
No Matches
bslx_outstreamfunctions.h
Go to the documentation of this file.
1/// @file bslx_outstreamfunctions.h
2///
3/// The content of this file has been pre-processed for Doxygen.
4///
5
6
7// bslx_outstreamfunctions.h -*-C++-*-
8#ifndef INCLUDED_BSLX_OUTSTREAMFUNCTIONS
9#define INCLUDED_BSLX_OUTSTREAMFUNCTIONS
10
11#include <bsls_ident.h>
12BSLS_IDENT("$Id: $")
13
14/// @defgroup bslx_outstreamfunctions bslx_outstreamfunctions
15/// @brief Facilitate uniform externalization of user and fundamental types.
16/// @addtogroup bsl
17/// @{
18/// @addtogroup bslx
19/// @{
20/// @addtogroup bslx_outstreamfunctions
21/// @{
22///
23/// <h1> Outline </h1>
24/// * <a href="#bslx_outstreamfunctions-purpose"> Purpose</a>
25/// * <a href="#bslx_outstreamfunctions-classes"> Classes </a>
26/// * <a href="#bslx_outstreamfunctions-description"> Description </a>
27/// * <a href="#bslx_outstreamfunctions-component-design-anticipated-usage-and-the-bdex-contract"> Component Design, Anticipated Usage, and the BDEX Contract </a>
28/// * <a href="#bslx_outstreamfunctions-implementing-bdex-streaming-in-value-semantic-template-classes"> Implementing BDEX Streaming in Value-Semantic Template Classes </a>
29/// * <a href="#bslx_outstreamfunctions-usage"> Usage </a>
30/// * <a href="#bslx_outstreamfunctions-example-1-using-bslx-outstreamfunctions-to-externalize-data"> Example 1: Using bslx::OutStreamFunctions to Externalize Data </a>
31///
32/// # Purpose {#bslx_outstreamfunctions-purpose}
33/// Facilitate uniform externalization of user and fundamental types.
34///
35/// # Classes {#bslx_outstreamfunctions-classes}
36///
37/// - bslx::OutStreamFunctions: namespace for BDEX externalization functions
38///
39/// @see bslx_instreamfunctions, bslx_versionfunctions
40///
41/// # Description {#bslx_outstreamfunctions-description}
42/// This component provides a namespace,
43/// `bslx::OutStreamFunctions`, that facilitates uniform support for BDEX
44/// externalization across all BDEX-compliant user-defined types, including
45/// template types and containers, as well as those fundamental types (and
46/// `bsl::string` and `bsl::vector`) for which the BDEX protocol provides direct
47/// support.
48///
49/// The namespace `bslx::OutStreamFunctions` facilitates client externalization
50/// of objects in a uniform, type-independent manner. It contains the
51/// `bdexStreamOut` function that externalizes objects of all BDEX-compliant
52/// types. This function externalizes the specified `object` in the specified
53/// `version`. The `bdexStreamOut` function is overloaded for fundamental
54/// types, enumeration types, `bsl::string`, and `bsl::vector`. Note that,
55/// excluding `bsl::vector`, version information is never written to the stream
56/// while externalizing these types.
57///
58/// By default, objects of enumeration type are streamed out as 32-bit `int`
59/// values. Users can override this behavior by providing overloads of the
60/// `OutStreamFunctions::bdexStreamOut` function in the enumeration's namespace
61/// for their enumeration types. The general form of this overload is:
62/// @code
63/// template <class STREAM>
64/// STREAM& bdexStreamOut(STREAM& stream, const MyEnum& value, int version)
65/// {
66/// using bslx::OutStreamFunctions::bdexStreamOut;
67///
68/// // Code to stream out objects of 'MyEnum' type.
69///
70/// return stream;
71/// }
72/// @endcode
73/// For value-semantic types that support the BDEX protocol, the free function
74/// `bdexStreamOut` calls the `bdexStreamOut` member function for that type.
75///
76/// ## Component Design, Anticipated Usage, and the BDEX Contract {#bslx_outstreamfunctions-component-design-anticipated-usage-and-the-bdex-contract}
77///
78///
79/// @ref bslx_outstreamfunctions is an integral part of the BDEX externalization
80/// contract. The BDEX contract is at least in part "collaborative", which is
81/// to say that each developer of a given *kind* of component (e.g., a stream or
82/// a value-semantic container) must comply with the relevant portions of the
83/// contract to ensure that the "system as a whole" works for everybody.
84/// @ref bslx_outstreamfunctions plays several related but different roles in
85/// helping various developers to produce BDEX-compliant components. In this
86/// section we briefly highlight how and why @ref bslx_outstreamfunctions is
87/// helpful (or required) for these different developers. By discussing
88/// different aspects of usage, we convey the general design goals of this
89/// component, and, to a certain extent, the overall BDEX contract. See the
90/// `bslx` package-level documentation for a full specification of the BDEX
91/// contract.
92///
93/// ### Implementing BDEX Streaming in Value-Semantic Template Classes {#bslx_outstreamfunctions-implementing-bdex-streaming-in-value-semantic-template-classes}
94///
95///
96/// The author of a non-template value-semantic type has full knowledge of the
97/// details of the "value" of that type, and may choose to use the appropriate
98/// output stream `put` methods directly when implementing the required
99/// `bdexStreamOut` method for that type. However, if one or more aspects of
100/// the value are of template parameter type, then the author cannot in general
101/// know how to stream the value using the `put` methods. For example, if a
102/// type has as its value one `int` data member:
103/// @code
104/// int d_value;
105/// @endcode
106/// then the implementation of the `bdexStreamOut` method can contain:
107/// @code
108/// stream.putInt32(d_value);
109/// @endcode
110/// However, if the data member is of (template parameter) `TYPE`:
111/// @code
112/// TYPE d_value;
113/// @endcode
114/// then the implementation of the `bdexStreamOut` method must rely on the
115/// `bslx::OutStreamFunctions` implementation to output the value:
116/// @code
117/// using bslx::OutStreamFunctions::bdexStreamOut;
118/// bdexStreamOut(stream, d_value, 1);
119/// @endcode
120/// This call will resolve to the correct sequence of `put` calls no matter
121/// whether `TYPE` is a fundamental type, a BDEX-compliant `enum`, or a proper
122/// BDEX-compliant class. In the latter two cases, the explicit specification
123/// of the version format (in this case, 1) guarantees the stable operation of
124/// this method whether or not `TYPE` is provided additional version formats.
125///
126/// ## Usage {#bslx_outstreamfunctions-usage}
127///
128///
129/// This section illustrates intended use of this component.
130///
131/// ### Example 1: Using bslx::OutStreamFunctions to Externalize Data {#bslx_outstreamfunctions-example-1-using-bslx-outstreamfunctions-to-externalize-data}
132///
133///
134/// In this example we illustrate the primary intended use of the parameterized
135/// methods of this component, as well as a few trivial invocations just to show
136/// the syntax clearly. To accomplish this, we exhibit two separate example
137/// "components": a value-semantic point object, and an `enum`. In all cases,
138/// the component designs are very simple, with much of the implied
139/// functionality omitted, in order to focus attention on the key aspects of the
140/// functionality of *this* component.
141///
142/// First, consider an `enum` `Color` that enumerates a set of colors:
143/// @code
144/// enum Color {
145/// RED = 0,
146/// GREEN = 1,
147/// BLUE = 2
148/// };
149/// @endcode
150/// Next, we consider a very special-purpose point that has as a data member its
151/// color. Such a point provides an excellent opportunity for factoring, but
152/// since we are interested in highlighting BDEX streaming of various types, we
153/// will present a simple and unfactored design here. In a real-world problem,
154/// the `mypoint` component would be implemented differently.
155///
156/// Note that the `MyPoint` class in this example represents its coordinates as
157/// `short` integer values; this is done to make the BDEX stream output byte
158/// pattern somewhat easier for the reader of this example to recognize when the
159/// output buffer is printed.
160/// @code
161/// // mypoint.h
162///
163/// class MyPoint {
164/// // This class provides a geometric point having integer coordinates and
165/// // an enumerated color property.
166///
167/// short d_x; // x coordinate
168/// short d_y; // y coordinate
169/// Color d_color; // enumerated color property
170///
171/// public:
172/// // CLASS METHODS
173/// static int maxSupportedBdexVersion(int versionSelector);
174/// // Return the maximum valid BDEX format version, as indicated by
175/// // the specified 'versionSelector', to be passed to the
176/// // 'bdexStreamOut' method. Note that it is highly recommended that
177/// // versionSelector' be formatted as "YYYYMMDD", a date
178/// // representation. Also note that 'versionSelector' should be a
179/// // *compile*-time-chosen value that selects a format version
180/// // supported by both externalizer and unexternalizer. See the
181/// // 'bslx' package-level documentation for more information on BDEX
182/// // streaming of value-semantic types and containers.
183///
184/// // CREATORS
185/// MyPoint();
186/// // Create a default point.
187///
188/// MyPoint(short x, short y, Color color);
189/// // Create a point having the specified 'x' and 'y' coordinates
190/// // and the specified 'color'.
191///
192/// ~MyPoint();
193/// // Destroy this point.
194///
195/// // MANIPULATORS
196/// // ...
197///
198/// // ACCESSORS
199/// int x() const;
200/// // Return the x coordinate of this point.
201///
202/// int y() const;
203/// // Return the y coordinate of this point.
204///
205/// Color color() const;
206/// // Return the enumerated color of this point.
207///
208/// template <class STREAM>
209/// STREAM& bdexStreamOut(STREAM& stream, int version) const;
210/// // Write the value of this object, using the specified 'version'
211/// // format, to the specified output 'stream', and return a reference
212/// // to 'stream'. If 'stream' is initially invalid, this operation
213/// // has no effect. If 'version' is not supported, 'stream' is
214/// // invalidated, but otherwise unmodified. Note that 'version' is
215/// // not written to 'stream'. See the 'bslx' package-level
216/// // documentation for more information on BDEX streaming of
217/// // value-semantic types and containers.
218/// };
219///
220/// // FREE OPERATORS
221/// inline
222/// bool operator==(const MyPoint& lhs, const MyPoint& rhs);
223/// // Return 'true' if the specified 'lhs' and 'rhs' points have the same
224/// // value, and 'false' otherwise. Two points have the same value if
225/// // they have the same x and y coordinates and the same color.
226/// @endcode
227/// Representative (inline) implementations of these methods are shown below:
228/// @code
229/// // ========================================================================
230/// // INLINE FUNCTION DEFINITIONS
231/// // ========================================================================
232///
233/// // CLASS METHODS
234/// inline
235/// int MyPoint::maxSupportedBdexVersion(int versionSelector)
236/// {
237/// if (versionSelector >= 20131201) {
238/// return 2;
239/// }
240/// return 1;
241/// }
242///
243/// // CREATORS
244/// inline
245/// MyPoint::MyPoint(short x, short y, Color color)
246/// : d_x(x)
247/// , d_y(y)
248/// , d_color(color)
249/// {
250/// }
251///
252/// inline
253/// MyPoint::~MyPoint()
254/// {
255/// }
256///
257/// // ...
258///
259/// // MANIPULATORS
260/// // ...
261///
262/// // ACCESSORS
263/// inline
264/// int MyPoint::x() const
265/// {
266/// return d_x;
267/// }
268///
269/// // ...
270///
271/// template <class STREAM>
272/// STREAM& MyPoint::bdexStreamOut(STREAM& stream, int version) const
273/// {
274/// switch (version) {
275/// case 1: {
276/// stream.putInt16(d_x); // output the x coordinate
277/// stream.putInt16(d_y); // output the y coordinate
278/// stream.putInt8(static_cast<char>(d_color));
279/// // output the color enum as one byte
280/// } break;
281/// default: {
282/// stream.invalidate();
283/// } break;
284/// }
285/// return stream;
286/// }
287///
288/// // FREE OPERATORS
289/// inline
290/// bool operator==(const MyPoint& lhs, const MyPoint& rhs)
291/// {
292/// return lhs.x() == rhs.x()
293/// && lhs.y() == rhs.y()
294/// && lhs.color() == rhs.color();
295/// }
296/// @endcode
297/// Then, we will implement an extremely simple output stream that supports the
298/// BDEX documentation-only protocol. For simplicity, we will use a fixed-size
299/// buffer (usually a bad idea in any event, and more so here since the
300/// implementation knows the buffer size, but makes no effort to prevent
301/// overwriting that buffer), and will only show a few methods needed for this
302/// example. See other `bslx` stream components for examples of
303/// properly-designed BDEX streams.
304/// @code
305/// // myoutstream.h
306/// // ...
307///
308/// class MyOutStream {
309/// // This class implements a limited-size fixed-buffer output stream that
310/// // partially conforms to the BDEX protocol for output streams. This
311/// // class is suitable for demonstration purposes only.
312///
313/// char d_buffer[1000]; // externalized values stored as contiguous bytes
314///
315/// int d_length; // length of data in 'd_buffer' (in bytes)
316///
317/// bool d_validFlag; // stream validity flag; 'true' if stream is in
318/// // valid state, 'false' otherwise
319///
320/// public:
321/// // CREATORS
322/// MyOutStream();
323/// // Create an empty output stream of limited, fixed capacity. Note
324/// // that this object is suitable for demonstration purposes only.
325///
326/// ~MyOutStream();
327/// // Destroy this output stream.
328///
329/// // MANIPULATORS
330/// void invalidate();
331/// // Put this input stream in an invalid state. This function has no
332/// // effect if this stream is already invalid. Note that this
333/// // function should be called whenever a value extracted from this
334/// // stream is determined to be invalid, inconsistent, or otherwise
335/// // incorrect.
336///
337/// MyOutStream& putVersion(int version);
338/// // Write to this stream the one-byte, two's complement integer
339/// // comprised of the least-significant one byte of the specified
340/// // 'version', and return a reference to this stream.
341///
342/// MyOutStream& putInt32(int value);
343/// // Write to this stream the four-byte, two's complement integer (in
344/// // network byte order) comprised of the least-significant four
345/// // bytes of the specified 'value' (in host byte order), and return
346/// // a reference to this stream.
347///
348/// MyOutStream& putInt16(int value);
349/// // Write to this stream the two-byte, two's complement integer
350/// // (in network byte order) comprised of the least-significant two
351/// // bytes of the specified 'value' (in host byte order), and return
352/// // a reference to this stream.
353///
354/// MyOutStream& putInt8(int value);
355/// // Write to this stream the one-byte, two's complement integer
356/// // comprised of the least-significant one byte of the specified
357/// // 'value', and return a reference to this stream.
358///
359/// void removeAll();
360/// // Remove all content in this stream.
361///
362/// // ACCESSORS
363/// const char *data() const;
364/// // Return the address of the contiguous, non-modifiable internal
365/// // memory buffer of this stream. The address will remain valid as
366/// // long as this stream is not destroyed or modified. The behavior
367/// // of accessing elements outside the range
368/// // '[ data() .. data() + (length() - 1) ]' is undefined.
369///
370/// int length() const;
371/// // Return the number of bytes in this stream.
372/// };
373///
374/// // FREE OPERATORS
375/// inline
376/// bsl::ostream& operator<<(bsl::ostream& stream,
377/// const MyOutStream& object);
378/// // Write the specified 'object' to the specified output 'stream' in
379/// // some reasonable (multi-line) format, and return a reference to
380/// // 'stream'.
381/// @endcode
382/// The relevant (inline) implementations are as follows.
383/// @code
384/// // ========================================================================
385/// // INLINE FUNCTION DEFINITIONS
386/// // ========================================================================
387///
388/// // CREATORS
389/// inline
390/// MyOutStream::MyOutStream()
391/// : d_length(0)
392/// , d_validFlag(true)
393/// {
394/// }
395///
396/// inline
397/// MyOutStream::~MyOutStream()
398/// {
399/// }
400///
401/// // MANIPULATORS
402/// inline
403/// void MyOutStream::invalidate()
404/// {
405/// d_validFlag = false;
406/// }
407///
408/// inline
409/// MyOutStream& MyOutStream::putVersion(int value)
410/// {
411/// d_buffer[d_length] = static_cast<char>(value);
412/// ++d_length;
413/// return *this;
414/// }
415///
416/// inline
417/// MyOutStream& MyOutStream::putInt32(int value)
418/// {
419/// d_buffer[d_length + 0] = static_cast<char>((value >> 24) & 0xff);
420/// d_buffer[d_length + 1] = static_cast<char>((value >> 16) & 0xff);
421/// d_buffer[d_length + 2] = static_cast<char>((value >> 8) & 0xff);
422/// d_buffer[d_length + 3] = static_cast<char>((value >> 0) & 0xff);
423/// d_length += 4;
424/// return *this;
425/// }
426///
427/// inline
428/// MyOutStream& MyOutStream::putInt16(int value)
429/// {
430/// d_buffer[d_length + 0] = static_cast<char>((value >> 8) & 0xff);
431/// d_buffer[d_length + 1] = static_cast<char>((value >> 0) & 0xff);
432/// d_length += 2;
433/// return *this;
434/// }
435///
436/// inline
437/// MyOutStream& MyOutStream::putInt8(int value)
438/// {
439/// d_buffer[d_length] = static_cast<char>(value);
440/// d_length += 1;
441/// return *this;
442/// }
443///
444/// inline
445/// void MyOutStream::removeAll()
446/// {
447/// d_length = 0;
448/// }
449///
450/// // ACCESSORS
451/// inline
452/// const char *MyOutStream::data() const
453/// {
454/// return static_cast<const char *>(d_buffer);
455/// }
456///
457/// inline
458/// int MyOutStream::length() const
459/// {
460/// return d_length;
461/// }
462/// @endcode
463/// Finally, use the above `enum`, point class, and output stream to illustrate
464/// `bslx::OutStreamFunctions` functionality. This test code does not attempt
465/// to do anything more useful than writing known values to a stream and
466/// confirming that the expected byte pattern was in fact written.
467/// @code
468/// int i = 168496141; // byte pattern 0a 0b 0c 0d
469/// Color color = BLUE; // byte pattern 02
470/// MyPoint p(0, -1, color); // byte pattern 00 00 ff ff 02
471///
472/// using bslx::OutStreamFunctions::bdexStreamOut;
473///
474/// MyOutStream out;
475/// assert(0 == out.length());
476///
477/// bdexStreamOut(out, i, 1);
478/// assert(4 == out.length());
479/// assert(0 == bsl::memcmp(out.data(), "\x0a\x0b\x0c\x0d", out.length()));
480///
481/// out.removeAll();
482/// assert(0 == out.length());
483///
484/// bdexStreamOut(out, i, 0);
485/// assert(4 == out.length());
486/// assert(0 == bsl::memcmp(out.data(), "\x0a\x0b\x0c\x0d", out.length()));
487///
488/// out.removeAll();
489/// assert(0 == out.length());
490///
491/// bdexStreamOut(out, color, 1);
492/// assert(4 == out.length());
493/// assert(0 == bsl::memcmp(out.data(), "\x00\x00\x00\x02", out.length()));
494///
495/// out.removeAll();
496/// assert(0 == out.length());
497///
498/// bdexStreamOut(out, color, 0);
499/// assert(4 == out.length());
500/// assert(0 == bsl::memcmp(out.data(), "\x00\x00\x00\x02", out.length()));
501///
502/// out.removeAll();
503/// assert(0 == out.length());
504///
505/// bdexStreamOut(out, p, 1);
506/// assert(5 == out.length());
507/// assert(0 == bsl::memcmp(out.data(), "\x00\x00\xff\xff\x02", out.length()));
508/// @endcode
509/// @}
510/** @} */
511/** @} */
512
513/** @addtogroup bsl
514 * @{
515 */
516/** @addtogroup bslx
517 * @{
518 */
519/** @addtogroup bslx_outstreamfunctions
520 * @{
521 */
522
523#include <bslscm_version.h>
524
526
527#include <bslmf_assert.h>
528#include <bslmf_conditional.h>
529#include <bslmf_isenum.h>
530
531#include <bsls_types.h>
532
533#include <bsl_string.h>
534#include <bsl_vector.h>
535#include <bsl_cstdint.h>
536
537#ifndef BDE_DONT_ALLOW_TRANSITIVE_INCLUDES
538#include <bslmf_if.h>
539#endif // BDE_DONT_ALLOW_TRANSITIVE_INCLUDES
540
541
542namespace bslx {
543
544 // ============================
545 // namespace OutStreamFunctions
546 // ============================
547
548namespace OutStreamFunctions {
549 // This namespace facilitates externalization of all BDEX-compliant types
550 // in a type-independent manner. The externalization functions are
551 // overloaded for fundamental types, enumeration types, 'bsl::string', and
552 // 'bsl::vector'. A compilation error will occur if the (template
553 // parameter) 'TYPE' of a non-overloaded method of
554 // 'bslx::OutStreamFunctions' does not support 'bdexStreamOut' and
555 // 'maxSupportedBdexVersion' (with the appropriate signatures).
556
557 // =================
558 // struct IsEnumType
559 // =================
560
561 /// This `struct`, together with `IsNotEnumType` (below), is used to
562 /// distinguish enumeration types from other types in function overload
563 /// resolution. This `struct` contains no interface or implementation
564 /// by design, and is meant for internal use only.
565 ///
566 /// See @ref bslx_outstreamfunctions
567 struct IsEnumType {
568 };
569
570 // ====================
571 // struct IsNotEnumType
572 // ====================
573
574 /// This `struct`, together with `IsEnumType` (above), is used to
575 /// distinguish enumeration types from other types in function overload
576 /// resolution. This `struct` contains no interface or implementation
577 /// by design, and is meant for internal use only.
578 ///
579 /// See @ref bslx_outstreamfunctions
581 };
582
583 // PRIVATE CLASS METHODS
584
585 /// Write the specified `value` to the specified output `stream` as a
586 /// 32-bit `int`, and return a reference to `stream`. The specified
587 /// `version` is ignored. If `stream` is initially invalid, this operation has no effect.
588 ///
589 /// \note Note that this function is called only for
590 /// enumeration types and that if `value` is outside the range of an
591 /// `int32_t` the externalization will be lossy. Also note that this
592 /// function is for internal use only. See the `bslx` package-level
593 /// documentation for more information on BDEX streaming of
594 /// value-semantic types and containers.
595 template <class STREAM, class TYPE>
596 STREAM& bdexStreamOutImp(STREAM& stream,
597 const TYPE& value,
598 int version,
599 const IsEnumType&);
600
601 /// Write the specified `value`, using the specified `version` format,
602 /// to the specified output `stream`, and return a reference to
603 /// `stream`. If `stream` is initially invalid, this operation has no
604 /// effect. If `version` is not supported by `TYPE`, `stream` is invalidated, but otherwise unmodified.
605 ///
606 /// \note Note that `version` is not
607 /// written to `stream`. Also note that this function is for internal
608 /// use only. See the `bslx` package-level documentation for more
609 /// information on BDEX streaming of value-semantic types and
610 /// containers.
611 template <class STREAM, class TYPE>
612 STREAM& bdexStreamOutImp(STREAM& stream,
613 const TYPE& value,
614 int version,
615 const IsNotEnumType&);
616
617 // CLASS METHODS
618
619 /// Write the specified `value` to the specified output `stream`, and
620 /// return a reference to `stream`. If `stream` is initially invalid,
621 /// this operation has no effect. If needed, first write the computed
622 /// version information to the `stream` and if this version is not supported by `TYPE`, `stream` is invalidated.
623 ///
624 /// \note Note that the version
625 /// is only needed when the (template parameter) `TYPE` is a
626 /// `bsl::vector` or a user-defined type. See the `bslx` package-level
627 /// documentation for more information on BDEX streaming of
628 /// value-semantic types and containers.
629 template <class STREAM, class TYPE>
630 STREAM& bdexStreamOut(STREAM& stream, const TYPE& value);
631
632 /// Write the specified `value`, using the specified `version` format,
633 /// to the specified output `stream`, and return a reference to
634 /// `stream`. If `stream` is initially invalid, this operation has no
635 /// effect. If `version` is not supported by `TYPE`, `stream` is invalidated, but otherwise unmodified.
636 ///
637 /// \note Note that `version` is not
638 /// written to `stream`. See the `bslx` package-level documentation for
639 /// more information on BDEX streaming of value-semantic types and
640 /// containers.
641 template <class STREAM, class TYPE>
642 STREAM& bdexStreamOut(STREAM& stream, const TYPE& value, int version);
643
644 /* overloads */
645
646 /// Write the specified `bool` `value` to the specified output `stream`,
647 /// and return a reference to `stream`. The optionally specified
648 /// `version` is ignored. If `stream` is initially invalid, this
649 /// operation has no effect. See the `bslx` package-level documentation
650 /// for more information on BDEX streaming of value-semantic types and
651 /// containers.
652 template <class STREAM>
653 STREAM& bdexStreamOut(STREAM& stream, const bool& value, int version = 0);
654
655 /// Write the specified `char` `value` to the specified output `stream`,
656 /// and return a reference to `stream`. The optionally specified
657 /// `version` is ignored. If `stream` is initially invalid, this
658 /// operation has no effect. See the `bslx` package-level documentation
659 /// for more information on BDEX streaming of value-semantic types and
660 /// containers.
661 template <class STREAM>
662 STREAM& bdexStreamOut(STREAM& stream, const char& value, int version = 0);
663
664 /// Write the specified `signed char` `value` to the specified output
665 /// `stream`, and return a reference to `stream`. The optionally
666 /// specified `version` is ignored. If `stream` is initially invalid,
667 /// this operation has no effect. See the `bslx` package-level
668 /// documentation for more information on BDEX streaming of
669 /// value-semantic types and containers.
670 template <class STREAM>
671 STREAM& bdexStreamOut(STREAM& stream,
672 const signed char& value,
673 int version = 0);
674
675 /// Write the specified `unsigned char` `value` to the specified output
676 /// `stream`, and return a reference to `stream`. The optionally
677 /// specified `version` is ignored. If `stream` is initially invalid,
678 /// this operation has no effect. See the `bslx` package-level
679 /// documentation for more information on BDEX streaming of
680 /// value-semantic types and containers.
681 template <class STREAM>
682 STREAM& bdexStreamOut(STREAM& stream,
683 const unsigned char& value,
684 int version = 0);
685
686 /// Write the specified `short` `value` to the specified output
687 /// `stream`, and return a reference to `stream`. The optionally
688 /// specified `version` is ignored. If `stream` is initially invalid,
689 /// this operation has no effect. See the `bslx` package-level
690 /// documentation for more information on BDEX streaming of
691 /// value-semantic types and containers.
692 template <class STREAM>
693 STREAM& bdexStreamOut(STREAM& stream,
694 const short& value,
695 int version = 0);
696
697 /// Write the specified `unsigned short` `value` to the specified output
698 /// `stream`, and return a reference to `stream`. The optionally
699 /// specified `version` is ignored. If `stream` is initially invalid,
700 /// this operation has no effect. See the `bslx` package-level
701 /// documentation for more information on BDEX streaming of
702 /// value-semantic types and containers.
703 template <class STREAM>
704 STREAM& bdexStreamOut(STREAM& stream,
705 const unsigned short& value,
706 int version = 0);
707
708 /// Write the specified `int` `value` to the specified output `stream`,
709 /// and return a reference to `stream`. The optionally specified
710 /// `version` is ignored. If `stream` is initially invalid, this
711 /// operation has no effect. See the `bslx` package-level
712 /// documentation for more information on BDEX streaming of
713 /// value-semantic types and containers.
714 template <class STREAM>
715 STREAM& bdexStreamOut(STREAM& stream, const int& value, int version = 0);
716
717 /// Write the specified `unsigned int` `value` to the specified output
718 /// `stream`, and return a reference to `stream`. The optionally
719 /// specified `version` is ignored. If `stream` is initially invalid,
720 /// this operation has no effect. See the `bslx` package-level
721 /// documentation for more information on BDEX streaming of
722 /// value-semantic types and containers.
723 template <class STREAM>
724 STREAM& bdexStreamOut(STREAM& stream,
725 const unsigned int& value,
726 int version = 0);
727
728 /// Write the specified `long` `value` to the specified output `stream`
729 /// as a 32-bit `int`, and return a reference to `stream`. The
730 /// optionally specified `version` is ignored. If `stream` is initially invalid, this operation has no effect.
731 ///
732 /// \note Note that for platforms
733 /// where `long` is not equivalent to `int32_t`, this operation may be
734 /// lossy. See the `bslx` package-level documentation for more
735 /// information on BDEX streaming of value-semantic types and
736 /// containers.
737 template <class STREAM>
738 STREAM& bdexStreamOut(STREAM& stream, const long& value, int version = 0);
739
740 /// Write the specified `unsigned long` `value` to the specified output
741 /// `stream` as a 32-bit `unsigned int`, and return a reference to
742 /// `stream`. The optionally specified `version` is ignored. If
743 /// `stream` is initially invalid, this operation has no effect.
744 ///
745 /// \note Note that for platforms where `unsigned long` is not equivalent to
746 /// `uint32_t`, this operation may be lossy. See the `bslx`
747 /// package-level documentation for more information on BDEX streaming
748 /// of value-semantic types and containers.
749 template <class STREAM>
750 STREAM& bdexStreamOut(STREAM& stream,
751 const unsigned long& value,
752 int version = 0);
753
754 /// Write the specified `bsls::Types::Int64` `value` to the specified
755 /// output `stream`, and return a reference to `stream`. The optionally
756 /// specified `version` is ignored. If `stream` is initially invalid,
757 /// this operation has no effect. See the `bslx` package-level
758 /// documentation for more information on BDEX streaming of
759 /// value-semantic types and containers.
760 template <class STREAM>
761 STREAM& bdexStreamOut(STREAM& stream,
762 const bsls::Types::Int64& value,
763 int version = 0);
764
765 /// Write the specified `bsls::Types::Uint64` `value` to the specified
766 /// output `stream`, and return a reference to `stream`. The optionally
767 /// specified `version` is ignored. If `stream` is initially invalid,
768 /// this operation has no effect. See the `bslx` package-level
769 /// documentation for more information on BDEX streaming of
770 /// value-semantic types and containers.
771 template <class STREAM>
772 STREAM& bdexStreamOut(STREAM& stream,
773 const bsls::Types::Uint64& value,
774 int version = 0);
775
776 /// Write the specified `float` `value` to the specified output
777 /// `stream`, and return a reference to `stream`. The optionally
778 /// specified `version` is ignored. If `stream` is initially invalid,
779 /// this operation has no effect. See the `bslx` package-level
780 /// documentation for more information on BDEX streaming of
781 /// value-semantic types and containers.
782 template <class STREAM>
783 STREAM& bdexStreamOut(STREAM& stream, const float& value, int version = 0);
784
785 /// Write the specified `double` `value` to the specified output
786 /// `stream`, and return a reference to `stream`. The optionally
787 /// specified `version` is ignored. If `stream` is initially invalid,
788 /// this operation has no effect. See the `bslx` package-level
789 /// documentation for more information on BDEX streaming of
790 /// value-semantic types and containers.
791 template <class STREAM>
792 STREAM& bdexStreamOut(STREAM& stream,
793 const double& value,
794 int version = 0);
795
796 /// Write the specified `bsl::string` `value` to the specified output
797 /// `stream`, and return a reference to `stream`. The optionally
798 /// specified `version` is ignored. If `stream` is initially invalid,
799 /// this operation has no effect. See the `bslx` package-level
800 /// documentation for more information on BDEX streaming of
801 /// value-semantic types and containers.
802 template <class STREAM>
803 STREAM& bdexStreamOut(STREAM& stream,
804 const bsl::string& value,
805 int version = 0);
806
807 /// Write the specified `bsl::vector<char, ALLOC>` `value` to the
808 /// specified output `stream`, and return a reference to `stream`. The
809 /// specified `version` is ignored. If `stream` is initially invalid,
810 /// this operation has no effect. See the `bslx` package-level
811 /// documentation for more information on BDEX streaming of
812 /// value-semantic types and containers.
813 template <class STREAM, class ALLOC>
814 STREAM& bdexStreamOut(STREAM& stream,
815 const bsl::vector<char, ALLOC>& value,
816 int version);
817
818 /// Write the specified `bsl::vector<signed char, ALLOC>` `value` to the
819 /// specified output `stream`, and return a reference to `stream`. The
820 /// specified `version` is ignored. If `stream` is initially invalid,
821 /// this operation has no effect. See the `bslx` package-level
822 /// documentation for more information on BDEX streaming of
823 /// value-semantic types and containers.
824 template <class STREAM, class ALLOC>
825 STREAM& bdexStreamOut(STREAM& stream,
827 int version);
828
829 /// Write the specified `bsl::vector<unsigned char, ALLOC>` `value` to
830 /// the specified output `stream`, and return a reference to `stream`.
831 /// The specified `version` is ignored. If `stream` is initially
832 /// invalid, this operation has no effect. See the `bslx` package-level
833 /// documentation for more information on BDEX streaming of
834 /// value-semantic types and containers.
835 template <class STREAM, class ALLOC>
836 STREAM& bdexStreamOut(STREAM& stream,
838 int version);
839
840 /// Write the specified `bsl::vector<short, ALLOC>` `value` to the
841 /// specified output `stream`, and return a reference to `stream`. The
842 /// specified `version` is ignored. If `stream` is initially invalid,
843 /// this operation has no effect. See the `bslx` package-level
844 /// documentation for more information on BDEX streaming of
845 /// value-semantic types and containers.
846 template <class STREAM, class ALLOC>
847 STREAM& bdexStreamOut(STREAM& stream,
848 const bsl::vector<short, ALLOC>& value,
849 int version);
850
851 /// Write the specified `bsl::vector<unsigned short, ALLOC>` `value` to
852 /// the specified output `stream`, and return a reference to `stream`.
853 /// The specified `version` is ignored. If `stream` is initially
854 /// invalid, this operation has no effect. See the `bslx` package-level
855 /// documentation for more information on BDEX streaming of
856 /// value-semantic types and containers.
857 template <class STREAM, class ALLOC>
858 STREAM& bdexStreamOut(STREAM& stream,
860 int version);
861
862 /// Write the specified `bsl::vector<int, ALLOC>` `value` to the
863 /// specified output `stream`, and return a reference to `stream`. The
864 /// specified `version` is ignored. If `stream` is initially invalid,
865 /// this operation has no effect. See the `bslx` package-level
866 /// documentation for more information on BDEX streaming of
867 /// value-semantic types and containers.
868 template <class STREAM, class ALLOC>
869 STREAM& bdexStreamOut(STREAM& stream,
870 const bsl::vector<int, ALLOC>& value,
871 int version);
872
873 /// Write the specified `bsl::vector<unsigned int, ALLOC>` `value` to
874 /// the specified output `stream`, and return a reference to `stream`.
875 /// The specified `version` is ignored. If `stream` is initially
876 /// invalid, this operation has no effect. See the `bslx` package-level
877 /// documentation for more information on BDEX streaming of
878 /// value-semantic types and containers.
879 template <class STREAM, class ALLOC>
880 STREAM& bdexStreamOut(STREAM& stream,
882 int version);
883
884 /// Write the specified `bsl::vector<bsls::Types::Int64, ALLOC>` `value`
885 /// to the specified output `stream`, and return a reference to
886 /// `stream`. The specified `version` is ignored. If `stream` is
887 /// initially invalid, this operation has no effect. See the `bslx`
888 /// package-level documentation for more information on BDEX streaming
889 /// of value-semantic types and containers.
890 template <class STREAM, class ALLOC>
891 STREAM& bdexStreamOut(
892 STREAM& stream,
894 int version);
895
896 /// Write the specified `bsl::vector<bsls::Types::Uint64, ALLOC>`
897 /// `value` to the specified output `stream`, and return a reference to
898 /// `stream`. The specified `version` is ignored. If `stream` is
899 /// initially invalid, this operation has no effect. See the `bslx`
900 /// package-level documentation for more information on BDEX streaming
901 /// of value-semantic types and containers.
902 template <class STREAM, class ALLOC>
903 STREAM& bdexStreamOut(
904 STREAM& stream,
906 int version);
907
908 /// Write the specified `bsl::vector<float, ALLOC>` `value` to the
909 /// specified output `stream`, and return a reference to `stream`. The
910 /// specified `version` is ignored. If `stream` is initially invalid,
911 /// this operation has no effect. See the `bslx` package-level
912 /// documentation for more information on BDEX streaming of
913 /// value-semantic types and containers.
914 template <class STREAM, class ALLOC>
915 STREAM& bdexStreamOut(STREAM& stream,
916 const bsl::vector<float, ALLOC>& value,
917 int version);
918
919 /// Write the specified `bsl::vector<double, ALLOC>` `value` to the
920 /// specified output `stream`, and return a reference to `stream`. The
921 /// specified `version` is ignored. If `stream` is initially invalid,
922 /// this operation has no effect. See the `bslx` package-level
923 /// documentation for more information on BDEX streaming of
924 /// value-semantic types and containers.
925 template <class STREAM, class ALLOC>
926 STREAM& bdexStreamOut(STREAM& stream,
927 const bsl::vector<double, ALLOC>& value,
928 int version);
929
930 /// Write the specified `bsl::vector<TYPE, ALLOC>` `value` to the
931 /// specified output `stream`, and return a reference to `stream`. If
932 /// `stream` is initially invalid, this operation has no effect. If
933 /// needed, first write the computed version information to the `stream`
934 /// and if this version is not supported by `TYPE` and the vector is not empty, `stream` is invalidated.
935 ///
936 /// \note Note that the version is only
937 /// needed when the (template parameter) `TYPE` is a `bsl::vector` or a
938 /// user-defined type. See the `bslx` package-level documentation for
939 /// more information on BDEX streaming of value-semantic types and
940 /// containers.
941 template <class STREAM, class TYPE, class ALLOC>
942 STREAM& bdexStreamOut(STREAM& stream,
943 const bsl::vector<TYPE, ALLOC>& value);
944
945 /// Write the specified `bsl::vector<TYPE, ALLOC>` `value`, using the
946 /// specified `version` format, to the specified output `stream`, and
947 /// return a reference to `stream`. If `stream` is initially invalid,
948 /// this operation has no effect. If `version` is not supported by
949 /// `TYPE` and the vector is not empty, `stream` is invalidated, but otherwise unmodified.
950 ///
951 /// \note Note that the specified `TYPE` might not
952 /// require a `version` to be serialized and that `version` is not
953 /// written to `stream`. See the `bslx` package-level documentation for
954 /// more information on BDEX streaming of value-semantic types and
955 /// containers.
956 template <class STREAM, class TYPE, class ALLOC>
957 STREAM& bdexStreamOut(STREAM& stream,
958 const bsl::vector<TYPE, ALLOC>& value,
959 int version);
960
961} // close namespace OutStreamFunctions
962
963// ============================================================================
964// INLINE FUNCTION DEFINITIONS
965// ============================================================================
966
967 // ----------------------------
968 // namespace OutStreamFunctions
969 // ----------------------------
970
971template <class STREAM, class TYPE>
972inline
974 const TYPE& value,
975 int /* version */,
976 const IsEnumType&)
977{
978 // A compilation error indicating the next line of code implies the 'TYPE'
979 // cannot be represented as a 32-bit 'int' and an overload for the
980 // 'OutStreamFunctions::bdexStreamOut' function, in the enumeration's
981 // namespace, should be provided.
982
983 BSLMF_ASSERT(sizeof(TYPE) <= sizeof(bsl::int32_t));
984
985 // Stream the 'enum' value as a 32-bit 'int'.
986 return stream.putInt32(static_cast<int>(value));
987}
988
989template <class STREAM, class TYPE>
990inline
992 const TYPE& value,
993 int version,
994 const IsNotEnumType&)
995{
996 // A compilation error indicating the next line of code implies the class
997 // of 'TYPE' does not support the 'bdexStreamOut' method.
998
999 return value.bdexStreamOut(stream, version);
1000}
1001
1002template <class STREAM, class TYPE>
1003inline
1004STREAM& OutStreamFunctions::bdexStreamOut(STREAM& stream, const TYPE& value)
1005{
1007
1008 const int version = maxSupportedBdexVersion(&value,
1009 stream.bdexVersionSelector());
1010 if (VersionFunctions::k_NO_VERSION != version) {
1011 stream.putVersion(version);
1012 }
1013
1014 return bdexStreamOut(stream, value, version);
1015}
1016
1017template <class STREAM, class TYPE>
1018inline
1020 const TYPE& value,
1021 int version)
1022{
1024 IsEnumType,
1025 IsNotEnumType>::type dummyType;
1026 return bdexStreamOutImp(stream, value, version, dummyType());
1027}
1028
1029template <class STREAM>
1030inline
1032 const bool& value,
1033 int /* version */)
1034{
1035 return stream.putInt8(static_cast<char>(value));
1036}
1037
1038template <class STREAM>
1039inline
1041 const char& value,
1042 int /* version */)
1043{
1044 return stream.putInt8(value);
1045}
1046
1047template <class STREAM>
1048inline
1050 const signed char& value,
1051 int /* version */)
1052{
1053 return stream.putInt8(value);
1054}
1055
1056template <class STREAM>
1057inline
1059 const unsigned char& value,
1060 int /* version */)
1061{
1062 return stream.putUint8(value);
1063}
1064
1065template <class STREAM>
1066inline
1068 const short& value,
1069 int /* version */)
1070{
1071 return stream.putInt16(value);
1072}
1073
1074template <class STREAM>
1075inline
1077 const unsigned short& value,
1078 int /* version */)
1079{
1080 return stream.putUint16(value);
1081}
1082
1083template <class STREAM>
1084inline
1086 const int& value,
1087 int /* version */)
1088{
1089 return stream.putInt32(value);
1090}
1091
1092template <class STREAM>
1093inline
1095 const unsigned int& value,
1096 int /* version */)
1097{
1098 return stream.putUint32(value);
1099}
1100
1101template <class STREAM>
1102inline
1104 const long& value,
1105 int /* version */)
1106{
1107 return stream.putInt32(static_cast<int>(value));
1108}
1109
1110template <class STREAM>
1111inline
1113 const unsigned long& value,
1114 int /* version */)
1115{
1116 return stream.putUint32(static_cast<unsigned int>(value));
1117}
1118
1119template <class STREAM>
1120inline
1122 const bsls::Types::Int64& value,
1123 int /* version */)
1124{
1125 return stream.putInt64(value);
1126}
1127
1128template <class STREAM>
1129inline
1131 STREAM& stream,
1132 const bsls::Types::Uint64& value,
1133 int /* version */)
1134{
1135 return stream.putUint64(value);
1136}
1137
1138template <class STREAM>
1139inline
1141 const float& value,
1142 int /* version */)
1143{
1144 return stream.putFloat32(value);
1145}
1146
1147template <class STREAM>
1148inline
1150 const double& value,
1151 int /* version */)
1152{
1153 return stream.putFloat64(value);
1154}
1155
1156template <class STREAM>
1157inline
1159 const bsl::string& value,
1160 int /* version */)
1161{
1162 return stream.putString(value);
1163}
1164
1165template <class STREAM, class ALLOC>
1166inline
1168 STREAM& stream,
1169 const bsl::vector<char, ALLOC>& value,
1170 int /* version */)
1171{
1172 const int length = static_cast<int>(value.size());
1173 stream.putLength(length);
1174
1175 return 0 < length ? stream.putArrayInt8(&value[0], length) : stream;
1176}
1177
1178template <class STREAM, class ALLOC>
1179inline
1181 STREAM& stream,
1183 int /* version */)
1184{
1185 const int length = static_cast<int>(value.size());
1186 stream.putLength(length);
1187
1188 return 0 < length ? stream.putArrayInt8(&value[0], length) : stream;
1189}
1190
1191template <class STREAM, class ALLOC>
1192inline
1194 STREAM& stream,
1196 int /* version */)
1197{
1198 const int length = static_cast<int>(value.size());
1199 stream.putLength(length);
1200
1201 return 0 < length ? stream.putArrayUint8(&value[0], length) : stream;
1202}
1203
1204template <class STREAM, class ALLOC>
1205inline
1207 STREAM& stream,
1208 const bsl::vector<short, ALLOC>& value,
1209 int /* version */)
1210{
1211 const int length = static_cast<int>(value.size());
1212 stream.putLength(length);
1213
1214 return 0 < length ? stream.putArrayInt16(&value[0], length) : stream;
1215}
1216
1217template <class STREAM, class ALLOC>
1218inline
1220 STREAM& stream,
1222 int /* version */)
1223{
1224 const int length = static_cast<int>(value.size());
1225 stream.putLength(length);
1226
1227 return 0 < length ? stream.putArrayUint16(&value[0], length) : stream;
1228}
1229
1230template <class STREAM, class ALLOC>
1231inline
1233 STREAM& stream,
1234 const bsl::vector<int, ALLOC>& value,
1235 int /* version */)
1236{
1237 const int length = static_cast<int>(value.size());
1238 stream.putLength(length);
1239
1240 return 0 < length ? stream.putArrayInt32(&value[0], length) : stream;
1241}
1242
1243template <class STREAM, class ALLOC>
1244inline
1246 STREAM& stream,
1248 int /* version */)
1249{
1250 const int length = static_cast<int>(value.size());
1251 stream.putLength(length);
1252
1253 return 0 < length ? stream.putArrayUint32(&value[0], length) : stream;
1254}
1255
1256template <class STREAM, class ALLOC>
1257inline
1259 STREAM& stream,
1261 int /* version */)
1262{
1263 const int length = static_cast<int>(value.size());
1264 stream.putLength(length);
1265
1266 return 0 < length ? stream.putArrayInt64(&value[0], length) : stream;
1267}
1268
1269template <class STREAM, class ALLOC>
1270inline
1272 STREAM& stream,
1274 int /* version */)
1275{
1276 const int length = static_cast<int>(value.size());
1277 stream.putLength(length);
1278
1279 return 0 < length ? stream.putArrayUint64(&value[0], length) : stream;
1280}
1281
1282template <class STREAM, class ALLOC>
1283inline
1285 STREAM& stream,
1286 const bsl::vector<float, ALLOC>& value,
1287 int /* version */)
1288{
1289 const int length = static_cast<int>(value.size());
1290 stream.putLength(length);
1291
1292 return 0 < length ? stream.putArrayFloat32(&value[0], length) : stream;
1293}
1294
1295template <class STREAM, class ALLOC>
1296inline
1298 STREAM& stream,
1299 const bsl::vector<double, ALLOC>& value,
1300 int /* version */)
1301{
1302 const int length = static_cast<int>(value.size());
1303 stream.putLength(length);
1304
1305 return 0 < length ? stream.putArrayFloat64(&value[0], length) : stream;
1306}
1307
1308template <class STREAM, class TYPE, class ALLOC>
1309inline
1311 STREAM& stream,
1312 const bsl::vector<TYPE, ALLOC>& value)
1313{
1315
1316 const int version = maxSupportedBdexVersion(&value,
1317 stream.bdexVersionSelector());
1318
1319 stream.putVersion(version);
1320 return bdexStreamOut(stream, value, version);
1321}
1322
1323template <class STREAM, class TYPE, class ALLOC>
1325 STREAM& stream,
1326 const bsl::vector<TYPE, ALLOC>& value,
1327 int version)
1328{
1329 typedef typename bsl::vector<TYPE, ALLOC>::const_iterator Iterator;
1330
1331 const int length = static_cast<int>(value.size());
1332 stream.putLength(length);
1333
1334 for (Iterator it = value.begin(); it != value.end(); ++it) {
1335 bdexStreamOut(stream, *it, version);
1336 }
1337
1338 return stream;
1339}
1340
1341} // close package namespace
1342
1343
1344#endif
1345
1346// ----------------------------------------------------------------------------
1347// Copyright 2014 Bloomberg Finance L.P.
1348//
1349// Licensed under the Apache License, Version 2.0 (the "License");
1350// you may not use this file except in compliance with the License.
1351// You may obtain a copy of the License at
1352//
1353// http://www.apache.org/licenses/LICENSE-2.0
1354//
1355// Unless required by applicable law or agreed to in writing, software
1356// distributed under the License is distributed on an "AS IS" BASIS,
1357// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1358// See the License for the specific language governing permissions and
1359// limitations under the License.
1360// ----------------------------- END-OF-FILE ----------------------------------
1361
1362/** @} */
1363/** @} */
1364/** @} */
Definition bslstl_string.h:1252
size_type size() const BSLS_KEYWORD_NOEXCEPT
Return the number of elements in this vector.
Definition bslstl_vector.h:3019
iterator begin() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_vector.h:2866
iterator end() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_vector.h:2874
Definition bslstl_vector.h:1120
VALUE_TYPE const * const_iterator
Definition bslstl_vector.h:1153
#define BSLMF_ASSERT(expr)
Definition bslmf_assert.h:231
#define BSLS_IDENT(str)
BSLS_IDENT() - insert string into .comment binary segment (if supported)
Definition bsls_ident.h:238
STREAM & bdexStreamOut(STREAM &stream, const TYPE &value)
Definition bslx_outstreamfunctions.h:1004
STREAM & bdexStreamOutImp(STREAM &stream, const TYPE &value, int version, const IsEnumType &)
Definition bslx_outstreamfunctions.h:973
int maxSupportedBdexVersion(const TYPE *, int versionSelector)
Definition bslx_versionfunctions.h:531
@ k_NO_VERSION
Definition bslx_versionfunctions.h:344
Definition bslx_byteinstream.h:377
Definition bslmf_conditional.h:123
unsigned long long Uint64
Definition bsls_types.h:139
long long Int64
Definition bsls_types.h:134
Definition bslx_outstreamfunctions.h:567
Definition bslx_outstreamfunctions.h:580