VMware GemFire Native Client Cache Reference  9.0.6
Struct.hpp
Go to the documentation of this file.
1 #ifndef __GEMFIRE_STRUCT_H__
2 #define __GEMFIRE_STRUCT_H__
3 /*=========================================================================
4  * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
5  * This product is protected by U.S. and international copyright
6  * and intellectual property laws. Pivotal products are covered by
7  * more patents listed at http://www.pivotal.io/patents.
8  *========================================================================
9  */
10 
11 #include "gfcpp_globals.hpp"
12 #include "gf_types.hpp"
13 #include "CacheableBuiltins.hpp"
14 #include "StructSet.hpp"
15 #include "SelectResults.hpp"
16 #include "Serializable.hpp"
17 #include "VectorT.hpp"
18 #include "HashMapT.hpp"
19 
24 namespace gemfire
25 {
26 
27 class StructSet;
28 
36 {
37 
38 public:
39 
43  Struct(StructSet * ssPtr, VectorT<SerializablePtr> & fieldValues);
44 
48  static Serializable* createDeserializable( );
49 
56  const SerializablePtr operator [] (int32_t index) const;
57 
65  const SerializablePtr operator [] (const char * fieldName) const;
66 
72  const StructSetPtr getStructSet() const;
73 
79  bool hasNext() const;
80 
86  int32_t length() const;
87 
93  const SerializablePtr next();
94 
98  virtual Serializable* fromData( DataInput& input );
99 
103  virtual void toData( DataOutput& output ) const;
104 
108  virtual int32_t classId( ) const;
109 
113  virtual int8_t typeId( ) const;
114 
119  virtual int8_t DSFID( ) const;
120 
124  virtual const char * getFieldName(int32_t index);
125 
129  virtual uint32_t objectSize() const {
130  return 0; //does not get cached, so no need to account for it
131  }
132 
133 
134 private:
135 
136  void skipClassName( DataInput& input );
137 
138  Struct( );
139 
141  VectorT<SerializablePtr> m_fieldValues;
142 
143  StructSet * m_parent;
144 
145  int32_t m_lastAccessIndex;
146 };
147 
148 } //namespace gemfire
149 
150 #endif //ifndef __GEMFIRE_STRUCT_H__
Vector template type class.
Definition: VectorT.hpp:24
A StructSet may be obtained after executing a Query which is obtained from a QueryService which in tu...
Definition: StructSet.hpp:32
Provide operations for writing primitive data values, byte arrays, strings, Serializable objects to a...
Definition: DataOutput.hpp:62
Contains generic template definitions for Cacheable types and instantiations for built-in types...
This namespace contains all the GemFire C++ API classes, enumerations and globals.
Definition: Assert.hpp:19
HashMap of TKEY to TVAL.
Definition: HashMapT.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
A Struct has a StructSet as its parent.
Definition: Struct.hpp:35
#define CPPCACHE_EXPORT
Defines a GemFire CPPCACHE export.
Definition: gf_base.hpp:51
virtual uint32_t objectSize() const
always returns 0
Definition: Struct.hpp:129
Defines a reference counted shared pointer.
Definition: SharedPtr.hpp:35

GemFire C++ Cache API Documentation