]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/longlong.tex
wxTipWindow is now a wxPopupTransientWindow instead of a wxFrame.
[wxWidgets.git] / docs / latex / wx / longlong.tex
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 %% Name: longlong.tex
3 %% Purpose: wxLongLong documentation
4 %% Author: Vadim Zeitlin
5 %% Modified by:
6 %% Created: 07.03.00
7 %% RCS-ID: $Id$
8 %% Copyright: (c) Vadim Zeitlin
9 %% License: wxWindows license
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11
12 \section{\class{wxLongLong}}\label{wxlonglong}
13
14 This class represents a signed 64 bit long number. It is implemented using the
15 native 64 bit type where available (machines with 64 bit longs or compilers
16 which have (an analog of) {\it long long} type) and uses the emulation code in
17 the other cases which ensures that it is the most efficient solution for
18 working with 64 bit integers independently of the architecture.
19
20 wxLongLong defines all usual arithmetic operations such as addition,
21 substraction, bitwise shifts and logical operations as well as multiplication
22 and division (not yet for the machines without native {\it long long}). It
23 also has operators for implicit construction from and conversion to the native
24 {\it long long} type if it exists and {\it long}.
25
26 You would usually use this type in exactly the same manner as any other
27 (built-in) arithmetic type. Note that wxLongLong is a signed type.
28
29 If a native (i.e. supported directly by the compiler) 64 bit integer type was
30 found a typedef {\it wxLongLong\_t} will be defined to correspond it.
31
32 \wxheading{Derived from}
33
34 No base class
35
36 \wxheading{Include files}
37
38 <wx/longlong.h>
39
40 \latexignore{\rtfignore{\wxheading{Members}}}
41
42 \membersection{wxLongLong::wxLongLong}\label{wxlonglongwxlonglongdef}
43
44 \func{}{wxLongLong}{\void}
45
46 Default constructor initializes the object to 0.
47
48 \membersection{wxLongLong::wxLongLong}\label{wxlonglongwxlonglongll}
49
50 \func{}{wxLongLong}{\param{wxLongLong\_t }{ll}}
51
52 Constructor from native long long (only for compilers supporting it).
53
54 \membersection{wxLongLong::wxLongLong}\label{wxlonglongwxlonglong}
55
56 \func{}{wxLongLong}{\param{long }{hi}, \param{unsigned long }{lo}}
57
58 Constructor from 2 longs: the high and low part are combined into one
59 wxLongLong.
60
61 \membersection{wxLongLong::operator=}\label{wxlonglongoperatorassign}
62
63 \func{wxLongLong\& operator}{operator=}{\param{wxLongLong\_t }{ll}}
64
65 Assignment operator from native long long (only for compilers supporting it).
66
67 \membersection{wxLongLong::Abs}\label{wxlonglongabs}
68
69 \constfunc{wxLongLong}{Abs}{\void}
70
71 \func{wxLongLong\&}{Abs}{\void}
72
73 Returns an absolute value of wxLongLong - either making a copy (const version)
74 or modifying it in place (the second one).
75
76 \membersection{wxLongLong::Assign}\label{wxlonglongassign}
77
78 \func{wxLongLong\&}{Assign}{\param{double }{d}}
79
80 This allows to convert a double value to wxLongLong type. Such conversion is
81 not always possible in which case the result will be silently truncated in a
82 platform-dependent way.
83
84 \membersection{wxLongLong::GetHi}\label{wxlonglonggethi}
85
86 \constfunc{long}{GetHi}{\void}
87
88 Returnes the high 32 bits of 64 bit integer.
89
90 \membersection{wxLongLong::GetLo}\label{wxlonglonggetlo}
91
92 \constfunc{unsigned long}{GetLo}{\void}
93
94 Returnes the low 32 bits of 64 bit integer.
95
96 \membersection{wxLongLong::GetValue}\label{wxlonglonggetvalue}
97
98 \constfunc{wxLongLong\_t}{GetValue}{\void}
99
100 Convert to native long long (only for compilers supporting it)
101
102 \membersection{wxLongLong::ToLong}\label{wxlonglongtolong}
103
104 \constfunc{long}{ToLong}{\void}
105
106 Truncate wxLongLong to long. If the conversion loses data (i.e. the wxLongLong
107 value is outside the range of built-in long type), an assert will be triggered
108 in debug mode.
109
110 \membersection{wxLongLong::ToString}\label{wxlonglongtostring}
111
112 \constfunc{wxString}{ToString}{\void}
113
114 Returns the string representation of a wxLongLong.
115
116 \membersection{wxLongLong::operator$+$}\label{wxlonglongoperatorplus}
117
118 \constfunc{wxLongLong}{operator$+$}{\param{const wxLongLong\& }{ll}}
119
120 Adds 2 wxLongLongs together and returns the result.
121
122 \membersection{wxLongLong::operator$+=$}\label{wxlonglongoperatorplusassign}
123
124 \func{wxLongLong\&}{operator+}{\param{const wxLongLong\& }{ll}}
125
126 Add another wxLongLong to this one.
127
128 \membersection{wxLongLong::operator$++$}\label{wxlonglongoperatorinc}
129
130 \func{wxLongLong\&}{operator$++$}{\void}
131
132 \func{wxLongLong\&}{operator$++$}{\param{int}{}}
133
134 Pre/post increment operator.
135
136 \membersection{wxLongLong::operator$-$}\label{wxlonglongoperatorunaryminus}
137
138 \constfunc{wxLongLong}{operator$-$}{\void}
139
140 Returns the value of this wxLongLong with opposite sign.
141
142 \membersection{wxLongLong::operator$-$}\label{wxlonglongoperatorminus}
143
144 \constfunc{wxLongLong}{operator$-$}{\param{const wxLongLong\& }{ll}}
145
146 Substracts 2 wxLongLongs and returns the result.
147
148 \membersection{wxLongLong::operator$-=$}\label{wxlonglongoperatorminusassign}
149
150 \func{wxLongLong\&}{operator-}{\param{const wxLongLong\& }{ll}}
151
152 Substracts another wxLongLong from this one.
153
154 \membersection{wxLongLong::operator$--$}\label{wxlonglongoperatordec}
155
156 \func{wxLongLong\&}{operator$--$}{\void}
157
158 \func{wxLongLong\&}{operator$--$}{\param{int}{}}
159
160 Pre/post decrement operator.
161
162 % TODO document all other arithmetics operations: shifts, multiplication,
163 % division, bitwise, comparison
164