Quote:Original post by Extrarius
It's not thread safe or thread friendly, and any subroutine that used the enumeration functions could produce bugs that are nearly impossible to trace down. If you want something like that, you should make a templated iterator wrapper instead.
Thanks Extrarius. Threads actually hadn't crossed my mind since I've never used them. I've added it to my todo list for the next iteration of my code library.
The subroutine issue is already on my to-do list, as is the fact that you can't iterate a const version of the vector.
Writing an iterator wrapper hadn't crossed my mind either, but mostly for the fact that I'm not quite sure how they work. I've got the gist of things, just not the "in-depth" understanding that I'd like to have. That's why I'm writing containers as a side learning project (nobody yell and scream; I'm doing it for learning purposes only and I don't plan to use them in anything.)
Quote:Original post by Falling Sky
I like it dude, this is what ive been looking for!
Cool, I'm glad to hear you find it useful.
To those that are interested in the design, but don't want to use my whole containers library (I know there's at least two of you lol): I rewrote the classes to use STL classes instead of my wrappers. It's a bit more ugly, but it works. You can see it
here. Make sure you read the comments in the GetCurrent() and GetCurrentKey() methods!
And for those that are interested in the rest of the library, I'll be putting it up in my journal within the next few days.
Quote:Original post by Falling Sky
hell, even if its slower ide still use it.
This shouldn't be a problem with any of my wrappers, since I'm storing STL internally. AFAIK the conversion operator (dfg::Vector to std::vector, dfg::Dictionary to std::map, and dfg::String to std::string) should be pretty much completely transparent since all I'm doing is returning the STL object.
This also brings up the point that my wrappers should integrate pretty seemlessly into other code (it has so far for me.) The only thing I can see at the moment that would slow things down are my copy constructors that take STL objects (since the data needs to be copied from the input container to my internal container.)
Thanks for the replies guys!