ReactOS  0.4.12-dev-36-g472787f
ATL::CFileTime Class Reference

#include <atltime.h>

Inheritance diagram for ATL::CFileTime:
Collaboration diagram for ATL::CFileTime:

Public Member Functions

 CFileTime () throw ()
 
 CFileTime (const FILETIME &ft) throw ()
 
 CFileTime (ULONGLONG nTime) throw ()
 
ULONGLONG GetTime () const throw ()
 
CFileTime LocalToUTC () const throw ()
 
void SetTime (ULONGLONG nTime) throw ()
 
CFileTime UTCToLocal () const throw ()
 
CFileTime operator- (CFileTimeSpan span) const throw ()
 
CFileTimeSpan operator- (CFileTime ft) const throw ()
 
bool operator!= (CFileTime ft) const throw ()
 
CFileTime operator+ (CFileTimeSpan span) const throw ()
 
CFileTimeoperator+= (CFileTimeSpan span) throw ()
 
bool operator< (CFileTime ft) const throw ()
 
bool operator<= (CFileTime ft) const throw ()
 
CFileTimeoperator= (const FILETIME &ft) throw ()
 
CFileTimeoperator-= (CFileTimeSpan span) throw ()
 
bool operator== (CFileTime ft) const throw ()
 
bool operator> (CFileTime ft) const throw ()
 
bool operator>= (CFileTime ft) const throw ()
 

Static Public Member Functions

static CFileTime GetCurrentTime () throw ()
 

Static Public Attributes

static const ULONGLONG Millisecond = 10000
 
static const ULONGLONG Second = Millisecond * 1000
 
static const ULONGLONG Minute = Second * 60
 
static const ULONGLONG Hour = Minute * 60
 
static const ULONGLONG Day = Hour * 24
 
static const ULONGLONG Week = Day * 7
 

Additional Inherited Members

- Public Attributes inherited from _FILETIME
DWORD dwLowDateTime
 
DWORD dwHighDateTime
 
uint32_t dwLowDateTime
 
uint32_t dwHighDateTime
 

Detailed Description

Definition at line 534 of file atltime.h.

Constructor & Destructor Documentation

◆ CFileTime() [1/3]

ATL::CFileTime::CFileTime ( )
throw (
)
inline

Definition at line 544 of file atltime.h.

545  {
546  this->dwLowDateTime = 0;
547  this->dwHighDateTime = 0;
548  }
DWORD dwHighDateTime
Definition: mapidefs.h:66
DWORD dwLowDateTime
Definition: mapidefs.h:65

◆ CFileTime() [2/3]

ATL::CFileTime::CFileTime ( const FILETIME ft)
throw (
)
inline

Definition at line 550 of file atltime.h.

551  {
552  this->dwLowDateTime = ft.dwLowDateTime;
553  this->dwHighDateTime = ft.dwHighDateTime;
554  }
DWORD dwHighDateTime
Definition: mapidefs.h:66
DWORD dwLowDateTime
Definition: mapidefs.h:65

◆ CFileTime() [3/3]

ATL::CFileTime::CFileTime ( ULONGLONG  nTime)
throw (
)
inline

Definition at line 556 of file atltime.h.

557  {
558  this->dwLowDateTime = (DWORD) nTime;
559  this->dwHighDateTime = nTime >> 32;
560  }
#define DWORD
Definition: msvc.h:34
DWORD dwHighDateTime
Definition: mapidefs.h:66
DWORD dwLowDateTime
Definition: mapidefs.h:65

Member Function Documentation

◆ GetCurrentTime()

static CFileTime ATL::CFileTime::GetCurrentTime ( )
throw (
)
inlinestatic

Definition at line 562 of file atltime.h.

563  {
564  FILETIME ft;
566  return CFileTime(ft);
567  }
VOID WINAPI GetSystemTimeAsFileTime(OUT PFILETIME lpFileTime)
Definition: time.c:128

◆ GetTime()

ULONGLONG ATL::CFileTime::GetTime ( ) const
throw (
)
inline

Definition at line 569 of file atltime.h.

570  {
571  return ((ULONGLONG)this->dwLowDateTime) | (((ULONGLONG)this->dwHighDateTime) << 32);
572  }
DWORD dwHighDateTime
Definition: mapidefs.h:66
uint64_t ULONGLONG
Definition: typedefs.h:65
DWORD dwLowDateTime
Definition: mapidefs.h:65

◆ LocalToUTC()

CFileTime ATL::CFileTime::LocalToUTC ( ) const
throw (
)
inline

Definition at line 574 of file atltime.h.

575  {
576  FILETIME ft;
577  LocalFileTimeToFileTime(this, &ft);
578  return CFileTime(ft);
579  }
BOOL WINAPI LocalFileTimeToFileTime(IN CONST FILETIME *lpLocalFileTime, OUT LPFILETIME lpFileTime)
Definition: time.c:243

◆ operator!=()

bool ATL::CFileTime::operator!= ( CFileTime  ft) const
throw (
)
inline

Definition at line 604 of file atltime.h.

605  {
606  return this->GetTime() != ft.GetTime();
607  }
ULONGLONG GetTime() const
Definition: atltime.h:569

◆ operator+()

CFileTime ATL::CFileTime::operator+ ( CFileTimeSpan  span) const
throw (
)
inline

Definition at line 609 of file atltime.h.

610  {
611  return CFileTime(this->GetTime() + span.GetTimeSpan());
612  }
ULONGLONG GetTime() const
Definition: atltime.h:569
LONGLONG GetTimeSpan() const
Definition: atltime.h:464

◆ operator+=()

CFileTime& ATL::CFileTime::operator+= ( CFileTimeSpan  span)
throw (
)
inline

Definition at line 614 of file atltime.h.

615  {
616  this->SetTime(this->GetTime() + span.GetTimeSpan());
617  return *this;
618  }
ULONGLONG GetTime() const
Definition: atltime.h:569
void SetTime(ULONGLONG nTime)
Definition: atltime.h:581
LONGLONG GetTimeSpan() const
Definition: atltime.h:464

◆ operator-() [1/2]

CFileTime ATL::CFileTime::operator- ( CFileTimeSpan  span) const
throw (
)
inline

Definition at line 594 of file atltime.h.

595  {
596  return CFileTime(this->GetTime() - span.GetTimeSpan());
597  }
ULONGLONG GetTime() const
Definition: atltime.h:569
LONGLONG GetTimeSpan() const
Definition: atltime.h:464

◆ operator-() [2/2]

CFileTimeSpan ATL::CFileTime::operator- ( CFileTime  ft) const
throw (
)
inline

Definition at line 599 of file atltime.h.

600  {
601  return CFileTimeSpan(this->GetTime() - ft.GetTime());
602  }
ULONGLONG GetTime() const
Definition: atltime.h:569

◆ operator-=()

CFileTime& ATL::CFileTime::operator-= ( CFileTimeSpan  span)
throw (
)
inline

Definition at line 637 of file atltime.h.

638  {
639  this->SetTime(this->GetTime() - span.GetTimeSpan());
640  return *this;
641  }
ULONGLONG GetTime() const
Definition: atltime.h:569
void SetTime(ULONGLONG nTime)
Definition: atltime.h:581
LONGLONG GetTimeSpan() const
Definition: atltime.h:464

◆ operator<()

bool ATL::CFileTime::operator< ( CFileTime  ft) const
throw (
)
inline

Definition at line 620 of file atltime.h.

621  {
622  return this->GetTime() < ft.GetTime();
623  }
ULONGLONG GetTime() const
Definition: atltime.h:569

◆ operator<=()

bool ATL::CFileTime::operator<= ( CFileTime  ft) const
throw (
)
inline

Definition at line 625 of file atltime.h.

626  {
627  return this->GetTime() <= ft.GetTime();
628  }
ULONGLONG GetTime() const
Definition: atltime.h:569

◆ operator=()

CFileTime& ATL::CFileTime::operator= ( const FILETIME ft)
throw (
)
inline

Definition at line 630 of file atltime.h.

631  {
632  this->dwLowDateTime = ft.dwLowDateTime;
633  this->dwHighDateTime = ft.dwHighDateTime;
634  return *this;
635  }
DWORD dwHighDateTime
Definition: mapidefs.h:66
DWORD dwLowDateTime
Definition: mapidefs.h:65

◆ operator==()

bool ATL::CFileTime::operator== ( CFileTime  ft) const
throw (
)
inline

Definition at line 643 of file atltime.h.

644  {
645  return this->GetTime() == ft.GetTime();
646  }
ULONGLONG GetTime() const
Definition: atltime.h:569

◆ operator>()

bool ATL::CFileTime::operator> ( CFileTime  ft) const
throw (
)
inline

Definition at line 648 of file atltime.h.

649  {
650  return this->GetTime() > ft.GetTime();
651  }
ULONGLONG GetTime() const
Definition: atltime.h:569

◆ operator>=()

bool ATL::CFileTime::operator>= ( CFileTime  ft) const
throw (
)
inline

Definition at line 653 of file atltime.h.

654  {
655  return this->GetTime() >= ft.GetTime();
656  }
ULONGLONG GetTime() const
Definition: atltime.h:569

◆ SetTime()

void ATL::CFileTime::SetTime ( ULONGLONG  nTime)
throw (
)
inline

Definition at line 581 of file atltime.h.

582  {
583  this->dwLowDateTime = (DWORD) nTime;
584  this->dwHighDateTime = nTime >> 32;
585  }
#define DWORD
Definition: msvc.h:34
DWORD dwHighDateTime
Definition: mapidefs.h:66
DWORD dwLowDateTime
Definition: mapidefs.h:65

◆ UTCToLocal()

CFileTime ATL::CFileTime::UTCToLocal ( ) const
throw (
)
inline

Definition at line 587 of file atltime.h.

588  {
589  FILETIME ft;
590  FileTimeToLocalFileTime(this, &ft);
591  return CFileTime(ft);
592  }
BOOL WINAPI FileTimeToLocalFileTime(IN CONST FILETIME *lpFileTime, OUT LPFILETIME lpLocalFileTime)
Definition: time.c:211

Member Data Documentation

◆ Day

const ULONGLONG ATL::CFileTime::Day = Hour * 24
static

Definition at line 541 of file atltime.h.

◆ Hour

const ULONGLONG ATL::CFileTime::Hour = Minute * 60
static

Definition at line 540 of file atltime.h.

◆ Millisecond

const ULONGLONG ATL::CFileTime::Millisecond = 10000
static

Definition at line 537 of file atltime.h.

◆ Minute

const ULONGLONG ATL::CFileTime::Minute = Second * 60
static

Definition at line 539 of file atltime.h.

◆ Second

const ULONGLONG ATL::CFileTime::Second = Millisecond * 1000
static

Definition at line 538 of file atltime.h.

◆ Week

const ULONGLONG ATL::CFileTime::Week = Day * 7
static

Definition at line 542 of file atltime.h.


The documentation for this class was generated from the following file: