SAGA API v9.10
Loading...
Searching...
No Matches
CSG_TimeSpan Class Reference

#include <datetime.h>

Public Member Functions

 CSG_TimeSpan (void)
 CSG_TimeSpan (const CSG_TimeSpan &ts)
 CSG_TimeSpan (const sLong &diff)
 CSG_TimeSpan (double hours)
 CSG_TimeSpan (long hours, long min=0, sLong sec=0, sLong msec=0)
CSG_TimeSpanAdd (const CSG_TimeSpan &ts)
CSG_TimeSpanSubtract (const CSG_TimeSpan &ts)
CSG_TimeSpanMultiply (int n)
CSG_TimeSpanoperator+= (const CSG_TimeSpan &ts)
CSG_TimeSpanoperator-= (const CSG_TimeSpan &ts)
CSG_TimeSpanoperator*= (int n)
CSG_TimeSpan Add (const CSG_TimeSpan &ts) const
CSG_TimeSpan Subtract (const CSG_TimeSpan &ts) const
CSG_TimeSpan Multiply (int n) const
CSG_TimeSpan operator+ (const CSG_TimeSpan &ts) const
CSG_TimeSpan operator- (const CSG_TimeSpan &ts) const
CSG_TimeSpan operator* (int n) const
CSG_TimeSpan Abs (void) const
CSG_TimeSpan Negate (void) const
CSG_TimeSpanNeg (void)
CSG_TimeSpanoperator- (void)
bool is_Null (void) const
bool is_Positive (void) const
bool is_Negative (void) const
bool operator! (void) const
bool is_EqualTo (const CSG_TimeSpan &ts) const
bool is_LongerThan (const CSG_TimeSpan &ts) const
bool is_ShorterThan (const CSG_TimeSpan &ts) const
bool operator< (const CSG_TimeSpan &ts) const
bool operator<= (const CSG_TimeSpan &ts) const
bool operator== (const CSG_TimeSpan &ts) const
bool operator!= (const CSG_TimeSpan &ts) const
bool operator>= (const CSG_TimeSpan &ts) const
bool operator> (const CSG_TimeSpan &ts) const
int Get_Weeks (void) const
int Get_Days (void) const
int Get_Hours (void) const
int Get_Minutes (void) const
sLong Get_Seconds (void) const
sLong Get_Milliseconds (void) const
sLong Get_Value (void) const
CSG_String Format (const CSG_String &format="") const

Static Public Member Functions

static CSG_TimeSpan Milliseconds (sLong ms)
static CSG_TimeSpan Seconds (sLong sec)
static CSG_TimeSpan Minutes (long min)
static CSG_TimeSpan Hours (long hours)
static CSG_TimeSpan Days (long days)
static CSG_TimeSpan Weeks (long days)
static CSG_TimeSpan Millisecond (void)
static CSG_TimeSpan Second (void)
static CSG_TimeSpan Minute (void)
static CSG_TimeSpan Hour (void)
static CSG_TimeSpan Day (void)
static CSG_TimeSpan Week (void)

Friends

class CSG_DateTime

Detailed Description

Definition at line 90 of file datetime.h.

Constructor & Destructor Documentation

◆ CSG_TimeSpan() [1/5]

◆ CSG_TimeSpan() [2/5]

CSG_TimeSpan::CSG_TimeSpan ( const CSG_TimeSpan & ts)
inline

Definition at line 97 of file datetime.h.

References CSG_TimeSpan().

◆ CSG_TimeSpan() [3/5]

CSG_TimeSpan::CSG_TimeSpan ( const sLong & diff)
inline

Definition at line 98 of file datetime.h.

◆ CSG_TimeSpan() [4/5]

CSG_TimeSpan::CSG_TimeSpan ( double hours)
inline

Definition at line 99 of file datetime.h.

◆ CSG_TimeSpan() [5/5]

CSG_TimeSpan::CSG_TimeSpan ( long hours,
long min = 0,
sLong sec = 0,
sLong msec = 0 )
inline

Definition at line 100 of file datetime.h.

Member Function Documentation

◆ Abs()

CSG_TimeSpan CSG_TimeSpan::Abs ( void ) const
inline

Definition at line 137 of file datetime.h.

References CSG_TimeSpan().

◆ Add() [1/2]

CSG_TimeSpan & CSG_TimeSpan::Add ( const CSG_TimeSpan & ts)
inline

Definition at line 121 of file datetime.h.

References CSG_TimeSpan().

Referenced by operator+=().

◆ Add() [2/2]

CSG_TimeSpan CSG_TimeSpan::Add ( const CSG_TimeSpan & ts) const
inline

Definition at line 129 of file datetime.h.

References CSG_TimeSpan().

◆ Day()

CSG_TimeSpan CSG_TimeSpan::Day ( void )
inlinestatic

Definition at line 117 of file datetime.h.

References CSG_TimeSpan(), and Days().

◆ Days()

CSG_TimeSpan CSG_TimeSpan::Days ( long days)
inlinestatic

Definition at line 110 of file datetime.h.

References CSG_TimeSpan(), and Hours().

Referenced by Day(), and Weeks().

◆ Format()

CSG_String CSG_TimeSpan::Format ( const CSG_String & format = "") const

Definition at line 65 of file datetime.cpp.

References Format().

Referenced by CSG_Tool::Execute(), and Format().

◆ Get_Days()

int CSG_TimeSpan::Get_Days ( void ) const
inline

Definition at line 160 of file datetime.h.

References Get_Hours().

Referenced by Get_Weeks().

◆ Get_Hours()

int CSG_TimeSpan::Get_Hours ( void ) const
inline

Definition at line 161 of file datetime.h.

References Get_Minutes().

Referenced by CSG_Tool::Execute(), and Get_Days().

◆ Get_Milliseconds()

sLong CSG_TimeSpan::Get_Milliseconds ( void ) const
inline

Definition at line 164 of file datetime.h.

Referenced by CSG_Tool::Execute().

◆ Get_Minutes()

int CSG_TimeSpan::Get_Minutes ( void ) const
inline

Definition at line 162 of file datetime.h.

References Get_Seconds().

Referenced by CSG_Tool::Execute(), and Get_Hours().

◆ Get_Seconds()

sLong CSG_TimeSpan::Get_Seconds ( void ) const
inline

Definition at line 163 of file datetime.h.

Referenced by CSG_Tool::Execute(), and Get_Minutes().

◆ Get_Value()

sLong CSG_TimeSpan::Get_Value ( void ) const
inline

Definition at line 165 of file datetime.h.

◆ Get_Weeks()

int CSG_TimeSpan::Get_Weeks ( void ) const
inline

Definition at line 159 of file datetime.h.

References Get_Days().

◆ Hour()

CSG_TimeSpan CSG_TimeSpan::Hour ( void )
inlinestatic

Definition at line 116 of file datetime.h.

References CSG_TimeSpan(), and Hours().

◆ Hours()

CSG_TimeSpan CSG_TimeSpan::Hours ( long hours)
inlinestatic

Definition at line 109 of file datetime.h.

References CSG_TimeSpan().

Referenced by Days(), and Hour().

◆ is_EqualTo()

bool CSG_TimeSpan::is_EqualTo ( const CSG_TimeSpan & ts) const
inline

Definition at line 148 of file datetime.h.

References CSG_TimeSpan().

◆ is_LongerThan()

bool CSG_TimeSpan::is_LongerThan ( const CSG_TimeSpan & ts) const
inline

Definition at line 149 of file datetime.h.

References CSG_TimeSpan().

◆ is_Negative()

bool CSG_TimeSpan::is_Negative ( void ) const
inline

Definition at line 144 of file datetime.h.

◆ is_Null()

bool CSG_TimeSpan::is_Null ( void ) const
inline

Definition at line 142 of file datetime.h.

Referenced by operator!().

◆ is_Positive()

bool CSG_TimeSpan::is_Positive ( void ) const
inline

Definition at line 143 of file datetime.h.

◆ is_ShorterThan()

bool CSG_TimeSpan::is_ShorterThan ( const CSG_TimeSpan & ts) const
inline

Definition at line 150 of file datetime.h.

References CSG_TimeSpan().

◆ Millisecond()

CSG_TimeSpan CSG_TimeSpan::Millisecond ( void )
inlinestatic

Definition at line 113 of file datetime.h.

References CSG_TimeSpan(), and Milliseconds().

◆ Milliseconds()

CSG_TimeSpan CSG_TimeSpan::Milliseconds ( sLong ms)
inlinestatic

Definition at line 106 of file datetime.h.

References CSG_TimeSpan().

Referenced by Millisecond().

◆ Minute()

CSG_TimeSpan CSG_TimeSpan::Minute ( void )
inlinestatic

Definition at line 115 of file datetime.h.

References CSG_TimeSpan(), and Minutes().

◆ Minutes()

CSG_TimeSpan CSG_TimeSpan::Minutes ( long min)
inlinestatic

Definition at line 108 of file datetime.h.

References CSG_TimeSpan().

Referenced by Minute().

◆ Multiply() [1/2]

CSG_TimeSpan & CSG_TimeSpan::Multiply ( int n)
inline

Definition at line 123 of file datetime.h.

References CSG_TimeSpan().

Referenced by operator*=().

◆ Multiply() [2/2]

CSG_TimeSpan CSG_TimeSpan::Multiply ( int n) const
inline

Definition at line 131 of file datetime.h.

References CSG_TimeSpan().

◆ Neg()

CSG_TimeSpan & CSG_TimeSpan::Neg ( void )
inline

Definition at line 139 of file datetime.h.

References CSG_TimeSpan().

Referenced by operator-().

◆ Negate()

CSG_TimeSpan CSG_TimeSpan::Negate ( void ) const
inline

Definition at line 138 of file datetime.h.

References CSG_TimeSpan().

◆ operator!()

bool CSG_TimeSpan::operator! ( void ) const
inline

Definition at line 146 of file datetime.h.

References is_Null().

◆ operator!=()

bool CSG_TimeSpan::operator!= ( const CSG_TimeSpan & ts) const
inline

Definition at line 155 of file datetime.h.

References CSG_TimeSpan().

◆ operator*()

CSG_TimeSpan CSG_TimeSpan::operator* ( int n) const
inline

Definition at line 135 of file datetime.h.

References CSG_TimeSpan().

◆ operator*=()

CSG_TimeSpan & CSG_TimeSpan::operator*= ( int n)
inline

Definition at line 127 of file datetime.h.

References CSG_TimeSpan(), and Multiply().

◆ operator+()

CSG_TimeSpan CSG_TimeSpan::operator+ ( const CSG_TimeSpan & ts) const
inline

Definition at line 133 of file datetime.h.

References CSG_TimeSpan().

◆ operator+=()

CSG_TimeSpan & CSG_TimeSpan::operator+= ( const CSG_TimeSpan & ts)
inline

Definition at line 125 of file datetime.h.

References Add(), and CSG_TimeSpan().

◆ operator-() [1/2]

CSG_TimeSpan CSG_TimeSpan::operator- ( const CSG_TimeSpan & ts) const
inline

Definition at line 134 of file datetime.h.

References CSG_TimeSpan().

◆ operator-() [2/2]

CSG_TimeSpan & CSG_TimeSpan::operator- ( void )
inline

Definition at line 140 of file datetime.h.

References CSG_TimeSpan(), and Neg().

◆ operator-=()

CSG_TimeSpan & CSG_TimeSpan::operator-= ( const CSG_TimeSpan & ts)
inline

Definition at line 126 of file datetime.h.

References CSG_TimeSpan(), and Subtract().

◆ operator<()

bool CSG_TimeSpan::operator< ( const CSG_TimeSpan & ts) const
inline

Definition at line 152 of file datetime.h.

References CSG_TimeSpan().

◆ operator<=()

bool CSG_TimeSpan::operator<= ( const CSG_TimeSpan & ts) const
inline

Definition at line 153 of file datetime.h.

References CSG_TimeSpan().

◆ operator==()

bool CSG_TimeSpan::operator== ( const CSG_TimeSpan & ts) const
inline

Definition at line 154 of file datetime.h.

References CSG_TimeSpan().

◆ operator>()

bool CSG_TimeSpan::operator> ( const CSG_TimeSpan & ts) const
inline

Definition at line 157 of file datetime.h.

References CSG_TimeSpan().

◆ operator>=()

bool CSG_TimeSpan::operator>= ( const CSG_TimeSpan & ts) const
inline

Definition at line 156 of file datetime.h.

References CSG_TimeSpan().

◆ Second()

CSG_TimeSpan CSG_TimeSpan::Second ( void )
inlinestatic

Definition at line 114 of file datetime.h.

References CSG_TimeSpan(), and Seconds().

◆ Seconds()

CSG_TimeSpan CSG_TimeSpan::Seconds ( sLong sec)
inlinestatic

Definition at line 107 of file datetime.h.

References CSG_TimeSpan().

Referenced by Second().

◆ Subtract() [1/2]

CSG_TimeSpan & CSG_TimeSpan::Subtract ( const CSG_TimeSpan & ts)
inline

Definition at line 122 of file datetime.h.

References CSG_TimeSpan().

Referenced by operator-=().

◆ Subtract() [2/2]

CSG_TimeSpan CSG_TimeSpan::Subtract ( const CSG_TimeSpan & ts) const
inline

Definition at line 130 of file datetime.h.

References CSG_TimeSpan().

◆ Week()

CSG_TimeSpan CSG_TimeSpan::Week ( void )
inlinestatic

Definition at line 118 of file datetime.h.

References CSG_TimeSpan(), and Weeks().

◆ Weeks()

CSG_TimeSpan CSG_TimeSpan::Weeks ( long days)
inlinestatic

Definition at line 111 of file datetime.h.

References CSG_TimeSpan(), and Days().

Referenced by Week().

◆ CSG_DateTime

friend class CSG_DateTime
friend

Definition at line 92 of file datetime.h.

References CSG_DateTime.

Referenced by CSG_DateTime.


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