Click or drag to resize
CharacterCountingIterator Class
Iterator that counts characters of text and tag items as it is moved forward and backward through the content of a paragraph.
Inheritance Hierarchy
SystemObject
  Sdl.FileTypeSupport.Framework.Core.Utilities.BilingualApiCharacterCountingIterator

Namespace: Sdl.FileTypeSupport.Framework.Core.Utilities.BilingualApi
Assembly: Sdl.FileTypeSupport.Framework.Core.Utilities (in Sdl.FileTypeSupport.Framework.Core.Utilities.dll) Version: 1.0.0.0 (1.0.2551.0)
Syntax
public class CharacterCountingIterator

The CharacterCountingIterator type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyCharacterCount
Number of characters counted up to this location.
Public propertyCharactersToNextLocation
The number of characters that that appear between the current location and the next available location.
Public propertyCharactersToPreviousLocation
The number of characters that appear between the current location and the preceding location.
Public propertyCurrentLocation
The current counting location
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodMoveNext
Increments the character count by the number of characters between the current location and the next location, and advances the location one step by calling MoveNext.
Public methodMovePrevious
Decrements the character count by the number of characters between the current location and the next location, and moves to the previous location by calling MovePrevious.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Remarks

Characters are counted in a similar fashion to how the content is represented in native API.

Moving over a text item increments the count according to the number of characters that are found in the text.

Moving over the start of a tag pair increments the count according to the number of characters in the tag content of the start tag properties.

Moving over the end of a tag pair increments the count according to the number of characters in the tag content of the end tag properties.

Moving over a placeholder tag increments the count according the number of characters in the tag content of the placeholder tag properties.

Moving over a locked content node increments the count according to the number of characters that are present in all tags and text in the locked content (recursively).

This component is used by the framework for approximate mapping of locations between the bilingual content and the native output format.

See Also
Community
Edit

Be the first to Edit the community content of this topic.
Comments