Apache Geode Native C++ Reference 1.15.0
apache::geode::client::StructSet Class Referenceabstract

A StructSet may be obtained after executing a Query which is obtained from a QueryService which in turn is obtained from a Cache. More...

#include <StructSet.hpp>

Inherits apache::geode::client::CqResults.

Public Types

typedef std::vector< std::shared_ptr< Cacheable > >::iterator iterator
 Interface of an iterator for SelectResults. More...
 

Public Member Functions

virtual iterator begin ()=0
 Get an iterator pointing to the start of SelectResults. More...
 
virtual iterator end ()=0
 Get an iterator pointing to the end of SelectResults. More...
 
virtual int32_t getFieldIndex (const std::string &fieldname)=0
 Get the index number of the specified field name in the StructSet. More...
 
virtual const std::string & getFieldName (int32_t index)=0
 Get the field name of the StructSet from the specified index number. More...
 
virtual const std::shared_ptr< Serializableoperator[] (size_t index) const =0
 Index operator to directly access an item in the SelectResults. More...
 
virtual size_t size () const =0
 Get the size of the SelectResults. More...
 

Detailed Description

A StructSet may be obtained after executing a Query which is obtained from a QueryService which in turn is obtained from a Cache.

It is the parent of a Struct which contains the field values.

Member Typedef Documentation

◆ iterator

typedef std::vector<std::shared_ptr<Cacheable>>::iterator apache::geode::client::SelectResults::iterator
inherited

Interface of an iterator for SelectResults.

Member Function Documentation

◆ begin()

virtual iterator apache::geode::client::SelectResults::begin ( )
pure virtualinherited

Get an iterator pointing to the start of SelectResults.

◆ end()

virtual iterator apache::geode::client::SelectResults::end ( )
pure virtualinherited

Get an iterator pointing to the end of SelectResults.

◆ getFieldIndex()

virtual int32_t apache::geode::client::StructSet::getFieldIndex ( const std::string &  fieldname)
pure virtual

Get the index number of the specified field name in the StructSet.

Parameters
fieldnamethe field name for which the index is required.
Returns
the index number of the specified field name.
Exceptions
std::invalid_argumentif the field name is not found.

◆ getFieldName()

virtual const std::string & apache::geode::client::StructSet::getFieldName ( int32_t  index)
pure virtual

Get the field name of the StructSet from the specified index number.

Parameters
indexthe index number of the field name to get.
Returns
the field name from the specified index number or nullptr if not found.
Exceptions
std::out_of_rangeif index is not found

◆ operator[]()

virtual const std::shared_ptr< Serializable > apache::geode::client::SelectResults::operator[] ( size_t  index) const
pure virtualinherited

Index operator to directly access an item in the SelectResults.

Parameters
indexthe index number of the required item.
Exceptions
IllegalArgumentExceptionif the index is out of bounds.
Returns
A smart pointer to the item indexed.

◆ size()

virtual size_t apache::geode::client::SelectResults::size ( ) const
pure virtualinherited

Get the size of the SelectResults.

Returns
the number of items in the SelectResults.

Apache Geode C++ Cache API Documentation