BDE 4.14.0 Production release
Loading...
Searching...
No Matches
baltzo::ZoneinfoBinaryHeader Class Reference

#include <baltzo_zoneinfobinaryheader.h>

Public Member Functions

 ZoneinfoBinaryHeader ()
 
 ZoneinfoBinaryHeader (const ZoneinfoBinaryHeader &original)
 
 ZoneinfoBinaryHeader (char version, int numIsGmt, int numIsStd, int numLeaps, int numTransitions, int numLocalTimeTypes, int abbrevDataSize)
 
 ~ZoneinfoBinaryHeader ()
 Destroy this object.
 
ZoneinfoBinaryHeaderoperator= (const ZoneinfoBinaryHeader &rhs)
 
void setVersion (char value)
 
void setNumIsGmt (int value)
 
void setNumIsStd (int value)
 
void setNumLeaps (int value)
 
void setNumTransitions (int value)
 
void setNumLocalTimeTypes (int value)
 
void setAbbrevDataSize (int value)
 
void swap (ZoneinfoBinaryHeader &other)
 
char version () const
 Return the value of the version attribute of this object.
 
int numIsGmt () const
 Return the value of the numIsGmt attribute of this object.
 
int numIsStd () const
 Return the value of the numIsStd attribute of this object.
 
int numLeaps () const
 Return the value of the numLeaps attribute of this object.
 
int numTransitions () const
 Return the value of the numTransitions attribute of this object.
 
int numLocalTimeTypes () const
 
int abbrevDataSize () const
 Return the value of the abbrevDataSize attribute of this object.
 
bsl::ostream & print (bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
 

Static Public Member Functions

static bool isValidVersion (char value)
 
static bool isValidNumIsGmt (int value)
 
static bool isValidNumIsStd (int value)
 
static bool isValidNumLeaps (int value)
 
static bool isValidNumTransitions (int value)
 
static bool isValidNumLocalTimeTypes (int value)
 
static bool isValidAbbrevDataSize (int value)
 

Detailed Description

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 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

Constructor & Destructor Documentation

◆ ZoneinfoBinaryHeader() [1/3]

baltzo::ZoneinfoBinaryHeader::ZoneinfoBinaryHeader ( )
inline

Create a ZoneinfoBinaryHeader object having the (default) attribute values:

version() == 0
numIsGmt() == 0
numIsStd() == 0
numLeaps() == 0
char version() const
Return the value of the version attribute of this object.
Definition baltzo_zoneinfobinaryheader.h:636
int numLocalTimeTypes() const
Definition baltzo_zoneinfobinaryheader.h:666
int numIsStd() const
Return the value of the numIsStd attribute of this object.
Definition baltzo_zoneinfobinaryheader.h:648
int numLeaps() const
Return the value of the numLeaps attribute of this object.
Definition baltzo_zoneinfobinaryheader.h:654
int numIsGmt() const
Return the value of the numIsGmt attribute of this object.
Definition baltzo_zoneinfobinaryheader.h:642
int numTransitions() const
Return the value of the numTransitions attribute of this object.
Definition baltzo_zoneinfobinaryheader.h:660
int abbrevDataSize() const
Return the value of the abbrevDataSize attribute of this object.
Definition baltzo_zoneinfobinaryheader.h:672

◆ ZoneinfoBinaryHeader() [2/3]

baltzo::ZoneinfoBinaryHeader::ZoneinfoBinaryHeader ( const ZoneinfoBinaryHeader original)
inline

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. The behavior is undefined unless 0 == version || 50 == version || 51 == version, 0 <= numIsGmt, 0 <= numIsStd, 0 == numLeaps, 0 <= numTransitions, 1 <= numLocalTimeTypes, and 1 <= abbrevDataSize. Note that 50 is the value of ASCII character 2 and 51 is the value of ASCII character 3.

◆ ~ZoneinfoBinaryHeader()

baltzo::ZoneinfoBinaryHeader::~ZoneinfoBinaryHeader ( )
inline

Member Function Documentation

◆ abbrevDataSize()

int baltzo::ZoneinfoBinaryHeader::abbrevDataSize ( ) const
inline

◆ 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 equals 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' or 2, and false otherwise.

◆ numIsGmt()

int baltzo::ZoneinfoBinaryHeader::numIsGmt ( ) const
inline

◆ numIsStd()

int baltzo::ZoneinfoBinaryHeader::numIsStd ( ) const
inline

◆ numLeaps()

int baltzo::ZoneinfoBinaryHeader::numLeaps ( ) const
inline

◆ numLocalTimeTypes()

int baltzo::ZoneinfoBinaryHeader::numLocalTimeTypes ( ) const
inline

Return the value of the numLocalTimeTypes attribute of this object.

◆ numTransitions()

int baltzo::ZoneinfoBinaryHeader::numTransitions ( ) const
inline

◆ operator=()

ZoneinfoBinaryHeader & baltzo::ZoneinfoBinaryHeader::operator= ( const ZoneinfoBinaryHeader rhs)
inline

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 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. 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. 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. 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. The behavior is undefined unless 0 == value.

◆ setNumLocalTimeTypes()

void baltzo::ZoneinfoBinaryHeader::setNumLocalTimeTypes ( int  value)
inline

Set the numLocalTimeTypes attribute of this object to the specified value. 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. 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. The behavior is undefined unless '0 == value || 50 == value || 51 == value'. Note that 50 is the value of ASCII character 2 and 51 is the value of ASCII character 3.

◆ swap()

void baltzo::ZoneinfoBinaryHeader::swap ( ZoneinfoBinaryHeader other)
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.

◆ version()

char baltzo::ZoneinfoBinaryHeader::version ( ) const
inline

The documentation for this class was generated from the following file: