Class: TDrivenTimeSourceSurrogate

Declaration: Clock.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TTimeSourceSurrogate

Inherited By:

None.

Purpose:

Provides a fast way for TSyncableClocks to determine what their TimeSource's time is. It is a surrogate for a TDrivenTimeSource. The driven time source keeps the current time in shared memory. TDrivenTimeSourceSurrogate::SetTimePointer sets the pointer to the time, and the semaphoreRef in the constructor is the semaphore used to protect access to it. TDrivenTimeSource automatically sets up a TDrivenTimeSourceSurrogate. This class would only be needed for deriving other functionality.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

Derived classes must preserve interface.

Concurrency:

Multithread safe.

Resource Use:

No special requirements.

Member Function: TDrivenTimeSourceSurrogate::~TDrivenTimeSourceSurrogate

virtual ~ TDrivenTimeSourceSurrogate ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Called to destroy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TDrivenTimeSourceSurrogate::Now

virtual void Now (TTime & theTime) const

Interface Category:

API.

Purpose:

Gets the current time of the driven time source.

Calling Context:

Called polymorphically by TSyncableClock clock framework.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TDrivenTimeSourceSurrogate::SetTimePointer

virtual void SetTimePointer (TTime * timeSourceTime)

Interface Category:

API.

Purpose:

Sets the pointer to the TTime object in shared memory that keeps the driven time source's current time.

Calling Context:

Called before the time source is initialized with this surrogate. TDrivenTimeSource does all the set up automatically for a TDrivenTimeSourceSurrogate.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TDrivenTimeSourceSurrogate::operator>>=

virtual TStream & operator >>=(TStream & toWhere) const

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

Called to stream out data.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself out to.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TDrivenTimeSourceSurrogate::operator<<=

virtual TStream & operator <<= (TStream & fromWhere)

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

Called to stream in data.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself in from.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TDrivenTimeSourceSurrogate::TDrivenTimeSourceSurrogate

TDrivenTimeSourceSurrogate (const TRecoverableSemaphoreHandle & semaphore)

Interface Category:

API.

Purpose:

Instantiates the object and initializes the semaphore to use.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.