BloombergLP::baltzo::LocalTimePeriod

This complex-constrained (value-semantic) attribute class describes a range of time in which a particular local time description (offset, DST status, and a descriptive string) is in effect. See the section for information on the class attributes. Note that the class invariants are identically the constraints on the attributes.

Synopsis

Declared in <baltzo_localtimeperiod.h>

class LocalTimePeriod;

Type Aliases

NameDescription
allocator_type Allocator type used by this class.

Member Functions

NameDescription
LocalTimePeriod [constructor]Constructors
~LocalTimePeriod [destructor]Destroy this object.
operator= Assignment operators
allocator Return get_allocator().mechanism().
descriptor Return a reference providing non-modifiable access to the descriptor attribute of this object.
get_allocator 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.
print Write the value of this object to the specified output stream in a human-readable format, and return a reference 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.
setDescriptor Set the descriptor attribute to the specified value.
setUtcStartAndEndTime Use the specified utcStartTime and utcEndTime to set the utcStartTime and utcEndTime attributes of this object respectively. The behavior is undefined unless utcStartTime == utcEndTime, or if utcStartTime and utcEndTime are comparable (i.e., neither equals a default constructed bdlt::DateTime object) unless `utcStartTime < utcEndTime. (See the isValidUtcStartAndEndTime` method.)
swap 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 other.
utcEndTime Return a reference providing non-modifiable access to the utcEndTime attribute of this object.
utcStartTime Return a reference providing non-modifiable access to the utcStartTime attribute of this object.
operator BloombergLP::bslmf::NestedTraitDeclaration<LocalTimePeriod, IsBitwiseMoveable> Nested trait declaration for bslma::UsesBslmaAllocator.

Static Member Functions

NameDescription
isValidUtcStartAndEndTime Return true if the specified utcStartTime and utcEndTime have the same value, or if utcStartTime and utcEndTime are comparable (i.e., neither has the value of a default-constructed bdlt::DateTime object) and utcStartTime < utcEndTime; return false otherwise.

Non-Member Functions

NameDescription
operator!=Return true if the specified lhs and rhs objects do not have the same value, and false otherwise. Two LocalTimePeriod objects do not have the same value if the corresponding values of their descriptor, utcStartTime, or utcEndTime attributes are not the same.
operator==Return true if the specified lhs and rhs objects have the same value, and false otherwise. Two LocalTimePeriod objects have the same value if each of their corresponding descriptor, utcStartTime, and utcEndTime attributes have the same value.
swapExchange 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.