Artifact 21cc3f3819f9601566306a4516be21c96bbe52ef8d5081a8bcd38ba0e6eb463e:
- File
src/OFMutableDictionary.h
— part of check-in
[bbf1f79b8f]
at
2009-09-08 16:06:10
on branch trunk
— New OFDictionary implementation and removal of a hack in OFList.
The new implementation is easier to use as it does automatic resizing,
but therefore it's not realtime-capable anymore. The new implementation
should also be a little bit faster.I decided to change the implementation as only very few need a
realtime-capable dictionary and those few will most likely write their
own implementation for their specific case anyway.As the new implementation no longer uses OFList, this also made it
possible to remove a hack from OFList. (user: js, size: 831) [annotate] [blame] [check-ins using]
/* * Copyright (c) 2008 - 2009 * Jonathan Schleifer <js@webkeks.org> * * All rights reserved. * * This file is part of libobjfw. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE included in * the packaging of this file. */ #import "OFDictionary.h" /** * The OFMutableDictionary class provides a class for using mutable hash tables. */ @interface OFMutableDictionary: OFDictionary {} /** * Sets a key to an object. A key can be any object. * * \param key The key to set * \param obj The object to set the key to */ - setObject: (OFObject*)obj forKey: (OFObject <OFCopying>*)key; /** * Remove the object with the given key from the dictionary. * * \param key The key whose object should be removed */ - removeObjectForKey: (OFObject*)key; @end