Panda3D
Public Member Functions | Public Attributes

floating_point_hash< Key > Class Template Reference

This hash_compare class hashes a float or a double. More...

#include "stl_compares.h"

Inheritance diagram for floating_point_hash< Key >:
stl_hash_compare< Key > less

List of all members.

Public Member Functions

 floating_point_hash (Key threshold=get_nearly_zero_value((Key) 0))
size_t add_hash (size_t start, const Key &key) const
 Adds the indicated key into a running hash.
bool operator() (const Key &a, const Key &b) const
 Returns true if a sorts before b, false otherwise.
size_t operator() (const Key &key) const
 Computes a size_t hash from the float.

Public Attributes

const Key _threshold

Detailed Description

template<class Key>
class floating_point_hash< Key >

This hash_compare class hashes a float or a double.

Definition at line 159 of file stl_compares.h.


Member Function Documentation

template<class Key >
size_t floating_point_hash< Key >::add_hash ( size_t  start,
const Key &  key 
) const [inline]

Adds the indicated key into a running hash.

Definition at line 180 of file stl_compares.I.

References AddHash::add_hash().

Referenced by RenderModeAttrib::get_hash_impl(), LightRampAttrib::get_hash_impl(), AudioVolumeAttrib::get_hash_impl(), and AlphaTestAttrib::get_hash_impl().

template<class Key >
size_t floating_point_hash< Key >::operator() ( const Key &  key) const [inline]

Computes a size_t hash from the float.

Reimplemented from stl_hash_compare< Key >.

Definition at line 158 of file stl_compares.I.

template<class Key >
bool floating_point_hash< Key >::operator() ( const Key &  a,
const Key &  b 
) const [inline]

Returns true if a sorts before b, false otherwise.

Reimplemented from stl_hash_compare< Key >.

Definition at line 169 of file stl_compares.I.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations