Index Topic Contents | |||
Previous Topic: CMsgThread Class Next Topic: COutputQueue Class |
COARefTime Class
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 Class
COARefTime::COARefTimeConstructs 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 Class
COARefTime::doubleRetrieves the reference time as a double value, converted from 100-nanosecond units to seconds.
operator double();COARefTime Class
COARefTime::Operator =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 Class
COARefTime::Operator ==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 Class
COARefTime::Operator !=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 Class
COARefTime::Operator <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 Class
COARefTime::Operator >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 Class
COARefTime::Operator >=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 Class
COARefTime::Operator <=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 Class
COARefTime::Operator +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 Class
COARefTime::Operator 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 Class
COARefTime::Operator +=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 Class
COARefTime::Operator =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 Class
COARefTime::Operator *Multiplies the COARefTime object by a value.
COARefTime operator*(
LONG l
);Parameters
- l
- Value to multiply by.
Return Values
Returns the result.
COARefTime Class
COARefTime::Operator /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.