]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/longlong.tex
Fixed some label errors
[wxWidgets.git] / docs / latex / wx / longlong.tex
CommitLineData
d7da9756
VZ
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
f6bcfd97 9%% License: wxWindows license
d7da9756
VZ
10%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11
8b81872f
VZ
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,
21substraction, 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
8e38fd1f
RL
27(built-in) arithmetic type. Note that wxLongLong is a signed type, if you
28want unsigned values use wxULongLong.
d7da9756
VZ
29
30If a native (i.e. supported directly by the compiler) 64 bit integer type was
31found a typedef {\it wxLongLong\_t} will be defined to correspond it.
32
33\wxheading{Derived from}
34
35No base class
36
37\wxheading{Include files}
38
39<wx/longlong.h>
40
41\latexignore{\rtfignore{\wxheading{Members}}}
42
43\membersection{wxLongLong::wxLongLong}\label{wxlonglongwxlonglongdef}
44
45\func{}{wxLongLong}{\void}
46
47Default constructor initializes the object to 0.
48
49\membersection{wxLongLong::wxLongLong}\label{wxlonglongwxlonglongll}
50
51\func{}{wxLongLong}{\param{wxLongLong\_t }{ll}}
52
53Constructor from native long long (only for compilers supporting it).
54
55\membersection{wxLongLong::wxLongLong}\label{wxlonglongwxlonglong}
56
57\func{}{wxLongLong}{\param{long }{hi}, \param{unsigned long }{lo}}
58
59Constructor from 2 longs: the high and low part are combined into one
60wxLongLong.
61
62\membersection{wxLongLong::operator=}\label{wxlonglongoperatorassign}
63
64\func{wxLongLong\& operator}{operator=}{\param{wxLongLong\_t }{ll}}
65
66Assignment operator from native long long (only for compilers supporting it).
67
68\membersection{wxLongLong::Abs}\label{wxlonglongabs}
69
70\constfunc{wxLongLong}{Abs}{\void}
71
72\func{wxLongLong\&}{Abs}{\void}
73
74Returns an absolute value of wxLongLong - either making a copy (const version)
8e38fd1f 75or modifying it in place (the second one). Not in wxULongLong.
d7da9756
VZ
76
77\membersection{wxLongLong::Assign}\label{wxlonglongassign}
78
79\func{wxLongLong\&}{Assign}{\param{double }{d}}
80
81This allows to convert a double value to wxLongLong type. Such conversion is
82not always possible in which case the result will be silently truncated in a
8e38fd1f 83platform-dependent way. Not in wxULongLong.
d7da9756
VZ
84
85\membersection{wxLongLong::GetHi}\label{wxlonglonggethi}
86
87\constfunc{long}{GetHi}{\void}
88
89Returnes the high 32 bits of 64 bit integer.
90
91\membersection{wxLongLong::GetLo}\label{wxlonglonggetlo}
92
93\constfunc{unsigned long}{GetLo}{\void}
94
95Returnes the low 32 bits of 64 bit integer.
96
97\membersection{wxLongLong::GetValue}\label{wxlonglonggetvalue}
98
99\constfunc{wxLongLong\_t}{GetValue}{\void}
100
101Convert to native long long (only for compilers supporting it)
102
103\membersection{wxLongLong::ToLong}\label{wxlonglongtolong}
104
105\constfunc{long}{ToLong}{\void}
106
107Truncate wxLongLong to long. If the conversion loses data (i.e. the wxLongLong
108value is outside the range of built-in long type), an assert will be triggered
109in debug mode.
110
3a994742
VZ
111\membersection{wxLongLong::ToString}\label{wxlonglongtostring}
112
113\constfunc{wxString}{ToString}{\void}
114
115Returns the string representation of a wxLongLong.
116
d7da9756
VZ
117\membersection{wxLongLong::operator$+$}\label{wxlonglongoperatorplus}
118
119\constfunc{wxLongLong}{operator$+$}{\param{const wxLongLong\& }{ll}}
120
121Adds 2 wxLongLongs together and returns the result.
122
123\membersection{wxLongLong::operator$+=$}\label{wxlonglongoperatorplusassign}
124
125\func{wxLongLong\&}{operator+}{\param{const wxLongLong\& }{ll}}
126
127Add another wxLongLong to this one.
128
129\membersection{wxLongLong::operator$++$}\label{wxlonglongoperatorinc}
130
131\func{wxLongLong\&}{operator$++$}{\void}
132
133\func{wxLongLong\&}{operator$++$}{\param{int}{}}
134
135Pre/post increment operator.
136
137\membersection{wxLongLong::operator$-$}\label{wxlonglongoperatorunaryminus}
138
139\constfunc{wxLongLong}{operator$-$}{\void}
140
8e38fd1f 141Returns the value of this wxLongLong with opposite sign. Not in wxULongLong.
d7da9756
VZ
142
143\membersection{wxLongLong::operator$-$}\label{wxlonglongoperatorminus}
144
145\constfunc{wxLongLong}{operator$-$}{\param{const wxLongLong\& }{ll}}
146
147Substracts 2 wxLongLongs and returns the result.
148
149\membersection{wxLongLong::operator$-=$}\label{wxlonglongoperatorminusassign}
150
151\func{wxLongLong\&}{operator-}{\param{const wxLongLong\& }{ll}}
152
153Substracts another wxLongLong from this one.
154
155\membersection{wxLongLong::operator$--$}\label{wxlonglongoperatordec}
156
157\func{wxLongLong\&}{operator$--$}{\void}
158
159\func{wxLongLong\&}{operator$--$}{\param{int}{}}
160
161Pre/post decrement operator.
22d6efa8 162
66f55ec6 163% TODO document all other arithmetics operations: shifts, multiplication,
d7da9756 164% division, bitwise, comparison
66f55ec6 165