Panda3D
|
This class generates an arbitrary hash number from a sequence of ints. More...
#include "hashGenerator.h"
Public Member Functions | |
void | add_blob (const std::vector< unsigned char > &bytes) |
Adds a blob to the hash, by breaking it down into a sequence of integers. More... | |
void | add_int (int num) |
Adds another integer to the hash so far. More... | |
void | add_string (const std::string &str) |
Adds a string to the hash, by breaking it down into a sequence of integers. More... | |
unsigned long | get_hash () const |
Returns the hash number generated. More... | |
This class generates an arbitrary hash number from a sequence of ints.
Definition at line 23 of file hashGenerator.h.
void HashGenerator::add_blob | ( | const std::vector< unsigned char > & | bytes | ) |
Adds a blob to the hash, by breaking it down into a sequence of integers.
Definition at line 62 of file hashGenerator.cxx.
Referenced by DCSwitch::generate_hash().
void HashGenerator::add_int | ( | int | num | ) |
Adds another integer to the hash so far.
Definition at line 40 of file hashGenerator.cxx.
Referenced by add_string(), DCAtomicField::generate_hash(), DCClass::generate_hash(), DCKeywordList::generate_hash(), DCMolecularField::generate_hash(), DCSimpleParameter::generate_hash(), and DCSwitch::generate_hash().
void HashGenerator::add_string | ( | const std::string & | str | ) |
Adds a string to the hash, by breaking it down into a sequence of integers.
Definition at line 50 of file hashGenerator.cxx.
References add_int().
Referenced by DCClass::generate_hash(), DCField::generate_hash(), DCKeyword::generate_hash(), and DCSwitch::generate_hash().
unsigned long HashGenerator::get_hash | ( | ) | const |
Returns the hash number generated.
Definition at line 74 of file hashGenerator.cxx.
Referenced by DCFile::get_hash().