VMware GemFire Native Client C++ API Reference
|
VMware VMware GemFire Native C++ Reference 10.4.3
|
Loading...
Searching...
No Matches
apache::geode::client::Struct Class Reference
A Struct has a StructSet as its parent. More...
#include <Struct.hpp>
Inherits internal::DataSerializableFixedId_t< internal::DSFid::Struct >.
Public Member Functions | |
| virtual const std::string & | getFieldName (const int32_t index) const |
| Returns the name of the field corresponding to the index number in the Struct. | |
| const std::shared_ptr< StructSet > | getStructSet () const |
| Get the parent StructSet of this Struct. | |
| size_t | objectSize () const override |
| always returns 0 | |
| const std::shared_ptr< Serializable > | operator[] (const std::string &fieldName) const |
| Get the field value for the given field name. | |
| const std::shared_ptr< Serializable > | operator[] (int32_t index) const |
| Get the field value for the given index number. | |
| int32_t | size () const |
| Get the number of field values available. | |
| Struct (StructSet *ssPtr, std::vector< std::shared_ptr< Serializable > > &fieldValues) | |
| Constructor - meant only for internal use. | |
Static Public Member Functions | |
| static std::shared_ptr< Serializable > | createDeserializable () |
Factory function for registration of Struct. | |
Detailed Description
A Struct has a StructSet as its parent.
It contains the field values returned after executing a Query obtained from a QueryService which in turn is obtained from a Cache.
Constructor & Destructor Documentation
◆ Struct()
| apache::geode::client::Struct::Struct | ( | StructSet * | ssPtr, |
| std::vector< std::shared_ptr< Serializable > > & | fieldValues | ||
| ) |
Constructor - meant only for internal use.
Member Function Documentation
◆ createDeserializable()
|
static |
Factory function for registration of Struct.
◆ getFieldName()
|
virtual |
Returns the name of the field corresponding to the index number in the Struct.
- Exceptions
-
std::out_of_range if index is not found
◆ getStructSet()
| const std::shared_ptr< StructSet > apache::geode::client::Struct::getStructSet | ( | ) | const |
◆ objectSize()
|
inlineoverride |
always returns 0
◆ operator[]() [1/2]
| const std::shared_ptr< Serializable > apache::geode::client::Struct::operator[] | ( | const std::string & | fieldName | ) | const |
Get the field value for the given field name.
- Parameters
-
fieldName the name of the field whos value is required.
- Returns
- A smart pointer to the field value.
- Exceptions
-
IllegalArgumentException if the field name is not found.
◆ operator[]() [2/2]
| const std::shared_ptr< Serializable > apache::geode::client::Struct::operator[] | ( | int32_t | index | ) | const |
Get the field value for the given index number.
- Parameters
-
index the index number of the field value to get.
- Returns
- A smart pointer to the field value or nullptr if index out of bounds.
◆ size()
| int32_t apache::geode::client::Struct::size | ( | ) | const |
Get the number of field values available.
- Returns
- the number of field values available.
Apache Geode C++ Cache API Documentation