idaeim studio
 Strings

Public Types | Public Member Functions
String_Filter Class Reference

A String_Filter filters the String contents of a Sliding_String during its slide forward. More...

#include <String_Filter.hh>

Inheritance diagram for String_Filter:
Inheritance graph
[legend]

List of all members.

Public Types

typedef std::string::size_type Index
 Index of character in a String.

Public Member Functions

virtual bool enabled (bool enable)
 Enables or disables filtering.
virtual bool enabled () const
 Tests if the filter is enabled or disabled.
virtual void filter (std::string &a_string, Index start=0, Index end=std::string::npos)
 Applies the filtering algorithm to a string.
virtual std::string identification () const
 Gets the identification string for the filter.
virtual ~String_Filter ()

Detailed Description

A String_Filter filters the String contents of a Sliding_String during its slide forward.

See also:
Sliding_String
Author:
Bradford Castalia
Version:
1.12

Member Typedef Documentation

typedef std::string::size_type Index

Index of character in a String.


Constructor & Destructor Documentation

virtual ~String_Filter ( ) [inline, virtual]

Member Function Documentation

virtual std::string identification ( ) const [inline, virtual]

Gets the identification string for the filter.

By default an empty string is provided.

Returns:
A string that identifies the filter.

Reimplemented in Line_Count_Filter, and VMS_Records_Filter.

virtual void filter ( std::string &  a_string,
Index  start = 0,
Index  end = std::string::npos 
) [inline, virtual]

Applies the filtering algorithm to a string.

An index range - [start, end) - of the string may be specified over which filtering is to be applied.

Parameters:
a_stringA string to be filtered.
startThe index in the string of the first character where the filtering is expected to start.
endThe index where filtering is expected to end; this character is not included in the filtering.

Reimplemented in Line_Count_Filter, and VMS_Records_Filter.

virtual bool enabled ( bool  enable) [inline, virtual]

Enables or disables filtering.

Parameters:
enableIf true filtering will be enabled; otherwise it is disabled.
Returns:
The previous state of the filter.

Reimplemented in Line_Count_Filter, and VMS_Records_Filter.

virtual bool enabled ( ) const [inline, virtual]

Tests if the filter is enabled or disabled.

Returns:
The current state of the filter.

Reimplemented in Line_Count_Filter, and VMS_Records_Filter.


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