Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TParameterFormatter
Inherited By:
None.
Purpose:
Derived from TParameterFormatter, this is a concrete class used by TPatternBasedDateTimeFormatter to format and scan. Typically, a date/time formatter would contain a perfect template used for formatting, and zero or more alternate templates that can be used in scanning. This class is primarily of interest to localizers rather than direct clients.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
TDateTimePattern is a concrete class designed to be used directly and not be derived
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
Other Considerations:
None.
- TDateTimePattern ()
- TDateTimePattern (const TDateTimePattern &)
Interface Category:
API.
Purpose:
- Default constructor.
- Copy constructor.
Calling Context:
- Called by the stream-in operators.
- Called to copy an object.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual ~ TDateTimePattern ()
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: TDateTimePattern::SetDateTimeFieldFormat
virtual void SetDateTimeFieldFormat (const TTextRange & range, ParameterIndex parameterNumber, TCalendar :: DateTimeFieldType whichField, const TFormatter & formatter)
Interface Category:
API.
Purpose:
Associates a TFormatter with a date/time field and a range in the pattern. Because all date/time fields are numeric, the TFormatter must be one that can handle numbers. If this function is not called for a given parameter, it is formatted as an integer.
Calling Context:
Called directly when constructing a pattern.
Parameters:
- const TTextRange & range -The range in the pattern where the formatted value is substituted.
- ParameterIndex parameterNumber -The parameter index.
- TCalendar :: DateTimeFieldType whichField -The calendar field for this parameter.
- const TFormatter & formatter -The formatter for this parameter.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
TDateTimePattern & operator =(const TDateTimePattern & format)
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.
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.
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: TDateTimePattern::GetFieldForParameter
virtual TCalendar :: DateTimeFieldType GetFieldForParameter (ParameterIndex index)
Interface Category:
API.
Purpose:
Gets the type of the date time field in the date pattern, whether it is a YearInEra, MonthInYear, and so on.
Calling Context:
Called to get the field.
Parameters:
- ParameterIndex index -The index into the date pattern fields.
Return Value:
The type of date time field.
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.