00001 #ifndef _GEMFIRE_CACHEABLEOBJECTARRAY_HPP_ 00002 #define _GEMFIRE_CACHEABLEOBJECTARRAY_HPP_ 00003 00004 00005 /*========================================================================= 00006 * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved. 00007 * This product is protected by U.S. and international copyright 00008 * and intellectual property laws. Pivotal products are covered by 00009 * more patents listed at http://www.pivotal.io/patents. 00010 *========================================================================= 00011 */ 00012 00013 #include "gfcpp_globals.hpp" 00014 #include "gf_types.hpp" 00015 #include "VectorT.hpp" 00016 00017 00021 namespace gemfire 00022 { 00023 00028 class CPPCACHE_EXPORT CacheableObjectArray 00029 : public Cacheable, public _VectorOfCacheable 00030 { 00031 public: 00032 00033 typedef _VectorOfCacheable::Iterator Iterator; 00034 00038 virtual void toData( DataOutput& output ) const; 00039 00043 virtual Serializable* fromData( DataInput& input ); 00044 00048 inline static Serializable* createDeserializable( ) 00049 { 00050 return new CacheableObjectArray( ); 00051 } 00052 00058 virtual int32_t classId( ) const; 00059 00065 virtual int8_t typeId( ) const; 00066 00070 inline static CacheableObjectArrayPtr create( ) 00071 { 00072 return CacheableObjectArrayPtr(new CacheableObjectArray()); 00073 } 00074 00079 inline static CacheableObjectArrayPtr create( int32_t n ) 00080 { 00081 return CacheableObjectArrayPtr(new CacheableObjectArray(n)); 00082 } 00083 00084 virtual uint32_t objectSize( ) const; 00085 00086 00087 protected: 00088 00090 inline CacheableObjectArray( ) 00091 : _VectorOfCacheable( ) { } 00093 inline CacheableObjectArray( int32_t n ) 00094 : _VectorOfCacheable( n ) { } 00095 00096 00097 private: 00098 00099 // never implemented. 00100 CacheableObjectArray& operator = ( const CacheableObjectArray& other ); 00101 CacheableObjectArray( const CacheableObjectArray& other ); 00102 }; 00103 00104 } 00105 00106 00107 #endif // _GEMFIRE_CACHEABLEOBJECTARRAY_HPP_