C++ Client API Reference for Oracle Coherence
14c (14.1.2.0.0)

F79659-03

coherence/util/filter/AnyFilter.hpp

00001 /*
00002  * Copyright (c) 2000, 2020, Oracle and/or its affiliates.
00003  *
00004  * Licensed under the Universal Permissive License v 1.0 as shown at
00005  * http://oss.oracle.com/licenses/upl.
00006  */
00007 #ifndef COH_ANY_FILTER_HPP
00008 #define COH_ANY_FILTER_HPP
00009 
00010 #include "coherence/lang.ns"
00011 
00012 #include "coherence/util/Map.hpp"
00013 #include "coherence/util/filter/ArrayFilter.hpp"
00014 
00015 COH_OPEN_NAMESPACE3(coherence,util,filter)
00016 
00017 
00018 /**
00019 * Filter which returns the logical "or" of a filter array.
00020 *
00021 * @author djl  2008.03.23
00022 */
00023 class COH_EXPORT AnyFilter
00024     : public class_spec<AnyFilter,
00025         extends<ArrayFilter> >
00026     {
00027     friend class factory<AnyFilter>;
00028 
00029     // ----- constructors ---------------------------------------------------
00030 
00031     protected:
00032         /**
00033         * Default constructor (necessary for the PortableObject interface).
00034         */
00035         AnyFilter();
00036 
00037         /**
00038         * Construct an "any" filter. The result is defined as:
00039         *   vaFilter[0] || vaFilter[1] ... || vaFilter[n]
00040         *
00041         * @param vaFilter   an array of filters
00042         */
00043         AnyFilter(ObjectArray::View vaFilter);
00044 
00045     private:
00046         /**
00047         * Blocked copy constructor.
00048         */
00049         AnyFilter(const AnyFilter&);
00050 
00051 
00052     // ----- EntryFilter interface ------------------------------------------
00053 
00054     public:
00055         /**
00056         * {@inheritDoc}
00057         */
00058         virtual bool evaluateEntry(Map::Entry::View vEntry) const;
00059 
00060 
00061     // ----- Filter interface -----------------------------------------------
00062 
00063     public:
00064         /**
00065         * {@inheritDoc}
00066         */
00067         virtual bool evaluate(Object::View v) const;
00068 
00069 
00070     // ----- IndexAwareFilter interface -------------------------------------
00071 
00072     public:
00073         /**
00074         * {@inheritDoc}
00075         */
00076         virtual size32_t calculateEffectiveness(Map::View vMapIndexes,
00077                 Set::View vSetKeys) const;
00078 
00079         /**
00080         * {@inheritDoc}
00081         */
00082         virtual Filter::View applyIndex(Map::View vMapIndexes,
00083                 Set::Handle hSetKeys) const;
00084     };
00085 
00086 COH_CLOSE_NAMESPACE3
00087 
00088 #endif // COH_ANY_FILTER_HPP
Copyright © 2000, 2025, Oracle and/or its affiliates. Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.