diff options
author | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2007-10-04 17:14:42 +0000 |
---|---|---|
committer | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2007-10-04 17:14:42 +0000 |
commit | df1c8cf224cee0c442a9f6b438b2c767326e4059 (patch) | |
tree | 311a0059e3087510b199e90dcc3b62ecfdedd31b /meta2/meta2.cpp | |
parent | 573e3c67a9f113b2bd101c669b1b86615356fc13 (diff) |
implementation of red-black tree, backing Map template class :)
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@353 4f64403b-2f21-0410-a795-97e2b3489a10
Diffstat (limited to 'meta2/meta2.cpp')
-rw-r--r-- | meta2/meta2.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/meta2/meta2.cpp b/meta2/meta2.cpp index d4effe5..3eff626 100644 --- a/meta2/meta2.cpp +++ b/meta2/meta2.cpp @@ -92,13 +92,33 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) { HANDLE hModulesLoaded;
extern "C" __declspec (dllexport) int Load(PLUGINLINK *link) {
-
pluginLink=link;
DuplicateHandle( GetCurrentProcess(), GetCurrentThread(), GetCurrentProcess(), &metaMainThread, THREAD_SET_CONTEXT, FALSE, 0 );
mir_getMMI(&mmi);
mir_getUTFI(&utfi);
+ RedBlackTree<int> test;
+ test.add(1);
+ test.add(-3);
+ test.add(15);
+ test.add(4);
+ test.add(2);
+ test.add(-1);
+ char buff[256];
+ for(RedBlackTree<int>::Iterator i = test.start(); i.has_val(); i.next()) {
+ mir_snprintf(buff, 256, "%d", i.val());
+ PUShowMessage(buff, SM_NOTIFY);
+ }
+
+ test.remove(-1);
+ test.remove(2);
+ for(RedBlackTree<int>::Iterator i2 = test.start(); i2.has_val(); i2.next()) {
+ mir_snprintf(buff, 256, "%d", i2.val());
+ PUShowMessage(buff, SM_NOTIFY);
+ }
+
+
InitOptions();
InitPriorities();
|