Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » T* Detach() for ArrayMap
T* Detach() for ArrayMap [message #24874] Tue, 02 February 2010 16:31 Go to previous message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
hi there

i ran into the need of
T* ArrayMap<K, T>::Detach(const K & key)

function. normal Array<T> *does* have one
T* Array<T>::Detach(int i);

since one can do a
T & Add(const K & key, T * newt)


on both, Array<T> and ArrayMap<K, T>, it would be consistent to have a Detach() function on both cotainer types.

so maybe the following lines could be added to Map.h
T* Detach(int i) { T *t = &B::value[i]; B::key.Remove(i); return t; }
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: VC2010
Next Topic: Symlink/Shortcut support
Goto Forum:
  


Current Time: Wed May 15 07:49:25 CEST 2024

Total time taken to generate the page: 0.04062 seconds