COARefTime Class

COARefTime class hierarchy

The COARefTime 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

COARefTime Constructs a COARefTime object.

Operators

double Retrieves 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.

Syntax

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 Value

No return value.

COARefTime::double

COARefTime Class

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

Syntax

operator double();

Return Value

Returns the reference time as a double value.

COARefTime::Operator =

COARefTime Class

Copy constructor for a COARefTime object.

Syntax

COARefTime& operator=(
    const double& rd
    );

Parameters

rd
A double value that constructs a COARefTime object.

Return Value

No return value.

COARefTime::Operator ==

COARefTime Class

Tests for equality between COARefTime objects.

Syntax

BOOL operator==(
    const COARefTime& rt
    );

Parameters

rt
COARefTime object corresponding to the right side of the operator.

Return Value

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

Remarks

This object is on the left side of the operator.

COARefTime::Operator !=

COARefTime Class

Tests for inequality between COARefTime objects.

Syntax

BOOL operator!=(
    const COARefTime& rt
    );

Parameters

rt
COARefTime object corresponding to the right side of the operator.

Return Value

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.

Syntax

BOOL operator < (
    const COARefTime& rt
    );

Parameters

rt
COARefTime object corresponding to the right side of the operator.

Return Value

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.

Syntax

BOOL operator > (
    const COARefTime& rt
    );

Parameters

rt
COARefTime object corresponding to the right side of the operator.

Return Value

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.

Syntax

BOOL operator >= (
    const COARefTime& rt
    );

Parameters

rt
COARefTime object corresponding to the right side of the operator.

Return Value

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.

Syntax

BOOL operator <= (
    const COARefTime& rt
    );

Parameters

rt
COARefTime object corresponding to the right side of the operator.

Return Value

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.

Syntax

COARefTime operator+(
    const COARefTime& rt
    );

Parameters

rt
COARefTime object to be added.

Return Value

Returns the result of the addition.

COARefTime::Operator –

COARefTime Class

Subtracts one COARefTime object from another COARefTime object.

Syntax

COARefTime operator-(
    const COARefTime& rt
    );

Parameters

rt
COARefTime object to be subtracted.

Return Value

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.

Syntax

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

Parameters

rt
COARefTime object to be added.

Return Value

Returns the result.

COARefTime::Operator –=

COARefTime Class

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

Syntax

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

Parameters

rt
COARefTime object to be subtracted.

Return Value

Returns the result.

Remarks

This object is the object subtracted from.

COARefTime::Operator *

COARefTime Class

Multiplies the COARefTime object by a value.

Syntax

COARefTime operator*(
    LONG l
    );

Parameters

l
Value to multiply by.

Return Value

Returns the result.

COARefTime::Operator /

COARefTime Class

Divides one COARefTime object by a value.

Syntax

COARefTime operator/(
    LONG l
    );

Parameters

l
Value to divide by.

Return Value

Returns the result.


Top of Page Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.