Release: Multi-Purpose List Class
Displaying 1-3 of 3 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
Sungam

http://www.verge-rpg.com/files/detail.php?id=553

I started out just wanting to mess around with ClassBuilder, and thought I'd make a linked list class, by Feyr's suggestion. Then I thought I'd rather have something similar to the PHP implementation of arrays (dynamic-length, sortable, and whatnot). Then I notice that PHP arrays have built-in functions for Push/Pop/Shift/Unshift, and I pretty much have stacks and queues covered already.
Considered inheritance and such for a moment, then decided - fuck it - and just sort of mashed everything together.

You be the judge of whether or not it's useful. I kinda like it, but then, I'm biased. At least it's native ClassBuilder stuff, and if you like that nearly as much as I do, you're very welcome.

From the documentation (included in the zip):
---
This is an all-in-one list structure, simulating the effects of a doubly-linked list, a stack, a queue, a dynamic-length array, and maybe a few others.
This structure is a bit unorthodox, but bear with me. It's not terribly efficient (larger memory usage, and probably slower than each list structure would have been individually), but at least you'll only have to use one sort of list for your entire project, and you have a bit more elbow space than usual.
For instance, node objects hold (in addition to pointers to surrounding nodes) three properties. Two CString (string) types (Key and DataStr) and one integer type (Data). While all these are mainly included so that you can use one list structure, regardless of what type of data you plan to store, it is also possible to mix and match data (some nodes hold integers while other hold strings), or even have each node hold both data types.
---


So there. Hope someone can find a use for it :)

Posted on 2004-11-14 21:33:03

rpgking

Nice :)

Posted on 2004-11-14 22:04:09

Feyr

Nice, I'll have to take a look at it. I was thinking about writing a hashtable class (analogous to PHP's associative arrays), and I even implemented the MD4 hashing algorithm (before throwing it away because it was far too slow -_-) before I got caught up in school stuff. And now that I've been hired as a PHP developer (pretty slick for someone who just started learning PHP four days ago, eh?) with instructions to write a database driven site suitable for a small business I'm going to have even less time for the next week or two. So I'm glad to see someone else working on the problem, so I won't have to when I get back to Verge. ;P

Posted on 2004-11-15 21:11:22


Displaying 1-3 of 3 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.