Public Types | Public Member Functions | Static Public Attributes | Protected Attributes

LogFilter Class Reference

#include <LogFilter.h>

Inherited by LogFilterInt, LogFilterIP, and LogFilterString.

Collaboration diagram for LogFilter:
Collaboration graph
[legend]

Public Types

enum  Type { INT_FILTER = 0, STRING_FILTER, IP_FILTER, N_TYPES }
enum  Action { REJECT = 0, ACCEPT, WIPE_FIELD_VALUE, N_ACTIONS }
enum  Operator {
  MATCH = 0, CASE_INSENSITIVE_MATCH, CONTAIN, CASE_INSENSITIVE_CONTAIN,
  N_OPERATORS
}

Public Member Functions

 LogFilter (const char *name, LogField *field, Action action, Operator oper)
virtual ~LogFilter ()
char * name () const
Type type () const
size_t get_num_values () const
virtual bool toss_this_entry (LogAccess *lad)=0
virtual bool wipe_this_entry (LogAccess *lad)=0
virtual void display (FILE *fd=stdout)=0
virtual void display_as_XML (FILE *fd=stdout)=0
void reverse ()
 LINK (LogFilter, link)

Static Public Attributes

static const char * ACTION_NAME [] = { "REJECT", "ACCEPT", "WIPE_FIELD_VALUE" }
static const char * OPERATOR_NAME [] = { "MATCH", "CASE_INSENSITIVE_MATCH","CONTAIN", "CASE_INSENSITIVE_CONTAIN" }

Protected Attributes

char * m_name
LogFieldm_field
Action m_action
Operator m_operator
Type m_type
size_t m_num_values

Detailed Description

Definition at line 42 of file LogFilter.h.


Member Enumeration Documentation

Enumerator:
REJECT 
ACCEPT 
WIPE_FIELD_VALUE 
N_ACTIONS 

Definition at line 53 of file LogFilter.h.

Enumerator:
MATCH 
CASE_INSENSITIVE_MATCH 
CONTAIN 
CASE_INSENSITIVE_CONTAIN 
N_OPERATORS 

Definition at line 66 of file LogFilter.h.

Enumerator:
INT_FILTER 
STRING_FILTER 
IP_FILTER 
N_TYPES 

Definition at line 45 of file LogFilter.h.


Constructor & Destructor Documentation

LogFilter::LogFilter ( const char *  name,
LogField field,
LogFilter::Action  action,
LogFilter::Operator  oper 
)

Definition at line 55 of file LogFilter.cc.

References ink_assert, LogFilter(), and m_field.

Referenced by LogFilter().

LogFilter::~LogFilter (  )  [virtual]

Definition at line 65 of file LogFilter.cc.

References ats_free(), m_field, and m_name.


Member Function Documentation

virtual void LogFilter::display ( FILE *  fd = stdout  )  [pure virtual]

Implemented in LogFilterString, LogFilterInt, and LogFilterIP.

virtual void LogFilter::display_as_XML ( FILE *  fd = stdout  )  [pure virtual]

Implemented in LogFilterString, LogFilterInt, and LogFilterIP.

size_t LogFilter::get_num_values (  )  const [inline]

Definition at line 81 of file LogFilter.h.

References m_num_values.

LogFilter::LINK ( LogFilter  ,
link   
)
char* LogFilter::name (  )  const [inline]

Definition at line 79 of file LogFilter.h.

References m_name.

void LogFilter::reverse (  )  [inline]

Definition at line 88 of file LogFilter.h.

References ACCEPT, m_action, and REJECT.

virtual bool LogFilter::toss_this_entry ( LogAccess lad  )  [pure virtual]

Implemented in LogFilterString, LogFilterInt, and LogFilterIP.

Type LogFilter::type (  )  const [inline]

Definition at line 80 of file LogFilter.h.

References m_type.

Referenced by LogFilterList::add(), and filters_are_equal().

virtual bool LogFilter::wipe_this_entry ( LogAccess lad  )  [pure virtual]

Implemented in LogFilterString, LogFilterInt, and LogFilterIP.


Field Documentation

const char * LogFilter::ACTION_NAME = { "REJECT", "ACCEPT", "WIPE_FIELD_VALUE" } [static]
char* LogFilter::m_name [protected]
size_t LogFilter::m_num_values [protected]
Type LogFilter::m_type [protected]
const char * LogFilter::OPERATOR_NAME = { "MATCH", "CASE_INSENSITIVE_MATCH","CONTAIN", "CASE_INSENSITIVE_CONTAIN" } [static]

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