Class: TFormattableTime

Declaration: DateTime.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TFormattable

Inherited By:

None.

Purpose:

Derived from TFormattable, this class encapsulates an instance of TTime, allowing it to be formatted by TFormatter classes.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

TFormattableTime is a concrete class designed to be used directly.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

None.

Member Function: TFormattableTime::TFormattableTime

  1. TFormattableTime ()
  2. TFormattableTime (const TTime & time)
  3. TFormattableTime (const TFormattableTime & copy)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Constructs a formattable containing the specified TTime.
  3. Copy constructor.

Calling Context:

  1. Called by the stream-in operators.
  2. Call directly to construct a formattable with a specific value.
  3. Called to copy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TFormattableTime::~TFormattableTime

virtual ~ TFormattableTime ()

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:

Not multithread safe.

Other Considerations:

None.

Member Function: TFormattableTime::GetChoiceValue

virtual double GetChoiceValue () const

Interface Category:

API.

Purpose:

Returns a number, based on the value of the encapsulated data, indicating the correct TParameterFormatter to use for formatting.

Calling Context:

Called by TChoiceFormatter during formatting.

Parameters:

Return Value:

The number of the TParameterFormatter to use.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TFormattableTime::SetChoiceValue

virtual void SetChoiceValue (double value)

Interface Category:

API.

Purpose:

Sets the data in this formattable, based on the TParameterFormatter object that provided the best text match during scanning.

Calling Context:

Called by TChoiceFormatter during scanning.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TFormattableTime::GetTime

void GetTime (TTime & time) const

Interface Category:

API.

Purpose:

Returns the time encapsulated by this formattable.

Calling Context:

Called to retrieve the time encapsulated by this formattable.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TFormattableTime::SetTime

virtual void SetTime (const TTime & time)

Interface Category:

API.

Purpose:

Sets the time encapsulated by this formattable.

Calling Context:

Called to reset the time encapsulated by this formattable after construction.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TFormattableTime::Hash

virtual long Hash () const

Interface Category:

API.

Purpose:

Generates a hash value.

Calling Context:

Called to generate a hash value.

Parameters:

Return Value:

The numeric value of the hash.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TFormattableTime::operatordouble

virtual operator double ()

Interface Category:

API.

Purpose:

Converts the encapsulated data into a double value.

Calling Context:

Called to convert the encapsulated data into a double value.

Parameters:

Return Value:

Implicitly int.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TFormattableTime::operator=

  1. virtual TFormattable & operator =(double value)
  2. virtual TFormattable & operator =(const TFormattable & toCopy)
  3. virtual TFormattableTime & operator =(const TFormattableTime & toCopy)

Interface Category:

API.

Purpose:

  1. Assignment operator.
  2. Assignment operator.
  3. Assignment operator.

Calling Context:

  1. Called when an object is assigned to another compatible object.
  2. Called when an object is assigned to another compatible object.
  3. Called when an object is assigned to another compatible object.

Parameters:

Return Value:

A non-const reference to the left-hand side object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TFormattableTime::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:

Not multithread safe.

Other Considerations:

None.

Member Function: TFormattableTime::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:

Not 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.