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

E26041-01

coherence/lang/Size64.hpp

00001 /*
00002 * Size64.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_SIZE64_HPP
00017 #define COH_SIZE64_HPP
00018 
00019 #include "coherence/lang/compatibility.hpp"
00020 
00021 #include "coherence/lang/Primitive.hpp"
00022 #include "coherence/lang/TypedHandle.hpp"
00023 
00024 COH_OPEN_NAMESPACE2(coherence,lang)
00025 
00026 
00027 /**
00028 * An immutable 64-bit unsigned value.
00029 *
00030 * @author mf  2011.02.24
00031 */
00032 class COH_EXPORT Size64
00033     : public cloneable_spec<Size64,
00034         extends<Primitive<size64_t> >,
00035         implements<Comparable> >
00036     {
00037     friend class factory<Size64>;
00038 
00039     // ----- constructors ---------------------------------------------------
00040 
00041     private:
00042         /**
00043         * Create a new Size64 instance.
00044         *
00045         * @param n  the value of the new Size64
00046         *
00047         * @return the new Size64
00048         */
00049         Size64(size64_t n);
00050 
00051         /**
00052         * Copy constructor.
00053         */
00054         Size64(const Size64& that);
00055 
00056 
00057     // ----- Comparable interface -------------------------------------------
00058 
00059     public:
00060         /**
00061         * {@inheritDoc}
00062         */
00063         virtual int32_t compareTo(Object::View v) const;
00064 
00065 
00066     // ----- static methods -------------------------------------------------
00067 
00068     public:
00069         /**
00070         * Factory method to produce Size64 objects with an optimization
00071         * that uses cached objects for all relatively-low values.
00072         *
00073         * @param n   an size64_t
00074         *
00075         * @return an Size64 whose value is the passed size64_t
00076         */
00077         static Handle valueOf(size64_t n);
00078 
00079 
00080     // ----- constants ------------------------------------------------------
00081 
00082     public:
00083         /**
00084         * A constant for the minimum representable value.
00085         */
00086         static const size64_t min_value = 0x0;
00087 
00088         /**
00089         * A constant for the maximum representable value.
00090         */
00091         static const size64_t max_value = size64_t(0xFFFFFFFF) << 32 | size64_t(0xFFFFFFFF);
00092     };
00093 
00094 COH_CLOSE_NAMESPACE2
00095 
00096 #endif // COH_SIZE64_HPP
Copyright © 2000, 2013, Oracle and/or its affiliates. All rights reserved.