Rechercher une page de manuel
hash.3bobcat
Langue: en
Version: 296159 (debian - 07/07/09)
Section: 3 (Bibliothèques de fonctions)
Sommaire
NAME
FBB::Hash - Various mapping template classes using hashingSYNOPSIS
#include <bobcat/hash>DESCRIPTION
The FBB:Hash group of template classes offer hashing-based mapping. Various variants are availabe, all based on the facilities offered by the GNU g++(1) ext/hash_map header file. Hashing containers are not (yet) part of the ANSI-ISO C++ standard, and an extension to the standard is offered by GNU's g++(1) compiler. GNU's hash map is defined in the __gnu_cxx namespace, indicating that this container is not one that is offered in the C++ standard.Unfortunately, the hash-map offered in the ext/hash_map header file has a fairly complex interface, and FBB::Hash is an attempt to simplify this interface. In practice, hashing uses a textual key, which may be std::string or char * based, and the keys may be used either case sensitively or case insensitively. FBB::Hash simplifies the use of the hash map offered in ext/hash_map by requiring its users to specify only the map's value type.
NAMESPACE
FBBAll constructors, members, operators and manipulators, mentioned in this man-page, are defined in the namespace FBB.
INHERITS FROM
__gnu_cxx::hash_map, using various instantiations.CONSTRUCTORS
Using case sensitive char const * keys:- o
- HashCharPtr<Value>():
The default constructor creates an empty hash-map container, in which the keys are char const *s. The map contains value of template type Value. - o
- HashCharPtr<Value>(InputIterator begin, InputIterator end):
This constructor creates a hash-map container, using elements pointed to by a pair of iterators in the hash-map. The iterators must point to std::pair<char const *, Value> objects.
Using case insensitive char const * keys:
- o
- HashCharCasePtr<Value>():
The default constructor creates an empty hash-map container, in which the keys are char const *s. The map contains value of template type Value. - o
- HashCharCasePtr<Value>(InputIterator begin, InputIterator end):
This constructor creates a hash-map container, using elements pointed to by a pair of iterators in the hash-map. The iterators must point to std::pair<char const *, Value> objects.
Using case sensitive std::string keys:
- o
- HashString<Value>():
The default constructor creates an empty hash-map container, in which the keys are std::strings. The map contains value of template type Value. - o
- HashString<Value>(InputIterator begin, InputIterator end):
This constructor creates a hash-map container, using elements pointed to by a pair of iterators in the hash-map. The iterators must point to std::pair<std::string, Value> objects.
Using case insensitive std::string keys:
- o
- HashStringCase<Value>():
The default constructor creates an empty hash-map container, in which the keys are std::strings. The map contains value of template type Value. - o
- HashStringCase<Value>(InputIterator begin, InputIterator end):
This constructor creates a hash-map container, using elements pointed to by a pair of iterators in the hash-map. The iterators must point to std::pair<std::string, Value> objects. The copy constructor is available for all FBB:Hash... hash-map containers.
OVERLOADED OPERATOR
The overloaded assignment operator is available for all FBB:Hash hash-map containers.MEMBER FUNCTIONS
All members of __gnu_cxx::hash_map are available, as FBB::Hash inherits from this template class. These members are (expected to be) the same members as available for the std::map container.EXAMPLE
#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; }
FILES
bobcat/hash - defines the class interfaceSEE ALSO
bobcat(7), g++(1), ext/hash_mapBUGS
None Reported.DISTRIBUTION FILES
- o
- bobcat_2.02.03-x.dsc: detached signature;
- o
- bobcat_2.02.03-x.tar.gz: source archive;
- o
- bobcat_2.02.03-x_i386.changes: change log;
- o
- libbobcat1_2.02.03-x_*.deb: debian package holding the libraries;
- o
- libbobcat1-dev_2.02.03-x_*.deb: debian package holding the libraries, headers and manual pages;
- o
- http://sourceforge.net/projects/bobcat: public archive location;
BOBCAT
Bobcat is an acronym of `Brokken's Own Base Classes And Templates'.COPYRIGHT
This is free software, distributed under the terms of the GNU General Public License (GPL).AUTHOR
Frank B. Brokken (f.b.brokken@rug.nl).Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre