ircproxy  The Ultimate Cyborg

Matcher_exactmatch Class Reference

#include <Matcher.h>

Inheritance diagram for Matcher_exactmatch:

Matcher

List of all members.


Detailed Description

Exact match matcher.

Definition at line 200 of file Matcher.h.


Public Member Functions

 Matcher_exactmatch (int param, std::string const &arg, bool single_param)
 Construct a Matcher_exactmatch instance that matches parameter param (and on if single_param is false) against string arg.
virtual void print_type_on (std::ostream &os) const
 For debugging purposes. Write the class name to os.
virtual void print_on (std::ostream &os) const
 For debugging purposes. Write the string to match to os.
virtual int sort_value (void)
 Implementation of pure virtual function Matcher::sort_value().

Protected Member Functions

virtual bool match_impl (ServerSession const &, char const *start, size_t len)
 Implementation of pure virtual function Matcher::match_impl.

Private Attributes

std::string M_string
 The string to match.

Constructor & Destructor Documentation

Matcher_exactmatch::Matcher_exactmatch ( int  param,
std::string const &  arg,
bool  single_param 
) [inline]

Construct a Matcher_exactmatch instance that matches parameter param (and on if single_param is false) against string arg.

Definition at line 206 of file Matcher.h.

00206                                                                            :
00207         Matcher(param, single_param), M_string(arg) { }


Member Function Documentation

virtual void Matcher_exactmatch::print_type_on ( std::ostream &  os  )  const [inline, virtual]

For debugging purposes. Write the class name to os.

Implements Matcher.

Definition at line 211 of file Matcher.h.

00211 { os << "Matcher_exactmatch"; }

virtual void Matcher_exactmatch::print_on ( std::ostream &  os  )  const [inline, virtual]

For debugging purposes. Write the string to match to os.

Reimplemented from Matcher.

Definition at line 213 of file Matcher.h.

00213 { os << "string: \"" << M_string << '"'; }

virtual bool Matcher_exactmatch::match_impl ( ServerSession const &  ,
char const *  start,
size_t  len 
) [inline, protected, virtual]

Implementation of pure virtual function Matcher::match_impl.

Implements Matcher.

Definition at line 219 of file Matcher.h.

References M_string.

00220         { return M_string.compare(0, std::string::npos, start, len) == 0; }

virtual int Matcher_exactmatch::sort_value ( void   )  [inline, virtual]

Implementation of pure virtual function Matcher::sort_value().

Implements Matcher.

Definition at line 224 of file Matcher.h.

00224 { return exactmatch_mt; }


Member Data Documentation

std::string Matcher_exactmatch::M_string [private]

The string to match.

Definition at line 202 of file Matcher.h.

Referenced by match_impl().


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

Copyright © 2005-2007 Carlo Wood.  All rights reserved.