Panda3D
Public Member Functions | List of all members
indirect_equals_hash< Key > Class Template Reference

An STL function object class, this is intended to be used on any ordered collection of pointers to classes that contain an operator ==() method. More...

#include "stl_compares.h"

Public Member Functions

bool is_equal (const Key &a, const Key &b) const
 Returns true if a is equal to b, false otherwise. More...
 
size_t operator() (const Key &key) const
 Calls the Key's get_hash() method. More...
 

Detailed Description

template<class Key>
class indirect_equals_hash< Key >

An STL function object class, this is intended to be used on any ordered collection of pointers to classes that contain an operator ==() method.

It defines the equality of the pointers via operator ==().

Since it doesn't define the ordering of the pointers, it can only be used with hash containers.

Definition at line 199 of file stl_compares.h.

Member Function Documentation

◆ is_equal()

template<class Key >
bool indirect_equals_hash< Key >::is_equal ( const Key &  a,
const Key &  b 
) const
inline

Returns true if a is equal to b, false otherwise.

Definition at line 211 of file stl_compares.I.

◆ operator()()

template<class Key >
size_t indirect_equals_hash< Key >::operator() ( const Key &  key) const
inline

Calls the Key's get_hash() method.

Definition at line 202 of file stl_compares.I.


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