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

E26041-01

coherence/io/pof/RawTimeInterval.hpp

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