Nebula
Loading...
Searching...
No Matches
win32filetime.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
12#include "core/types.h"
13#include "util/string.h"
14
15//------------------------------------------------------------------------------
16namespace Win32
17{
19{
20public:
24 Win32FileTime(const Util::String& str);
26 friend bool operator==(const Win32FileTime& a, const Win32FileTime& b);
28 friend bool operator!=(const Win32FileTime& a, const Win32FileTime& b);
30 friend bool operator>(const Win32FileTime& a, const Win32FileTime& b);
32 friend bool operator<(const Win32FileTime& a, const Win32FileTime& b);
34 Util::String AsString() const;
35
37 uint GetHighBits() const;
39 uint GetLowBits() const;
41 void SetBits(uint lowBits, uint highBits);
42
43 FILETIME time;
44};
45
46//------------------------------------------------------------------------------
49inline
51{
52 time.dwLowDateTime = 0;
53 time.dwHighDateTime = 0;
54}
55
56//------------------------------------------------------------------------------
59inline bool
61{
62 return (0 == CompareFileTime(&(a.time), &(b.time)));
63}
64
65//------------------------------------------------------------------------------
68inline bool
70{
71 return (0 != CompareFileTime(&(a.time), &(b.time)));
72}
73
74//------------------------------------------------------------------------------
77inline bool
79{
80 return (1 == CompareFileTime(&(a.time), &(b.time)));
81}
82
83//------------------------------------------------------------------------------
86inline bool
87operator <(const Win32FileTime& a, const Win32FileTime& b)
88{
89 return (-1 == CompareFileTime(&(a.time), &(b.time)));
90}
91
92}; // namespace Win32
93//------------------------------------------------------------------------------
Implements a Win32-specific file-access time stamp.
Definition win32filetime.h:19
uint GetLowBits() const
get low bits
Definition win32filetime.cc:48
FILETIME time
Definition win32filetime.h:43
friend bool operator<(const Win32FileTime &a, const Win32FileTime &b)
operator <
Definition win32filetime.h:87
friend bool operator!=(const Win32FileTime &a, const Win32FileTime &b)
operator !=
Definition win32filetime.h:69
void SetBits(uint lowBits, uint highBits)
set bits
Definition win32filetime.cc:57
Util::String AsString() const
convert to string
Definition win32filetime.cc:28
friend bool operator==(const Win32FileTime &a, const Win32FileTime &b)
operator ==
Definition win32filetime.h:60
uint GetHighBits() const
get high bits
Definition win32filetime.cc:39
friend bool operator>(const Win32FileTime &a, const Win32FileTime &b)
operator >
Definition win32filetime.h:78
Win32FileTime()
constructor
Definition win32filetime.h:50
[TODO: Describe Win32 subsystem]
bool operator==(const Win32FileTime &a, const Win32FileTime &b)
Definition win32filetime.h:60
bool operator<(const Win32FileTime &a, const Win32FileTime &b)
Definition win32filetime.h:87
bool operator>(const Win32FileTime &a, const Win32FileTime &b)
Definition win32filetime.h:78
bool operator!=(const Win32FileTime &a, const Win32FileTime &b)
Definition win32filetime.h:69
Nebula's universal string class.
Definition string.h:50
unsigned int uint
Definition types.h:31