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

E26041-01

coherence/io/pof/RawYearMonthInterval.hpp

00001 /*
00002 * RawYearMonthInterval.hpp
00003 *
00004 * Copyright (c) 2000, 2013, 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_RAW_YEAR_MONTH_INTERVAL_HPP
00017 #define COH_RAW_YEAR_MONTH_INTERVAL_HPP
00018 
00019 #include "coherence/lang.ns"
00020 
00021 #include <ostream>
00022 
00023 COH_OPEN_NAMESPACE3(coherence,io,pof)
00024 
00025 
00026 /**
00027 * Raw POF year-month interval value.
00028 *
00029 * @author jh  2008.04.08
00030 */
00031 class COH_EXPORT RawYearMonthInterval
00032     : public cloneable_spec<RawYearMonthInterval>
00033     {
00034     friend class factory<RawYearMonthInterval>;
00035 
00036     // ----- constructors ---------------------------------------------------
00037 
00038     protected:
00039         /**
00040         * Construct a raw POF year-month interval value.
00041         *
00042         * @param cYears  the number of years in the year-month interval
00043         * @param cMonths the number of months in the year-month interval
00044         *
00045         * @return the new RawYearMonthInterval
00046         */
00047         RawYearMonthInterval(int32_t cYears, int32_t cMonths);
00048 
00049         /**
00050         * Copy constructor.
00051         */
00052         RawYearMonthInterval(const RawYearMonthInterval& that);
00053 
00054 
00055     // ----- Object interface -----------------------------------------------
00056 
00057     public:
00058         /**
00059         * {@inheritDoc}
00060         */
00061         virtual bool equals(Object::View v) const;
00062 
00063         /**
00064         * {@inheritDoc}
00065         */
00066         virtual size32_t hashCode() const;
00067 
00068         /**
00069         * {@inheritDoc}
00070         */
00071         virtual bool isImmutable() const;
00072 
00073         /**
00074         * {@inheritDoc}
00075         */
00076         virtual void toStream(std::ostream &out) const;
00077 
00078 
00079     // ----- accessors ------------------------------------------------------
00080 
00081     public:
00082         /**
00083         * Determine the number of years in the year-month interval.
00084         *
00085         * @return the number of years in the year-month interval
00086         */
00087         virtual int32_t getYears() const;
00088 
00089         /**
00090         * Determine the number of months in the year-month interval.
00091         *
00092         * @return the number of months in the year-month interval
00093         */
00094         virtual int32_t getMonths() const;
00095 
00096 
00097     // ----- data members ---------------------------------------------------
00098 
00099     protected:
00100         /**
00101         * The number of years in the year-month interval.
00102         */
00103         int32_t m_cYears;
00104 
00105         /**
00106         * The number of months in the year-month interval.
00107         */
00108         int32_t m_cMonths;
00109     };
00110 
00111 COH_CLOSE_NAMESPACE3
00112 
00113 #endif // COH_RAW_YEAR_MONTH_INTERVAL_HPP
Copyright © 2000, 2013, Oracle and/or its affiliates. All rights reserved.