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