PUMA Library Reference Manual
Loading...
Searching...
No Matches
Puma::StrHashKey Class Reference

#include <Puma/StrHashKey.h>

+ Inheritance diagram for Puma::StrHashKey:

Description

String hash table key.

Public Member Functions

 StrHashKey (int magic, const char *str, int len)
 Construct a new string hash table key.
 
 ~StrHashKey ()
 Destroy the hash table key.
 
unsigned int getMagic () const
 Get the hash value of the string.
 
unsigned int length () const
 Get the length of the string.
 
const char * c_str () const
 Get the string.
 
- Public Member Functions inherited from Puma::Chain
 Chain ()
 Construct a single chain element.
 
void select (Chain *element)
 Select an element as the next element.
 
Chainselect () const
 Get the next element.
 
Chainunlink ()
 Unlink the next element from the chain.
 
void insert (Chain *element)
 Insert an element in the chain as the next element.
 

Constructor & Destructor Documentation

◆ StrHashKey()

Puma::StrHashKey::StrHashKey ( int magic,
const char * str,
int len )
inline

Construct a new string hash table key.

The input string is copied.

Parameters
magicThe hash value.
strThe string.
lenThe length of the string.

◆ ~StrHashKey()

Puma::StrHashKey::~StrHashKey ( )
inline

Destroy the hash table key.

Frees the string copy.

Member Function Documentation

◆ c_str()

const char * Puma::StrHashKey::c_str ( ) const
inline

Get the string.

Returns
The string.

◆ getMagic()

unsigned int Puma::StrHashKey::getMagic ( ) const
inline

Get the hash value of the string.

Returns
The hash value.

◆ length()

unsigned int Puma::StrHashKey::length ( ) const
inline

Get the length of the string.

Returns
The string's length.