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

#include <TextCharFilter.h>

Inheritance diagram for TextCharFilter:

Public Types

typedef std::set< UTF32TextCharCharSet
 

Public Member Functions

 TextCharFilter (textchar const *pFilteredChars, size_t count)
 
bool Add (textchar ch)
 
bool Remove (textchar ch)
 
CharSet const & GetFilter (void) const
 
bool operator() (UTF32TextChar const &ch) const
 

Detailed Description

Unary predicate that filters out the specified characters. See bottom of the file for usage examples.

Constructor & Destructor Documentation

TextCharFilter::TextCharFilter (textchar const * pFilteredChars,
size_t count 
)
inline

Initializes the filter.

Parameters
pFilteredChars[in]- characters to be filtered out.
count[in]- number of characters in pFilteredChars.

Member Function Documentation

bool TextCharFilter::Add (textchar ch)
inline

Adds a new character to the filter.

Parameters
ch[in]- new character to be filtered out.
Returns
true if the operation succeeded.
CharSet const& TextCharFilter::GetFilter (void ) const
inline

Accessor for the filter. Can be used to iterate the content of the filter.

Returns
const reference to the filter's character set.
bool TextCharFilter::operator() (UTF32TextChar const & ch) const
inline

Filters the specified character. If the character is in the filtered set, the predicate returns true.

Parameters
ch[in]- character to be filtered.
Returns
true if ch is in the filtered set.
bool TextCharFilter::Remove (textchar ch)
inline

Removes a character from the filter.

Parameters
ch[in]- character to be removed from the filter.
Returns
true if the operation succeeded.