DirectShow Animated Header -- COARefTime Class DirectShow Animated Header -- COARefTime Class* Microsoft DirectShow SDK
*Index  *Topic Contents
*Previous Topic: CMsgThread Class
*Next Topic: COutputQueue Class

COARefTime Class


COARefTime class hierarchy

This class converts between the Automation-compatible REFTIME type and the REFERENCE_TIME type used within and between filters.

Time parameters within the control interfaces are represented as double values, containing a fractional number of seconds. Interfaces supported between and within filters use a 64-bit LONGLONG type containing the time in 100-nanosecond units. Filters use this class to convert between the two formats. It is derived from CRefTime and thus is a LONGLONG, but it can be constructed from and assigned double values.

Member Functions
Name Description
COARefTime Constructs a COARefTime object.

Operators
Name Description
double Returns the reference time as a double value.
Operator = Copy constructor for the COARefTime class.
Operator == Tests for equality between COARefTime objects.
Operator != Tests for inequality between COARefTime objects.
Operator < Tests if one COARefTime object is less than another COARefTime object.
Operator > Tests if one COARefTime object is greater than another COARefTime object.
Operator <= Tests if one COARefTime object is less than or equal to another COARefTime object.
Operator >= Tests if one COARefTime object is greater than or equal to another COARefTime object.
Operator + Adds two COARefTime objects.
Operator – Subtracts one COARefTime object from another COARefTime object.
Operator += Adds two COARefTime objects and makes this object equal to the result.
Operator –= Subtracts one COARefTime object from another COARefTime object and makes this object equal to the result.
Operator * Multiplies two COARefTime objects.
Operator / Divides one COARefTime object by another COARefTime object.


COARefTime::COARefTime

COARefTime Class

Constructs a COARefTime object.

COARefTime(
  CRefTime t
  );
COARefTime(
  REFERENCE_TIME t
  );
COARefTime(
  double d
  );

Parameters
t
CRefTime value or REFERENCE_TIME value passed through to the class. Units are 100 nanoseconds.
d
A double value that constructs the COARefTime class. Units in this case are (fractional) seconds.
Return Values

No return value.


COARefTime::double

COARefTime Class

Retrieves the reference time as a double value, converted from 100-nanosecond units to seconds.

operator double();


COARefTime::Operator =

COARefTime Class

Copy constructor for a COARefTime object.

COARefTime& operator=(
  const double& rd
  );

Parameters
rd
A double value that constructs a COARefTime object.
Return Values

No return value.


COARefTime::Operator ==

COARefTime Class

Tests for equality between COARefTime objects.

BOOL operator==(
  const COARefTime& rt
  );

Parameters
rt
COARefTime object corresponding to the right side of the operator.
Return Values

Returns TRUE if the COARefTime object tested is equal to this object and FALSE otherwise.

Remarks

This object is on the left side of the operator.


COARefTime::Operator !=

COARefTime Class

Tests for inequality between COARefTime objects.

BOOL operator!=(
  const COARefTime& rt
  );

Parameters
rt
COARefTime object corresponding to the right side of the operator.
Return Values

Returns TRUE if the COARefTime object tested is not equal to this object; otherwise, returns FALSE.

Remarks

This object is on the left side of the operator.


COARefTime::Operator <

COARefTime Class

Tests if one COARefTime object is less than another COARefTime object.

BOOL operator < (
  const COARefTime& rt
  );

Parameters
rt
COARefTime object corresponding to the right side of the operator.
Return Values

Returns TRUE if the COARefTime object tested is less than this object; otherwise, returns FALSE.

Remarks

This object is on the left side of the operator.


COARefTime::Operator >

COARefTime Class

Tests if one COARefTime object is greater than another COARefTime object.

BOOL operator > (
  const COARefTime& rt
  );

Parameters
rt
COARefTime object corresponding to the right side of the operator.
Return Values

Returns TRUE if the COARefTime object tested is greater than this object; otherwise, returns FALSE.

Remarks

This object is on the left side of the operator.


COARefTime::Operator >=

COARefTime Class

Tests if one COARefTime object is greater than or equal to another COARefTime object.

BOOL operator >= (
  const COARefTime& rt
  );

Parameters
rt
COARefTime object corresponding to the right side of the operator.
Return Values

Returns TRUE if the COARefTime object tested is greater than or equal to this object; otherwise, returns FALSE.

Remarks

This object is on the left side of the operator.


COARefTime::Operator <=

COARefTime Class

Tests if one COARefTime object is less than or equal to another COARefTime object.

BOOL operator <= (
  const COARefTime& rt
  );

Parameters
rt
COARefTime object corresponding to the right side of the operator.
Return Values

Returns TRUE if the COARefTime object tested is less than or equal to this object; otherwise, returns FALSE.

Remarks

This object is on the left side of the operator.


COARefTime::Operator +

COARefTime Class

Adds two COARefTime objects.

COARefTime operator+(
  const COARefTime& rt
  );

Parameters
rt
COARefTime object to be added.
Return Values

Returns the result of the addition.


COARefTime::Operator –

COARefTime Class

Subtracts one COARefTime object from another COARefTime object.

COARefTime operator-(
  const COARefTime& rt
  );

Parameters
rt
COARefTime object to be subtracted.
Return Values

Returns the result of the subtraction.

Remarks

This object is the object subtracted from.


COARefTime::Operator +=

COARefTime Class

Adds two COARefTime objects and makes this object equal to the result.

COARefTime& operator+=(
  const COARefTime& rt
  );

Parameters
rt
COARefTime object to be added.
Return Values

Returns the result.


COARefTime::Operator –=

COARefTime Class

Subtracts one COARefTime object from another COARefTime object and makes this object equal to the result.

COARefTime& operator-=(
  const COARefTime& rt
  );

Parameters
rt
COARefTime object to be subtracted.
Return Values

Returns the result.

Remarks

This object is the object subtracted from.


COARefTime::Operator *

COARefTime Class

Multiplies the COARefTime object by a value.

COARefTime operator*(
  LONG l
  );

Parameters
l
Value to multiply by.
Return Values

Returns the result.


COARefTime::Operator /

COARefTime Class

Divides one COARefTime object by a value.

COARefTime operator/(
  LONG l
  );

Parameters
l
Value to divide by.
Return Values

Returns the result.

© 1998 Microsoft Corporation. All rights reserved. Terms of Use.

*Top of Page