Loading...
Searching...
No Matches
osmium::ItemStash::handle_type Class Reference

`#include <item_stash.hpp>`

## Public Member Functions

| handle_type () noexcept
| The default constructor creates an invalid handle.
bool | valid () const noexcept
| Is this a valid handle?

## Private Member Functions

| handle_type (std::size_t new_value) noexcept

## Private Attributes

std::size_t | value

## Friends

class | ItemStash
template<typename TChar , typename TTraits >
std::basic_ostream< TChar, TTraits > & | operator<< (std::basic_ostream< TChar, TTraits > &out, const ItemStash::handle_type &handle)

## Detailed Description

This is the type of the handle returned by the add_item() call. It is used to access the item again with get_item() or get<>() or erase it with remove_item().

There is one special handle, the invalid handle. It can be created by calling the default constructor. You can use it for instance to mark removed objects in your data structures. Valid handles can only be constructed by the ItemStash class.

## Constructor & Destructor Documentation

## handle_type() [1/2]

osmium::ItemStash::handle_type::handle_type | ( | std::size_t | new_value | ) |

inline explicit private noexcept

## handle_type() [2/2]

osmium::ItemStash::handle_type::handle_type | ( |  | ) |

inline noexcept

The default constructor creates an invalid handle.

## Member Function Documentation

## valid()

bool osmium::ItemStash::handle_type::valid | ( |  | ) | const

inline noexcept

Is this a valid handle?

## Friends And Related Symbol Documentation

## ItemStash

friend class ItemStash

friend

## operator<<

template<typename TChar , typename TTraits >

std::basic_ostream< TChar, TTraits > & operator<< | ( | std::basic_ostream< TChar, TTraits > & | out,
|  | const ItemStash::handle_type & | handle )

friend

Print the handle for debugging purposes. An invalid handle will be printed as the single letter '-'. A valid handle will be printed as a unique (for an ItemStash object) number.

## Member Data Documentation

## value

std::size_t osmium::ItemStash::handle_type::value

private

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

- include/osmium/storage/item_stash.hpp