[#BloombergLP-bdlb-BigEndianUint16]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::BigEndianUint16
:relfileprefix: ../../
:mrdocs:

This class provides a container for an in&hyphen;core representation of an unsigned 16&hyphen;bit big&hyphen;endian integer&period; It supports a complete set of _value_ _semantic_ operations, including copy construction, assignment, equality comparison, `bsl&colon;&colon;ostream` printing, and BDEX serialization&period; Note that the copy constructor and copy&hyphen;assignment operator are provided by the compiler&period; Any object of this class can be converted to an `unsigned short` allowing comparison with any other object of this class&period; This class is _exception_ _neutral_ with no guarantee of rollback&colon; if an exception is thrown during the invocation of a method on a pre&hyphen;existing object, the object is left in a valid state, but its value is undefined&period; In no event is memory leaked&period; Finally, _aliasing_ (e&period;g&period;, using all or part of an object as both source and destination) is supported in all cases&period;

== Synopsis

Declared in `&lt;bdlb&lowbar;bigendian&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class BigEndianUint16;
----

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlb/BigEndianUint16/operator_assign.adoc[`operator&equals;`] 
| Store in this object the specified `value` as an unsigned 16&hyphen;bit big&hyphen;endian integer, and return a reference to this modifiable object&period;
| xref:BloombergLP/bdlb/BigEndianUint16/bdexStreamIn.adoc[`bdexStreamIn`] 
| Assign to this object the value read from the specified input `stream` using the specified `version` format, and return a reference to `stream`&period; If `stream` is initially invalid, this operation has no effect&period; If `version` is not supported, this object is unaltered and `stream` is invalidated but otherwise unmodified&period; If `version` is supported but `stream` becomes invalid during this operation, this object has an undefined, but valid, state&period; Note that no version is read from `stream`&period; See the `bslx` package&hyphen;level documentation for more information on BDEX streaming of value&hyphen;semantic types and containers&period;
| xref:BloombergLP/bdlb/BigEndianUint16/bdexStreamOut.adoc[`bdexStreamOut`] 
| Write this value to the specified output `stream` using the specified `version` format, and return a reference to `stream`&period; If `stream` is initially invalid, this operation has no effect&period; If `version` is not supported, `stream` is invalidated but otherwise unmodified&period; Note that `version` is not written to `stream`&period; See the `bslx` package&hyphen;level documentation for more information on BDEX streaming of value&hyphen;semantic types and containers&period;
| xref:BloombergLP/bdlb/BigEndianUint16/print.adoc[`print`] 
| Format this object to the specified output `stream` at the (absolute value of) the optionally specified indentation `level` and return a reference to `stream`&period; If `level` is specified, optionally specify `spacesPerLevel`, the number of spaces per indentation level for this and all of its nested objects&period; If `level` is negative, suppress indentation of the first line&period; If `spacesPerLevel` is negative, format the entire output on one line, suppressing all but the initial indentation (as governed by `level`)&period; If `stream` is not valid on entry, this operation has no effect&period;
| xref:BloombergLP/bdlb/BigEndianUint16/2conversion-09.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration&lt;BigEndianUint16, HasPrintMethod&gt;`] 
| Declare that this type is trivially copyable&period;
| xref:BloombergLP/bdlb/BigEndianUint16/2conversion-0d.adoc[`operator unsigned short`] 
| Return the value stored in this object as a `unsigned short` in the native byte&hyphen;order&period;
|===


== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlb/BigEndianUint16/make.adoc[`make`] 
| Create and initialize a `BigEndianUint16` object that stores the specified `value` as a unsigned 16&hyphen;bit big&hyphen;endian integer&period;
| xref:BloombergLP/bdlb/BigEndianUint16/maxSupportedBdexVersion-02.adoc[`maxSupportedBdexVersion`] 
| `maxSupportedBdexVersion` overloads
|===


== Friends

[cols="1,4"]
|===
| Name| Description
| `xref:BloombergLP/bdlb/operator_not_eq-06e.adoc[BloombergLP::bdlb::operator!&equals;]`
| Return `true` if the specified `lhs` and `rhs` `BigEndianUint16` objects do not have the same value, and `false` otherwise&period; Two `BigEndianUint16` objects do not have the same value if and only if the respective integral network byte&hyphen;order values that they represent do not have the same value&period;
| `xref:BloombergLP/bdlb/operator_eq-022e.adoc[BloombergLP::bdlb::operator&equals;&equals;]`
| Return `true` if the specified `lhs` and `rhs` `BigEndianUint16` objects have the same value, and `false` otherwise&period; Two `BigEndianUint16` objects have the same value if and only if the respective integral network byte&hyphen;order values that they represent have the same value&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
