FBB::Hash(3bobcat)
π FBB::Hash π β the bobcat manual, section 3 (3bobcat), bestie edition π¦
okay so sit down, grab a strawberry π, because we're talking about FBB::Hash β the hashing container glow-up from the bobcat library. it's giving template magic, it's giving group chat energy, and yes it ate. π
β¨ NAME β¨
FBB::Hash β various mapping template classes using hashing π
β¨ SYNOPSIS β¨
#include <bobcat/hash>
β¨ DESCRIPTION β¨
so the FBB:Hash squad of template classes is all about hashing-based mapping, okurrr? there are a bunch of variants, and every single one of them is built on top of the facilities that unordered_map offers. no cap. π₯
here's the tea though: the hash-map situation in the unordered_map container has a fairly complex construction interface π, and Hash is literally the attempt to simplify that part of the interface. icon behavior honestly.
in practice, hashing uses a textual key, which may be std::string based or char * based, and the keys can be used either case sensitively or case insensitively. and Hash is out here asking for the bare minimum from you: just specify the map's value type. that's it bestie. the key may be a char const * or a std::string, used case sensitively or case insensitively, and Hash handles the vibe check for you. π
β¨ NAMESPACE β¨
FBB
literally every constructor, member, operator and manipulator mentioned in this man-page is defined in the namespace FBB. all of them. periodt. π
β¨ INHERITS FROM β¨
std::unordered_map, using various instantiations. yes she's a nepo baby and we love her for it. π
β¨ TYPE β¨
every variant defines value_type as the corresponding unordered_map value_type. in practice a value_type defines a std::pair<Key, Value>, where Key represents the hash's key-type and Value represents the hash's value type. so like... a little couple. a duo. main character and their partner. π«Ά
β¨ CONSTRUCTORS β¨
variants of the FBB::Hash container are available for char const * keys or std::string keys, used case sensitively or case insensitively. four flavors, pick your fighter. π§
and listen β all variants support:
- default construction β¨
- move construction (plus move assignment, obviously) π
- construction from initializer lists π
- construction from iterators defining a half-open range of
value_typevalues πΈ
okay so here are the variants, showing their default constructors. Value refers to the value type stored in the hash table, iykyk:
HashCharPtr<Value>()β this hash table uses case sensitivechar const *keys π₯HashCharCasePtr<Value>()β this hash table uses case insensitivechar const *keys πHashString<Value>()β this hash table uses case sensitivestd::stringkeys βHashStringCase<Value>()β this hash table uses case insensitivestd::stringkeys π
β¨ OVERLOADED OPERATOR β¨
on top of the index operator inherited from unordered_map, the overloaded copy and move assignment operators are available for all Hash containers. so you can = to your heart's content. no thoughts, just assignment. π
β¨ MEMBER FUNCTIONS β¨
every single member of the unordered_map container is available, because Hash inherits from this template class. the whole inheritance bag, bestie. π
β¨ EXAMPLE β¨
look at her go:
#include <iostream>
#include <bobcat/hash>
using namespace std;
using namespace FBB;
pair<char const *, size_t> ap[] =
{
pair<char const *, size_t>("one", 1),
pair<char const *, size_t>("two", 2),
};
int main()
{
HashCharPtr<size_t> hcp;
HashCharPtr<size_t> hcp2(ap, ap + 2);
HashCharPtr<size_t> hcp3(hcp2);
hcp = hcp2;
cout << hcp2["one"] << endl;
}
like?? default construct, iterator-range construct, copy construct, copy assign, and then hcp2["one"] goes brrr. slay. π₯
β¨ FILES β¨
bobcat/hashβ defines the class interface π
β¨ SEE ALSO β¨
bobcat(7)π
β¨ BUGS β¨
None Reported. (a clean queen. not a single problem reported. we stan. π)
β¨ BOBCAT PROJECT FILES β¨
- https://fbb-git.gitlab.io/bobcat/ : gitlab project page β¨
Debian Bobcat project files:
libbobcat6β debian package containing the shared library, changelog and copyright note πlibbobcat-devβ debian package containing the static library, headers, manual pages, and developer info πΈ
β¨ BOBCAT β¨
Bobcat is an acronym of Brokken's Own Base Classes And Templates. like, the name itself is a flex. π
β¨ COPYRIGHT β¨
This is free software, distributed under the terms of the GNU General Public License (GPL). free free free, bestie. π«Ά
β¨ AUTHOR β¨
Frank B. Brokken (f.b.brokken@rug.nl). the man, the myth, the maintainer. π
okay so that's the whole page, every single detail intact, nothing skipped, no cap π
and that's a wrap on libbobcat-dev_6.15.01, dated 2005-2026 β the FBB::Hash manual page, section 3bobcat, signed off with love for the bobcat library. go forth and hash responsibly, bestie ππ
β¨
π¦ where this page comes from
- ubuntu stonking: libbobcat-dev 6.15.01-1 Β· GPL-3.0-or-later WITH OpenSSL exception
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms