Oracle Coherence for C++ API
Release 3.6.1.0
E18813-01

- Main Page
- Namespaces
- Classes
- Files

# coherence/util/EventObject.hpp

    00001 /*
    00002 * EventObject.hpp
    00003 *
    00004 * Copyright (c) 2000, 2010, 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_EVENT_OBJECT_HPP
    00017 #define COH_EVENT_OBJECT_HPP
    00018
    00019 #include "coherence/lang.ns"
    00020
    00021 #include "coherence/util/Describable.hpp"
    00022
    00023 COH_OPEN_NAMESPACE2(coherence,util)
    00024
    00025
    00026 /**
    00027 * The root class from which all event state objects shall be derived.
    00028 * <p>
    00029 * All Events are constructed with a reference to the object, the "source",
    00030 * that is logically deemed to be the object upon which the Event in question
    00031 * initially occurred upon.
    00032 *
    00033 * @author js  2008.06.04
    00034 */
    00035 class COH_EXPORT EventObject
    00036     : public class_spec<EventObject,
    00037         extends<Describable> >
    00038     {
    00039     friend class factory<EventObject>;
    00040
    00041     // ----- constructors ---------------------------------------------------
    00042
    00043     protected:
    00044         /**
    00045         * Create a prototypical Event.
    00046         *
    00047         * @param hSource  the object on which the Event initially occurred
    00048         *
    00049         * @throws  IllegalArgumentException  if source is NULL.
    00050         */
    00051         EventObject(Object::Handle hSource);
    00052
    00053
    00054     // ----- EventObject interface ------------------------------------------
    00055
    00056     public:
    00057         /**
    00058         * The object on which the Event initially occurred.
    00059         *
    00060         * @return  The object on which the Event initially occurred
    00061         */
    00062         virtual Object::Handle getSource() const;
    00063
    00064
    00065     // ----- Describable interface ------------------------------------------
    00066
    00067     public:
    00068         /**
    00069         * {@inheritDoc}
    00070         */
    00071         virtual void outputDescription(std::ostream& out) const;
    00072
    00073
    00074     // ----- data members ---------------------------------------------------
    00075
    00076     protected:
    00077         /**
    00078         * The object on which the Event initially occurred.
    00079         */
    00080         mutable MemberHandle<Object> m_hoSource;
    00081     };
    00082
    00083 COH_CLOSE_NAMESPACE2
    00084
    00085 #endif // COH_EVENT_OBJECT_HPP
    00086

Copyright © 2000, 2010, Oracle and/or its affiliates. All rights reserved.