KTimeSpan Class Reference

#include <ktime.h>

List of all members.


Detailed Description

Class to encapsulate time intervals.
See also:
KTime

Definition at line 549 of file ktime.h.


Public Member Functions

  KTimeSpan ()
  Constructor.
  KTimeSpan (KTime pStart, KTime pStop)
  Constructor.
void  Set (KTime pStart, KTime pStop)
  Set start and stop time.
void  SetStart (KTime pStart)
  Set start time.
void  SetStop (KTime pStop)
  Set stop time.
KTime GetStart ()
  Get start time.
KTime GetStop ()
  Get stop time.
KTime  GetDuration () const
  Get time interval in absolute value.
KTime  GetSignedDuration () const
  Get time interval.
int  GetDirection () const
  Get direction of the time interval.
bool  operator & (KTime &pTime) const
  Return true if the time is inside the timespan.
KTimeSpan  operator & (KTimeSpan &pTime) const
  Return the intersection of the two time spans.
bool  operator!= (KTimeSpan &pTime)
  Inequality operator.

Constructor & Destructor Documentation

KTimeSpan (  )  [inline]

Constructor.

Definition at line 553 of file ktime.h.

KTimeSpan ( KTime  pStart,
KTime  pStop  
) [inline]

Constructor.

Parameters:
pStart  Beginning of the time interval.
pStop  Ending of the time interval.

Definition at line 559 of file ktime.h.


Member Function Documentation

void Set ( KTime  pStart,
KTime  pStop  
) [inline]

Set start and stop time.

Parameters:
pStart  Beginning of the time interval.
pStop  Ending of the time interval.

Definition at line 565 of file ktime.h.

void SetStart ( KTime  pStart  )  [inline]

Set start time.

Parameters:
pStart  Beginning of the time interval.

Definition at line 570 of file ktime.h.

void SetStop ( KTime  pStop  )  [inline]

Set stop time.

Parameters:
pStop  Ending of the time interval.

Definition at line 575 of file ktime.h.

KTime& GetStart (  )  [inline]

Get start time.

Returns:
Beginning of time interval.

Definition at line 580 of file ktime.h.

KTime& GetStop (  )  [inline]

Get stop time.

Returns:
Ending of time interval.

Definition at line 585 of file ktime.h.

KTime GetDuration (  )  const [inline]

Get time interval in absolute value.

Returns:
Time interval.

Definition at line 590 of file ktime.h.

KTime GetSignedDuration (  )  const [inline]

Get time interval.

Returns:
Signed time interval.

Definition at line 595 of file ktime.h.

int GetDirection (  )  const [inline]

Get direction of the time interval.

Returns:
KTS_FORWARD if time interval is forward, KTS_BACKWARD if backward.

Definition at line 600 of file ktime.h.

References KTS_BACKWARD, and KTS_FORWARD.

bool operator & ( KTime pTime  )  const

Return true if the time is inside the timespan.

Parameters:
pTime  Judge whether pTime is inside the timespan.
Returns:
True if is, false otherwise.

KTimeSpan operator & ( KTimeSpan pTime  )  const

Return the intersection of the two time spans.

Parameters:
pTime 
Returns:
The intersection of pTime and this KTimeSpan.

bool operator!= ( KTimeSpan pTime  ) 

Inequality operator.

Parameters:
pTime  KTimeSpan compared with this one.
Returns:
True if unequal, false otherwise.
KTimeSpan KTimeSpan KTimeSpan KTimeSpan KTimeSpan KTimeSpan KTimeSpan KTimeSpan KTimeSpan KTimeSpan
KTimeSpan KTimeSpan KTimeSpan KTimeSpan KTimeSpan KTimeSpan KTimeSpan KTimeSpan KTimeSpan KTimeSpan