soui 5.0.0.1
Soui5 Doc
 
Loading...
Searching...
No Matches
STimeSpan Class Reference

时间间隔类 More...

#include <STime.h>

Public Member Functions

 STimeSpan ()
 默认构造函数
 
 STimeSpan (__time64_t time)
 构造函数,从时间间隔秒数初始化
 
 STimeSpan (LONG lDays, int nHours, int nMins, int nSecs)
 构造函数,从天、小时、分钟、秒初始化
 
LONGLONG GetDays () const
 获取天数
 
LONGLONG GetTotalHours () const
 获取总小时数
 
LONG GetHours () const
 获取小时数
 
LONGLONG GetTotalMinutes () const
 获取总分钟数
 
LONG GetMinutes () const
 获取分钟数
 
LONGLONG GetTotalSeconds () const
 获取总秒数
 
LONG GetSeconds () const
 获取秒数
 
__time64_t GetTimeSpan () const
 获取时间间隔秒数
 
STimeSpan operator+ (STimeSpan span) const
 加法运算符重载
 
STimeSpan operator- (STimeSpan span) const
 减法运算符重载
 
STimeSpanoperator+= (STimeSpan span)
 加法赋值运算符重载
 
STimeSpanoperator-= (STimeSpan span)
 减法赋值运算符重载
 
bool operator== (STimeSpan span) const
 等于运算符重载
 
bool operator!= (STimeSpan span) const
 不等于运算符重载
 
bool operator< (STimeSpan span) const
 小于运算符重载
 
bool operator> (STimeSpan span) const
 大于运算符重载
 
bool operator<= (STimeSpan span) const
 小于等于运算符重载
 
bool operator>= (STimeSpan span) const
 大于等于运算符重载
 

Detailed Description

时间间隔类

Definition at line 12 of file STime.h.

Constructor & Destructor Documentation

◆ STimeSpan() [1/3]

STimeSpan::STimeSpan ( )

默认构造函数

Definition at line 7 of file stime.cpp.

◆ STimeSpan() [2/3]

STimeSpan::STimeSpan ( __time64_t time)

构造函数,从时间间隔秒数初始化

Parameters
time时间间隔秒数

Definition at line 12 of file stime.cpp.

◆ STimeSpan() [3/3]

STimeSpan::STimeSpan ( LONG lDays,
int nHours,
int nMins,
int nSecs )

构造函数,从天、小时、分钟、秒初始化

Parameters
lDays天数
nHours小时数
nMins分钟数
nSecs秒数

Definition at line 17 of file stime.cpp.

Member Function Documentation

◆ GetDays()

LONGLONG STimeSpan::GetDays ( ) const

获取天数

Returns
天数

Definition at line 22 of file stime.cpp.

◆ GetHours()

LONG STimeSpan::GetHours ( ) const

获取小时数

Returns
小时数

Definition at line 32 of file stime.cpp.

◆ GetMinutes()

LONG STimeSpan::GetMinutes ( ) const

获取分钟数

Returns
分钟数

Definition at line 42 of file stime.cpp.

◆ GetSeconds()

LONG STimeSpan::GetSeconds ( ) const

获取秒数

Returns
秒数

Definition at line 52 of file stime.cpp.

◆ GetTimeSpan()

__time64_t STimeSpan::GetTimeSpan ( ) const

获取时间间隔秒数

Returns
时间间隔秒数

Definition at line 57 of file stime.cpp.

◆ GetTotalHours()

LONGLONG STimeSpan::GetTotalHours ( ) const

获取总小时数

Returns
总小时数

Definition at line 27 of file stime.cpp.

◆ GetTotalMinutes()

LONGLONG STimeSpan::GetTotalMinutes ( ) const

获取总分钟数

Returns
总分钟数

Definition at line 37 of file stime.cpp.

◆ GetTotalSeconds()

LONGLONG STimeSpan::GetTotalSeconds ( ) const

获取总秒数

Returns
总秒数

Definition at line 47 of file stime.cpp.

◆ operator!=()

bool STimeSpan::operator!= ( STimeSpan span) const

不等于运算符重载

Parameters
span时间间隔对象
Returns
如果不相等返回true,否则返回false

Definition at line 89 of file stime.cpp.

◆ operator+()

STimeSpan STimeSpan::operator+ ( STimeSpan span) const

加法运算符重载

Parameters
span时间间隔对象
Returns
新的时间间隔对象

Definition at line 62 of file stime.cpp.

◆ operator+=()

STimeSpan & STimeSpan::operator+= ( STimeSpan span)

加法赋值运算符重载

Parameters
span时间间隔对象
Returns
当前时间间隔对象的引用

Definition at line 72 of file stime.cpp.

◆ operator-()

STimeSpan STimeSpan::operator- ( STimeSpan span) const

减法运算符重载

Parameters
span时间间隔对象
Returns
新的时间间隔对象

Definition at line 67 of file stime.cpp.

◆ operator-=()

STimeSpan & STimeSpan::operator-= ( STimeSpan span)

减法赋值运算符重载

Parameters
span时间间隔对象
Returns
当前时间间隔对象的引用

Definition at line 78 of file stime.cpp.

◆ operator<()

bool STimeSpan::operator< ( STimeSpan span) const

小于运算符重载

Parameters
span时间间隔对象
Returns
如果小于返回true,否则返回false

Definition at line 94 of file stime.cpp.

◆ operator<=()

bool STimeSpan::operator<= ( STimeSpan span) const

小于等于运算符重载

Parameters
span时间间隔对象
Returns
如果小于等于返回true,否则返回false

Definition at line 104 of file stime.cpp.

◆ operator==()

bool STimeSpan::operator== ( STimeSpan span) const

等于运算符重载

Parameters
span时间间隔对象
Returns
如果相等返回true,否则返回false

Definition at line 84 of file stime.cpp.

◆ operator>()

bool STimeSpan::operator> ( STimeSpan span) const

大于运算符重载

Parameters
span时间间隔对象
Returns
如果大于返回true,否则返回false

Definition at line 99 of file stime.cpp.

◆ operator>=()

bool STimeSpan::operator>= ( STimeSpan span) const

大于等于运算符重载

Parameters
span时间间隔对象
Returns
如果大于等于返回true,否则返回false

Definition at line 109 of file stime.cpp.


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