| VRS - The Virtual Rendering System |
| version 3.3 |
#include <vrs/container/dictionary.h>

Public Member Functions | |
| NonPersistentDictionary (unsigned int estimatedElements=0) | |
| void | setValue (const K &key, const V &value) |
| const V & | getValue (const K &key) const |
| const V & | operator[] (const K &key) const |
| V & | operator[] (const K &key) |
| bool | find (const K &key, V &result) const |
| bool | contains (const K &key) const |
| int | size () const |
| Returns true, if the dictonary is empty. | |
| bool | isEmpty () const |
| Returns the number of entries. | |
| bool | insert (const K &key, const V &v) |
| bool | erase (const K &key) |
| void | clear () |
| Iterator< K > * | newKeyIterator () const |
| Creates an iterator instance for the keys. | |
| Iterator< V > * | newValueIterator () const |
| Creates an iterator instance for the values. | |
| VRS_TYPEINFO (NonPersistentDictionary, SharedObj) | |
| VRS_SERIALIZABLE_ABSTRACT_CLASS (NonPersistentDictionary) | |
| VRS::NonPersistentDictionary< K, V >::NonPersistentDictionary | ( | unsigned int | estimatedElements = 0 |
) |
`Dictionary<K,T>' : dictionary class implemented by hashtables. `K': key class, `T': class of associated data. If the number of elements is known during construction, the access performance will be optimized. Constraints for the template classes:
| void VRS::NonPersistentDictionary< K, V >::setValue | ( | const K & | key, | |
| const V & | value | |||
| ) |
| const V& VRS::NonPersistentDictionary< K, V >::getValue | ( | const K & | key | ) | const |
| const V& VRS::NonPersistentDictionary< K, V >::operator[] | ( | const K & | key | ) | const |
| V& VRS::NonPersistentDictionary< K, V >::operator[] | ( | const K & | key | ) |
`operator[]' : element access which asserts that the dictionary contains the element with key `k'.
| bool VRS::NonPersistentDictionary< K, V >::find | ( | const K & | key, | |
| V & | result | |||
| ) | const |
If key "key" is included, "result" is set to the value associated with "key", and true is returned. If no key "key" is included, "result" is not changed, and false is returned.
| bool VRS::NonPersistentDictionary< K, V >::contains | ( | const K & | key | ) | const |
Tries to find the given dictionary entry, and returns if such an key exists or not.
| int VRS::NonPersistentDictionary< K, V >::size | ( | ) | const |
Returns true, if the dictonary is empty.
| bool VRS::NonPersistentDictionary< K, V >::isEmpty | ( | ) | const |
Returns the number of entries.
| bool VRS::NonPersistentDictionary< K, V >::insert | ( | const K & | key, | |
| const V & | v | |||
| ) |
| bool VRS::NonPersistentDictionary< K, V >::erase | ( | const K & | key | ) |
| void VRS::NonPersistentDictionary< K, V >::clear | ( | ) |
`insert' includes "(key,v)" in the dictionary. If an entry with the same key already exists, it is overwritten, and false is returned. If such an entry has not been included before, true is returned. `erase' excludes the entry with key "key". If no entry with key "key" exists, an error occurs. `clear' removes all dictionary entries.
| Iterator<K>* VRS::NonPersistentDictionary< K, V >::newKeyIterator | ( | ) | const |
Creates an iterator instance for the keys.
| Iterator<V>* VRS::NonPersistentDictionary< K, V >::newValueIterator | ( | ) | const |
Creates an iterator instance for the values.
| VRS::NonPersistentDictionary< K, V >::VRS_TYPEINFO | ( | NonPersistentDictionary< K, V > | , | |
| SharedObj | ||||
| ) |
| VRS::NonPersistentDictionary< K, V >::VRS_SERIALIZABLE_ABSTRACT_CLASS | ( | NonPersistentDictionary< K, V > | ) |