Class: TRuleBasedTranscoder

Declaration: Transcoding.h

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.

Member Function: TRuleBasedTranscoder::TRuleBasedTranscoder

  1. TRuleBasedTranscoder ()
  2. TRuleBasedTranscoder (const TToken & encoding, TTextCount maximumBytesPerCharacter)
  3. TRuleBasedTranscoder (const TRuleBasedTranscoder & copyIn)

Interface Category:

API.

Purpose:

  1. Default constructor. This constructor is protected.
  2. Creates a transcoder ready for adding rules. This constructor is protected.
  3. Copy constructor. This constructor is protected.

Calling Context:

  1. Called by the stream-in operators.
  2. Called by derived classes during construction.
  3. Called to copy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe. Implementors must add.

Other Considerations:

None.

Member Function: TRuleBasedTranscoder::AddRule

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.

Member Function: TRuleBasedTranscoder::RuleCount

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.

Member Function: TRuleBasedTranscoder::Compact

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.

Member Function: TRuleBasedTranscoder::operator=

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.

Member Function: TRuleBasedTranscoder::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. Implementors must add.

Other Considerations:

None.

Member Function: TRuleBasedTranscoder::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. Implementors must add.

Other Considerations:

None.

Member Function: TRuleBasedTranscoder::~TRuleBasedTranscoder

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.