coherence/util/SparseArray.hpp

00001 /*
00002 * SparseArray.hpp
00003 *
00004 * Copyright (c) 2000, 2009, 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_SPARSE_ARRAY_HPP
00017 #define COH_SPARSE_ARRAY_HPP
00018 
00019 #include "coherence/lang.ns"
00020 
00021 #include "coherence/util/AbstractSparseArray.hpp"
00022 
00023 COH_OPEN_NAMESPACE2(coherence,util)
00024 
00025 
00026 /**
00027 * A data structure resembling an array keyed by long values.
00028 *
00029 * @author js 2008.04.08
00030 */
00031 class COH_EXPORT SparseArray
00032     : public cloneable_spec<SparseArray,
00033         extends<AbstractSparseArray> >
00034     {
00035     friend class factory<SparseArray>;
00036 
00037     // ----- constructors ---------------------------------------------------
00038 
00039     protected:
00040         /**
00041         * Create a SparseArray.
00042         */
00043         SparseArray();
00044 
00045         /**
00046         * Copy constructor.
00047         */
00048         SparseArray(const SparseArray& that);
00049 
00050 
00051     // ----- helper methods -------------------------------------------------
00052 
00053     protected:
00054         /**
00055         * {@inheritDoc}
00056         */
00057         virtual AbstractSparseArray::Node::Handle instantiateNode(
00058                 int64_t lKey, Object::Holder ohValue);
00059     };
00060 
00061 COH_CLOSE_NAMESPACE2
00062 
00063 #endif // COH_SPARSE_ARRAY_HPP
Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved.