| CharacterCountingIterator Class |
Namespace: Sdl.FileTypeSupport.Framework.Core.Utilities.BilingualApi
The CharacterCountingIterator type exposes the following members.
| Name | Description | |
|---|---|---|
| CharacterCountingIterator(Location) |
Create the iterator with a specified start location. The root parent of the location
determines the scope of the iteration. The iterator will not count past the end of the
top-level parent.
| |
| CharacterCountingIterator(Location, FuncCharacterCountingIteratorICharacterCountingVisitor, FuncCharacterCountingIteratorICharacterCountingVisitor) |
This constructor overload allows a custom implementations of the
counter visitor implementations.
|
| Name | Description | |
|---|---|---|
| CharacterCount |
Number of characters counted up to this location.
| |
| CharactersToNextLocation |
The number of characters that that appear between the current
location and the next available location.
| |
| CharactersToPreviousLocation |
The number of characters that appear between the current location
and the preceding location.
| |
| CurrentLocation |
The current counting location
|
| Name | Description | |
|---|---|---|
| MoveNext |
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.
| |
| MovePrevious |
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.
|
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.