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.
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.
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:
- TTime & theTime -Set to the time source's time.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
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:
- TTime * timeSourceTime -A pointer to the driven time source's time.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual TStream & operator >>=(TStream & toWhere) const
Interface Category:
API.
Purpose:
Stream-out operator.
Calling Context:
Called to stream out data.
Parameters:
- TStream & toWhere -The stream the object streams itself out to.
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.
virtual TStream & operator <<= (TStream & fromWhere)
Interface Category:
API.
Purpose:
Stream-in operator.
Calling Context:
Called to stream in data.
Parameters:
- TStream & fromWhere -The stream the object streams itself in from.
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.
TDrivenTimeSourceSurrogate (const TRecoverableSemaphoreHandle & semaphore)
Interface Category:
API.
Purpose:
Instantiates the object and initializes the semaphore to use.
Calling Context:
Call this function directly.
Parameters:
- const TRecoverableSemaphoreHandle & semaphore -The semaphore to protect access to the time that the driven time source surrogate is using.
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.