jabberd14 1.6.2
Public Member Functions
xmppd::xhash< value_type > Class Template Reference

#include <jabberdlib.h>

Inheritance diagram for xmppd::xhash< value_type >:
map

Public Member Functions

xhash< value_type >::iterator get_by_domain (std::string domainkey)

Detailed Description

template<class value_type>
class xmppd::xhash< value_type >

a class implementing a hash with std::string as key and void* as value

This is a replacement for the xht structure in older versions of jabberd14 and the xhash_...() functions are mapped to method calls on this object.

Todo:
This dynamically maps to either a map or an unordered_map if available. This depends on a test made in the configure script. But we should not depend on definitions in config.h (i.e. definitions made by the configure script) in files we do install. This should be fixed before this code gets released.

Member Function Documentation

template<class value_type >
xmppd::xhash< value_type >::iterator xmppd::xhash< value_type >::get_by_domain ( std::string  domainkey)

get an entry from the hash but consider the key to be a domain

This accesor function also matches if the domainkey is a 'subdomain' for a domain in the map. If there are multiple matches, the most specific one is returned. If no match can be found, "*" is tried as a default key.

Parameters:
domainkeythe key that should be considered as a domain
Returns:
iterator to the found value

Referenced by xhash_get_by_domain().


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