uLib
User mode C/C++ extended API library for Win32 programmers.
LargeInt.h
Go to the documentation of this file.
1
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2
// Project: uLib - User mode library.
3
// Module: Class wrap for LARGE_INTEGER.
4
// Author: Copyright (c) Love Nystrom
5
// License: NNOSL (BSD descendant, see NNOSL.txt in the base directory).
6
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7
8
#ifdef __cplusplus
9
#ifndef __uLib_LargeInt_h_incl__
10
#define __uLib_LargeInt_h_incl__
11
12
#include <
uLib/Common.h
>
13
14
BEGIN_NAMESPACE
(
uLib
)
15
16
25
26
class
LargeInt
{
27
protected
:
29
LARGE_INTEGER _val;
// Has, rather than is, since unions can't be inherited.
31
public
:
32
LargeInt
(
const
INT64
Val = 0 );
33
LargeInt
(
const
DWORD
Lo,
const
LONG Hi );
34
LargeInt
(
const
LARGE_INTEGER& Val );
35
LargeInt
(
const
FILETIME& Val );
36
LargeInt
(
const
LUID& Val );
37
LargeInt
(
const
LargeInt
& Val );
38
39
LargeInt
& Set(
DWORD
Lo, LONG Hi );
40
41
operator
LARGE_INTEGER()
const
;
42
operator
PLARGE_INTEGER()
const
;
43
operator
ULARGE_INTEGER()
const
;
44
operator
PULARGE_INTEGER()
const
;
45
operator
INT64
()
const
;
46
operator
INT32()
const
;
47
operator
UINT64
()
const
;
48
operator
UINT32()
const
;
49
operator
LUID()
const
;
50
operator
FILETIME()
const
;
51
52
INT32
High
() {
return
_val.HighPart; }
53
54
LargeInt
& operator = (
const
INT64
rhs );
55
LargeInt
& operator = (
const
LARGE_INTEGER& rhs );
56
LargeInt
& operator = (
const
LUID& rhs );
57
LargeInt
& operator = (
const
FILETIME& rhs );
58
59
LargeInt
& operator += (
const
INT64
rhs );
60
LargeInt
& operator -= (
const
INT64
rhs );
61
LargeInt
& operator *= (
const
INT64
rhs );
62
LargeInt
& operator /= (
const
INT64
rhs );
63
LargeInt
& operator %= (
const
INT64
rhs );
64
LargeInt
& operator &= (
const
INT64
rhs );
65
LargeInt
& operator |= (
const
INT64
rhs );
66
LargeInt
& operator ^= (
const
INT64
rhs );
67
68
LargeInt
& operator += (
const
LARGE_INTEGER& rhs );
69
LargeInt
& operator -= (
const
LARGE_INTEGER& rhs );
70
LargeInt
& operator *= (
const
LARGE_INTEGER& rhs );
71
LargeInt
& operator /= (
const
LARGE_INTEGER& rhs );
72
LargeInt
& operator %= (
const
LARGE_INTEGER& rhs );
73
LargeInt
& operator &= (
const
LARGE_INTEGER& rhs );
74
LargeInt
& operator |= (
const
LARGE_INTEGER& rhs );
75
LargeInt
& operator ^= (
const
LARGE_INTEGER& rhs );
76
77
LargeInt
& operator >>= (
const
BYTE
nbits );
78
LargeInt
& operator <<= (
const
BYTE
nbits );
79
80
LargeInt
operator ++ ();
81
LargeInt
operator -- ();
82
LargeInt
operator ++ (
int
);
83
LargeInt
operator -- (
int
);
84
85
LargeInt
operator - ()
const
;
86
87
LargeInt
operator + (
const
INT64
rhs )
const
;
88
LargeInt
operator - (
const
INT64
rhs )
const
;
89
LargeInt
operator * (
const
INT64
rhs )
const
;
90
LargeInt
operator / (
const
INT64
rhs )
const
;
91
LargeInt
operator % (
const
INT64
rhs )
const
;
92
LargeInt
operator & (
const
INT64
rhs )
const
;
93
LargeInt
operator | (
const
INT64
rhs )
const
;
94
LargeInt
operator ^ (
const
INT64
rhs )
const
;
95
96
LargeInt
operator >> (
const
BYTE
nbits )
const
;
97
LargeInt
operator << (
const
BYTE
nbits )
const
;
98
99
LargeInt
operator + (
const
LARGE_INTEGER& rhs )
const
;
100
LargeInt
operator - (
const
LARGE_INTEGER& rhs )
const
;
101
LargeInt
operator * (
const
LARGE_INTEGER& rhs )
const
;
102
LargeInt
operator / (
const
LARGE_INTEGER& rhs )
const
;
103
LargeInt
operator % (
const
LARGE_INTEGER& rhs )
const
;
104
LargeInt
operator & (
const
LARGE_INTEGER& rhs )
const
;
105
LargeInt
operator | (
const
LARGE_INTEGER& rhs )
const
;
106
LargeInt
operator ^ (
const
LARGE_INTEGER& rhs )
const
;
107
};
108
110
END_NAMESPACE
(
uLib
)
111
#endif//ndef __uLib_LargeInt_h_incl__
112
#endif//def __cplusplus
113
// EOF
DWORD
unsigned long DWORD
Definition:
Common.h:414
uLib::LargeInt
Definition:
LargeInt.h:26
END_NAMESPACE
#define END_NAMESPACE(name)
Definition:
Common.h:225
uLib
Definition:
DynArray.h:18
INT64
signed __int64 INT64
Definition:
Common.h:401
UINT64
unsigned __int64 UINT64
Definition:
Common.h:400
BEGIN_NAMESPACE
#define BEGIN_NAMESPACE(name)
Definition:
Common.h:224
Common.h
Common include; Added types, small "ubiquitous" utilities, et c.
uLib::LargeInt::High
INT32 High()
Definition:
LargeInt.h:52
BYTE
unsigned char BYTE
Definition:
Common.h:412
LargeInt.h
Generated by
1.8.15