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

E26041-01

coherence/io/pof/RawDayTimeInterval.hpp

00001 /*
00002 * RawDayTimeInterval.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_DAY_TIME_INTERVAL_HPP
00017 #define COH_RAW_DAY_TIME_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 immutable POF day-time interval value.
00028 *
00029 * @author jh  2008.04.08
00030 */
00031 class COH_EXPORT RawDayTimeInterval
00032     : public cloneable_spec<RawDayTimeInterval>
00033     {
00034     friend class factory<RawDayTimeInterval>;
00035 
00036     // ----- constructors ---------------------------------------------------
00037 
00038     protected:
00039         /**
00040         * Construct a raw POF day-time interval value.
00041         *
00042         * @param cDays     the number of days in the day-time interval
00043         * @param cHours    the number of hours in the day-time interval
00044         * @param cMinutes  the number of minutes in the day-time interval
00045         * @param cSeconds  the number of seconds in the day-time interval
00046         * @param cNanos    the number of nanoseconds in the day-time interval
00047         *
00048         * @return the new RawDayTimeInterval
00049         */
00050         RawDayTimeInterval(int32_t cDays, int32_t cHours, int32_t cMinutes,
00051                 int32_t cSeconds, int32_t cNanos);
00052 
00053         /**
00054         * Copy constructor.
00055         */
00056         RawDayTimeInterval(const RawDayTimeInterval& that);
00057 
00058 
00059     // ----- Object interface -----------------------------------------------
00060 
00061     public:
00062         /**
00063         * {@inheritDoc}
00064         */
00065         virtual bool equals(Object::View v) const;
00066 
00067         /**
00068         * {@inheritDoc}
00069         */
00070         virtual size32_t hashCode() const;
00071 
00072         /**
00073         * {@inheritDoc}
00074         */
00075         virtual bool isImmutable() const;
00076 
00077         /**
00078         * {@inheritDoc}
00079         */
00080         virtual void toStream(std::ostream &out) const;
00081 
00082 
00083     // ----- accessors ------------------------------------------------------
00084 
00085     public:
00086         /**
00087         * Determine the number of days in the day-time interval.
00088         *
00089         * @return the number of days in the day-time interval
00090         */
00091         virtual int32_t getDays() const;
00092 
00093         /**
00094         * Determine the number of hours in the day-time interval.
00095         *
00096         * @return the number of hours in the day-time interval
00097         */
00098         virtual int32_t getHours() const;
00099 
00100         /**
00101         * Determine the number of minutes in the day-time interval.
00102         *
00103         * @return the number of minutes in the day-time interval
00104         */
00105         virtual int32_t getMinutes() const;
00106 
00107         /**
00108         * Determine the number of seconds in the day-time interval.
00109         *
00110         * @return the number of seconds in the day-time interval
00111         */
00112         virtual int32_t getSeconds() const;
00113 
00114         /**
00115         * Determine the number of nanoseconds in the day-time interval.
00116         *
00117         * @return the number of nanoseconds in the day-time interval
00118         */
00119         virtual int32_t getNanos() const;
00120 
00121 
00122     // ----- data members ---------------------------------------------------
00123 
00124     protected:
00125         /**
00126         * The number of days in the day-time interval.
00127         */
00128         int32_t m_cDays;
00129 
00130         /**
00131         * The number of hours in the day-time interval.
00132         */
00133         int32_t m_cHours;
00134 
00135         /**
00136         * The number of minutes in the day-time interval.
00137         */
00138         int32_t m_cMinutes;
00139 
00140         /**
00141         * The number of seconds in the day-time interval.
00142         */
00143         int32_t m_cSeconds;
00144 
00145         /**
00146         * The number of nanoseconds in the day-time interval.
00147         */
00148         int32_t m_cNanos;
00149     };
00150 
00151 COH_CLOSE_NAMESPACE3
00152 
00153 #endif // COH_RAW_DAY_TIME_INTERVAL_HPP
Copyright © 2000, 2013, Oracle and/or its affiliates. All rights reserved.