Oracle Coherence for C++ API
Release 3.7.1.0
E22845-01
00001 /* 00002 * NullFilter.hpp 00003 * 00004 * Copyright (c) 2000, 2011, 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_NULL_FILTER_HPP 00017 #define COH_NULL_FILTER_HPP 00018 00019 #include "coherence/lang.ns" 00020 00021 #include "coherence/io/pof/PofReader.hpp" 00022 #include "coherence/io/pof/PofWriter.hpp" 00023 #include "coherence/io/pof/PortableObject.hpp" 00024 #include "coherence/util/Filter.hpp" 00025 00026 COH_OPEN_NAMESPACE2(coherence,util) 00027 00028 using coherence::io::pof::PofReader; 00029 using coherence::io::pof::PofWriter; 00030 using coherence::io::pof::PortableObject; 00031 00032 /** 00033 * Filter which discards null references. 00034 * 00035 * @author gm 2008.07.28 00036 */ 00037 class COH_EXPORT NullFilter 00038 : public cloneable_spec<NullFilter, 00039 extends<Object>, 00040 implements<Filter, PortableObject> > 00041 { 00042 friend class factory<NullFilter>; 00043 00044 // ----- constructors --------------------------------------------------- 00045 00046 protected: 00047 /** 00048 * Default constructor (for PortableObject). 00049 */ 00050 NullFilter(); 00051 00052 /** 00053 * Copy constructor. 00054 */ 00055 NullFilter(const NullFilter& that); 00056 00057 00058 // ----- Filter interface ----------------------------------------------- 00059 00060 public: 00061 /** 00062 * {@inheritDoc} 00063 */ 00064 virtual bool evaluate(Object::View v) const; 00065 00066 00067 // ----- PortableObject interface --------------------------------------- 00068 00069 public: 00070 /** 00071 * {@inheritDoc} 00072 */ 00073 virtual void readExternal(PofReader::Handle hIn); 00074 00075 /** 00076 * {@inheritDoc} 00077 */ 00078 virtual void writeExternal(PofWriter::Handle hOut) const; 00079 }; 00080 00081 COH_CLOSE_NAMESPACE2 00082 00083 #endif // COH_NULL_FILTER_HPP