Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
MCollectible
Inherited By:
TFormattableNumber
TFormattableParameterList
TFormattableText
TFormattableTime
Purpose:
The base class for data that is wrapped so that it can be formatted by a TFormatter.
Instantiation:
Abstract class; do not allocate.
Deriving Classes:
Anything that needs to be Format or Scan should derive from this class. All formatters can only process a formattable of its own kind or of any of the formattable's base class. Derived classes must provide a protected virtual assignment operator. Derived classes should also override GetChoiceValue and SetChoiceValue, which are needed to support TChoiceFormatter.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
virtual ~ TFormattable ()
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: TFormattable::operator=
virtual TFormattable & operator =(const TFormattable &)
Interface Category:
API.
Purpose:
Assignment operator.
Calling Context:
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: TFormattable::operator>>=
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 is streamed 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:
Not multithread safe.
Other Considerations:
None.
Member Function: TFormattable::operator<<=
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 is streamed 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:
Not multithread safe.
Other Considerations:
None.
- TFormattable ()
- TFormattable (const TFormattable &)
Interface Category:
API.
Purpose:
- Default constructor.
- Copy constructor.
Calling Context:
- Called by the stream-in operators.
- Called to copy an object.
Parameters:
- Takes no parameters.
- const TFormattable & -The object to copy.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TFormattable::SetChoiceValue
virtual void SetChoiceValue (double value)
Interface Category:
API.
Purpose:
Sets a value for this formattable. This function basically does nothing. It provides a default behavior for all the derived classes of TFormattable. This is needed to support TChoiceFormatter.
Calling Context:
Normally, user will not call this member function. It is being called by TChoiceFormatter.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TFormattable::GetChoiceValue
virtual double GetChoiceValue () const
Interface Category:
API.
Purpose:
Gets a value for this formattable. This function always return zero. It provides a default behavior for all the derived classes of TFormattable. This is needed to support TChoiceFormatter.
Calling Context:
Normally, user will not call this member function. It is being called by TChoiceFormatter.
Parameters:
Return Value:
Returns a double.
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.