Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / Open Source plugin for making .NET style Dictionarys

Author
Message
MoomanFL
18
Years of Service
User Offline
Joined: 12th Nov 2005
Location:
Posted: 10th Feb 2008 14:11 Edited at: 10th Feb 2008 14:55
Greetings everyone. This is my first public plugin. I made it in order to learn C++ and test some concepts for another plugin I had in mind, but it took on a life of it's own.

What it does is allows the user to make a Dictionary style list (basically a 1 dimensional array) with key/value pairs. The key and the value can be of any data type except for UDT's and arrays. It is a similar concept to the Generic Dictionary class in .NET, hash tables in Perl, or std::map in C++ (in fact that was what I used to make this).

Command List and Usage:

MAKE DICTIONARY index
DICTIONARY SET index, key, value
returnvalue = DICTIONARY GET(index, key)
DELETE DICTIONARY index
DELETE KEY FROM DICTIONARY index, key
CLEAR DICTIONARY index
returnvalue as integer = DICTIONARY SIZE(index)


The plugin is fully documented (and then some) with help files, keyword file, and heavily documented C++ source code. It is released under the GNU LGPL so it may be modified or used in commercial projects. A copy of all relevant licenses is provided. All I ask is that any modifications or additions to the code that might benefit the community be posted back to this thread for all to gain the benefit of.

Here is a sample bit of code to show how it would be used... sorry, it isn't very pretty. It was my test code when making the plugin.



Hope you enjoy. For anyone that is interested, there is a TODO list in the help files. If you would like, take a look over that and if there is a feature you would like to add, feel free. I am not going to have much time to work on this so it is open for anyone. Source code is located in the Help/DBPDictionaries directory.

Design documents?!? What design documents??? I thought we were just going to wing it!!!

Attachments

Login to view attachments
Kentaree
21
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 11th Feb 2008 00:32
You, my good sir, are a legend, I was looking for something like this a few weeks back (although I've moved on to DGDK now), but it's a great thing for DBP to have

MoomanFL
18
Years of Service
User Offline
Joined: 12th Nov 2005
Location:
Posted: 11th Feb 2008 00:48
Thanks for the encouragement, Kentaree. If you could, I would appreciate it if you would fire up DBP for a little while and give this a shakedown anyway just to see if you can spot any bugs. Like I said in my first post, I am a C++ newbie and I want to make sure I didn't miss something that would have been obvious to a more experienced programmer.

Design documents?!? What design documents??? I thought we were just going to wing it!!!
SirFire
19
Years of Service
User Offline
Joined: 4th Apr 2005
Location: North America
Posted: 11th Feb 2008 10:23 Edited at: 11th Feb 2008 10:24
Works here just fine, and good job on your first TPC! Nice that it includes help file and keywords

_____________________
Windows Vista: Just say no.
MoomanFL
18
Years of Service
User Offline
Joined: 12th Nov 2005
Location:
Posted: 11th Feb 2008 10:42
Thanks SirFire! I wouldn't consider releasing a public plugin without them. If you have any suggestions on how to improve the plugin, just let me know.

Design documents?!? What design documents??? I thought we were just going to wing it!!!
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 11th Feb 2008 19:17
Looks good

If you find that it takes a while making the keyword file and string table, email me, and I'll send you my generator You pick the .cpp file you want to use and it generates everything for you. It even works with overloaded functions (you just put a number at the end of the function).

MoomanFL
18
Years of Service
User Offline
Joined: 12th Nov 2005
Location:
Posted: 12th Feb 2008 01:21
Thanks, Diggsey. That program would be nice to have although one to generate help files would be nice too. Those are a pain. LOL

Design documents?!? What design documents??? I thought we were just going to wing it!!!
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 13th Feb 2008 11:32 Edited at: 13th Feb 2008 11:36
Here you go

For the prefix, you are using 'DLLCMDC'. For the custom prefix, enter what you would like in front of all commands from that plugin (Currently you are not using one, so you would just leave it blank). The name of the plugin is the folder under help where you will put the help files. (So if you wrote 'Dictionary plugin' it would put a link for each command to 'HelpDictionary plugin<command name>.htm'

The .ini is generated directly, but the string table requires you to copy it in. A file called '<filename>_res.txt' will be created. Open it, and open your project's .rc file in notepad. In the .rc file, if you scroll down a bit, you should see the string table in the same layout as shown in the .txt file. Copy the generated one over the existing one and save it.

Attachments

Login to view attachments
MoomanFL
18
Years of Service
User Offline
Joined: 12th Nov 2005
Location:
Posted: 14th Feb 2008 03:17
Thanks Diggsey! This is going to come in extremely handy with the DBPEventsManager plugin as it is slated for a lot more functions than this one by the time it is done. This saves a lot of work.

Design documents?!? What design documents??? I thought we were just going to wing it!!!

Login to post a reply

Server time is: 2024-09-08 03:25:25
Your offset time is: 2024-09-08 03:25:25