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

E90870-01

coherence/io/pof/RawTimeInterval.hpp

00001 /*
00002 * RawTimeInterval.hpp
00003 *
00004 * Copyright (c) 2000, 2019, 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_TIME_INTERVAL_HPP
00017 #define COH_RAW_TIME_INTERVAL_HPP
00018 
00019 #include "coherence/lang.ns"
00020 
00021 #include "coherence/io/pof/PofIntrinsic.hpp"
00022 
00023 
00024 
00025 COH_OPEN_NAMESPACE3(coherence,io,pof)
00026 
00027 
00028 /**
00029 * Raw immutable POF time interval value.
00030 *
00031 * @author jh  2008.04.08
00032 */
00033 class COH_EXPORT RawTimeInterval
00034     : public cloneable_spec<RawTimeInterval,
00035           extends<Object>,
00036           implements<PofIntrinsic> >
00037     {
00038     friend class factory<RawTimeInterval>;
00039 
00040     // ----- constructors ---------------------------------------------------
00041 
00042     protected:
00043         /**
00044         * Construct a raw POF time interval value.
00045         *
00046         * @param cHours    the number of hours in the time interval
00047         * @param cMinutes  the number of minutes in the time interval
00048         * @param cSeconds  the number of seconds in the time interval
00049         * @param cNanos    the number of nanoseconds in the time interval
00050         *
00051         * @return the new RawTimeInterval
00052         */
00053         RawTimeInterval(int32_t cHours, int32_t cMinutes, int32_t cSeconds,
00054                 int32_t cNanos);
00055 
00056         /**
00057         * Copy constructor.
00058         */
00059         RawTimeInterval(const RawTimeInterval& that);
00060 
00061 
00062     // ----- Object interface -----------------------------------------------
00063 
00064     public:
00065         /**
00066         * {@inheritDoc}
00067         */
00068         virtual bool equals(Object::View v) const;
00069 
00070         /**
00071         * {@inheritDoc}
00072         */
00073         virtual size32_t hashCode() const;
00074 
00075         /**
00076         * {@inheritDoc}
00077         */
00078         virtual bool isImmutable() const;
00079 
00080         /**
00081         * {@inheritDoc}
00082         */
00083         virtual TypedHandle<const String> toString() const;
00084 
00085 
00086     // ----- accessors ------------------------------------------------------
00087 
00088     public:
00089         /**
00090         * Determine the number of hours in the time interval.
00091         *
00092         * @return the number of hours in the time interval
00093         */
00094         virtual int32_t getHours() const;
00095 
00096         /**
00097         * Determine the number of minutes in the time interval.
00098         *
00099         * @return the number of minutes in the time interval
00100         */
00101         virtual int32_t getMinutes() const;
00102 
00103         /**
00104         * Determine the number of seconds in the time interval.
00105         *
00106         * @return the number of seconds in the time interval
00107         */
00108         virtual int32_t getSeconds() const;
00109 
00110         /**
00111         * Determine the number of nanoseconds in the time interval.
00112         *
00113         * @return the number of nanoseconds in the time interval
00114         */
00115         virtual int32_t getNanos() const;
00116 
00117 
00118     // ----- data members ---------------------------------------------------
00119 
00120     protected:
00121         /**
00122         * The number of hours in the time interval.
00123         */
00124         int32_t m_cHours;
00125 
00126         /**
00127         * The number of minutes in the time interval.
00128         */
00129         int32_t m_cMinutes;
00130 
00131         /**
00132         * The number of seconds in the time interval.
00133         */
00134         int32_t m_cSeconds;
00135 
00136         /**
00137         * The number of nanoseconds in the time interval.
00138         */
00139         int32_t m_cNanos;
00140     };
00141 
00142 COH_CLOSE_NAMESPACE3
00143 
00144 #endif // COH_RAW_TIME_INTERVAL_HPP
Copyright © 2000, 2019, Oracle and/or its affiliates. All rights reserved.