version 3.3

VRS::NonPersistentMultiDictionary< K, V > Class Template Reference

MultiDictionary Template. More...

#include <vrs/container/multidictionary.h>

Inheritance diagram for VRS::NonPersistentMultiDictionary< K, V >:

VRS::SharedObj VRS::Visitable VRS::MultiDictionary< K, V >

List of all members.

Public Member Functions

 NonPersistentMultiDictionary (unsigned int estimatedElements=0, bool autoDeleteKey=true)
void setValue (const K &key, SO< Array< V > >value)
SO< Array< V > > getValue (const K &key) const
bool find (const K &key, V &result) const
bool contains (const K &key) const
int size (void) const
 Returns the number of entries.
bool isEmpty (void) const
 Returns true, if the multi-dictonary is empty.
bool insert (const K &key, const V &v)
bool erase (const K &k, const V &v)
bool erase (const K &key)
void clear (void)
Iterator< K > * newKeyIterator (void) const
 Creates an iterator instance for the keys.
Iterator< V > * newValueIterator (const K &) const
 Creates an iterator instance for the values.
void setAutoDeleteKey (bool autoDeleteKey)
bool getAutoDeleteKey (void) const
 VRS_TYPEINFO (NonPersistentMultiDictionary, SharedObj)
 VRS_SERIALIZABLE_ABSTRACT_CLASS (NonPersistentMultiDictionary)


Detailed Description

template<typename K, typename V>
class VRS::NonPersistentMultiDictionary< K, V >

MultiDictionary Template.

Constructor & Destructor Documentation

template<typename K, typename V>
VRS::NonPersistentMultiDictionary< K, V >::NonPersistentMultiDictionary ( unsigned int  estimatedElements = 0,
bool  autoDeleteKey = true 
)

`MultiDictionary<K,T>' : multi-dictionary (multimap) class implemented by VRS Dictionary and VRS Array. `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:


Member Function Documentation

template<typename K, typename V>
void VRS::NonPersistentMultiDictionary< K, V >::setValue ( const K &  key,
SO< Array< V > >  value 
)

template<typename K, typename V>
SO<Array<V> > VRS::NonPersistentMultiDictionary< K, V >::getValue ( const K &  key  )  const

template<typename K, typename V>
bool VRS::NonPersistentMultiDictionary< 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.

template<typename K, typename V>
bool VRS::NonPersistentMultiDictionary< K, V >::contains ( const K &  key  )  const

Tries to find the given multi-dictionary entry, and returns if such an key exists or not.

template<typename K, typename V>
int VRS::NonPersistentMultiDictionary< K, V >::size ( void   )  const

Returns the number of entries.

template<typename K, typename V>
bool VRS::NonPersistentMultiDictionary< K, V >::isEmpty ( void   )  const

Returns true, if the multi-dictonary is empty.

template<typename K, typename V>
bool VRS::NonPersistentMultiDictionary< K, V >::insert ( const K &  key,
const V &  v 
)

template<typename K, typename V>
bool VRS::NonPersistentMultiDictionary< K, V >::erase ( const K &  k,
const V &  v 
)

template<typename K, typename V>
bool VRS::NonPersistentMultiDictionary< K, V >::erase ( const K &  key  ) 

template<typename K, typename V>
void VRS::NonPersistentMultiDictionary< K, V >::clear ( void   ) 

`insert' includes "(key,v)" in the multi-dictionary. If an entry with the same key and value already exists, it is overwritten, and false is returned. If such an entry has not been included before, true is returned. `erase' excludes the entries with key "key". If no entry with key "key" exists, an error occurs. `clear' removes all multi-dictionary entries.

template<typename K, typename V>
Iterator<K>* VRS::NonPersistentMultiDictionary< K, V >::newKeyIterator ( void   )  const

Creates an iterator instance for the keys.

template<typename K, typename V>
Iterator<V>* VRS::NonPersistentMultiDictionary< K, V >::newValueIterator ( const K &   )  const

Creates an iterator instance for the values.

template<typename K, typename V>
void VRS::NonPersistentMultiDictionary< K, V >::setAutoDeleteKey ( bool  autoDeleteKey  )  [inline]

template<typename K, typename V>
bool VRS::NonPersistentMultiDictionary< K, V >::getAutoDeleteKey ( void   )  const [inline]

template<typename K, typename V>
VRS::NonPersistentMultiDictionary< K, V >::VRS_TYPEINFO ( NonPersistentMultiDictionary< K, V >  ,
SharedObj   
)

template<typename K, typename V>
VRS::NonPersistentMultiDictionary< K, V >::VRS_SERIALIZABLE_ABSTRACT_CLASS ( NonPersistentMultiDictionary< K, V >   ) 


The documentation for this class was generated from the following file:

Generated on Tue May 22 06:00:19 2012 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact