Quick Links:

bal | bbl | bdl | bsl

Public Types | Public Member Functions

bdlb::CStringHash Struct Reference

#include <bdlb_cstringhash.h>

List of all members.

Public Types

typedef const char * argument_type
typedef bsl::size_t result_type

Public Member Functions

 BSLMF_NESTED_TRAIT_DECLARATION (CStringHash, bsl::is_trivially_copyable)
 BSLMF_NESTED_TRAIT_DECLARATION (CStringHash, bsl::is_trivially_default_constructible)
 CStringHash ()
 CStringHash (const CStringHash &original)
 ~CStringHash ()
CStringHashoperator= (const CStringHash &rhs)
bsl::size_t operator() (const char *argument) const

Detailed Description

This struct defines a hash operation for null-terminated character strings enabling them to be used as keys in the standard unordered associative containers such as bsl::unordered_map and bsl::unordered_set. Note that this class is an empty POD type.

See Component bdlb_cstringhash


Member Typedef Documentation

typedef const char* bdlb::CStringHash::argument_type
typedef bsl::size_t bdlb::CStringHash::result_type

Constructor & Destructor Documentation

bdlb::CStringHash::CStringHash (  ) 

Create a CStringHash object.

bdlb::CStringHash::CStringHash ( const CStringHash original  ) 

Create a CStringHash object. Note that as CStringHash is an empty (stateless) type, this operation will have no observable effect.

bdlb::CStringHash::~CStringHash (  ) 

Destroy this object.


Member Function Documentation

bdlb::CStringHash::BSLMF_NESTED_TRAIT_DECLARATION ( CStringHash  ,
bsl::is_trivially_copyable   
)
bdlb::CStringHash::BSLMF_NESTED_TRAIT_DECLARATION ( CStringHash  ,
bsl::is_trivially_default_constructible   
)
CStringHash& bdlb::CStringHash::operator= ( const CStringHash rhs  ) 

Assign to this object the value of the specified rhs object, and a return a reference providing modifiable access to this object. Note that as CStringHash is an empty (stateless) type, this operation will have no observable effect.

bsl::size_t bdlb::CStringHash::operator() ( const char *  argument  )  const

Return a hash code generated from the contents of the specified null-terminated argument string. The behavior is undefined unless argument points to a null-terminated string.


The documentation for this struct was generated from the following file: