Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TTranscoder
Inherited By:
None.
Purpose:
An abstract base class that provides the protocol for editable transcoders whose rules can be represented using the TTranscodingRule class.
Instantiation:
Not instantiated directly.
Deriving Classes:
Derive when necessary to implement particular mapping behavior for a transcoder.
Concurrency:
Not multithread safe. Implementors must add multithread protection.
Resource Use:
Because they are often large, implementors might want to share them across address spaces using a server. Access can be provided through surrogates. This is what is done with TMacintoshTranscoder.
- TRuleBasedTranscoder ()
- TRuleBasedTranscoder (const TToken & encoding, TTextCount maximumBytesPerCharacter)
- TRuleBasedTranscoder (const TRuleBasedTranscoder & copyIn)
Interface Category:
API.
Purpose:
- Default constructor. This constructor is protected.
- Creates a transcoder ready for adding rules. This constructor is protected.
- Copy constructor. This constructor is protected.
Calling Context:
- Called by the stream-in operators.
- Called by derived classes during construction.
- Called to copy an object.
Parameters:
- Takes no parameters.
- const TToken & encoding -The encoding that this transcoder can be used for.
- TTextCount maximumBytesPerCharacter -The maximum bytes required for transcoding from Unicode to a character in this encoding.
- const TRuleBasedTranscoder & copyIn -The source transcoding from which this will be copied.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe. Implementors must add.
Other Considerations:
None.
virtual void AddRule (TTranscodingRule & rule)
Interface Category:
API.
Purpose:
Adds a rule to this transcoder for transcoding to or from Unicode
Calling Context:
Called during editing of a transcoder.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe. Implementors must add.
Other Considerations:
This is a pure virtual function and needs to be overridden.
virtual long RuleCount () const
Interface Category:
API.
Purpose:
Allows clients to know the number of rules that exist in an editable transcoder.
Calling Context:
Called during editing.
Parameters:
Return Value:
The number of rules in this transcoder.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe. Implementors must add.
Other Considerations:
This is a pure virtual function and needs to be overridden.
virtual void Compact ()
Interface Category:
API.
Purpose:
Allows compacting of transcoding rules.
Calling Context:
Called after insertion of multiple rules for possible size reduction. However, transcoders should be usable without previously calling Compact.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe. Implementors must add.
Other Considerations:
This is a pure virtual function and needs to be overridden.
TRuleBasedTranscoder & operator =(const TRuleBasedTranscoder & from)
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. Implementors must add.
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. Implementors must add.
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. Implementors must add.
Other Considerations:
None.
virtual ~ TRuleBasedTranscoder ()
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. Implementors must add.
Other Considerations:
None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.