Panda3D
Public Member Functions | Static Public Member Functions | List of all members
sequence_hash< Key, Compare > Class Template Reference

This hash_compare class hashes a string. More...

#include "stl_compares.h"

Inheritance diagram for sequence_hash< Key, Compare >:
stl_hash_compare< Key, Compare >

Public Member Functions

size_t operator() (const Key &key) const
 Trivially computes a size_t hash from the components of the string. More...
 
bool operator() (const Key &a, const Key &b) const
 
- Public Member Functions inherited from stl_hash_compare< Key, Compare >
bool is_equal (const Key &a, const Key &b) const
 
size_t operator() (const Key &key) const
 
bool operator() (const Key &a, const Key &b) const
 

Static Public Member Functions

static size_t add_hash (size_t start, const Key &key)
 Adds the elements of the indicated key into a running hash. More...
 

Detailed Description

template<class Key, class Compare = std::less<Key>>
class sequence_hash< Key, Compare >

This hash_compare class hashes a string.

It assumes the Key is a string or provides begin() and end() methods that iterate through Key::value_type.

Definition at line 154 of file stl_compares.h.

Member Function Documentation

◆ add_hash()

template<class Key , class Compare >
size_t sequence_hash< Key, Compare >::add_hash ( size_t  start,
const Key &  key 
)
inlinestatic

Adds the elements of the indicated key into a running hash.

Definition at line 168 of file stl_compares.I.

References AddHash::add_hash().

◆ operator()()

template<class Key , class Compare >
size_t sequence_hash< Key, Compare >::operator() ( const Key &  key) const
inline

Trivially computes a size_t hash from the components of the string.

Definition at line 159 of file stl_compares.I.


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