Pivotal GemFire Native Client Cache Reference  9.0.6
CacheableFileName.hpp
Go to the documentation of this file.
1 #ifndef _GEMFIRE_CACHEABLEFILENAME_HPP_
2 #define _GEMFIRE_CACHEABLEFILENAME_HPP_
3 
4 /*=========================================================================
5  * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
6  * This product is protected by U.S. and international copyright
7  * and intellectual property laws. Pivotal products are covered by
8  * more patents listed at http://www.pivotal.io/patents.
9  *=========================================================================
10  */
11 
12 #include "gfcpp_globals.hpp"
13 #include "gf_types.hpp"
14 #include "CacheableKey.hpp"
15 #include "CacheableString.hpp"
16 
20 namespace gemfire
21 {
27  {
28  public:
29 
33  virtual void toData(DataOutput& output) const;
34 
40  virtual Serializable* fromData(DataInput& input);
41 
47  virtual int32_t classId() const;
48 
54  virtual int8_t typeId() const;
55 
60  {
61  return new CacheableFileName();
62  }
63 
68  static CacheableFileNamePtr create(const char* value, int32_t len = 0)
69  {
70  CacheableFileNamePtr str = NULLPTR;
71  if (value != NULL) {
72  str = new CacheableFileName();
73  str->initString(value, len);
74  }
75  return str;
76  }
77 
82  static CacheableFileNamePtr create(const wchar_t* value, int32_t len = 0)
83  {
84  CacheableFileNamePtr str = NULLPTR;
85  if (value != NULL) {
86  str = new CacheableFileName();
87  str->initString(value, len);
88  }
89  return str;
90  }
91 
93  virtual const char* className() const
94  {
95  return "CacheableFileName";
96  }
97 
99  virtual uint32_t hashcode() const;
100 
101  protected:
102 
104  inline CacheableFileName() :
105  CacheableString(),m_hashcode(0)
106  {
107  }
108 
109  private:
110  // never implemented.
111  void operator =(const CacheableFileName& other);
112  CacheableFileName(const CacheableFileName& other);
113 
114  private:
115  mutable int m_hashcode;
116  };
117 
118 }
119 
120 #endif
CacheableFileName()
Default constructor.
Definition: CacheableFileName.hpp:104
Provide operations for writing primitive data values, byte arrays, strings, Serializable objects to a...
Definition: DataOutput.hpp:62
This namespace contains all the GemFire C++ API classes, enumerations and globals.
Definition: Assert.hpp:19
static CacheableFileNamePtr create(const wchar_t *value, int32_t len=0)
Factory method for creating an instance of CacheableFileName from a wide-character C string optionall...
Definition: CacheableFileName.hpp:82
virtual const char * className() const
get the name of the class of this object for logging purpose
Definition: CacheableFileName.hpp:93
static Serializable * createDeserializable()
creation function for filenames.
Definition: CacheableFileName.hpp:59
Implement a immutable C string wrapper that can serve as a distributable key object for caching as we...
Definition: CacheableString.hpp:33
Implement an immutable wrapper for filenames that can serve as a distributable filename object for ca...
Definition: CacheableFileName.hpp:26
This abstract base class is the superclass of all user objects in the cache that can be serialized...
Definition: Serializable.hpp:39
Provide operations for reading primitive data values, byte arrays, strings, Serializable objects from...
Definition: DataInput.hpp:44
#define CPPCACHE_EXPORT
Defines a GemFire CPPCACHE export.
Definition: gf_base.hpp:51
Defines a reference counted shared pointer.
Definition: SharedPtr.hpp:35
static CacheableFileNamePtr create(const char *value, int32_t len=0)
Factory method for creating an instance of CacheableFileName from a C string optionally given the len...
Definition: CacheableFileName.hpp:68

GemFire C++ Cache API Documentation