00001 /* 00002 * Filter.hpp 00003 * 00004 * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. 00005 * 00006 * Oracle is a registered trademarks of Oracle Corporation and/or its 00007 * affiliates. 00008 * 00009 * This software is the confidential and proprietary information of Oracle 00010 * Corporation. You shall not disclose such confidential and proprietary 00011 * information and shall use it only in accordance with the terms of the 00012 * license agreement you entered into with Oracle. 00013 * 00014 * This notice may not be removed or altered. 00015 */ 00016 #ifndef COH_FILTER_HPP 00017 #define COH_FILTER_HPP 00018 00019 #include "coherence/lang.ns" 00020 00021 COH_OPEN_NAMESPACE2(coherence,util) 00022 00023 00024 /** 00025 * Provide for "pluggable" conditional behavior. 00026 * 00027 * @author jh 2008.02.26 00028 */ 00029 class COH_EXPORT Filter 00030 : public interface_spec<Filter> 00031 { 00032 // ----- Filter interface ----------------------------------------------- 00033 00034 public: 00035 /** 00036 * Apply the test to the object. 00037 * 00038 * @param v the object to test 00039 * 00040 * @return true if the test passes, false otherwise 00041 */ 00042 virtual bool evaluate(Object::View v) const = 0; 00043 }; 00044 00045 COH_CLOSE_NAMESPACE2 00046 00047 #endif // COH_FILTER_HPP