Panda3D
Public Member Functions | List of all members
HashGenerator Class Reference

This class generates an arbitrary hash number from a sequence of ints. More...

#include "hashGenerator.h"

Public Member Functions

void add_blob (const vector_uchar &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...
 

Detailed Description

This class generates an arbitrary hash number from a sequence of ints.

Definition at line 24 of file hashGenerator.h.

Member Function Documentation

◆ add_blob()

void HashGenerator::add_blob ( const vector_uchar &  bytes)

Adds a blob to the hash, by breaking it down into a sequence of integers.

Definition at line 63 of file hashGenerator.cxx.

References add_int().

Referenced by DCSwitch::generate_hash().

◆ add_int()

void HashGenerator::add_int ( int  num)

◆ add_string()

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 51 of file hashGenerator.cxx.

References add_int().

Referenced by DCKeyword::generate_hash(), DCSwitch::generate_hash(), DCField::generate_hash(), and DCClass::generate_hash().

◆ get_hash()

unsigned long HashGenerator::get_hash ( ) const

Returns the hash number generated.

Definition at line 75 of file hashGenerator.cxx.

Referenced by DCFile::get_hash().


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