aboutsummaryrefslogtreecommitdiff
path: root/src/hash.h (follow)
AgeCommit message (Collapse)Author
2009-08-13Bu::Hash can now be sent through the Formatter, it's cute.Mike Buland
2009-08-09Really, just a lot of documenting.Mike Buland
2009-02-08So many updates. I recommend using the new FString iterators instead of directMike Buland
indexing. It is now many times faster, and requires less overhead. Also, more stuff iterator related in every class. More on that later.
2009-01-24Added some append and prepend functions and operators to Bu::List, now you canMike Buland
append one list to another and the like. Also, wow, I found a bug that's been around for ages, I guess we don't copy hash tables often. The interesting thing is that it actually worked, it copied but it would include any data that had been deleted in the old hash table but not reclaimed yet and insert it as new data. Usually the key had been completely destroyed (like with a string) so it came out as keyed to blank string. So in cases like that, all deleted keys would collapse into one deleted key in the new hash table.
2009-01-07Corrected a couple of places where std:: classes were being used and shouldn'tMike Buland
have been. Also made the Unit tests actually use expected values, so you can mark a test as "expected fail" and it'll know. It also prints out cute reports at the end of each run.
2008-12-31Wow, that was a freaky bug. Turned out to not have anything to do with theMike Buland
size of the table, it had to do with using non pointer types for the key (some more complex types worked as well, probably because of lazy memory collection) and then using the [] indexing operators. You wound up with pointers to local variables that didn't exist by the end of the assignemnt operator. Strange, but I didn't actually use references inside of all of the Bu::Hash accessor functions, that means in cases where more complex variables are used as keys (like Bu::FString) it was making several copies of them per operation and destroying them all immediately. Now it will be even faster and use much less memory. Good catch, David.
2008-10-09david - make the operator= on iterator and const_iterator return themselves.David
2008-09-24Ok, now all the warnings are gone (except for those coming from nids, but that'sMike Buland
ok, nids is still in flux, they'll be gone soon).
2008-09-15Whoa! Loads of NIDS work. It actually compiles, runs, and I'm optimizing theMike Buland
hell out of it. Good times, everyone. This is a major chunk for congo, and the new optimizations should be good.
2008-04-28Apparently there were a number of things that weren't strict ISO C++, the newMike Buland
version of gcc complained about them, none of these changes will break backward compatibility, so I fixed them. I added more docs too, it seems.
2008-02-26Some simple getters that are const safe weren't labeled as such. Oops.Mike Buland
2008-02-07Just updated the copyright date.Mike Buland
2007-11-15david - example of license notice in hash.hDavid
2007-11-14Fixed a bug in Bu::Hash::clear(), it wasn't actually changing the number ofMike Buland
deleted items, so the size was being misreported immediately after a clear.
2007-11-14Thought that a Bu::Hash::getValues() function would be nice to matchMike Buland
Bu::Hash::getKeys().
2007-10-19As long as the Bu::Hash::iterator was aware that it was finished or not, IMike Buland
thought I would write an accessor for that. Also, I added a public copy constructor, it only makes sense.
2007-10-14Fixed an interesting ideosyncacy in Bu::Hash in a safe way, I should try to doMike Buland
this with the Bu::Archive next. Basically, there's one generic template function that will convert anything that can safely cast to a uint32_t and that supports direct comparisson, and doesn't have it's own override already to be a Hash key, such as char, uint8_t, uint64_t, etc. The Telnet protocol handler does everything I need it too for now, next up for it is escape sequence handling, it would be nice to make this general too, by using the termcap database or something, but there is an ANSI/ISO standard now, I may just go ahead and use that. Also, it looks like it'd be pretty easy to make the canonical mode editing functions be pluggable to facilitate different types of editing, but that can be done down the road as well.
2007-10-03Nothing about function. I added a bunch of docs and re-arranged a bunch ofMike Buland
the existing docs. Taking advantage of some of the cooler extra features of doxygen I've started writing extra how-to pages covering working with sections of the library. Also, I started grouping the classes by function so they show up on the Modules page together, very cute.
2007-09-26Fixed a bug that allowed Bu::Hash::get() to rehash, this has been corrected, theMike Buland
get function can no longer change the Hash in any way.
2007-08-28Minor change that may break some other programs in a very minor way, changedMike Buland
the name of Bu::Hash::size() to Bu::Hash::getSize() to be consistant accross the system.
2007-07-10I Fixed the Hash bug!!!Mike Buland
2007-07-01That was weird. Bu::Hash was basically unusable const'd, this has beenMike Buland
corrected. There may be more operations that need to be fixed, but all basic data operations are fixed and a const_iterator has been added.
2007-06-28Many minor changes, hopefully the header fixes will keep future header macroMike Buland
conflicts from happening. And, from now on, other projects should do -Ilibbu++ not -Ilibbu++/src so we can get ready for an installed version of libbu++.
2007-06-18david - writing code documentation...David
2007-06-11Corrected another issue with the prefix * iterator operator in Bu::Hash, it wasMike Buland
still trying to use a pair internally. Also added more helpers to FString.
2007-06-07The new taf interfaces seem to work just fine, except for saving and that loadedMike Buland
TafNode structures are immutable, it all looks really good. Saving should be a snap, and the immutable part I'm not sure is bad...we'll see what happens. Also, I'm contemplating looking into a way to add "named data structure" support to the Archive at a lower level, then allow it to use a nameing system to apply names to each data structure and then output to any backend that supports naming, like taf, xml, etc.
2007-06-07Minor change to the operation of the Hash, now dereferencing an iterator withMike Buland
the prefix * operator will return only a reference to the value, not a pair, it was causing issues, and you can still get at the key with the getKey function.
2007-06-04Added rudimentary object tracking to Archive, and rearranged the hash andMike Buland
archive dependancies a little. I'll add docs for object tracking later...
2007-04-10Woo, changed the name of Achable to Archival, I dig that, and added the ground-Mike Buland
work for the SSocket, that should be cool.
2007-04-03The first batch seem to have made it alright. Unfortunately the Archive classMike Buland
isn't done yet, I'm going to make it rely on streams, so those will be next, then we can make it work all sortsa' well.
2007-04-03Ok, no code is left in src, it's all in src/old. We'll gradually move code backMike Buland
into src as it's fixed and re-org'd. This includes tests, which, I may write a unit test system into libbu++ just to make my life easier.
2007-03-25Some more updates to Hash and FString.Mike Buland
2007-03-21Fixed an infinite loop rehashing in the has function...whackyMike Buland
2007-03-20Minor updates to the Hash and FString, Hash got a getKeys function, and FStringMike Buland
got the more normal getStr and getSize functions.
2007-03-19Fixed some bugs and added some new goo. You can serialize FStrings and HeshesMike Buland
now.
2007-03-15This version may break hashing of strings, but at least you can hash FStrings...Mike Buland
templates are confusing.
2007-03-02Removed debugging from the HashMike Buland
2007-01-29Added another new helper to Hash.Mike Buland
2007-01-27New feature in Hash, a copy constructor, you can now put a hash into otherMike Buland
templatized containers.
2007-01-19Experimental commit to see if references work...Mike Buland
2007-01-17Added more hash functions, yay hash functions!Mike Buland
2006-11-27Added the new OrdHash, check the test file for an example.Mike Buland
2006-11-24Fixed size bug.Mike Buland
2006-11-24david - added sizeDavid
2006-11-21Nooow everything in the lib is clean with -Wall, hash was a template and didn'tMike Buland
complain until I ran the tests. The tests will be fixed next.
2006-11-21Hash uses real exceptions now, and has a clear() function.Mike Buland
2006-11-21Added a has function to HashMike Buland
2006-11-21Updated a thing.Mike Buland
2006-11-21Added erase functionality, and specializations for using ints as hash keys, soMike Buland
really it does everything the old one did, does it better, easier, and possibly faster.
2006-11-21OK, everything that did work works, but now the HashProxy is as fast as insert,Mike Buland
and has more options. Use [] all you want!