H:/gfcppsancout/product/include/gfcpp/CacheableFileName.hpp

Go to the documentation of this file.
00001 #ifndef _GEMFIRE_CACHEABLEFILENAME_HPP_
00002 #define _GEMFIRE_CACHEABLEFILENAME_HPP_
00003 
00004 /*=========================================================================
00005  * (c) Copyright 2002-2007, GemStone Systems, Inc. All Rights Reserved.
00006  * 1260 NW Waterhouse Ave., Suite 200,  Beaverton, OR 97006
00007  *=========================================================================
00008  */
00009 
00010 #include "gfcpp_globals.hpp"
00011 #include "gf_types.hpp"
00012 #include "CacheableKey.hpp"
00013 #include "CacheableString.hpp"
00014 
00015 
00020 namespace gemfire
00021 {
00026   class CPPCACHE_EXPORT CacheableFileName
00027     : public CacheableString
00028   {
00029     public:
00030 
00034       virtual void toData( DataOutput& output ) const;
00035 
00039       virtual Serializable* fromData( DataInput& input );
00040 
00046       virtual int8_t classId( ) const;
00047 
00053       virtual int8_t typeId( ) const;
00054 
00058       static Serializable* createDeserializable( )
00059       {
00060         return new CacheableFileName( );
00061       }
00062 
00069       static CacheableFileNamePtr create( const char* value )
00070       {
00071         return new CacheableFileName( value );
00072       }
00073 
00080       static CacheableFileNamePtr create( const char* value, size_t len )
00081       {
00082         return new CacheableFileName( value, len );
00083       }
00084 
00091       static CacheableFileNamePtr create( const wchar_t* value )
00092       {
00093         return new CacheableFileName( value );
00094       }
00095 
00102       static CacheableFileNamePtr create( const wchar_t* value, size_t len )
00103       {
00104         return new CacheableFileName( value, len );
00105       }
00106 
00108       virtual size_t logString( char* buffer, size_t maxLength ) const;
00109 
00110 
00111     protected:
00112 
00114       inline CacheableFileName( )
00115         : CacheableString( GemfireTypeIds::CacheableString ) { }
00116 
00118       inline CacheableFileName( const char* value )
00119         : CacheableString( value ) { }
00120 
00122       inline CacheableFileName( const char* value, size_t len )
00123         : CacheableString( value, len ) { }
00124 
00126       inline CacheableFileName( const wchar_t* value )
00127         : CacheableString( value ) { }
00128 
00130       inline CacheableFileName( const wchar_t* value, size_t len )
00131         : CacheableString( value, len ) { }
00132 
00133 
00134     private:
00135 
00136       // never implemented.
00137       void operator = ( const CacheableFileName& other );
00138       CacheableFileName( const CacheableFileName& other );
00139 
00140   };
00141 
00142 }
00143 
00144 
00145 #endif

GemFire C++ Cache API Documentation