Oracle® Fusion Middleware C++ API Reference for Oracle Coherence
12c (12.2.1.3.0)

E80355-01

coherence/util/processor/PropertyProcessor.hpp

00001 /*
00002 * PropertyProcessor.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_PROPERTY_PROCESSOR_HPP
00017 #define COH_PROPERTY_PROCESSOR_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/InvocableMap.hpp"
00025 #include "coherence/util/ValueManipulator.hpp"
00026 #include "coherence/util/processor/AbstractProcessor.hpp"
00027 
00028 COH_OPEN_NAMESPACE3(coherence,util, processor)
00029 
00030 using coherence::io::pof::PofReader;
00031 using coherence::io::pof::PofWriter;
00032 using coherence::io::pof::PortableObject;
00033 using coherence::util::Describable;
00034 using coherence::util::InvocableMap;
00035 using coherence::util::ValueManipulator;
00036 
00037 
00038 /**
00039 * PropertyProcessor is a base class for EntryProcessor implementations that
00040 * depend on a ValueManipulator.
00041 *
00042 * @author tb  2008.04.28
00043 */
00044 class COH_EXPORT PropertyProcessor
00045     : public abstract_spec<PropertyProcessor,
00046         extends<AbstractProcessor>,
00047         implements<PortableObject> >
00048     {
00049     // ----- constructors ---------------------------------------------------
00050 
00051     protected:
00052         /**
00053         * Default constructor (necessary for the ExternalizableLite interface).
00054         */
00055         PropertyProcessor();
00056 
00057         /**
00058         * Construct a PropertyProcessor based for the specified
00059         * ValueManipulator.
00060         *
00061         * @param vManipulator  a ValueManipulator; could be null
00062         */
00063         PropertyProcessor(ValueManipulator::View vManipulator);
00064 
00065 
00066     // ----- PortableObject interface ---------------------------------------
00067 
00068     public:
00069         /**
00070         * {@inheritDoc}
00071         */
00072         virtual void readExternal(PofReader::Handle hIn);
00073 
00074         /**
00075         * {@inheritDoc}
00076         */
00077         virtual void writeExternal(PofWriter::Handle hOut) const;
00078 
00079 
00080     // ----- Object interface -----------------------------------------------
00081 
00082     public:
00083         /**
00084         * {@inheritDoc}
00085         */
00086         virtual bool equals(Object::View v) const;
00087 
00088         /**
00089         * {@inheritDoc}
00090         */
00091         virtual size32_t hashCode() const;
00092 
00093 
00094     // ----- helpers --------------------------------------------------------
00095 
00096     protected:
00097         /**
00098         * Get the property value from the passed Entry object.
00099         *
00100         * @param vEntry  the Entry object
00101         *
00102         * @return the property value
00103         */
00104         virtual Object::View get(InvocableMap::Entry::View vEntry) const;
00105 
00106         /**
00107         * Set the property value into the passed Entry object.
00108         *
00109         * @param hEntry  the Entry object
00110         * @param vValue a new property value
00111         */
00112         virtual void set(InvocableMap::Entry::Handle hEntry,
00113                 Object::View vValue) const;
00114 
00115 
00116     // ----- data members ---------------------------------------------------
00117 
00118     protected:
00119         /**
00120         * The property value manipulator.
00121         */
00122         FinalView<ValueManipulator> f_vManipulator;
00123     };
00124 
00125 COH_CLOSE_NAMESPACE3
00126 
00127 #endif // COH_PROPERTY_PROCESSOR_HPP
Copyright © 2000, 2017, Oracle and/or its affiliates. All rights reserved.