Oracle Coherence for C++ API
Release 3.7.0.0

E18684-01

coherence/lang/Boolean.hpp

00001 /*
00002 * Boolean.hpp
00003 *
00004 * Copyright (c) 2000, 2011, 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_BOOLEAN_HPP
00017 #define COH_BOOLEAN_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 boolean value.
00029 *
00030 * @author jh  2008.04.01
00031 */
00032 class COH_EXPORT Boolean
00033     : public cloneable_spec<Boolean,
00034         extends<Primitive<bool> > >
00035     {
00036     friend class factory<Boolean>;
00037 
00038     // ----- constructors ---------------------------------------------------
00039 
00040     private:
00041         /**
00042         * @internal
00043         */
00044         Boolean(bool f);
00045 
00046         /**
00047         * Copy constructor.
00048         */
00049         Boolean(const Boolean& that);
00050 
00051 
00052     // ----- static methods -------------------------------------------------
00053 
00054     public:
00055         /**
00056         * Get an instance of a Boolean that represents true or false.
00057         *
00058         * @param f  the instance of Boolean to return
00059         *
00060         * @return the instance of boolean that represents true or false
00061         *         based on f
00062         */
00063         static Handle valueOf(bool f);
00064     };
00065 
00066 COH_CLOSE_NAMESPACE2
00067 
00068 #endif // COH_BOOLEAN_HPP
Copyright © 2000, 2011, Oracle and/or its affiliates. All rights reserved.