]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/longlong.tex
fixed status bar positioning to work both with and without sizers (patch 1199639...
[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 subtraction, 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, if you
28 want unsigned values use wxULongLong which has exactly the same API as
29 wxLongLong except when explicitly mentioned otherwise.
30
31 If a native (i.e. supported directly by the compiler) 64 bit integer type was
32 found to exist, {\it wxLongLong\_t} macro will be defined to correspond to it.
33 Also, in this case only, two additional macros will be defined:
34 \helpref{wxLongLongFmtSpec}{wxlonglongfmtspec} for printing 64 bit integers
35 using the standard {\tt printf()} function (but see also
36 \helpref{ToString()}{wxlonglongtostring} for a more portable solution) and
37 \helpref{wxLL}{wxll} for defining 64 bit integer compile-time constants.
38
39 \wxheading{Derived from}
40
41 No base class
42
43 \wxheading{Include files}
44
45 <wx/longlong.h>
46
47 \latexignore{\rtfignore{\wxheading{Members}}}
48
49
50 \membersection{wxLongLong::wxLongLong}\label{wxlonglongwxlonglongdef}
51
52 \func{}{wxLongLong}{\void}
53
54 Default constructor initializes the object to 0.
55
56
57 \membersection{wxLongLong::wxLongLong}\label{wxlonglongwxlonglongll}
58
59 \func{}{wxLongLong}{\param{wxLongLong\_t }{ll}}
60
61 Constructor from native long long (only for compilers supporting it).
62
63
64 \membersection{wxLongLong::wxLongLong}\label{wxlonglongwxlonglong}
65
66 \func{}{wxLongLong}{\param{long }{hi}, \param{unsigned long }{lo}}
67
68 Constructor from 2 longs: the high and low part are combined into one
69 wxLongLong.
70
71
72 \membersection{wxLongLong::operator=}\label{wxlonglongoperatorassign}
73
74 \func{wxLongLong\& operator}{operator=}{\param{wxLongLong\_t }{ll}}
75
76 Assignment operator from native long long (only for compilers supporting it).
77
78
79 \membersection{wxLongLong::Abs}\label{wxlonglongabs}
80
81 \constfunc{wxLongLong}{Abs}{\void}
82
83 \func{wxLongLong\&}{Abs}{\void}
84
85 Returns an absolute value of wxLongLong - either making a copy (const version)
86 or modifying it in place (the second one). Not in wxULongLong.
87
88
89 \membersection{wxLongLong::Assign}\label{wxlonglongassign}
90
91 \func{wxLongLong\&}{Assign}{\param{double }{d}}
92
93 This allows to convert a double value to wxLongLong type. Such conversion is
94 not always possible in which case the result will be silently truncated in a
95 platform-dependent way. Not in wxULongLong.
96
97
98 \membersection{wxLongLong::GetHi}\label{wxlonglonggethi}
99
100 \constfunc{long}{GetHi}{\void}
101
102 Returns the high 32 bits of 64 bit integer.
103
104
105 \membersection{wxLongLong::GetLo}\label{wxlonglonggetlo}
106
107 \constfunc{unsigned long}{GetLo}{\void}
108
109 Returns the low 32 bits of 64 bit integer.
110
111
112 \membersection{wxLongLong::GetValue}\label{wxlonglonggetvalue}
113
114 \constfunc{wxLongLong\_t}{GetValue}{\void}
115
116 Convert to native long long (only for compilers supporting it)
117
118
119 \membersection{wxLongLong::ToDouble}\label{wxlonglonggetdouble}
120
121 \constfunc{double}{ToDouble}{\void}
122
123 Returns the value as \texttt{double}.
124
125
126 \membersection{wxLongLong::ToLong}\label{wxlonglongtolong}
127
128 \constfunc{long}{ToLong}{\void}
129
130 Truncate wxLongLong to long. If the conversion loses data (i.e. the wxLongLong
131 value is outside the range of built-in long type), an assert will be triggered
132 in debug mode.
133
134
135 \membersection{wxLongLong::ToString}\label{wxlonglongtostring}
136
137 \constfunc{wxString}{ToString}{\void}
138
139 Returns the string representation of a wxLongLong.
140
141
142 \membersection{wxLongLong::operator$+$}\label{wxlonglongoperatorplus}
143
144 \constfunc{wxLongLong}{operator$+$}{\param{const wxLongLong\& }{ll}}
145
146 Adds 2 wxLongLongs together and returns the result.
147
148
149 \membersection{wxLongLong::operator$+=$}\label{wxlonglongoperatorplusassign}
150
151 \func{wxLongLong\&}{operator+}{\param{const wxLongLong\& }{ll}}
152
153 Add another wxLongLong to this one.
154
155
156 \membersection{wxLongLong::operator$++$}\label{wxlonglongoperatorinc}
157
158 \func{wxLongLong\&}{operator$++$}{\void}
159
160 \func{wxLongLong\&}{operator$++$}{\param{int}{}}
161
162 Pre/post increment operator.
163
164
165 \membersection{wxLongLong::operator$-$}\label{wxlonglongoperatorunaryminus}
166
167 \constfunc{wxLongLong}{operator$-$}{\void}
168
169 Returns the value of this wxLongLong with opposite sign. Not in wxULongLong.
170
171
172 \membersection{wxLongLong::operator$-$}\label{wxlonglongoperatorminus}
173
174 \constfunc{wxLongLong}{operator$-$}{\param{const wxLongLong\& }{ll}}
175
176 Subtracts 2 wxLongLongs and returns the result.
177
178
179 \membersection{wxLongLong::operator$-=$}\label{wxlonglongoperatorminusassign}
180
181 \func{wxLongLong\&}{operator-}{\param{const wxLongLong\& }{ll}}
182
183 Subtracts another wxLongLong from this one.
184
185
186 \membersection{wxLongLong::operator$--$}\label{wxlonglongoperatordec}
187
188 \func{wxLongLong\&}{operator$--$}{\void}
189
190 \func{wxLongLong\&}{operator$--$}{\param{int}{}}
191
192 Pre/post decrement operator.
193
194 % TODO document all other arithmetics operations: shifts, multiplication,
195 % division, bitwise, comparison
196