C++ Client API Reference for Oracle Coherence
14c (14.1.2.0.0)

F79659-03

coherence/io/pof/RawTimeInterval.hpp

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