Oracle Coherence for C++ API
Release 3.6.0.0

E15728-01

ExtractorFilter Class Reference

#include <coherence/util/filter/ExtractorFilter.hpp>

Inherits Object, EntryFilter, and PortableObject.

Inherited by ComparisonFilter, and ValueChangeEventFilter.

List of all members.


Detailed Description

Base Filter implementation for doing extractor-based processing.
Author:
djl 2008.03.02

Public Types

typedef spec::Handle  Handle
  ExtractorFilter Handle definition.
typedef spec::View  View
  ExtractorFilter View definition.
typedef spec::Holder  Holder
  ExtractorFilter Holder definition.

Public Member Functions

virtual bool  evaluateEntry (Map::Entry::View vEntry) const
  Apply the test to a Map::Entry.
Parameters:
vEntry  the Map::Entry to evaluate; never NULL
Returns:
true if the test passes, false otherwise

virtual bool  evaluate (Object::View v) const
  Apply the test to the object.
Parameters:
v  the object to test
Returns:
true if the test passes, false otherwise

virtual void  readExternal (PofReader::Handle hIn)
 
virtual void  writeExternal (PofWriter::Handle hOut) const
 
virtual void  toStream (std::ostream &out) const
  Output a human-readable description of this Object to the given stream.

coherence::lang::operator<<(std::ostream, Object::View) is defined and will call into the toStream method, to output Objects. If a managed String object is desired, the COH_TO_STRING macro can be used to build up a String from streamable contents.

 Object::View vKey   = ...
 Object::View vValue = ...
 std::cout << vKey << " = " << vValue << std::endl;

 String::Handle hs = COH_TO_STRING(vKey << " = " << vValue);
Parameters:
out  the stream used to output the description

virtual
ValueExtractor::View 
getValueExtractor () const
  Obtain the ValueExtractor used by this filter.

Static Public Attributes

static const size32_t  EVAL_COST
  The evaluation cost as a factor to the single index access operation.

Protected Member Functions

  ExtractorFilter ()
  Default constructor (necessary for the PortableObject interface).
  ExtractorFilter (ValueExtractor::View vExtractor)
  Construct a ExtractorFilter for a given ValueExtractor.
virtual bool  evaluateExtracted (Object::View vExtracted) const =0
  Evaluate the specified extracted value.
virtual Object::View  extract (Object::View v) const
  Get the result of ValueExtractor invocation.

Protected Attributes

MemberView
< ValueExtractor
m_vExtractor
  The ValueExtractor used by this filter.

Constructor & Destructor Documentation

ExtractorFilter ( ValueExtractor::View  vExtractor  )  [protected]

Construct a ExtractorFilter for a given ValueExtractor.

Parameters:
vExtractor  the ValueExtractor to use by this filter

Member Function Documentation

virtual bool evaluateExtracted ( Object::View  vExtracted  )  const [protected, pure virtual]

Evaluate the specified extracted value.

Parameters:
vExtracted  an extracted value to evaluate

Implemented in ContainsAllFilter, ContainsAnyFilter, ContainsFilter, EqualsFilter, GreaterEqualsFilter, GreaterFilter, InFilter, LessEqualsFilter, LessFilter, LikeFilter, NotEqualsFilter, and ValueChangeEventFilter.

virtual Object::View extract ( Object::View  v  )  const [protected, virtual]

Get the result of ValueExtractor invocation.

Parameters:
v  the object on which to invoke the ValueExtractor; must not be null
Returns:
the result of the method invocation

virtual ValueExtractor::View getValueExtractor (  )  const [virtual]

Obtain the ValueExtractor used by this filter.

Returns:
the ValueExtractor::View used by this filter

Member Data Documentation

const size32_t EVAL_COST [static]

The evaluation cost as a factor to the single index access operation.

See also:
IndexAwareFilter::calculateEffectiveness(Map, Set)

The documentation for this class was generated from the following file:
Copyright © 2000, 2010, Oracle and/or its affiliates. All rights reserved.