バナーをクリックすれば目次に戻ります
Copyright 1999 Rogue Wave Software
Copyright 1999 Sun Microsystems, Inc.
RWTValHashMap<K,T,H,EQ>
#include <rw/tvhdict.h> RWTValHashMap<K,T,H,EQ> m;
注 - 標準 C++ ライブラリがある場合は、ここで述べるインタフェースを使用します。標準 C++ ライブラリがない場合は、付録 A に記載する RWTValHashDictionary 用インタフェースを使用してください。
unsigned long operator()(const K& x)
コレクション中の同値キーは、型 EQ の同等オブジェクトにもとづいてグループ化されます。EQ は、次の公開メンバーを介して、このグループ化を保証しなければなりません。
bool operator()(const K& x, const K& y)
これは、x と y が等しい場合に真を返します。
RWTValHashMap<K,T,H,EQ> は、コレクション内の既存のキーと等しいキーは受け付けません (RWTValHashMultiMap<K,T,H,EQ> には、互いに等しい複数のキーを含めることができます)。等しいかどうかは、== 演算子ではなく、比較オブジェクトにもとづいて判定されます。
クラス rw_hashmap<K,T,H,EQ> は、このコレクションの基礎となる実装として使用される C++ 標準準拠コレクションです。
typedef rw_hashmap<K,T,H,EQ> container_type; typedef container_type::iterator iterator; typedef container_type::const_iterator const_iterator; typedef container_type::size_type size_type; typedef pair <const K,T> value_type; typedef K key_type; typedef T data_type; typedef pair <const K,T>& reference; typedef pair <const K,T>& const_reference;
RWTValHashMap<K,T,H,EQ>();
RWTValHashMap<K,T,H,EQ>(const rw_hashmap<K,T,H,EQ>& m);
RWTValHashMap<K,T,H,EQ> (const H& h, size_type sz = RWDEFAULT_CAPACITY);
RWTValHashMap<K,T,H,EQ>(const RWTValHashMap<K,T,H,EQ>& rwm);
RWTValHashMap<K,T,H,EQ>(const value_type* first, const value_type* last);
RWTValHashMap<K,T,H,EQ>& operator=(const RWTValHashMap<K,T,H,EQ>& m); RWTValHashMap<K,T,H,EQ>& operator=(const rw_hashmap<K,T,H,EQ>& m);
bool operator==(const RWTValHashMap<K,T,H,EQ>& m) const; bool operator==(const rw_hashmap<K,T,H,EQ>& m) const;
T& operator[](const K& key);
void apply(void (*fn)(const K&, T&, void*),void* d); void apply(void (*fn)(const K&,const T&,void*),void* d) const;
void yourfun(const K& key, T& a, void* d); void yourfun(const K& key, const T& a,void* d);
void applyToKeyAndValue(void (*fn)(const K&, T&,void*),void* d); void applyToKeyAndValue (void (*fn)(const K&, const T, void*),void* d) const;
iterator begin(); const_iterator begin() const;
size_type capacity() const;
void clear();
bool contains(const K& key) const;
bool contains(bool (*fn)(const_reference,void*), void* d) const;
bool yourTester(const_reference a, void* d);
iterator end(); const_iterator end() const;
size_type entries() const;
float fillRatio() const;
bool find(const K& key, K& r) const;
bool find(bool (*fn)(const_reference,void*),void* d, pair<K,T>& r) const;
bool yourTester(const K& a, void* d);
bool findValue(const K& key, T& r) const;
bool findKeyValue(const K& key, K& kr, T& tr) const;
bool insert(const K& key, const T& a);
bool insertKeyAndValue(const K& key,const T& a);
bool isEmpty() const;
size_type occurrencesOf(const K& key) const;
size_type occurrencesOf(bool (*fn)(const_reference,void*),void* d) const;
bool yourTester(const_reference a, void* d);
bool remove(const K& key);
bool remove(bool (*fn)(const_reference,void*), void* d);
bool yourTester(const_reference a, void* d);
size_type removeAll(const K& key);
size_type removeAll(bool (*fn)(const_reference,void*), void* d);
bool yourTester(const_reference a, void* d);
void resize(size_type sz);
rw_hashmap<K,T,H,EQ>& std(); const rw_hashmap<K,T,H,EQ>& std() const;
RWvostream& operator<<(RWvostream& strm, const RWTValHashMap<K,T,H,EQ>& coll); RWFile& operator<<(RWFile& strm, const RWTValHashMap<K,T,H,EQ>& coll);
RWvistream& operator>>(RWvistream& strm, RWTValHashMap<K,T,H,EQ>& coll); RWFile& operator>>(RWFile& strm, RWTValHashMap<K,T,H,EQ>& coll);
RWvistream& operator>>(RWvistream& strm, RWTValHashMap<K,T,H,EQ>*& p); RWFile& operator>>(RWFile& strm, RWTValHashMap<K,T,H,EQ>*& p);