BDE 4.39.x Production Release
Loading...
Searching...
No Matches
baltzo_zoneinfobinaryheader.h
Go to the documentation of this file.
1/// @file baltzo_zoneinfobinaryheader.h
2///
3/// The content of this file has been pre-processed for Doxygen.
4///
5
6
7// baltzo_zoneinfobinaryheader.h -*-C++-*-
8#ifndef INCLUDED_BALTZO_ZONEINFOBINARYHEADER
9#define INCLUDED_BALTZO_ZONEINFOBINARYHEADER
10
11#include <bsls_ident.h>
12BSLS_IDENT("$Id: $")
13
14/// @defgroup baltzo_zoneinfobinaryheader baltzo_zoneinfobinaryheader
15/// @brief Provide an attribute class for Zoneinfo binary-file header data.
16/// @addtogroup bal
17/// @{
18/// @addtogroup baltzo
19/// @{
20/// @addtogroup baltzo_zoneinfobinaryheader
21/// @{
22///
23/// <h1> Outline </h1>
24/// * <a href="#baltzo_zoneinfobinaryheader-purpose"> Purpose</a>
25/// * <a href="#baltzo_zoneinfobinaryheader-classes"> Classes </a>
26/// * <a href="#baltzo_zoneinfobinaryheader-description"> Description </a>
27/// * <a href="#baltzo_zoneinfobinaryheader-attributes"> Attributes </a>
28/// * <a href="#baltzo_zoneinfobinaryheader-usage"> Usage </a>
29/// * <a href="#baltzo_zoneinfobinaryheader-example-1-creating-a-baltzo-zoneinfobinaryheader-from-user-input"> Example 1: Creating a baltzo::ZoneinfoBinaryHeader from User Input </a>
30///
31/// # Purpose {#baltzo_zoneinfobinaryheader-purpose}
32/// Provide an attribute class for Zoneinfo binary-file header data.
33///
34/// # Classes {#baltzo_zoneinfobinaryheader-classes}
35///
36/// - baltzo::ZoneinfoBinaryHeader: attribute class for Zoneinfo header data
37///
38/// @see baltzo_zoneinfobinaryreader
39///
40/// # Description {#baltzo_zoneinfobinaryheader-description}
41/// This component provides a simply constrained attribute class,
42/// `baltzo::ZoneinfoBinaryHeader`, representing the header data of a Zoneinfo
43/// binary data file.
44///
45/// ## Attributes {#baltzo_zoneinfobinaryheader-attributes}
46///
47///
48/// @code
49/// Name Type Default Simple Constraints
50/// ----------------- ---- ------- ------------------------------
51/// version char '\0' == '\0' || ( >= '2' && <= '4')
52/// numIsGmt int 0 >= 0
53/// numIsStd int 0 >= 0
54/// numLeaps int 0 == 0
55/// numTransitions int 0 >= 0
56/// numLocalTimeTypes int 1 >= 1
57/// abbrevDataSize int 1 >= 1
58/// @endcode
59///
60/// * `version`: Zoneinfo file format version, as of 2025, either '\0', `2`, `3`
61/// or `4`.
62/// * `numIsGmt`: number of encoded UTC/local indicators in the file,
63/// indicating whether a transition time was originally specified as UTC in
64/// the rule file.
65/// * `numIsStd`: number of encoded standard/wall indicators in the file,
66/// indicating whether a transition time was originally specified as standard
67/// time in the rule file.
68/// * `numLeaps`: number of leap corrections stored in the file.
69/// * `numTransitions`: number of local-time type transitions stored in the
70/// file.
71/// * `numLocalTimeTypes`: number of local-time types stored in the file.
72/// * `abbrevDataSize`: length of the sequence of characters containing the
73/// ('\0'-separated) abbreviation strings in the file.
74///
75/// ## Usage {#baltzo_zoneinfobinaryheader-usage}
76///
77///
78/// This section illustrates intended use of this component.
79///
80/// ### Example 1: Creating a baltzo::ZoneinfoBinaryHeader from User Input {#baltzo_zoneinfobinaryheader-example-1-creating-a-baltzo-zoneinfobinaryheader-from-user-input}
81///
82///
83/// We define the `getNextZoneinfoBinaryHeader` helper function, reads data from
84/// a stream, validates the data, and constructs a
85/// `baltzo::ZoneinfoBinaryHeader` object.
86/// @code
87/// /// Set to the specified `object` the value extracted from the
88/// /// specified `stream`. Return 0 on success, and a non-zero value
89/// /// otherwise, with no change to `object`. The `stream` contains
90/// /// white-space separated decimal representations of the attributes
91/// /// of `baltzo::ZoneinfoBinaryHeader` in the following order: `version`,
92/// /// `numIsGmt`, `numIsStd`, `numLeaps`, `numTransitions`,
93/// /// `numLocalTimeTypes`, and `abbrevDataSize`.
94/// int getNextZoneinfoBinaryHeader(baltzo::ZoneinfoBinaryHeader *object,
95/// bsl::istream& stream)
96/// {
97/// int version; // not 'char'
98/// int numIsGmt;
99/// int numIsStd;
100/// int numLeaps;
101/// int numTransitions;
102/// int numLocalTimeTypes;
103/// int abbrevDataSize;
104///
105/// if (!(stream >> version
106/// && stream >> numIsGmt
107/// && stream >> numIsStd
108/// && stream >> numLeaps
109/// && stream >> numTransitions
110/// && stream >> numLocalTimeTypes
111/// && stream >> abbrevDataSize)) {
112/// return 1; // RETURN
113/// }
114///
115/// if (!(baltzo::ZoneinfoBinaryHeader::isValidVersion(version)
116/// && baltzo::ZoneinfoBinaryHeader::isValidNumIsGmt(numIsGmt)
117/// && baltzo::ZoneinfoBinaryHeader::isValidNumIsStd(numIsStd)
118/// && baltzo::ZoneinfoBinaryHeader::isValidNumLeaps(numLeaps)
119/// && baltzo::ZoneinfoBinaryHeader::isValidNumTransitions(
120/// numTransitions)
121/// && baltzo::ZoneinfoBinaryHeader::isValidNumLocalTimeTypes(
122/// numLocalTimeTypes)
123/// && baltzo::ZoneinfoBinaryHeader::isValidAbbrevDataSize(
124/// abbrevDataSize))) {
125/// return 2; // RETURN
126/// }
127///
128/// object->setVersion(version);
129/// object->setNumIsGmt(numIsGmt);
130/// object->setNumIsStd(numIsStd);
131/// object->setNumLeaps(numLeaps);
132/// object->setNumTransitions(numTransitions);
133/// object->setNumLocalTimeTypes(numLocalTimeTypes);
134/// object->setAbbrevDataSize(abbrevDataSize);
135///
136/// return 0;
137/// }
138/// @endcode
139/// To use our helper function, we supply it with a stream of (decimal,
140/// whitespace-separated values). The resulting object has the expected value.
141/// @code
142/// bsl::stringstream input("50 1 2 0 3 4 5");
143/// baltzo::ZoneinfoBinaryHeader header;
144/// int rc;
145///
146/// rc = getNextZoneinfoBinaryHeader(&header, input);
147///
148/// assert( 0 == rc);
149/// assert('2' == header.version());
150/// assert( 1 == header.numIsGmt());
151/// assert( 2 == header.numIsStd());
152/// assert( 0 == header.numLeaps());
153/// assert( 3 == header.numTransitions());
154/// assert( 4 == header.numLocalTimeTypes());
155/// assert( 5 == header.abbrevDataSize());
156/// @endcode
157/// Since all of the data in the stream has now been consumed, another call to
158/// the function returns an error and leaves the object unchanged.
159/// @code
160/// header.setVersion(0);
161/// header.setNumIsGmt(10);
162/// header.setNumIsStd(20);
163/// header.setNumLeaps(0);
164/// header.setNumTransitions(30);
165/// header.setNumLocalTimeTypes(40);
166/// header.setAbbrevDataSize(50);
167///
168/// rc = getNextZoneinfoBinaryHeader(&header, input);
169///
170/// assert( 0 != rc);
171/// assert('\0' == header.version());
172/// assert( 10 == header.numIsGmt());
173/// assert( 20 == header.numIsStd());
174/// assert( 0 == header.numLeaps());
175/// assert( 30 == header.numTransitions());
176/// assert( 40 == header.numLocalTimeTypes());
177/// assert( 50 == header.abbrevDataSize());
178/// @endcode
179/// @}
180/** @} */
181/** @} */
182
183/** @addtogroup bal
184 * @{
185 */
186/** @addtogroup baltzo
187 * @{
188 */
189/** @addtogroup baltzo_zoneinfobinaryheader
190 * @{
191 */
192
193#include <balscm_version.h>
194
195#include <bsls_assert.h>
196#include <bsls_review.h>
197
198#include <bsl_algorithm.h>
199#include <bsl_iosfwd.h>
200
201
202namespace baltzo {
203
204 // ==========================
205 // class ZoneinfoBinaryHeader
206 // ==========================
207
208/// This simply constrained (value-semantic) attribute class represents the
209/// header information found at the start of a Zoneinfo (binary) database
210/// file, which describes the contents of the file.
211///
212/// See the @ref baltzo_zoneinfobinaryheader-attributes section for information on the class attributes.
213///
214/// \note Note that the class invariants are identically the constraints on the
215/// individual attributes.
216///
217/// This class:
218/// * supports a complete set of *value* *semantic* operations
219/// - except for `bdex` serialization
220/// * is *exception-neutral*
221/// * is *alias-safe*
222/// * is `const` *thread-safe*
223/// For terminology see @ref bsldoc_glossary .
224///
225/// See @ref baltzo_zoneinfobinaryheader
227
228 // DATA
229 char d_version; // file format version of the Zoneinfo, as of
230 // 2013, it can be either '\0', '2', or '3'.
231
232 int d_numIsGmt; // number of encoded UTC/local indicators in the
233 // file, indicating whether a transition time
234 // was originally specified as UTC in the rule
235 // file.
236
237 int d_numIsStd; // number of encoded standard/wall indicators in
238 // the file, indicating whether a transition
239 // time was originally specified as standard the
240 // in the rule file.
241
242 int d_numLeaps; // number of leap corrections stored in the file
243
244 int d_numTransitions; // number of local-time type transitions stored
245 // in the file
246
247 int d_numLocalTimeTypes; // number of local-time types stored in the file
248
249 int d_abbrevDataSize; // length of the sequence of characters
250 // containing the ('\0' separated) abbreviation
251 // strings in the file
252
253 public:
254 // CLASS METHODS
255
256 /// Return `true` if the specified value equals '\0', `2`, `3` or `4`, and
257 /// `false` otherwise.
258 static bool isValidVersion(char value);
259
260 /// Return `true` if the specified `value` is greater than or equal to 0,
261 /// and `false` otherwise'.
262 static bool isValidNumIsGmt(int value);
263
264 /// Return `true` if the specified `value` is greater than or equal to 0,
265 /// and `false` otherwise'.
266 static bool isValidNumIsStd(int value);
267
268 /// Return `true` if the specified `value` is greater than or equal to 0,
269 /// and `false` otherwise'.
270 static bool isValidNumLeaps(int value);
271
272 /// Return `true` if the specified `value` is greater than or equal to 0,
273 /// and `false` otherwise'.
274 static bool isValidNumTransitions(int value);
275
276 /// Return `true` if the specified `value` is greater than or equal to 1,
277 /// and `false` otherwise'.
278 static bool isValidNumLocalTimeTypes(int value);
279
280 /// Return `true` if the specified `value` is greater than or equal to 1,
281 /// and `false` otherwise'.
282 static bool isValidAbbrevDataSize(int value);
283
284 // CREATORS
285
286 /// Create a `ZoneinfoBinaryHeader` object having the (default) attribute
287 /// values:
288 /// @code
289 /// version() == 0
290 /// numIsGmt() == 0
291 /// numIsStd() == 0
292 /// numLeaps() == 0
293 /// numTransitions() == 0
294 /// numLocalTimeTypes() == 1
295 /// abbrevDataSize() == 1
296 /// @endcode
298
299 /// Create a `ZoneInfoBinaryHeader` object with the same value as the
300 /// specified `original`.
302
303 /// Create a `ZoneinfoBinaryHeader` having the specified `version`,
304 /// `numIsGmt`, `numIsStd`, `numLeaps`, `numTransitions`,
305 /// `numLocalTimeTypes`, and `abbrevDataSize` values.
306 ///
307 /// \pre The behavior is undefined unless ('0' <= version && version <= '4')`, `0 <= numIsGmt`,
308 /// `0 <= numIsStd`, `0 <= numLeaps`, `0 <= numTransitions`,
309 /// `1 <= numLocalTimeTypes`, and `1 <= abbrevDataSize`.
311 int numIsGmt,
312 int numIsStd,
313 int numLeaps,
314 int numTransitions,
316 int abbrevDataSize);
317
318 /// Destroy this object.
320
321 // MANIPULATORS
322
323 /// Assign to this object the value of the specified `rhs` object, and
324 /// return a reference providing modifiable access to this object.
326
327 /// Set the `version` attribute of this object to the specified `value`.
328 ///
329 /// \pre The behavior is undefined unless '0 == value || (50 >= value || 52 <= value)'.
330 ///
331 /// \note Note that 50 is the
332 /// value of ASCII character `2` and 52 is the value of ASCII character
333 /// `4`.
334 void setVersion(char value);
335
336 /// Set the `numIsGmt` attribute of this object to the specified `value`.
337 ///
338 /// \pre The behavior is undefined unless `0 <= value`.
339 void setNumIsGmt(int value);
340
341 /// Set the `numIsStd` attribute of this object to the specified `value`.
342 ///
343 /// \pre The behavior is undefined unless `0 <= value`.
344 void setNumIsStd(int value);
345
346 /// Set the `numLeaps` attribute of this object to the specified `value`.
347 ///
348 /// \pre The behavior is undefined unless `0 <= value`. While we do not provide
349 /// parsed leap second transitions to clients, the requirement to be able
350 /// to handle version `4` of the Zoneinfo binary data files as well forces
351 /// us to allow a non-zero number of such transactions to be accepted.
352 void setNumLeaps(int value);
353
354 /// Set the `numTransitions` attribute of this object to the specified `value`.
355 ///
356 /// \pre The behavior is undefined unless `0 <= value`.
357 void setNumTransitions(int value);
358
359 /// Set the `numLocalTimeTypes` attribute of this object to the specified `value`.
360 ///
361 /// \pre The behavior is undefined unless `1 <= value`.
362 void setNumLocalTimeTypes(int value);
363
364 /// Set the `abbrevDataSize` attribute of this object to the specified `value`.
365 ///
366 /// \pre The behavior is undefined unless `1 <= value`.
367 void setAbbrevDataSize(int value);
368
369 /// Efficiently exchange the value of this object with the value of the
370 /// specified `other` object. This method provides the no-throw
371 /// exception-safety guarantee.
372 void swap(ZoneinfoBinaryHeader& other);
373
374 // ACCESSORS
375
376 /// Return the value of the `version` attribute of this object.
377 char version() const;
378
379 /// Return the value of the `numIsGmt` attribute of this object.
380 int numIsGmt() const;
381
382 /// Return the value of the `numIsStd` attribute of this object.
383 int numIsStd() const;
384
385 /// Return the value of the `numLeaps` attribute of this object.
386 int numLeaps() const;
387
388 /// Return the value of the `numTransitions` attribute of this object.
389 int numTransitions() const;
390
391 /// Return the value of the `numLocalTimeTypes` attribute of this object.
392 int numLocalTimeTypes() const;
393
394 /// Return the value of the `abbrevDataSize` attribute of this object.
395 int abbrevDataSize() const;
396
397 // Aspects
398
399 /// Write the value of this object to the specified output `stream` in a
400 /// human-readable format, and return a reference to `stream`. Optionally
401 /// specify an initial indentation `level`, whose absolute value is
402 /// incremented recursively for nested objects. If `level` is specified,
403 /// optionally specify `spacesPerLevel`, whose absolute value indicates the
404 /// number of spaces per indentation level for this and all of its nested
405 /// objects. If `level` is negative, suppress indentation of the first
406 /// line. If `spacesPerLevel` is negative, format the entire output on one
407 /// line, suppressing all but the initial indentation (as governed by
408 /// `level`). If `stream` is not valid on entry, this operation has no effect.
409 ///
410 /// \note Note that the format is not fully specified, and can change
411 /// without notice.
412 bsl::ostream& print(bsl::ostream& stream,
413 int level = 0,
414 int spacesPerLevel = 4) const;
415};
416
417// FREE OPERATORS
418
419/// Return `true` if the specified `lhs` and `rhs` objects have the same value,
420/// and `false` otherwise. Two `ZoneinfoBinaryHeader` objects have the same
421/// value if the corresponding values of their `version`, `numIsGmt`,
422/// `numIsStd`, `numLeaps`, `numTransitions`, `numLocalTimeTypes`, and
423/// `abbrevDataSize` attributes are the same.
424bool operator==(const ZoneinfoBinaryHeader& lhs,
425 const ZoneinfoBinaryHeader& rhs);
426
427/// Return `true` if the specified `lhs` and `rhs` objects have the same value,
428/// and `false` otherwise. Two `ZoneinfoBinaryHeader` objects do not have the
429/// same value if the corresponding values of their `version`, `numIsGmt`,
430/// `numIsStd`, `numLeaps`, `numTransitions`, `numLocalTimeTypes`, or
431/// `abbrevDataSize` attributes are not the same.
432bool operator!=(const ZoneinfoBinaryHeader& lhs,
433 const ZoneinfoBinaryHeader& rhs);
434
435/// Write the value of the specified `object` to the specified output `stream`
436/// in a single-line format, and return a reference to `stream`. If `stream` is not valid on entry, this operation has no effect.
437///
438/// \note Note that this
439/// human-readable format is not fully specified and can change without notice.
440/// Also note that this method has the same behavior as
441/// `object.print(stream, 0, -1)`.
442bsl::ostream& operator<<(bsl::ostream& stream,
443 const ZoneinfoBinaryHeader& object);
444
445// FREE FUNCTIONS
446
447/// Efficiently exchange the values of the specified `a` and `b` objects. This
448/// function provides the no-throw exception-safety guarantee.
450
451// ============================================================================
452// INLINE DEFINITIONS
453// ============================================================================
454
455 // --------------------------
456 // class ZoneinfoBinaryHeader
457 // --------------------------
458
459// CLASS METHODS
460inline
462{
463 return '\0' == value || ('2' <= value && '4' >= value);
464}
465
466inline
468{
469 return value >= 0;
470}
471
472inline
474{
475 return value >= 0;
476}
477
478inline
480{
481 return value >= 0;
482}
483
484inline
486{
487 return value >= 0;
488}
489
490inline
492{
493 return value >= 1;
494}
495
496inline
498{
499 return value >= 1;
500}
501
502// CREATORS
503inline
505: d_version(0)
506, d_numIsGmt(0)
507, d_numIsStd(0)
508, d_numLeaps(0)
509, d_numTransitions(0)
510, d_numLocalTimeTypes(1)
511, d_abbrevDataSize(1)
512{
513}
514
515inline
517 const ZoneinfoBinaryHeader& original)
518: d_version(original.d_version)
519, d_numIsGmt(original.d_numIsGmt)
520, d_numIsStd(original.d_numIsStd)
521, d_numLeaps(original.d_numLeaps)
522, d_numTransitions(original.d_numTransitions)
523, d_numLocalTimeTypes(original.d_numLocalTimeTypes)
524, d_abbrevDataSize(original.d_abbrevDataSize)
525{
526}
527
528inline
530 int numIsGmt,
531 int numIsStd,
532 int numLeaps,
533 int numTransitions,
534 int numLocalTimeTypes,
535 int abbrevDataSize)
536: d_version(version)
537, d_numIsGmt(numIsGmt)
538, d_numIsStd(numIsStd)
539, d_numLeaps(numLeaps)
540, d_numTransitions(numTransitions)
541, d_numLocalTimeTypes(numLocalTimeTypes)
542, d_abbrevDataSize(abbrevDataSize)
543{
551}
552
553inline
555{
556 BSLS_ASSERT(isValidVersion(d_version));
557 BSLS_ASSERT(isValidNumIsGmt(d_numIsGmt));
558 BSLS_ASSERT(isValidNumIsStd(d_numIsStd));
559 BSLS_ASSERT(isValidNumLeaps(d_numLeaps));
560 BSLS_ASSERT(isValidNumTransitions(d_numTransitions));
561 BSLS_ASSERT(isValidNumLocalTimeTypes(d_numLocalTimeTypes));
562 BSLS_ASSERT(isValidAbbrevDataSize(d_abbrevDataSize));
563}
564
565// MANIPULATORS
566inline
568 const ZoneinfoBinaryHeader& rhs)
569{
570 d_version = rhs.d_version;
571 d_numIsGmt = rhs.d_numIsGmt;
572 d_numIsStd = rhs.d_numIsStd;
573 d_numLeaps = rhs.d_numLeaps;
574 d_numTransitions = rhs.d_numTransitions;
575 d_numLocalTimeTypes = rhs.d_numLocalTimeTypes;
576 d_abbrevDataSize = rhs.d_abbrevDataSize;
577 return *this;
578}
579inline
581{
583
584 d_version = value;
585}
586
587inline
589{
591
592 d_numIsGmt = value;
593}
594
595inline
597{
599
600 d_numIsStd = value;
601}
602
603inline
605{
607
608 d_numLeaps = value;
609}
610
611inline
613{
615
616 d_numTransitions = value;
617}
618
619inline
621{
623
624 d_numLocalTimeTypes = value;
625}
626
627inline
629{
631
632 d_abbrevDataSize = value;
633}
634
635inline
637{
638 bsl::swap(d_version, other.d_version);
639 bsl::swap(d_numIsGmt, other.d_numIsGmt);
640 bsl::swap(d_numIsStd, other.d_numIsStd);
641 bsl::swap(d_numLeaps, other.d_numLeaps);
642 bsl::swap(d_numTransitions, other.d_numTransitions);
643 bsl::swap(d_numLocalTimeTypes, other.d_numLocalTimeTypes);
644 bsl::swap(d_abbrevDataSize, other.d_abbrevDataSize);
645}
646
647// ACCESSORS
648inline
650{
651 return d_version;
652}
653
654inline
656{
657 return d_numIsGmt;
658}
659
660inline
662{
663 return d_numIsStd;
664}
665
666inline
668{
669 return d_numLeaps;
670}
671
672inline
674{
675 return d_numTransitions;
676}
677
678inline
680{
681 return d_numLocalTimeTypes;
682}
683
684inline
686{
687 return d_abbrevDataSize;
688}
689
690} // close package namespace
691
692// FREE OPERATORS
693inline
694bool baltzo::operator==(const ZoneinfoBinaryHeader& lhs,
695 const ZoneinfoBinaryHeader& rhs)
696{
697 return lhs.version() == rhs.version()
698 && lhs.numIsGmt() == rhs.numIsGmt()
699 && lhs.numIsStd() == rhs.numIsStd()
700 && lhs.numLeaps() == rhs.numLeaps()
701 && lhs.numTransitions() == rhs.numTransitions()
702 && lhs.numLocalTimeTypes() == rhs.numLocalTimeTypes()
703 && lhs.abbrevDataSize() == rhs.abbrevDataSize();
704}
705
706inline
707bool baltzo::operator!=(const ZoneinfoBinaryHeader& lhs,
708 const ZoneinfoBinaryHeader& rhs)
709{
710 return !(lhs == rhs);
711}
712
713/// Write a single line description of the specified `description` to the
714/// specified `stream` and a reference to the modifiable `stream`.
715inline
716bsl::ostream& baltzo::operator<<(bsl::ostream& stream,
717 const ZoneinfoBinaryHeader& object)
718{
719 return object.print(stream, 0, -1);
720}
721
722// FREE FUNCTIONS
723inline
724void baltzo::swap(ZoneinfoBinaryHeader& a, ZoneinfoBinaryHeader& b)
725{
726 a.swap(b);
727}
728
729
730
731#endif
732
733// ----------------------------------------------------------------------------
734// Copyright 2018 Bloomberg Finance L.P.
735//
736// Licensed under the Apache License, Version 2.0 (the "License");
737// you may not use this file except in compliance with the License.
738// You may obtain a copy of the License at
739//
740// http://www.apache.org/licenses/LICENSE-2.0
741//
742// Unless required by applicable law or agreed to in writing, software
743// distributed under the License is distributed on an "AS IS" BASIS,
744// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
745// See the License for the specific language governing permissions and
746// limitations under the License.
747// ----------------------------- END-OF-FILE ----------------------------------
748
749/** @} */
750/** @} */
751/** @} */
Definition baltzo_zoneinfobinaryheader.h:226
void setNumIsGmt(int value)
Definition baltzo_zoneinfobinaryheader.h:588
ZoneinfoBinaryHeader & operator=(const ZoneinfoBinaryHeader &rhs)
Definition baltzo_zoneinfobinaryheader.h:567
~ZoneinfoBinaryHeader()
Destroy this object.
Definition baltzo_zoneinfobinaryheader.h:554
static bool isValidNumLocalTimeTypes(int value)
Definition baltzo_zoneinfobinaryheader.h:491
static bool isValidVersion(char value)
Definition baltzo_zoneinfobinaryheader.h:461
static bool isValidNumIsStd(int value)
Definition baltzo_zoneinfobinaryheader.h:473
char version() const
Return the value of the version attribute of this object.
Definition baltzo_zoneinfobinaryheader.h:649
static bool isValidNumIsGmt(int value)
Definition baltzo_zoneinfobinaryheader.h:467
void setNumLeaps(int value)
Definition baltzo_zoneinfobinaryheader.h:604
void swap(ZoneinfoBinaryHeader &other)
Definition baltzo_zoneinfobinaryheader.h:636
int numLocalTimeTypes() const
Return the value of the numLocalTimeTypes attribute of this object.
Definition baltzo_zoneinfobinaryheader.h:679
static bool isValidNumLeaps(int value)
Definition baltzo_zoneinfobinaryheader.h:479
int numIsStd() const
Return the value of the numIsStd attribute of this object.
Definition baltzo_zoneinfobinaryheader.h:661
void setNumLocalTimeTypes(int value)
Definition baltzo_zoneinfobinaryheader.h:620
int numLeaps() const
Return the value of the numLeaps attribute of this object.
Definition baltzo_zoneinfobinaryheader.h:667
ZoneinfoBinaryHeader()
Definition baltzo_zoneinfobinaryheader.h:504
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
static bool isValidAbbrevDataSize(int value)
Definition baltzo_zoneinfobinaryheader.h:497
static bool isValidNumTransitions(int value)
Definition baltzo_zoneinfobinaryheader.h:485
void setAbbrevDataSize(int value)
Definition baltzo_zoneinfobinaryheader.h:628
void setVersion(char value)
Definition baltzo_zoneinfobinaryheader.h:580
int numIsGmt() const
Return the value of the numIsGmt attribute of this object.
Definition baltzo_zoneinfobinaryheader.h:655
void setNumTransitions(int value)
Definition baltzo_zoneinfobinaryheader.h:612
int numTransitions() const
Return the value of the numTransitions attribute of this object.
Definition baltzo_zoneinfobinaryheader.h:673
int abbrevDataSize() const
Return the value of the abbrevDataSize attribute of this object.
Definition baltzo_zoneinfobinaryheader.h:685
void setNumIsStd(int value)
Definition baltzo_zoneinfobinaryheader.h:596
#define BSLS_ASSERT(X)
Definition bsls_assert.h:1976
#define BSLS_IDENT(str)
BSLS_IDENT() - insert string into .comment binary segment (if supported)
Definition bsls_ident.h:238
Definition baltzo_datafileloader.h:259
bool operator==(const LocalDatetime &lhs, const LocalDatetime &rhs)
void swap(LocalDatetime &a, LocalDatetime &b)
bool operator!=(const LocalDatetime &lhs, const LocalDatetime &rhs)
bsl::ostream & operator<<(bsl::ostream &stream, DstPolicy::Enum value)
ALLOCATOR const STRING_VIEW_LIKE_TYPE & rhs
Definition bslstl_string.h:3918
ALLOCATOR & lhs
Definition bslstl_string.h:3917