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

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.