File: ztrans.cpp

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (103 lines) | stat: -rw-r--r-- 2,989 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
// © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/*
*******************************************************************************
* Copyright (C) 2009-2010, International Business Machines Corporation and         *
* others. All Rights Reserved.                                                *
*******************************************************************************
*/

/**
 * \file 
 * \brief C API: Time zone transition classes
 */

#include <_foundation_unicode/utypes.h>

#if !UCONFIG_NO_FORMATTING

#include <_foundation_unicode/uobject.h>
#include "ztrans.h"
#include <_foundation_unicode/tztrans.h>
#include "cmemory.h"
#include <_foundation_unicode/ustring.h>
#include <_foundation_unicode/parsepos.h>

U_NAMESPACE_USE

U_CAPI ZTrans* U_EXPORT2
ztrans_open(UDate time, const void* from, const void* to){
    return (ZTrans*) new TimeZoneTransition(time,*(TimeZoneRule*)from,*(TimeZoneRule*)to);
}

U_CAPI ZTrans* U_EXPORT2
ztrans_openEmpty() {
    return (ZTrans*) new TimeZoneTransition();
}

U_CAPI void U_EXPORT2
ztrans_close(ZTrans *trans) {
    delete (TimeZoneTransition*)trans;
}

U_CAPI ZTrans* U_EXPORT2
ztrans_clone(ZTrans *trans) {
    return (ZTrans*) (((TimeZoneTransition*)trans)->TimeZoneTransition::clone());
}

U_CAPI UBool U_EXPORT2
ztrans_equals(const ZTrans* trans1, const ZTrans* trans2){
    return *(const TimeZoneTransition*)trans1 == *(const TimeZoneTransition*)trans2;
}

U_CAPI UDate U_EXPORT2
ztrans_getTime(ZTrans* trans) {
    return ((TimeZoneTransition*)trans)->TimeZoneTransition::getTime();
}

U_CAPI void U_EXPORT2
ztrans_setTime(ZTrans* trans, UDate time) {
    return ((TimeZoneTransition*)trans)->TimeZoneTransition::setTime(time);
}

U_CAPI void* U_EXPORT2
ztrans_getFrom(ZTrans* & trans) {
    return (void*) (((TimeZoneTransition*)trans)->TimeZoneTransition::getFrom());
}

U_CAPI void U_EXPORT2
ztrans_setFrom(ZTrans* trans, const void* from) {
    return ((TimeZoneTransition*)trans)->TimeZoneTransition::setFrom(*(TimeZoneRule*)from);
}

U_CAPI void U_EXPORT2
ztrans_adoptFrom(ZTrans* trans, void* from) {
    return ((TimeZoneTransition*)trans)->TimeZoneTransition::adoptFrom((TimeZoneRule*)from);
}

U_CAPI void* U_EXPORT2
ztrans_getTo(ZTrans* trans){
    return (void*) (((TimeZoneTransition*)trans)->TimeZoneTransition::getTo());
}

U_CAPI void U_EXPORT2
ztrans_setTo(ZTrans* trans, const void* to) {
    return ((TimeZoneTransition*)trans)->TimeZoneTransition::setTo(*(TimeZoneRule*)to);
}

U_CAPI void U_EXPORT2
ztrans_adoptTo(ZTrans* trans, void* to) {
    return ((TimeZoneTransition*)trans)->TimeZoneTransition::adoptTo((TimeZoneRule*)to);
}

U_CAPI UClassID U_EXPORT2
ztrans_getStaticClassID(ZTrans* trans) {
    return ((TimeZoneTransition*)trans)->TimeZoneTransition::getStaticClassID();
}

U_CAPI UClassID U_EXPORT2
ztrans_getDynamicClassID(ZTrans* trans){
    return ((TimeZoneTransition*)trans)->TimeZoneTransition::getDynamicClassID();
}

#endif