Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
Wtime Class Reference

#include <wtime.h>

Public Types

enum  { POSITIVE =0 , NEGATIVE =1 }
 
enum  { POSITIVE =0 , NEGATIVE =1 }
 

Public Member Functions

 Wtime ()
 
 Wtime (Wtime &other)
 
 Wtime (uint32 other)
 
 ~Wtime ()
 
void Update ()
 
void PrintTime (FILE *out) const
 
void PrintTime (char *out) const
 
void PrintDate (FILE *out) const
 
void PrintDate (char *out) const
 
uint32 GetSec (void) const
 
uint32 GetUsec (void) const
 
void SetSec (uint32 newsec)
 
void SetUsec (uint32 newusec)
 
void Set (uint32 newsec, uint32 newusec)
 
bit8 ParseDate (char *in)
 
bit8 FormatTime (char *out, char *format)
 
struct timeval * GetTimeval (void)
 
void GetTimevalMT (struct timeval &tv)
 
uint32 GetSecond (void) const
 
uint32 GetMinute (void) const
 
uint32 GetHour (void) const
 
uint32 GetMDay (void) const
 
uint32 GetWDay (void) const
 
uint32 GetYDay (void) const
 
uint32 GetMonth (void) const
 
uint32 GetYWeek (void) const
 
uint32 GetYear (void) const
 
bit8 GetSign (void) const
 
int Compare (const Wtime &other) const
 
bit8 operator== (const Wtime &other) const
 
bit8 operator!= (const Wtime &other) const
 
bit8 operator< (const Wtime &other) const
 
bit8 operator> (const Wtime &other) const
 
bit8 operator<= (const Wtime &other) const
 
bit8 operator>= (const Wtime &other) const
 
Wtimeoperator= (const Wtime &other)
 
Wtimeoperator= (const uint32 other)
 
void SignedAdd (const Wtime &other)
 
void SignedSubtract (const Wtime &other)
 
Wtimeoperator+= (const Wtime &other)
 
Wtimeoperator-= (const Wtime &other)
 
Wtime operator+ (Wtime &other)
 
Wtime operator- (Wtime &other)
 
Wtimeoperator+= (const uint32 other)
 
Wtimeoperator-= (const uint32 other)
 
Wtime operator+ (uint32 other)
 
Wtime operator- (uint32 other)
 
 Wtime ()
 
 Wtime (Wtime &other)
 
 Wtime (uint32 other)
 
 ~Wtime ()
 
void Update ()
 
void PrintTime (FILE *out) const
 
void PrintTime (char *out) const
 
void PrintDate (FILE *out) const
 
void PrintDate (char *out) const
 
uint32 GetSec (void) const
 
uint32 GetUsec (void) const
 
void SetSec (uint32 newsec)
 
void SetUsec (uint32 newusec)
 
void Set (uint32 newsec, uint32 newusec)
 
bit8 ParseDate (char *in)
 
bit8 FormatTime (char *out, char *format)
 
struct timeval * GetTimeval (void)
 
void GetTimevalMT (struct timeval &tv)
 
uint32 GetSecond (void) const
 
uint32 GetMinute (void) const
 
uint32 GetHour (void) const
 
uint32 GetMDay (void) const
 
uint32 GetWDay (void) const
 
uint32 GetYDay (void) const
 
uint32 GetMonth (void) const
 
uint32 GetYWeek (void) const
 
uint32 GetYear (void) const
 
bit8 GetSign (void) const
 
int Compare (const Wtime &other) const
 
bit8 operator== (const Wtime &other) const
 
bit8 operator!= (const Wtime &other) const
 
bit8 operator< (const Wtime &other) const
 
bit8 operator> (const Wtime &other) const
 
bit8 operator<= (const Wtime &other) const
 
bit8 operator>= (const Wtime &other) const
 
Wtimeoperator= (const Wtime &other)
 
Wtimeoperator= (const uint32 other)
 
void SignedAdd (const Wtime &other)
 
void SignedSubtract (const Wtime &other)
 
Wtimeoperator+= (const Wtime &other)
 
Wtimeoperator-= (const Wtime &other)
 
Wtime operator+ (Wtime &other)
 
Wtime operator- (Wtime &other)
 
Wtimeoperator+= (const uint32 other)
 
Wtimeoperator-= (const uint32 other)
 
Wtime operator+ (uint32 other)
 
Wtime operator- (uint32 other)
 

Protected Attributes

uint32 sec
 
uint32 usec
 
bit8 sign
 

Detailed Description

Definition at line 46 of file wtime.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
POSITIVE 
NEGATIVE 

Definition at line 50 of file wtime.h.

◆ anonymous enum

anonymous enum
Enumerator
POSITIVE 
NEGATIVE 

Definition at line 50 of file wtime.h.

Constructor & Destructor Documentation

◆ Wtime() [1/6]

Wtime::Wtime ( void )

Definition at line 59 of file wtime.cpp.

◆ Wtime() [2/6]

Wtime::Wtime ( Wtime & other)

Definition at line 64 of file wtime.cpp.

◆ Wtime() [3/6]

Wtime::Wtime ( uint32 other)

Definition at line 71 of file wtime.cpp.

◆ ~Wtime() [1/2]

Wtime::~Wtime ( )

Definition at line 78 of file wtime.cpp.

◆ Wtime() [4/6]

Wtime::Wtime ( )

◆ Wtime() [5/6]

Wtime::Wtime ( Wtime & other)

◆ Wtime() [6/6]

Wtime::Wtime ( uint32 other)

◆ ~Wtime() [2/2]

Wtime::~Wtime ( )

Member Function Documentation

◆ Compare() [1/2]

int Wtime::Compare ( const Wtime & other) const

Definition at line 538 of file wtime.cpp.

◆ Compare() [2/2]

int Wtime::Compare ( const Wtime & other) const

◆ FormatTime() [1/2]

bit8 Wtime::FormatTime ( char * out,
char * format )

Definition at line 194 of file wtime.cpp.

◆ FormatTime() [2/2]

bit8 Wtime::FormatTime ( char * out,
char * format )

◆ GetHour() [1/2]

uint32 Wtime::GetHour ( void ) const

Definition at line 471 of file wtime.cpp.

◆ GetHour() [2/2]

uint32 Wtime::GetHour ( void ) const

◆ GetMDay() [1/2]

uint32 Wtime::GetMDay ( void ) const

Definition at line 478 of file wtime.cpp.

◆ GetMDay() [2/2]

uint32 Wtime::GetMDay ( void ) const

◆ GetMinute() [1/2]

uint32 Wtime::GetMinute ( void ) const

Definition at line 464 of file wtime.cpp.

◆ GetMinute() [2/2]

uint32 Wtime::GetMinute ( void ) const

◆ GetMonth() [1/2]

uint32 Wtime::GetMonth ( void ) const

Definition at line 510 of file wtime.cpp.

◆ GetMonth() [2/2]

uint32 Wtime::GetMonth ( void ) const

◆ GetSec() [1/2]

uint32 Wtime::GetSec ( void ) const

Definition at line 414 of file wtime.cpp.

◆ GetSec() [2/2]

uint32 Wtime::GetSec ( void ) const

◆ GetSecond() [1/2]

uint32 Wtime::GetSecond ( void ) const

Definition at line 457 of file wtime.cpp.

◆ GetSecond() [2/2]

uint32 Wtime::GetSecond ( void ) const

◆ GetSign() [1/2]

bit8 Wtime::GetSign ( void ) const

Definition at line 530 of file wtime.cpp.

◆ GetSign() [2/2]

bit8 Wtime::GetSign ( void ) const

◆ GetTimeval() [1/2]

struct timeval * Wtime::GetTimeval ( void )

Definition at line 441 of file wtime.cpp.

◆ GetTimeval() [2/2]

struct timeval * Wtime::GetTimeval ( void )

◆ GetTimevalMT() [1/2]

void Wtime::GetTimevalMT ( struct timeval & tv)

Definition at line 450 of file wtime.cpp.

◆ GetTimevalMT() [2/2]

void Wtime::GetTimevalMT ( struct timeval & tv)

◆ GetUsec() [1/2]

uint32 Wtime::GetUsec ( void ) const

Definition at line 419 of file wtime.cpp.

◆ GetUsec() [2/2]

uint32 Wtime::GetUsec ( void ) const

◆ GetWDay() [1/2]

uint32 Wtime::GetWDay ( void ) const

Definition at line 485 of file wtime.cpp.

◆ GetWDay() [2/2]

uint32 Wtime::GetWDay ( void ) const

◆ GetYDay() [1/2]

uint32 Wtime::GetYDay ( void ) const

Definition at line 492 of file wtime.cpp.

◆ GetYDay() [2/2]

uint32 Wtime::GetYDay ( void ) const

◆ GetYear() [1/2]

uint32 Wtime::GetYear ( void ) const

Definition at line 518 of file wtime.cpp.

◆ GetYear() [2/2]

uint32 Wtime::GetYear ( void ) const

◆ GetYWeek() [1/2]

uint32 Wtime::GetYWeek ( void ) const

Definition at line 499 of file wtime.cpp.

◆ GetYWeek() [2/2]

uint32 Wtime::GetYWeek ( void ) const

◆ operator!=() [1/2]

bit8 Wtime::operator!= ( const Wtime & other) const

Definition at line 563 of file wtime.cpp.

◆ operator!=() [2/2]

bit8 Wtime::operator!= ( const Wtime & other) const

◆ operator+() [1/4]

Wtime Wtime::operator+ ( uint32 other)

Definition at line 788 of file wtime.cpp.

◆ operator+() [2/4]

Wtime Wtime::operator+ ( uint32 other)

◆ operator+() [3/4]

Wtime Wtime::operator+ ( Wtime & other)

Definition at line 749 of file wtime.cpp.

◆ operator+() [4/4]

Wtime Wtime::operator+ ( Wtime & other)

◆ operator+=() [1/4]

Wtime & Wtime::operator+= ( const uint32 other)

Definition at line 766 of file wtime.cpp.

◆ operator+=() [2/4]

Wtime & Wtime::operator+= ( const uint32 other)

◆ operator+=() [3/4]

Wtime & Wtime::operator+= ( const Wtime & other)

Definition at line 709 of file wtime.cpp.

◆ operator+=() [4/4]

Wtime & Wtime::operator+= ( const Wtime & other)

◆ operator-() [1/4]

Wtime Wtime::operator- ( uint32 other)

Definition at line 780 of file wtime.cpp.

◆ operator-() [2/4]

Wtime Wtime::operator- ( uint32 other)

◆ operator-() [3/4]

Wtime Wtime::operator- ( Wtime & other)

Definition at line 742 of file wtime.cpp.

◆ operator-() [4/4]

Wtime Wtime::operator- ( Wtime & other)

◆ operator-=() [1/4]

Wtime & Wtime::operator-= ( const uint32 other)

Definition at line 773 of file wtime.cpp.

◆ operator-=() [2/4]

Wtime & Wtime::operator-= ( const uint32 other)

◆ operator-=() [3/4]

Wtime & Wtime::operator-= ( const Wtime & other)

Definition at line 721 of file wtime.cpp.

◆ operator-=() [4/4]

Wtime & Wtime::operator-= ( const Wtime & other)

◆ operator<() [1/2]

bit8 Wtime::operator< ( const Wtime & other) const

Definition at line 572 of file wtime.cpp.

◆ operator<() [2/2]

bit8 Wtime::operator< ( const Wtime & other) const

◆ operator<=() [1/2]

bit8 Wtime::operator<= ( const Wtime & other) const

Definition at line 590 of file wtime.cpp.

◆ operator<=() [2/2]

bit8 Wtime::operator<= ( const Wtime & other) const

◆ operator=() [1/4]

Wtime & Wtime::operator= ( const uint32 other)

Definition at line 796 of file wtime.cpp.

◆ operator=() [2/4]

Wtime & Wtime::operator= ( const uint32 other)

◆ operator=() [3/4]

Wtime & Wtime::operator= ( const Wtime & other)

Definition at line 757 of file wtime.cpp.

◆ operator=() [4/4]

Wtime & Wtime::operator= ( const Wtime & other)

◆ operator==() [1/2]

bit8 Wtime::operator== ( const Wtime & other) const

Definition at line 554 of file wtime.cpp.

◆ operator==() [2/2]

bit8 Wtime::operator== ( const Wtime & other) const

◆ operator>() [1/2]

bit8 Wtime::operator> ( const Wtime & other) const

Definition at line 581 of file wtime.cpp.

◆ operator>() [2/2]

bit8 Wtime::operator> ( const Wtime & other) const

◆ operator>=() [1/2]

bit8 Wtime::operator>= ( const Wtime & other) const

Definition at line 599 of file wtime.cpp.

◆ operator>=() [2/2]

bit8 Wtime::operator>= ( const Wtime & other) const

◆ ParseDate() [1/2]

bit8 Wtime::ParseDate ( char * in)

Definition at line 105 of file wtime.cpp.

◆ ParseDate() [2/2]

bit8 Wtime::ParseDate ( char * in)

◆ PrintDate() [1/4]

void Wtime::PrintDate ( char * out) const

Definition at line 408 of file wtime.cpp.

◆ PrintDate() [2/4]

void Wtime::PrintDate ( char * out) const

◆ PrintDate() [3/4]

void Wtime::PrintDate ( FILE * out) const

Definition at line 401 of file wtime.cpp.

◆ PrintDate() [4/4]

void Wtime::PrintDate ( FILE * out) const

◆ PrintTime() [1/4]

void Wtime::PrintTime ( char * out) const

Definition at line 396 of file wtime.cpp.

◆ PrintTime() [2/4]

void Wtime::PrintTime ( char * out) const

◆ PrintTime() [3/4]

void Wtime::PrintTime ( FILE * out) const

Definition at line 389 of file wtime.cpp.

◆ PrintTime() [4/4]

void Wtime::PrintTime ( FILE * out) const

◆ Set() [1/2]

void Wtime::Set ( uint32 newsec,
uint32 newusec )

Definition at line 434 of file wtime.cpp.

◆ Set() [2/2]

void Wtime::Set ( uint32 newsec,
uint32 newusec )

◆ SetSec() [1/2]

void Wtime::SetSec ( uint32 newsec)

Definition at line 424 of file wtime.cpp.

◆ SetSec() [2/2]

void Wtime::SetSec ( uint32 newsec)

◆ SetUsec() [1/2]

void Wtime::SetUsec ( uint32 newusec)

Definition at line 429 of file wtime.cpp.

◆ SetUsec() [2/2]

void Wtime::SetUsec ( uint32 newusec)

◆ SignedAdd() [1/2]

void Wtime::SignedAdd ( const Wtime & other)

Definition at line 611 of file wtime.cpp.

◆ SignedAdd() [2/2]

void Wtime::SignedAdd ( const Wtime & other)

◆ SignedSubtract() [1/2]

void Wtime::SignedSubtract ( const Wtime & other)

Definition at line 661 of file wtime.cpp.

◆ SignedSubtract() [2/2]

void Wtime::SignedSubtract ( const Wtime & other)

◆ Update() [1/2]

void Wtime::Update ( void )

Definition at line 82 of file wtime.cpp.

◆ Update() [2/2]

void Wtime::Update ( )

Member Data Documentation

◆ sec

uint32 Wtime::sec
protected

Definition at line 123 of file wtime.h.

◆ sign

bit8 Wtime::sign
protected

Definition at line 125 of file wtime.h.

◆ usec

uint32 Wtime::usec
protected

Definition at line 124 of file wtime.h.


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