00001 #ifndef _GEMFIRE_CACHEABLEOBJECTARRAY_HPP_ 00002 #define _GEMFIRE_CACHEABLEOBJECTARRAY_HPP_ 00003 00004 00005 /*========================================================================= 00006 * (c) Copyright 2002-2007, GemStone Systems, Inc. All Rights Reserved. 00007 * 1260 NW Waterhouse Ave., Suite 200, Beaverton, OR 97006 00008 *========================================================================= 00009 */ 00010 00011 #include "gfcpp_globals.hpp" 00012 #include "gf_types.hpp" 00013 #include "VectorT.hpp" 00014 00015 00019 namespace gemfire 00020 { 00021 00026 class CPPCACHE_EXPORT CacheableObjectArray 00027 : public Cacheable, public _VectorOfCacheable 00028 { 00029 public: 00030 00031 typedef _VectorOfCacheable::Iterator Iterator; 00032 00036 virtual void toData( DataOutput& output ) const; 00037 00041 virtual Serializable* fromData( DataInput& input ); 00042 00046 inline static Serializable* createDeserializable( ) 00047 { 00048 return new CacheableObjectArray( ); 00049 } 00050 00056 virtual int32_t classId( ) const; 00057 00063 virtual int8_t typeId( ) const; 00064 00068 inline static CacheableObjectArrayPtr create( ) 00069 { 00070 return CacheableObjectArrayPtr(new CacheableObjectArray()); 00071 } 00072 00077 inline static CacheableObjectArrayPtr create( size_t n ) 00078 { 00079 return CacheableObjectArrayPtr(new CacheableObjectArray(n)); 00080 } 00081 00082 virtual uint32_t objectSize( ) const; 00083 00084 00085 protected: 00086 00088 inline CacheableObjectArray( ) 00089 : _VectorOfCacheable( ) { } 00091 inline CacheableObjectArray( size_t n ) 00092 : _VectorOfCacheable( n ) { } 00093 00094 00095 private: 00096 00097 // never implemented. 00098 CacheableObjectArray& operator = ( const CacheableObjectArray& other ); 00099 CacheableObjectArray( const CacheableObjectArray& other ); 00100 }; 00101 00102 } 00103 00104 00105 #endif // _GEMFIRE_CACHEABLEOBJECTARRAY_HPP_