BDE 4.14.0 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' || == '3'
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 2013, either '\0', `2`,
61/// or `3`.
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/// Note that the class invariants are identically the constraints on the
214/// individual attributes.
215///
216/// This class:
217/// * supports a complete set of *value* *semantic* operations
218/// - except for `bdex` serialization
219/// * is *exception-neutral*
220/// * is *alias-safe*
221/// * is `const` *thread-safe*
222/// For terminology see @ref bsldoc_glossary .
223///
224/// See @ref baltzo_zoneinfobinaryheader
226
227 // DATA
228 char d_version; // file format version of the Zoneinfo, as of
229 // 2013, it can be either '\0', '2', or '3'.
230
231 int d_numIsGmt; // number of encoded UTC/local indicators in the
232 // file, indicating whether a transition time
233 // was originally specified as UTC in the rule
234 // file.
235
236 int d_numIsStd; // number of encoded standard/wall indicators in
237 // the file, indicating whether a transition
238 // time was originally specified as standard the
239 // in the rule file.
240
241 int d_numLeaps; // number of leap corrections stored in the file
242
243 int d_numTransitions; // number of local-time type transitions stored
244 // in the file
245
246 int d_numLocalTimeTypes; // number of local-time types stored in the file
247
248 int d_abbrevDataSize; // length of the sequence of characters
249 // containing the ('\0' separated) abbreviation
250 // strings in the file
251
252 public:
253 // CLASS METHODS
254
255 /// Return `true` if the specified value equals '\0' or `2`, and `false`
256 /// otherwise.
257 static bool isValidVersion(char value);
258
259 /// Return `true` if the specified `value` is greater than or equal to
260 /// 0, and `false` otherwise'.
261 static bool isValidNumIsGmt(int value);
262
263 /// Return `true` if the specified `value` is greater than or equal to
264 /// 0, and `false` otherwise'.
265 static bool isValidNumIsStd(int value);
266
267 /// Return `true` if the specified value equals 0, and `false`
268 /// otherwise'.
269 static bool isValidNumLeaps(int value);
270
271 /// Return `true` if the specified `value` is greater than or equal to
272 /// 0, and `false` otherwise'.
273 static bool isValidNumTransitions(int value);
274
275 /// Return `true` if the specified `value` is greater than or equal to
276 /// 1, and `false` otherwise'.
277 static bool isValidNumLocalTimeTypes(int value);
278
279 /// Return `true` if the specified `value` is greater than or equal to
280 /// 1, and `false` otherwise'.
281 static bool isValidAbbrevDataSize(int value);
282
283 // CREATORS
284
285 /// Create a `ZoneinfoBinaryHeader` object having the (default)
286 /// attribute values:
287 /// @code
288 /// version() == 0
289 /// numIsGmt() == 0
290 /// numIsStd() == 0
291 /// numLeaps() == 0
292 /// numTransitions() == 0
293 /// numLocalTimeTypes() == 1
294 /// abbrevDataSize() == 1
295 /// @endcode
297
298 /// Create a `ZoneInfoBinaryHeader` object with the same value as the
299 /// specified `original`.
301
302 /// Create a `ZoneinfoBinaryHeader` having the specified `version`,
303 /// `numIsGmt`, `numIsStd`, `numLeaps`, `numTransitions`,
304 /// `numLocalTimeTypes`, and `abbrevDataSize` values. The behavior is
305 /// undefined unless `0 == version || 50 == version || 51 == version`,
306 /// `0 <= numIsGmt`, `0 <= numIsStd`, `0 == numLeaps`,
307 /// `0 <= numTransitions`, `1 <= numLocalTimeTypes`, and
308 /// `1 <= abbrevDataSize`. Note that 50 is the value of ASCII
309 /// character `2` and 51 is the value of ASCII character `3`.
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 /// The behavior is undefined unless '0 == value || 50 == value ||
329 /// 51 == value'. Note that 50 is the value of ASCII character `2` and
330 /// 51 is the value of ASCII character `3`.
331 void setVersion(char value);
332
333 /// Set the `numIsGmt` attribute of this object to the specified
334 /// `value`. The behavior is undefined unless `0 <= value`.
335 void setNumIsGmt(int value);
336
337 /// Set the `numIsStd` attribute of this object to the specified
338 /// `value`. The behavior is undefined unless `0 <= value`.
339 void setNumIsStd(int value);
340
341 /// Set the `numLeaps` attribute of this object to the specified
342 /// `value`. The behavior is undefined unless `0 == value`.
343 void setNumLeaps(int value);
344
345 /// Set the `numTransitions` attribute of this object to the specified
346 /// `value`. The behavior is undefined unless `0 <= value`.
347 void setNumTransitions(int value);
348
349 /// Set the `numLocalTimeTypes` attribute of this object to the
350 /// specified `value`. The behavior is undefined unless `1 <= value`.
351 void setNumLocalTimeTypes(int value);
352
353 /// Set the `abbrevDataSize` attribute of this object to the specified
354 /// `value`. The behavior is undefined unless `1 <= value`.
355 void setAbbrevDataSize(int value);
356
357 /// Efficiently exchange the value of this object with the value of the
358 /// specified `other` object. This method provides the no-throw
359 /// exception-safety guarantee.
360 void swap(ZoneinfoBinaryHeader& other);
361
362 // ACCESSORS
363
364 /// Return the value of the `version` attribute of this object.
365 char version() const;
366
367 /// Return the value of the `numIsGmt` attribute of this object.
368 int numIsGmt() const;
369
370 /// Return the value of the `numIsStd` attribute of this object.
371 int numIsStd() const;
372
373 /// Return the value of the `numLeaps` attribute of this object.
374 int numLeaps() const;
375
376 /// Return the value of the `numTransitions` attribute of this object.
377 int numTransitions() const;
378
379 /// Return the value of the `numLocalTimeTypes` attribute of this
380 /// object.
381 int numLocalTimeTypes() const;
382
383 /// Return the value of the `abbrevDataSize` attribute of this object.
384 int abbrevDataSize() const;
385
386 // Aspects
387
388 /// Write the value of this object to the specified output `stream` in a
389 /// human-readable format, and return a reference to `stream`.
390 /// Optionally specify an initial indentation `level`, whose absolute
391 /// value is incremented recursively for nested objects. If `level` is
392 /// specified, optionally specify `spacesPerLevel`, whose absolute value
393 /// indicates the number of spaces per indentation level for this and
394 /// all of its nested objects. If `level` is negative, suppress
395 /// indentation of the first line. If `spacesPerLevel` is negative,
396 /// format the entire output on one line, suppressing all but the
397 /// initial indentation (as governed by `level`). If `stream` is not
398 /// valid on entry, this operation has no effect. Note that the format
399 /// is not fully specified, and can change without notice.
400 bsl::ostream& print(bsl::ostream& stream,
401 int level = 0,
402 int spacesPerLevel = 4) const;
403};
404
405// FREE OPERATORS
406
407/// Return `true` if the specified `lhs` and `rhs` objects have the same
408/// value, and `false` otherwise. Two `ZoneinfoBinaryHeader` objects have
409/// the same value if the corresponding values of their `version`,
410/// `numIsGmt`, `numIsStd`, `numLeaps`, `numTransitions`,
411/// `numLocalTimeTypes`, and `abbrevDataSize` attributes are the same.
412bool operator==(const ZoneinfoBinaryHeader& lhs,
413 const ZoneinfoBinaryHeader& rhs);
414
415/// Return `true` if the specified `lhs` and `rhs` objects have the same
416/// value, and `false` otherwise. Two `ZoneinfoBinaryHeader` objects do not
417/// have the same value if the corresponding values of their `version`,
418/// `numIsGmt`, `numIsStd`, `numLeaps`, `numTransitions`,
419/// `numLocalTimeTypes`, or `abbrevDataSize` attributes are not the same.
420bool operator!=(const ZoneinfoBinaryHeader& lhs,
421 const ZoneinfoBinaryHeader& rhs);
422
423/// Write the value of the specified `object` to the specified output
424/// `stream` in a single-line format, and return a reference to `stream`.
425/// If `stream` is not valid on entry, this operation has no effect. Note
426/// that this human-readable format is not fully specified and can change
427/// without notice. Also note that this method has the same behavior as
428/// `object.print(stream, 0, -1)`.
429bsl::ostream& operator<<(bsl::ostream& stream,
430 const ZoneinfoBinaryHeader& object);
431
432// FREE FUNCTIONS
433
434/// Efficiently exchange the values of the specified `a` and `b` objects.
435/// This function provides the no-throw exception-safety guarantee.
437
438// ============================================================================
439// INLINE DEFINITIONS
440// ============================================================================
441
442 // --------------------------
443 // class ZoneinfoBinaryHeader
444 // --------------------------
445
446// CLASS METHODS
447inline
449{
450 return '\0' == value || '2' == value || '3' == value;
451}
452
453inline
455{
456 return value >= 0;
457}
458
459inline
461{
462 return value >= 0;
463}
464
465inline
467{
468 return value == 0;
469}
470
471inline
473{
474 return value >= 0;
475}
476
477inline
479{
480 return value >= 1;
481}
482
483inline
485{
486 return value >= 1;
487}
488
489// CREATORS
490inline
492: d_version(0)
493, d_numIsGmt(0)
494, d_numIsStd(0)
495, d_numLeaps(0)
496, d_numTransitions(0)
497, d_numLocalTimeTypes(1)
498, d_abbrevDataSize(1)
499{
500}
501
502inline
504 const ZoneinfoBinaryHeader& original)
505: d_version(original.d_version)
506, d_numIsGmt(original.d_numIsGmt)
507, d_numIsStd(original.d_numIsStd)
508, d_numLeaps(original.d_numLeaps)
509, d_numTransitions(original.d_numTransitions)
510, d_numLocalTimeTypes(original.d_numLocalTimeTypes)
511, d_abbrevDataSize(original.d_abbrevDataSize)
512{
513}
514
515inline
517 int numIsGmt,
518 int numIsStd,
519 int numLeaps,
520 int numTransitions,
521 int numLocalTimeTypes,
522 int abbrevDataSize)
523: d_version(version)
524, d_numIsGmt(numIsGmt)
525, d_numIsStd(numIsStd)
526, d_numLeaps(numLeaps)
527, d_numTransitions(numTransitions)
528, d_numLocalTimeTypes(numLocalTimeTypes)
529, d_abbrevDataSize(abbrevDataSize)
530{
538}
539
540inline
542{
543 BSLS_ASSERT(isValidVersion(d_version));
544 BSLS_ASSERT(isValidNumIsGmt(d_numIsGmt));
545 BSLS_ASSERT(isValidNumIsStd(d_numIsStd));
546 BSLS_ASSERT(isValidNumLeaps(d_numLeaps));
547 BSLS_ASSERT(isValidNumTransitions(d_numTransitions));
548 BSLS_ASSERT(isValidNumLocalTimeTypes(d_numLocalTimeTypes));
549 BSLS_ASSERT(isValidAbbrevDataSize(d_abbrevDataSize));
550}
551
552// MANIPULATORS
553inline
555 const ZoneinfoBinaryHeader& rhs)
556{
557 d_version = rhs.d_version;
558 d_numIsGmt = rhs.d_numIsGmt;
559 d_numIsStd = rhs.d_numIsStd;
560 d_numLeaps = rhs.d_numLeaps;
561 d_numTransitions = rhs.d_numTransitions;
562 d_numLocalTimeTypes = rhs.d_numLocalTimeTypes;
563 d_abbrevDataSize = rhs.d_abbrevDataSize;
564 return *this;
565}
566inline
568{
570
571 d_version = value;
572}
573
574inline
576{
578
579 d_numIsGmt = value;
580}
581
582inline
584{
586
587 d_numIsStd = value;
588}
589
590inline
592{
594
595 d_numLeaps = value;
596}
597
598inline
600{
602
603 d_numTransitions = value;
604}
605
606inline
608{
610
611 d_numLocalTimeTypes = value;
612}
613
614inline
616{
618
619 d_abbrevDataSize = value;
620}
621
622inline
624{
625 bsl::swap(d_version, other.d_version);
626 bsl::swap(d_numIsGmt, other.d_numIsGmt);
627 bsl::swap(d_numIsStd, other.d_numIsStd);
628 bsl::swap(d_numLeaps, other.d_numLeaps);
629 bsl::swap(d_numTransitions, other.d_numTransitions);
630 bsl::swap(d_numLocalTimeTypes, other.d_numLocalTimeTypes);
631 bsl::swap(d_abbrevDataSize, other.d_abbrevDataSize);
632}
633
634// ACCESSORS
635inline
637{
638 return d_version;
639}
640
641inline
643{
644 return d_numIsGmt;
645}
646
647inline
649{
650 return d_numIsStd;
651}
652
653inline
655{
656 return d_numLeaps;
657}
658
659inline
661{
662 return d_numTransitions;
663}
664
665inline
667{
668 return d_numLocalTimeTypes;
669}
670
671inline
673{
674 return d_abbrevDataSize;
675}
676
677} // close package namespace
678
679// FREE OPERATORS
680inline
681bool baltzo::operator==(const ZoneinfoBinaryHeader& lhs,
682 const ZoneinfoBinaryHeader& rhs)
683{
684 return lhs.version() == rhs.version()
685 && lhs.numIsGmt() == rhs.numIsGmt()
686 && lhs.numIsStd() == rhs.numIsStd()
687 && lhs.numLeaps() == rhs.numLeaps()
688 && lhs.numTransitions() == rhs.numTransitions()
689 && lhs.numLocalTimeTypes() == rhs.numLocalTimeTypes()
690 && lhs.abbrevDataSize() == rhs.abbrevDataSize();
691}
692
693inline
694bool baltzo::operator!=(const ZoneinfoBinaryHeader& lhs,
695 const ZoneinfoBinaryHeader& rhs)
696{
697 return !(lhs == rhs);
698}
699
700/// Write a single line description of the specified `description` to the
701/// specified `stream` and a reference to the modifiable `stream`.
702inline
703bsl::ostream& baltzo::operator<<(bsl::ostream& stream,
704 const ZoneinfoBinaryHeader& object)
705{
706 return object.print(stream, 0, -1);
707}
708
709// FREE FUNCTIONS
710inline
711void baltzo::swap(ZoneinfoBinaryHeader& a, ZoneinfoBinaryHeader& b)
712{
713 a.swap(b);
714}
715
716
717
718#endif
719
720// ----------------------------------------------------------------------------
721// Copyright 2018 Bloomberg Finance L.P.
722//
723// Licensed under the Apache License, Version 2.0 (the "License");
724// you may not use this file except in compliance with the License.
725// You may obtain a copy of the License at
726//
727// http://www.apache.org/licenses/LICENSE-2.0
728//
729// Unless required by applicable law or agreed to in writing, software
730// distributed under the License is distributed on an "AS IS" BASIS,
731// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
732// See the License for the specific language governing permissions and
733// limitations under the License.
734// ----------------------------- END-OF-FILE ----------------------------------
735
736/** @} */
737/** @} */
738/** @} */
Definition baltzo_zoneinfobinaryheader.h:225
void setNumIsGmt(int value)
Definition baltzo_zoneinfobinaryheader.h:575
ZoneinfoBinaryHeader & operator=(const ZoneinfoBinaryHeader &rhs)
Definition baltzo_zoneinfobinaryheader.h:554
~ZoneinfoBinaryHeader()
Destroy this object.
Definition baltzo_zoneinfobinaryheader.h:541
static bool isValidNumLocalTimeTypes(int value)
Definition baltzo_zoneinfobinaryheader.h:478
static bool isValidVersion(char value)
Definition baltzo_zoneinfobinaryheader.h:448
static bool isValidNumIsStd(int value)
Definition baltzo_zoneinfobinaryheader.h:460
char version() const
Return the value of the version attribute of this object.
Definition baltzo_zoneinfobinaryheader.h:636
static bool isValidNumIsGmt(int value)
Definition baltzo_zoneinfobinaryheader.h:454
void setNumLeaps(int value)
Definition baltzo_zoneinfobinaryheader.h:591
void swap(ZoneinfoBinaryHeader &other)
Definition baltzo_zoneinfobinaryheader.h:623
int numLocalTimeTypes() const
Definition baltzo_zoneinfobinaryheader.h:666
static bool isValidNumLeaps(int value)
Definition baltzo_zoneinfobinaryheader.h:466
int numIsStd() const
Return the value of the numIsStd attribute of this object.
Definition baltzo_zoneinfobinaryheader.h:648
void setNumLocalTimeTypes(int value)
Definition baltzo_zoneinfobinaryheader.h:607
int numLeaps() const
Return the value of the numLeaps attribute of this object.
Definition baltzo_zoneinfobinaryheader.h:654
ZoneinfoBinaryHeader()
Definition baltzo_zoneinfobinaryheader.h:491
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
static bool isValidAbbrevDataSize(int value)
Definition baltzo_zoneinfobinaryheader.h:484
static bool isValidNumTransitions(int value)
Definition baltzo_zoneinfobinaryheader.h:472
void setAbbrevDataSize(int value)
Definition baltzo_zoneinfobinaryheader.h:615
void setVersion(char value)
Definition baltzo_zoneinfobinaryheader.h:567
int numIsGmt() const
Return the value of the numIsGmt attribute of this object.
Definition baltzo_zoneinfobinaryheader.h:642
void setNumTransitions(int value)
Definition baltzo_zoneinfobinaryheader.h:599
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
void setNumIsStd(int value)
Definition baltzo_zoneinfobinaryheader.h:583
#define BSLS_ASSERT(X)
Definition bsls_assert.h:1804
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition baltzo_datafileloader.h:263
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)