This simply constrained (value‐semantic) attribute class represents the header information found at the start of a Zoneinfo (binary) database file, which describes the contents of the file.

Synopsis

Declared in <baltzo_zoneinfobinaryheader.h>

class ZoneinfoBinaryHeader;

Description

See the section for information on the class attributes. Note that the class invariants are identically the constraints on the individual attributes.

This class: * supports a complete set of value semantic operations

  • except for bdex serialization * is exception‐neutral * is alias‐safe * is const thread‐safe For terminology see bsldoc_glossary.

Member Functions

Name

Description

ZoneinfoBinaryHeader [constructor]

Constructors

~ZoneinfoBinaryHeader [destructor]

Destroy this object.

operator=

Assign to this object the value of the specified rhs object, and return a reference providing modifiable access to this object.

abbrevDataSize

Return the value of the abbrevDataSize attribute of this object.

numIsGmt

Return the value of the numIsGmt attribute of this object.

numIsStd

Return the value of the numIsStd attribute of this object.

numLeaps

Return the value of the numLeaps attribute of this object.

numLocalTimeTypes

Return the value of the numLocalTimeTypes attribute of this object.

numTransitions

Return the value of the numTransitions attribute of this object.

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.

setAbbrevDataSize

Set the abbrevDataSize attribute of this object to the specified value. The behavior is undefined unless 1 <= value.

setNumIsGmt

Set the numIsGmt attribute of this object to the specified value. The behavior is undefined unless 0 <= value.

setNumIsStd

Set the numIsStd attribute of this object to the specified value. The behavior is undefined unless 0 <= value.

setNumLeaps

Set the numLeaps attribute of this object to the specified value. The behavior is undefined unless 0 <= value. While we do not provide parsed leap second transitions to clients, the requirement to be able to handle version 4 of the Zoneinfo binary data files as well forces us to allow a non‐zero number of such transactions to be accepted.

setNumLocalTimeTypes

Set the numLocalTimeTypes attribute of this object to the specified value. The behavior is undefined unless 1 <= value.

setNumTransitions

Set the numTransitions attribute of this object to the specified value. The behavior is undefined unless 0 <= value.

setVersion

Set the version attribute of this object to the specified value. The behavior is undefined unless '0 == value || (50 >= value || 52 <= value)'. Note that 50 is the value of ASCII character 2 and 52 is the value of ASCII character 4.

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.

version

Return the value of the version attribute of this object.

Static Member Functions

Name

Description

isValidAbbrevDataSize

Return true if the specified value is greater than or equal to 1, and false otherwise'.

isValidNumIsGmt

Return true if the specified value is greater than or equal to 0, and false otherwise'.

isValidNumIsStd

Return true if the specified value is greater than or equal to 0, and false otherwise'.

isValidNumLeaps

Return true if the specified value is greater than or equal to 0, and false otherwise'.

isValidNumLocalTimeTypes

Return true if the specified value is greater than or equal to 1, and false otherwise'.

isValidNumTransitions

Return true if the specified value is greater than or equal to 0, and false otherwise'.

isValidVersion

Return true if the specified value equals '0', 2, 3 or 4, and false otherwise.

Non-Member Functions

Name

Description

operator!=

Return true if the specified lhs and rhs objects have the same value, and false otherwise. Two ZoneinfoBinaryHeader objects do not have the same value if the corresponding values of their version, numIsGmt, numIsStd, numLeaps, numTransitions, numLocalTimeTypes, or abbrevDataSize attributes are not the same.

operator==

Return true if the specified lhs and rhs objects have the same value, and false otherwise. Two ZoneinfoBinaryHeader objects have the same value if the corresponding values of their version, numIsGmt, numIsStd, numLeaps, numTransitions, numLocalTimeTypes, and abbrevDataSize attributes are the same.

swap

Efficiently exchange the values of the specified a and b objects. This function provides the no‐throw exception‐safety guarantee.

Created with MrDocs