Adobe.com
Contents Suites Classes Class Index Member Index

ATE::IWordsIterator Class Reference

This object allows you to iterate through a set of words in a text range. More...

#include <IText.h>

List of all members.

Public Member Functions

 IWordsIterator ()
 Constructor.
 IWordsIterator (const IWordsIterator &src)
 Copy constructor.
IWordsIteratoroperator= (const IWordsIterator &rhs)
 Assignment operator.
bool operator== (const IWordsIterator &rhs) const
 Comparison operator tests for equality.
bool operator!= (const IWordsIterator &rhs) const
 Comparison operator tests for inequality.
 IWordsIterator (WordsIteratorRef wordsiterator)
 Constructs this C++ object from the corresponding C object returned by an ATE suite function.
virtual ~IWordsIterator ()
 Destructor.
WordsIteratorRef GetRef () const
 Retrieves a reference to this object.
bool IsNull () const
 Reports whether this is a null object.
 IWordsIterator (const ITextRanges &ranges, Direction direction=kForward)
 Constructor.
bool IsNotDone () const
 Reports whether the end of the set has been reached.
bool IsDone () const
 Reports whether the end of the set has been reached.
bool IsEmpty () const
 Reports whether the set is empty.
void MoveToFirst ()
 Sets the current position to the first member of this set.
void MoveToLast ()
 Sets the current position to the last member of this set.
void Next ()
 Increments the current position in the set in the iterator's current direction.
ITextRange Item () const
 Retrieves the text range for the current word, including trailing characters.
ATETextDOM::Int32 GetTrailingSpaceCount () const
 Trailing characters.
ATETextDOM::Int32 GetTrailingCount () const
 Retrieves the total number of trailing characters for the current word, including spaces, other white-space characters, and punctuation characters.
ATETextDOM::Int32 GetTrailingTerminatingPunctuationCount () const
 Retrieves the number of trailing punctuation characters for the current word.

Detailed Description

This object allows you to iterate through a set of words in a text range.

Create an iterator object using ITextRange::GetWordsIterator(), or the corresponding method in ITextRanges, IStory, IStories, IParagraph, or IGlyphs.


Constructor & Destructor Documentation

ATE::IWordsIterator::IWordsIterator (  ) 

Constructor.

Returns:
The new object.
ATE::IWordsIterator::IWordsIterator ( const IWordsIterator src  ) 

Copy constructor.

Parameters:
src The object to copy.
Returns:
The new object.

References ATE::sWordsIterator.

ATE::IWordsIterator::IWordsIterator ( WordsIteratorRef  wordsiterator  )  [explicit]

Constructs this C++ object from the corresponding C object returned by an ATE suite function.

The C++ object manages reference counting.

Parameters:
wordsiterator The C object.
Returns:
The new C++ object.
ATE::IWordsIterator::~IWordsIterator (  )  [virtual]

Destructor.

References ATE::sWordsIterator.

ATE::IWordsIterator::IWordsIterator ( const ITextRanges ranges,
Direction  direction = kForward 
)

Constructor.

Creates an iterator object for the words in a specific text range set. that is ordered first-to-last or last-to-first.

Parameters:
ranges The text range set object.
direction Optional. The order of iteration. Default is first-to-last.
Returns:
The new iterator object.

References ATE::ITextRanges::GetRef(), ATE::sWordsIterator, and ATE::Throw_ATE_Exception().


Member Function Documentation

WordsIteratorRef ATE::IWordsIterator::GetRef (  )  const

Retrieves a reference to this object.

Returns:
The object reference.
ATETextDOM::Int32 ATE::IWordsIterator::GetTrailingCount (  )  const

Retrieves the total number of trailing characters for the current word, including spaces, other white-space characters, and punctuation characters.

Trailing characters are those after the word, regardless of the direction of iteration.

Returns:
The number of trailing characters.

References ATE::sWordsIterator, and ATE::Throw_ATE_Exception().

ATETextDOM::Int32 ATE::IWordsIterator::GetTrailingSpaceCount (  )  const

Trailing characters.

Retrieves the number of trailing spaces for the current word. Trailing spaces are those after the word, regardless of the direction of iteration.

Returns:
The number of trailing spaces.

References ATE::sWordsIterator, and ATE::Throw_ATE_Exception().

ATETextDOM::Int32 ATE::IWordsIterator::GetTrailingTerminatingPunctuationCount (  )  const

Retrieves the number of trailing punctuation characters for the current word.

Trailing characters are those after the word, regardless of the direction of iteration.

Returns:
The number of trailing punctuation characters.

References ATE::sWordsIterator, and ATE::Throw_ATE_Exception().

bool ATE::IWordsIterator::IsDone (  )  const

Reports whether the end of the set has been reached.

Returns:
True if no more members remain in the set.

References ATE::sWordsIterator, and ATE::Throw_ATE_Exception().

bool ATE::IWordsIterator::IsEmpty (  )  const

Reports whether the set is empty.

Returns:
True if the set is empty.

References ATE::sWordsIterator, and ATE::Throw_ATE_Exception().

bool ATE::IWordsIterator::IsNotDone (  )  const

Reports whether the end of the set has been reached.

Returns:
True if more members remain in the set.

References ATE::sWordsIterator, and ATE::Throw_ATE_Exception().

bool ATE::IWordsIterator::IsNull (  )  const

Reports whether this is a null object.

Returns:
True if this is a null object.

References ATE::sWordsIterator.

ITextRange ATE::IWordsIterator::Item (  )  const

Retrieves the text range for the current word, including trailing characters.

This is equivalent to Ctrl/Cmd + arrow. For example, "..." is considered a word.

Returns:
The text range object.

References ATE::sWordsIterator, and ATE::Throw_ATE_Exception().

void ATE::IWordsIterator::MoveToFirst (  ) 

Sets the current position to the first member of this set.

Returns:
Nothing.

References ATE::sWordsIterator, and ATE::Throw_ATE_Exception().

void ATE::IWordsIterator::MoveToLast (  ) 

Sets the current position to the last member of this set.

Returns:
Nothing.

References ATE::sWordsIterator, and ATE::Throw_ATE_Exception().

void ATE::IWordsIterator::Next (  ) 

Increments the current position in the set in the iterator's current direction.

Returns:
Nothing.

References ATE::sWordsIterator, and ATE::Throw_ATE_Exception().

bool ATE::IWordsIterator::operator!= ( const IWordsIterator rhs  )  const

Comparison operator tests for inequality.

Parameters:
rhs The object to compare to this one.
Returns:
True if the two objects are not the same.
IWordsIterator & ATE::IWordsIterator::operator= ( const IWordsIterator rhs  ) 

Assignment operator.

Parameters:
rhs The object to assign to this one.
Returns:
A reference to this object.

References ATE::sWordsIterator.

bool ATE::IWordsIterator::operator== ( const IWordsIterator rhs  )  const

Comparison operator tests for equality.

Parameters:
rhs The object to compare to this one.
Returns:
True if the two objects are the same.

The documentation for this class was generated from the following files:


Contents Suites Classes Class Index Member Index
Adobe Solutions Network
 
Copyright © 2016 Adobe Systems Incorporated. All rights reserved.
Terms of Use Online Privacy Policy Adobe and accessibility Avoid software piracy Permissions and Trademarks