w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

ztrans.cpp
Go to the documentation of this file.
1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3 /*
4 *******************************************************************************
5 * Copyright (C) 2009-2010, International Business Machines Corporation and *
6 * others. All Rights Reserved. *
7 *******************************************************************************
8 */
9 
10 /**
11  * \file
12  * \brief C API: Time zone transition classes
13  */
14 
15 #include "unicode/utypes.h"
16 
17 #if !UCONFIG_NO_FORMATTING
18 
19 #include "unicode/uobject.h"
20 #include "ztrans.h"
21 #include "unicode/tztrans.h"
22 #include "cmemory.h"
23 #include "unicode/ustring.h"
24 #include "unicode/parsepos.h"
25 
27 
29 ztrans_open(UDate time, const void* from, const void* to){
30  return (ZTrans*) new TimeZoneTransition(time,*(TimeZoneRule*)from,*(TimeZoneRule*)to);
31 }
32 
35  return (ZTrans*) new TimeZoneTransition();
36 }
37 
38 U_CAPI void U_EXPORT2
40  delete (TimeZoneTransition*)trans;
41 }
42 
45  return (ZTrans*) (((TimeZoneTransition*)trans)->TimeZoneTransition::clone());
46 }
47 
49 ztrans_equals(const ZTrans* trans1, const ZTrans* trans2){
50  return *(const TimeZoneTransition*)trans1 == *(const TimeZoneTransition*)trans2;
51 }
52 
55  return ((TimeZoneTransition*)trans)->TimeZoneTransition::getTime();
56 }
57 
58 U_CAPI void U_EXPORT2
60  return ((TimeZoneTransition*)trans)->TimeZoneTransition::setTime(time);
61 }
62 
63 U_CAPI void* U_EXPORT2
65  return (void*) (((TimeZoneTransition*)trans)->TimeZoneTransition::getFrom());
66 }
67 
68 U_CAPI void U_EXPORT2
69 ztrans_setFrom(ZTrans* trans, const void* from) {
70  return ((TimeZoneTransition*)trans)->TimeZoneTransition::setFrom(*(TimeZoneRule*)from);
71 }
72 
73 U_CAPI void U_EXPORT2
74 ztrans_adoptFrom(ZTrans* trans, void* from) {
75  return ((TimeZoneTransition*)trans)->TimeZoneTransition::adoptFrom((TimeZoneRule*)from);
76 }
77 
78 U_CAPI void* U_EXPORT2
80  return (void*) (((TimeZoneTransition*)trans)->TimeZoneTransition::getTo());
81 }
82 
83 U_CAPI void U_EXPORT2
84 ztrans_setTo(ZTrans* trans, const void* to) {
85  return ((TimeZoneTransition*)trans)->TimeZoneTransition::setTo(*(TimeZoneRule*)to);
86 }
87 
88 U_CAPI void U_EXPORT2
90  return ((TimeZoneTransition*)trans)->TimeZoneTransition::adoptTo((TimeZoneRule*)to);
91 }
92 
93 U_CAPI UClassID U_EXPORT2
95  return ((TimeZoneTransition*)trans)->TimeZoneTransition::getStaticClassID();
96 }
97 
98 U_CAPI UClassID U_EXPORT2
100  return ((TimeZoneTransition*)trans)->TimeZoneTransition::getDynamicClassID();
101 }
102 
103 #endif
#define U_EXPORT2
Definition: platform.h:844
real to[600]
Definition: pmxab.c:87
time_t time()
C API: Unicode string handling functions.
C++ API: Time zone transition.
int8_t UBool
Definition: umachine.h:269
#define U_CAPI
Definition: umachine.h:110
#define ztrans_close
Definition: urename.h:1907
#define ztrans_setTo
Definition: urename.h:1918
#define ztrans_setFrom
Definition: urename.h:1916
#define ztrans_getDynamicClassID
Definition: urename.h:1909
#define ztrans_getFrom
Definition: urename.h:1910
#define ztrans_getStaticClassID
Definition: urename.h:1911
#define ztrans_getTo
Definition: urename.h:1913
#define ztrans_adoptFrom
Definition: urename.h:1904
#define ztrans_setTime
Definition: urename.h:1917
#define ztrans_open
Definition: urename.h:1914
#define ztrans_clone
Definition: urename.h:1906
#define ztrans_openEmpty
Definition: urename.h:1915
#define ztrans_adoptTo
Definition: urename.h:1905
#define ztrans_getTime
Definition: urename.h:1912
#define ztrans_equals
Definition: urename.h:1908
Basic definitions for ICU, for both C and C++ APIs.
double UDate
Definition: utypes.h:203
static zic_t trans[50]
Definition: zic.c:412
C API: Time zone transition classes.
struct ZTrans ZTrans
Definition: ztrans.h:30