Filter Struct Reference

A (possibly empty) criteria for deciding to execute a line in a sed script. The criteria include. More...

#include <muSED.h>

Collaboration diagram for Filter:
Collaboration graph
[legend]

List of all members.

Public Types

enum  type {
  none,
  regex,
  lineNumber,
  lastLine
}

Public Member Functions

virtual std::string debugString () const
 Filter ()
Filteroperator= (Filter const &rhs)
template<class StringIterator >
bool parse (StringIterator &first, StringIterator const &last)
 parse a string into *this.
bool passes (size_t lineNo, bool isLast, std::string const &line)
 filter. If the filter type is none, all of them do.

Public Attributes

size_t line_
SimpleRegex regex_
type type_

Detailed Description

A (possibly empty) criteria for deciding to execute a line in a sed script. The criteria include.

The filter can be any of the above, or none.

Note:
Filter logic inversion is handled by FilterableStatement, note here

Definition at line 133 of file muSED.h.


Member Enumeration Documentation

enum type
Enumerator:
none 
regex 
lineNumber 
lastLine 

Definition at line 150 of file muSED.h.


Constructor & Destructor Documentation

Filter (  ) 

Definition at line 159 of file muSED.h.


Member Function Documentation

std::string debugString (  )  const [virtual]

Definition at line 96 of file muSED.cxx.

Here is the caller graph for this function:

Filter& operator= ( Filter const &  rhs  ) 

Definition at line 165 of file muSED.h.

bool parse ( StringIterator &  first,
StringIterator const &  last 
)

parse a string into *this.

Parameters:
[in,out] first Pointer to the next input character;
[in] last Pointer past the end of valid input
Returns:
true to indicate the successfull parsing of a filter.

Note that returning false only means that there was no filter, not that an error occurred -- although it might mean that!

Leading blanks will be skipped. If an actual error occurrs, The first non-blank character will be the location where this function leaves 'first', which is an in/out parameter.

Definition at line 197 of file muSED.h.

Here is the call graph for this function:

Here is the caller graph for this function:

bool passes ( size_t  lineNo,
bool  isLast,
std::string const &  line 
)

filter. If the filter type is none, all of them do.

Parameters:
[in] lineNo The number of the current line of text
[in] isLast A boolean indicating that this line is the last line of the input stream
[in] line The text of the current line
Returns:
true to indicate that the line matches the filter
Parameters:
line Determine if the current line of text passes the

Definition at line 67 of file muSED.cxx.

Here is the caller graph for this function:


Member Data Documentation

size_t line_

Definition at line 156 of file muSED.h.

Definition at line 154 of file muSED.h.

Definition at line 152 of file muSED.h.


The documentation for this struct was generated from the following files:
Generated on Wed Feb 29 22:59:01 2012 for CXXUtilities by  doxygen 1.6.3