| Apache Ignite C++

Public Member Functions | List of all members
ignite::binary::BinaryMapReader< K, V > Class Template Reference

Binary map reader. More...

`#include <binary_containers.h>`

## Public Member Functions
| BinaryMapReader (impl::binary::BinaryReaderImpl *impl, int32_t id, MapType::Type type, int32_t size)
| Constructor. More...
bool | HasNext ()
| Check whether next element is available for read. More...
void | GetNext (K &key, V &val)
| Read next element. More...
MapType::Type | GetType ()
| Get map type. More...
int32_t | GetSize ()
| Get map size. More...
bool | IsNull ()
| Check whether map is NULL. More...

## Detailed Description

### template<typename K, typename V>
class ignite::binary::BinaryMapReader< K, V >

Binary map reader.

Can be used to read map entry by entry.

Use GetNext() method to read array value by value while HasNext() method returns true.

## Constructor & Destructor Documentation

## ◆ BinaryMapReader()

template<typename K , typename V >

ignite::binary::BinaryMapReader< K, V >::BinaryMapReader | ( | impl::binary::BinaryReaderImpl * | impl,
|  | int32_t | id,
|  | MapType::Type | type,
|  | int32_t | size
| ) |  |
| inline

Constructor.

Internal call. Should not be used by user.

Parameters

  impl | Reader implementation.
  id | Identifier.
  type | Map type.
  size | Map size.

## Member Function Documentation

## ◆ GetNext()

template<typename K , typename V >

void ignite::binary::BinaryMapReader< K, V >::GetNext | ( | K & | key,
|  | V & | val
| ) |  |
| inline

Read next element.

Parameters

  key | Pointer to buffer where key element should be stored. Should not be null.
  val | Pointer to buffer where value element should be stored. Should not be null.

Exceptions

  IgniteError | if there is no element to read.

## ◆ GetSize()

template<typename K , typename V >

int32_t ignite::binary::BinaryMapReader< K, V >::GetSize | ( |  | ) |
| inline

Get map size.

Returns
  Size or -1 if map is NULL.

## ◆ GetType()

template<typename K , typename V >

MapType::Type ignite::binary::BinaryMapReader< K, V >::GetType | ( |  | ) |
| inline

Get map type.

Returns
  Map type. See MapType for the list of available values and their description.

## ◆ HasNext()

template<typename K , typename V >

bool ignite::binary::BinaryMapReader< K, V >::HasNext | ( |  | ) |
| inline

Check whether next element is available for read.

Returns
  True if available.

## ◆ IsNull()

template<typename K , typename V >

bool ignite::binary::BinaryMapReader< K, V >::IsNull | ( |  | ) |
| inline

Check whether map is NULL.

Returns
  True if the map is NULL.

The documentation for this class was generated from the following file:

- binary_containers.h