#include <baltzo_zoneinfobinaryheader.h>
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.
See the Attributes section for information on the class attributes.
- Note
- 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 .
See baltzo_zoneinfobinaryheader
◆ ZoneinfoBinaryHeader() [1/3]
| baltzo::ZoneinfoBinaryHeader::ZoneinfoBinaryHeader |
( |
| ) |
|
|
inline |
◆ ZoneinfoBinaryHeader() [2/3]
Create a ZoneInfoBinaryHeader object with the same value as the specified original.
◆ ZoneinfoBinaryHeader() [3/3]
| baltzo::ZoneinfoBinaryHeader::ZoneinfoBinaryHeader |
( |
char |
version, |
|
|
int |
numIsGmt, |
|
|
int |
numIsStd, |
|
|
int |
numLeaps, |
|
|
int |
numTransitions, |
|
|
int |
numLocalTimeTypes, |
|
|
int |
abbrevDataSize |
|
) |
| |
|
inline |
Create a ZoneinfoBinaryHeader having the specified version, numIsGmt, numIsStd, numLeaps, numTransitions, numLocalTimeTypes, and abbrevDataSize values.
- Precondition
- The behavior is undefined unless ('0' <= version && version <= '4')
,0 <= numIsGmt, 0 <= numIsStd,0 <= numLeaps,0 <= numTransitions, 1 <= numLocalTimeTypes, and1 <= abbrevDataSize`.
◆ ~ZoneinfoBinaryHeader()
| baltzo::ZoneinfoBinaryHeader::~ZoneinfoBinaryHeader |
( |
| ) |
|
|
inline |
◆ abbrevDataSize()
| int baltzo::ZoneinfoBinaryHeader::abbrevDataSize |
( |
| ) |
const |
|
inline |
Return the value of the abbrevDataSize attribute of this object.
◆ isValidAbbrevDataSize()
| bool baltzo::ZoneinfoBinaryHeader::isValidAbbrevDataSize |
( |
int |
value | ) |
|
|
inlinestatic |
Return true if the specified value is greater than or equal to 1, and false otherwise'.
◆ isValidNumIsGmt()
| bool baltzo::ZoneinfoBinaryHeader::isValidNumIsGmt |
( |
int |
value | ) |
|
|
inlinestatic |
Return true if the specified value is greater than or equal to 0, and false otherwise'.
◆ isValidNumIsStd()
| bool baltzo::ZoneinfoBinaryHeader::isValidNumIsStd |
( |
int |
value | ) |
|
|
inlinestatic |
Return true if the specified value is greater than or equal to 0, and false otherwise'.
◆ isValidNumLeaps()
| bool baltzo::ZoneinfoBinaryHeader::isValidNumLeaps |
( |
int |
value | ) |
|
|
inlinestatic |
Return true if the specified value is greater than or equal to 0, and false otherwise'.
◆ isValidNumLocalTimeTypes()
| bool baltzo::ZoneinfoBinaryHeader::isValidNumLocalTimeTypes |
( |
int |
value | ) |
|
|
inlinestatic |
Return true if the specified value is greater than or equal to 1, and false otherwise'.
◆ isValidNumTransitions()
| bool baltzo::ZoneinfoBinaryHeader::isValidNumTransitions |
( |
int |
value | ) |
|
|
inlinestatic |
Return true if the specified value is greater than or equal to 0, and false otherwise'.
◆ isValidVersion()
| bool baltzo::ZoneinfoBinaryHeader::isValidVersion |
( |
char |
value | ) |
|
|
inlinestatic |
Return true if the specified value equals '\0', 2, 3 or 4, and false otherwise.
◆ numIsGmt()
| int baltzo::ZoneinfoBinaryHeader::numIsGmt |
( |
| ) |
const |
|
inline |
Return the value of the numIsGmt attribute of this object.
◆ numIsStd()
| int baltzo::ZoneinfoBinaryHeader::numIsStd |
( |
| ) |
const |
|
inline |
Return the value of the numIsStd attribute of this object.
◆ numLeaps()
| int baltzo::ZoneinfoBinaryHeader::numLeaps |
( |
| ) |
const |
|
inline |
Return the value of the numLeaps attribute of this object.
◆ numLocalTimeTypes()
| int baltzo::ZoneinfoBinaryHeader::numLocalTimeTypes |
( |
| ) |
const |
|
inline |
Return the value of the numLocalTimeTypes attribute of this object.
◆ numTransitions()
| int baltzo::ZoneinfoBinaryHeader::numTransitions |
( |
| ) |
const |
|
inline |
Return the value of the numTransitions attribute of this object.
◆ operator=()
Assign to this object the value of the specified rhs object, and return a reference providing modifiable access to this object.
◆ print()
| bsl::ostream & baltzo::ZoneinfoBinaryHeader::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 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
- Note that the format is not fully specified, and can change without notice.
◆ setAbbrevDataSize()
| void baltzo::ZoneinfoBinaryHeader::setAbbrevDataSize |
( |
int |
value | ) |
|
|
inline |
Set the abbrevDataSize attribute of this object to the specified value.
- Precondition
- The behavior is undefined unless
1 <= value.
◆ setNumIsGmt()
| void baltzo::ZoneinfoBinaryHeader::setNumIsGmt |
( |
int |
value | ) |
|
|
inline |
Set the numIsGmt attribute of this object to the specified value.
- Precondition
- The behavior is undefined unless
0 <= value.
◆ setNumIsStd()
| void baltzo::ZoneinfoBinaryHeader::setNumIsStd |
( |
int |
value | ) |
|
|
inline |
Set the numIsStd attribute of this object to the specified value.
- Precondition
- The behavior is undefined unless
0 <= value.
◆ setNumLeaps()
| void baltzo::ZoneinfoBinaryHeader::setNumLeaps |
( |
int |
value | ) |
|
|
inline |
Set the numLeaps attribute of this object to the specified value.
- Precondition
- 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()
| void baltzo::ZoneinfoBinaryHeader::setNumLocalTimeTypes |
( |
int |
value | ) |
|
|
inline |
Set the numLocalTimeTypes attribute of this object to the specified value.
- Precondition
- The behavior is undefined unless
1 <= value.
◆ setNumTransitions()
| void baltzo::ZoneinfoBinaryHeader::setNumTransitions |
( |
int |
value | ) |
|
|
inline |
Set the numTransitions attribute of this object to the specified value.
- Precondition
- The behavior is undefined unless
0 <= value.
◆ setVersion()
| void baltzo::ZoneinfoBinaryHeader::setVersion |
( |
char |
value | ) |
|
|
inline |
Set the version attribute of this object to the specified value.
- Precondition
- The behavior is undefined unless '0 == value || (50 >= value || 52 <= value)'.
- Note
- 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()
| char baltzo::ZoneinfoBinaryHeader::version |
( |
| ) |
const |
|
inline |
Return the value of the version attribute of this object.
The documentation for this class was generated from the following file: