InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ExceptionHyphenWord Class Reference

#include <ExceptionHyphenWord.h>

Inheritance diagram for ExceptionHyphenWord:
IHyphenatedWordgrRefCountedObj

Public Member Functions

 ExceptionHyphenWord (const WideString &word, const HyphenPoints &points, const int32 nMinTail, const int32 nMinHead)
 
virtual int32 GetPointCount () const
 
virtual int32 GetIndexOfPoint (int32 nNthPoint) const
 
virtual int32 GetQualityOfPoint (int32 nNthPoint) const
 
virtual WideString GetWord () const
 
virtual void GetPartsOfPoint (int32 nNthPoint, WideString *pFirstPart, WideString *pLastPart) const
 
virtual void GetFirstPartOfPoint (int32 nNthPoint, WideString *pPart) const
 
virtual void GetLastPartOfPoint (int32 nNthPoint, WideString *pPart) const
 
virtual void Merge (const IHyphenatedWord *pToMergeWith)
 
virtual void ValidatePointRanges (void)
 

Protected Attributes

HyphenPoints fPoints
 
WideString fWord
 

Additional Inherited Members

- Public Types inherited from IHyphenatedWord
enum  {
  kNoHyphenPoint = 0, kVeryUnpreferredHyphenPoint = 10, kUnpreferredHyphenPoint = 25, kRegularHyphenPoint = 50,
  kPreferredHyphenPoint = 75, kDiscretionaryHyphenPoint = 80, kHardHyphenPoint = 90, kBestHyphenPoint = 100,
  kWorstHyphenPoint = 0, kForcedHyphenPoint = kBestHyphenPoint, kRefusedHyphenPoint = kWorstHyphenPoint, kInvalidHyphenPoint = -1
}
 

Detailed Description

Stores information about the hyphenation points within a particular word.

Constructor & Destructor Documentation

ExceptionHyphenWord::ExceptionHyphenWord (const WideStringword,
const HyphenPointspoints,
const int32 nMinTail,
const int32 nMinHead 
)

Constructor. pWord and pPoints will be copied.

Member Function Documentation

virtual void ExceptionHyphenWord::GetFirstPartOfPoint (int32 nNthPoint,
WideStringpPart 
) const
virtual

Fills the WideString without hyphen, i.e.: "service" to "ser". Will do spelling changes but doesn't add the hyphen (if it wasn't already there).

Parameters
nNthPointis which break point.
pPartis a pointer (not nil) to a blank WideString, is filled out with the pre-break point part.

Implements IHyphenatedWord.

virtual int32 ExceptionHyphenWord::GetIndexOfPoint (int32 nNthPoint) const
virtual

The index is the position before the hyphen: i.e. ser-vice returns 2 (zero-based).

Parameters
nNthPointis which point to ask about.
Returns
the index in the word of the Nth hyphenation point.

Implements IHyphenatedWord.

virtual void ExceptionHyphenWord::GetLastPartOfPoint (int32 nNthPoint,
WideStringpPart 
) const
virtual

Fills the WideString, i.e.: "service" to "vice". Can do spelling changes.

Parameters
nNthPointis which break point.
pPartis a pointer (not nil) to a blank WideString, is filled out with the post-break point part.

Implements IHyphenatedWord.

virtual void ExceptionHyphenWord::GetPartsOfPoint (int32 nNthPoint,
WideStringpFirstPart,
WideStringpLastPart 
) const
virtual

Fills the WideStrings without hyphen, i.e.: "service" to "ser" and "vice". Will do spelling changes but doesn't add the hyphen (if it wasn't already there).

Parameters
nNthPointis which break point.
pFirstPartis a pointer (not nil) to a blank WideString, is filled out with the pre-break point part.
pLastPartis a pointer (not nil) to a blank WideString, is filled out with the post-break point part.

Implements IHyphenatedWord.

virtual int32 ExceptionHyphenWord::GetPointCount () const
virtual

How many hyphenation points?

Returns
the count of hyphenation points that has been found.

Implements IHyphenatedWord.

virtual int32 ExceptionHyphenWord::GetQualityOfPoint (int32 nNthPoint) const
virtual

The quality value of the Nth hyphenation point.

Parameters
nNthPointis which point to ask about.
Returns
the quality in the word of the Nth hyphenation point.

Implements IHyphenatedWord.

virtual WideString ExceptionHyphenWord::GetWord () const
virtual

Copies the word (might be different because the linguisitc systems do their own character translations).

Returns
a WideString version of the word being hyphenated.

Implements IHyphenatedWord.

virtual void ExceptionHyphenWord::Merge (const IHyphenatedWordpToMergeWith)
virtual

Merge 2 lists of break points. Used to combine dictionary breakpoints with other types of breaking Used only for to combine hard dash breaking since Discretionary hyphens always take precidence.

Parameters
pToMergeWithis another hyphenated word to merge into this one.

Implements IHyphenatedWord.

virtual void ExceptionHyphenWord::ValidatePointRanges (void )
virtual

after merging, this routine is called as a post-method clean up

Implements IHyphenatedWord.