X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/blobdiff_plain/ba8a9c5fbc92dc95fc99d8078b3474fd2fd5a043..92d7eb81980a40dda0715b23e874a1537cf3adb8:/named_object_list.h?ds=sidebyside diff --git a/named_object_list.h b/named_object_list.h index d3fb20c..2c91263 100644 --- a/named_object_list.h +++ b/named_object_list.h @@ -65,7 +65,8 @@ public: const std::string& get_descr(iterator& it) const { return it->second->description; } - size_t size() const { return assoc.size(); } + bool exists(const std::string& name) const + { return assoc.find(name) != assoc.end(); } iterator begin() const { return assoc.begin(); } iterator end() const { return assoc.end(); } @@ -73,9 +74,6 @@ public: //===== arity 2 ===== -#include -#include - template class named_object_list2 { protected: @@ -145,7 +143,7 @@ public: //=================== -#define THIS_INSERT(name, descr, class) insert(name, new creator(descr)) +#define NOL_INSERT(name, descr, class) insert(name, new creator(descr)) #endif // !NAMED_OBJECT_LIST_H