BDE 4.14.0 Production release
|
#include <baltzo_localdatetime.h>
Public Types | |
typedef bsl::allocator< char > | allocator_type |
Static Public Member Functions | |
static int | maxSupportedBdexVersion () |
static int | maxSupportedBdexVersion (int versionSelector) |
Friends | |
void | swap (LocalDatetime &, LocalDatetime &) |
This unconstrained (value-semantic) attribute class characterizes a date time, offset from UTC, and a time zone identifier represented by a string. See the Attributes section for information on the class attributes.
typedef bsl::allocator<char> baltzo::LocalDatetime::allocator_type |
|
inline |
|
inlineexplicit |
Create a LocalDatetime
object having the (default) attribute values:
Optionally specify an allocator
(e.g., the address of a bslma::Allocator
object) to supply memory; otherwise, the default allocator is used.
|
inline |
|
inline |
Create a LocalDatetime
object with attribute values set from the specified datetimeTz
and timeZoneId
. Optionally specify an allocator
(e.g., the address of a bslma::Allocator
object) to supply memory; otherwise, the default allocator is used. If timeZoneId
is passed as a null pointer, it is treated as an empty string.
|
inline |
Create a LocalDatetime
object having the same value as the specified original
object. Optionally specify an allocator
(e.g., the address of a bslma::Allocator
object) to supply memory; otherwise, the default allocator is used.
|
inline |
Create a LocalDatetime
object having the same value and the same allocator as the specified original
object. The value of original
becomes unspecified but valid, and its allocator remains unchanged.
|
inline |
Create a LocalDatetime
object having the same value as the specified original
object, using the specified allocator
(e.g., the address of a bslma::Allocator
object) to supply memory. The allocator of original
remains unchanged. If original
and the newly created object have the same allocator then the value of original
becomes unspecified but valid, and no exceptions will be thrown; otherwise original
is unchanged and an exception may be thrown.
|
inline |
|
inline |
Return get_allocator().mechanism()
.
@DEPRECATED Use get_allocator()
instead.
STREAM & baltzo::LocalDatetime::bdexStreamIn | ( | STREAM & | stream, |
int | version | ||
) |
Assign to this object the value read from the specified input stream
using the specified version
format, and return a reference to stream
. If stream
is initially invalid, this operation has no effect. If version
is not supported, this object is unaltered and stream
is invalidated, but otherwise unmodified. If version
is supported but stream
becomes invalid during this operation, this object has an undefined, but valid, state. Note that no version is read from stream
. See the bslx
package-level documentation for more information on BDEX streaming of value-semantic types and containers.
STREAM & baltzo::LocalDatetime::bdexStreamOut | ( | STREAM & | stream, |
int | version | ||
) | const |
Write the value of this object, using the specified version
format, to the specified output stream
, and return a reference to stream
. If stream
is initially invalid, this operation has no effect. If version
is not supported, stream
is invalidated, but otherwise unmodified. Note that version
is not written to stream
. See the bslx
package-level documentation for more information on BDEX streaming of value-semantic types and containers.
baltzo::LocalDatetime::BSLMF_NESTED_TRAIT_DECLARATION | ( | LocalDatetime | , |
bslma::UsesBslmaAllocator | |||
) |
baltzo::LocalDatetime::BSLMF_NESTED_TRAIT_DECLARATION | ( | LocalDatetime | , |
bslmf::IsBitwiseMoveable | |||
) |
|
inline |
Return a reference providing non-modifiable access to the datetimeTz
attribute of this object.
|
inline |
Return the allocator used by this object to supply memory. Note that if no allocator was supplied at construction the default allocator in effect at construction is used.
|
inlinestatic |
Return the most current BDEX streaming version number supported by this class.
@DEPRECATED Use maxSupportedBdexVersion(int)
instead.
|
inlinestatic |
Return the maximum valid BDEX format version, as indicated by the specified versionSelector
, to be passed to the bdexStreamOut
method. Note that it is highly recommended that versionSelector
be formatted as "YYYYMMDD", a date representation. Also note that versionSelector
should be a compile-time-chosen value that selects a format version supported by both externalizer and unexternalizer. See the bslx
package-level documentation for more information on BDEX streaming of value-semantic types and containers.
|
inline |
Assign to this object the value of the specified rhs
object, and return a non-const
reference to this object. The allocators of this object and rhs
both remain unchanged. If rhs
and this object have the same allocator then the value of rhs
becomes unspecified but valid, and no exceptions will be thrown; otherwise rhs
is unchanged (and an exception may be thrown).
|
inline |
Assign to this object the value of the specified rhs
object, and return a reference providing modifiable access to this object.
bsl::ostream & baltzo::LocalDatetime::print | ( | bsl::ostream & | stream, |
int | level = 0 , |
||
int | spacesPerLevel = 4 |
||
) | const |
Write the value of this object to the specified output stream
in a human-readable format, and return a reference providing modifiable access to stream
. Optionally specify an initial indentation level
, whose absolute value is incremented recursively for nested objects. If level
is specified, optionally specify spacesPerLevel
, whose absolute value indicates the number of spaces per indentation level for this and all of its nested objects. If level
is negative, suppress indentation of the first line. If spacesPerLevel
is negative, format the entire output on one line, suppressing all but the initial indentation (as governed by level
). If stream
is not valid on entry, this operation has no effect. Note that the format is not fully specified, and can change without notice.
|
inline |
|
inline |
|
inline |
Set the timeZoneId
attribute of this object to the specified value
. If value
is null, it is treated as an empty string.
|
inline |
Efficiently exchange the value of this object with the value of the specified other
object. This method provides the no-throw exception-safety guarantee. The behavior is undefined unless this object was created with the same allocator as was other
.
|
inline |
Return a reference providing non-modifiable access to the timeZoneId
attribute of this object.
|
friend |
Exchange the values of the specified a
and b
objects. This function provides the no-throw exception-safety guarantee if the two objects were created with the same allocator and the basic guarantee otherwise.