Class: TFormattableParameterList

Declaration: Formatter.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TFormattable

Inherited By:

None.

Purpose:

Derived from TFormattable, it encapsulates an indexed list of parameters for supplying to TParameterFormatter.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

Any class derived from TParameterFormatter should have a formattable derived from this class.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TFormattableParameterList::TFormattableParameterList

  1. TFormattableParameterList ()
  2. TFormattableParameterList (const TFormattableParameterList & toCopy)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Copy constructor.

Calling Context:

  1. Called by the stream-in operators.
  2. 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: TFormattableParameterList::~TFormattableParameterList

~ TFormattableParameterList ()

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: TFormattableParameterList::operator=

virtual TFormattable & operator =(const TFormattable & toCopy)

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: TFormattableParameterList::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: TFormattableParameterList::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.

Member Function: TFormattableParameterList::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: TFormattableParameterList::SetParameter

virtual void SetParameter (ParameterIndex aParameterNumber, const TFormattable & value)

Interface Category:

API.

Purpose:

Takes the formattable for a given parameter, clones it, and puts it at the specified index in the list. The parameter list maintains its own storage.

Calling Context:

Called to specify a formattable for a single parameter. Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TFormattableParameterList::GetParameter

virtual bool GetParameter (ParameterIndex aParameterNumber, TFormattable & value) const

Interface Category:

API.

Purpose:

Copies the value of the TFormattable at the specified index in the TFormattableParameterList to the storage area provided. The caller must provide the right kind of TFormattable.

Calling Context:

Called to get a copy of the formattable at a particular parameter index.

Parameters:

Return Value:

Returns true if a parameter exists at the specified index.

Exceptions:

Throws an exception if the provided TFormattable is not either the same type of formattable or derived from the TFormattable in the parameter list.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TFormattableParameterList::CopyParameter

virtual TFormattable * CopyParameter (ParameterIndex aParameterNumber) const

Interface Category:

API.

Purpose:

Clones the TFormattable at the specified index and returns a pointer to it.

Calling Context:

Called to get a copy of the formattable at a particular parameter index.

Parameters:

Return Value:

The formattable for that parameter.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TFormattableParameterList::ClearParameter

virtual void ClearParameter (ParameterIndex aParameterNumber)

Interface Category:

API.

Purpose:

Deletes the formattable at the specified index.

Calling Context:

Called to delete the formattable for a particular parameter.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TFormattableParameterList::ClearAllParameters

virtual void ClearAllParameters ()

Interface Category:

API.

Purpose:

Deletes all formattables attached to this parameter list.

Calling Context:

Called before scanning to reset the list. Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TFormattableParameterList::GetMaxParameterCount

virtual ParameterCount GetMaxParameterCount () const

Interface Category:

API.

Purpose:

Returns the maximum number of defined parameters. It might not return the actual number of defined parameters if some indexes are empty.

Calling Context:

Called to get the maximum number of defined parameters.

Parameters:

Return Value:

The maximum number of defined parameters.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TFormattableParameterList::SetChoiceValue

virtual void SetChoiceValue (double value)

Interface Category:

API.

Purpose:

To support TChoiceFormatter.

Calling Context:

Set the value for the TFormattableParameterList.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TFormattableParameterList::GetChoiceValue

virtual double GetChoiceValue () const

Interface Category:

API.

Purpose:

To support TChoiceFormatter.

Calling Context:

Get the Choice value for the TFormattableParameterList.

Parameters:

Return Value:

Returns a real number.

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.