59int main(
int argc,
char **argv)
67 JParser<> zap(
"Example program to test hash set.");
73 catch(
const exception &error) {
74 FATAL(error.what() << endl);
84 for (
int i = 1<<10; i != 0; i >>= 1) {
85 buffer.insert(__A__(i));
88 buffer.
erase(buffer.find(1<<2), buffer.find(1<<4));
90 if (!buffer.erase(1<<4)) {
91 FATAL(
"Erasing value failed." << endl);
94 for (hash_set::const_iterator i = buffer.begin(); i != buffer.end(); ++i) {
96 cout << setw(4) << *i;
99 hash_set::const_iterator p = buffer.find(*i);
101 if (p != buffer.end())
102 cout << setw(4) << *p << endl;
104 FATAL(
"Inconsistent has set at " << *i << endl);
General purpose class for a hash set of sorted elements.
General purpose messaging.
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Auxiliary base class for object identification.
Utility class to parse command line options.
std::string getKey(const std::map< std::string, T > &map, const std::string &key, const T &value)
Auxiliary method to get preferred key for given value.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).