]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/longlong.tex
Chnaged includes to work without precompiled headers
[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
9%% Licence: wxWindows licence
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
d7da9756
VZ
27(built-in) arithmetic type. Note that wxLongLong is a signed type.
28
29If a native (i.e. supported directly by the compiler) 64 bit integer type was
30found a typedef {\it wxLongLong\_t} will be defined to correspond it.
31
32\wxheading{Derived from}
33
34No 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
46Default constructor initializes the object to 0.
47
48\membersection{wxLongLong::wxLongLong}\label{wxlonglongwxlonglongll}
49
50\func{}{wxLongLong}{\param{wxLongLong\_t }{ll}}
51
52Constructor 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
58Constructor from 2 longs: the high and low part are combined into one
59wxLongLong.
60
61\membersection{wxLongLong::operator=}\label{wxlonglongoperatorassign}
62
63\func{wxLongLong\& operator}{operator=}{\param{wxLongLong\_t }{ll}}
64
65Assignment 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
73Returns an absolute value of wxLongLong - either making a copy (const version)
74or modifying it in place (the second one).
75
76\membersection{wxLongLong::Assign}\label{wxlonglongassign}
77
78\func{wxLongLong\&}{Assign}{\param{double }{d}}
79
80This allows to convert a double value to wxLongLong type. Such conversion is
81not always possible in which case the result will be silently truncated in a
82platform-dependent way.
83
84\membersection{wxLongLong::GetHi}\label{wxlonglonggethi}
85
86\constfunc{long}{GetHi}{\void}
87
88Returnes the high 32 bits of 64 bit integer.
89
90\membersection{wxLongLong::GetLo}\label{wxlonglonggetlo}
91
92\constfunc{unsigned long}{GetLo}{\void}
93
94Returnes the low 32 bits of 64 bit integer.
95
96\membersection{wxLongLong::GetValue}\label{wxlonglonggetvalue}
97
98\constfunc{wxLongLong\_t}{GetValue}{\void}
99
100Convert to native long long (only for compilers supporting it)
101
102\membersection{wxLongLong::ToLong}\label{wxlonglongtolong}
103
104\constfunc{long}{ToLong}{\void}
105
106Truncate wxLongLong to long. If the conversion loses data (i.e. the wxLongLong
107value is outside the range of built-in long type), an assert will be triggered
108in debug mode.
109
110\membersection{wxLongLong::operator$+$}\label{wxlonglongoperatorplus}
111
112\constfunc{wxLongLong}{operator$+$}{\param{const wxLongLong\& }{ll}}
113
114Adds 2 wxLongLongs together and returns the result.
115
116\membersection{wxLongLong::operator$+=$}\label{wxlonglongoperatorplusassign}
117
118\func{wxLongLong\&}{operator+}{\param{const wxLongLong\& }{ll}}
119
120Add another wxLongLong to this one.
121
122\membersection{wxLongLong::operator$++$}\label{wxlonglongoperatorinc}
123
124\func{wxLongLong\&}{operator$++$}{\void}
125
126\func{wxLongLong\&}{operator$++$}{\param{int}{}}
127
128Pre/post increment operator.
129
130\membersection{wxLongLong::operator$-$}\label{wxlonglongoperatorunaryminus}
131
132\constfunc{wxLongLong}{operator$-$}{\void}
133
134Returns the value of this wxLongLong with opposite sign.
135
136\membersection{wxLongLong::operator$-$}\label{wxlonglongoperatorminus}
137
138\constfunc{wxLongLong}{operator$-$}{\param{const wxLongLong\& }{ll}}
139
140Substracts 2 wxLongLongs and returns the result.
141
142\membersection{wxLongLong::operator$-=$}\label{wxlonglongoperatorminusassign}
143
144\func{wxLongLong\&}{operator-}{\param{const wxLongLong\& }{ll}}
145
146Substracts another wxLongLong from this one.
147
148\membersection{wxLongLong::operator$--$}\label{wxlonglongoperatordec}
149
150\func{wxLongLong\&}{operator$--$}{\void}
151
152\func{wxLongLong\&}{operator$--$}{\param{int}{}}
153
154Pre/post decrement operator.
22d6efa8 155
66f55ec6 156% TODO document all other arithmetics operations: shifts, multiplication,
d7da9756 157% division, bitwise, comparison
66f55ec6 158