#include <shortidprocessor.h>
|
using | ItemType = typename std::remove_reference< decltype(std::declval< Adapter & >().getItem(std::declval< PrefilledItemType & >()))>::type |
|
template<typename PrefilledItemType, typename Adapter, typename ItemCompare>
class ShortIdProcessor< PrefilledItemType, Adapter, ItemCompare >
Definition at line 17 of file shortidprocessor.h.
◆ ItemType
template<typename PrefilledItemType , typename Adapter , typename ItemCompare >
using ShortIdProcessor< PrefilledItemType, Adapter, ItemCompare >::ItemType = typename std::remove_reference< decltype(std::declval<Adapter &>().getItem( std::declval<PrefilledItemType &>()))>::type |
|
private |
◆ ShortIdProcessor()
template<typename PrefilledItemType , typename Adapter , typename ItemCompare >
ShortIdProcessor< PrefilledItemType, Adapter, ItemCompare >::ShortIdProcessor |
( |
const std::vector< PrefilledItemType > & |
prefilledItems, |
|
|
const std::vector< uint64_t > & |
shortids, |
|
|
size_t |
maxShortIdPerBucket |
|
) |
| |
|
inline |
◆ addItem()
template<typename PrefilledItemType , typename Adapter , typename ItemCompare >
◆ getItem()
template<typename PrefilledItemType , typename Adapter , typename ItemCompare >
◆ getItemCount()
template<typename PrefilledItemType , typename Adapter , typename ItemCompare >
size_t ShortIdProcessor< PrefilledItemType, Adapter, ItemCompare >::getItemCount |
( |
| ) |
const |
|
inline |
◆ getShortIdCount()
template<typename PrefilledItemType , typename Adapter , typename ItemCompare >
size_t ShortIdProcessor< PrefilledItemType, Adapter, ItemCompare >::getShortIdCount |
( |
| ) |
const |
|
inline |
◆ hasOutOfBoundIndex()
template<typename PrefilledItemType , typename Adapter , typename ItemCompare >
bool ShortIdProcessor< PrefilledItemType, Adapter, ItemCompare >::hasOutOfBoundIndex |
( |
| ) |
const |
|
inline |
◆ hasShortIdCollision()
template<typename PrefilledItemType , typename Adapter , typename ItemCompare >
bool ShortIdProcessor< PrefilledItemType, Adapter, ItemCompare >::hasShortIdCollision |
( |
| ) |
const |
|
inline |
◆ isEvenlyDistributed()
template<typename PrefilledItemType , typename Adapter , typename ItemCompare >
bool ShortIdProcessor< PrefilledItemType, Adapter, ItemCompare >::isEvenlyDistributed |
( |
| ) |
const |
|
inline |
◆ matchKnownItem()
template<typename PrefilledItemType , typename Adapter , typename ItemCompare >
int ShortIdProcessor< PrefilledItemType, Adapter, ItemCompare >::matchKnownItem |
( |
uint64_t |
shortid, |
|
|
const ItemType & |
item |
|
) |
| |
|
inline |
Attempts to add a known item by matching its shortid with the supplied ones.
The shortids must be processed prior from calling this method.
- Parameters
-
[in] | shortid | The shortid of the item |
[in] | item | The item to be added, whose index is retrieved from its shortid |
- Returns
- int The number of added items:
- 0 if it was not added (e.g. index out of bounds).
- +1 if added successfully.
- -1 if an existing item was removed due to collision.
Definition at line 109 of file shortidprocessor.h.
◆ evenlyDistributed
template<typename PrefilledItemType , typename Adapter , typename ItemCompare >
bool ShortIdProcessor< PrefilledItemType, Adapter, ItemCompare >::evenlyDistributed = true |
|
private |
◆ haveItem
template<typename PrefilledItemType , typename Adapter , typename ItemCompare >
std::vector<bool> ShortIdProcessor< PrefilledItemType, Adapter, ItemCompare >::haveItem |
|
private |
◆ itemsAvailable
template<typename PrefilledItemType , typename Adapter , typename ItemCompare >
◆ outOfBoundIndex
template<typename PrefilledItemType , typename Adapter , typename ItemCompare >
bool ShortIdProcessor< PrefilledItemType, Adapter, ItemCompare >::outOfBoundIndex = false |
|
private |
◆ shortIdCollision
template<typename PrefilledItemType , typename Adapter , typename ItemCompare >
bool ShortIdProcessor< PrefilledItemType, Adapter, ItemCompare >::shortIdCollision = false |
|
private |
◆ shortIdIndexMap
template<typename PrefilledItemType , typename Adapter , typename ItemCompare >
std::unordered_map<uint64_t, uint32_t> ShortIdProcessor< PrefilledItemType, Adapter, ItemCompare >::shortIdIndexMap |
|
private |
The documentation for this class was generated from the following file: