.TH "FBB::Hash" "3bobcat" "2005\-2024" "libbobcat\-dev_6\&.06\&.02" "Key hashing containers" .PP .SH "NAME" FBB::Hash \- Various mapping template classes using hashing .PP .SH "SYNOPSIS" \fB#include \fP .br .PP .SH "DESCRIPTION" The \fBFBB:Hash\fP group of template classes offer hashing\-based mapping\&. Various variants are available, all based on the facilities offered by the \fBunordered_map\fP\&. .PP The hash\-map offered in the \fBunordered_map\fP container has a fairly complex construction interface, and \fIHash\fP is an attempt to simplify this part of its interface\&. In practice, hashing uses a textual key, which may be \fBstd::string\fP or \fIchar *\fP based, and the keys may be used either case sensitively or case insensitively\&. \fIHash\fP merely requires its users to specify the map\(cq\&s value type, while the key may be a \fIchar const *\fP or \fIstd::string\fP, used case sensitively or case insensitively\&. .PP .SH "NAMESPACE" \fBFBB\fP .br All constructors, members, operators and manipulators, mentioned in this man\-page, are defined in the namespace \fBFBB\fP\&. .PP .SH "INHERITS FROM" \fBstd::unordered_map\fP, using various instantiations\&. .PP .SH "TYPE" .PP All variants define \fIvalue_type\fP as the corresponding \fIunordered_map value_type\fP\&. In practice a \fIvalue_type\fP defines a \fIstd::pair\fP, where \fIKey\fP represents the hash\(cq\&s key\-type and \fIValue\fP represents the hash\(cq\&s value type\&. .PP .SH "CONSTRUCTORS" .PP Variants of the \fIFBB::Hash\fP container are available for \fIchar const *\fP or \fIstd::string\fP keys, used case sensitively or case insensitively\&. .PP All variants support default and move construction (as well as move assignment), support construction from initializer lists\&. and support construction from iterators defining a half\-open range of \fIvalue_type\fP values\&. .PP The following variants are available (showing their default constructors)\&. \fIValue\fP refers to the value type stored in the hash table\&. .PP .IP o \fBHashCharPtr()\fP: .br this hash table uses \fIcase sensitive\fP \fBchar const *\fP keys; .IP .IP o \fBHashCharCasePtr()\fP: .br this hash table uses \fIcase insensitive\fP \fBchar const *\fP keys; .IP .IP o \fBHashString()\fP: .br this hash table uses \fIcase sensitive\fP \fBstd::string\fP keys; .IP .IP o \fBHashStringCase()\fP: .br this hash table uses \fIcase insensitive\fP \fBstd::string\fP keys; .PP .SH "OVERLOADED OPERATOR" In addition to the index operator inherited from \fIunordered_map\fP the overloaded copy and move assignment operators are available for all \fIHash\fP containers\&. .PP .SH "MEMBER FUNCTIONS" All members of the \fIunordered_map\fP container are available, as \fIHash\fP inherits from this template class\&. .PP .SH "EXAMPLE" .nf #include #include using namespace std; using namespace FBB; pair ap[] = { pair(\(dq\&one\(dq\&, 1), pair(\(dq\&two\(dq\&, 2), }; int main() { HashCharPtr hcp; HashCharPtr hcp2(ap, ap + 2); HashCharPtr hcp3(hcp2); hcp = hcp2; cout << hcp2[\(dq\&one\(dq\&] << endl; } .fi .PP .SH "FILES" \fIbobcat/hash\fP \- defines the class interface .PP .SH "SEE ALSO" \fBbobcat\fP(7) .PP .SH "BUGS" None Reported\&. .PP .SH "BOBCAT PROJECT FILES" .PP .IP o \fIhttps://fbb\-git\&.gitlab\&.io/bobcat/\fP: gitlab project page; .IP o \fIbobcat_6\&.06\&.02\-x\&.dsc\fP: detached signature; .IP o \fIbobcat_6\&.06\&.02\-x\&.tar\&.gz\fP: source archive; .IP o \fIbobcat_6\&.06\&.02\-x_i386\&.changes\fP: change log; .IP o \fIlibbobcat1_6\&.06\&.02\-x_*\&.deb\fP: debian package containing the libraries; .IP o \fIlibbobcat1\-dev_6\&.06\&.02\-x_*\&.deb\fP: debian package containing the libraries, headers and manual pages; .PP .SH "BOBCAT" Bobcat is an acronym of `Brokken\(cq\&s Own Base Classes And Templates\(cq\&\&. .PP .SH "COPYRIGHT" This is free software, distributed under the terms of the GNU General Public License (GPL)\&. .PP .SH "AUTHOR" Frank B\&. Brokken (\fBf\&.b\&.brokken@rug\&.nl\fP)\&. .PP