New update! 3.1 is liiiive!

Error handling:
Array now has sufficiently advanced error handling to remove most, if not all, disable_checks.

Extention:
With the metaprogramming techniques, new types can be added easily.

Speed:
With the new changes I've made to Judy, the Array module has far exceeded the speed of any traditional datatype
This commit is contained in:
Twilight Suzuka
2006-03-14 02:54:24 +00:00
parent 4457b0d879
commit 5c88803942
39 changed files with 9858 additions and 0 deletions

50
dlls/arrayx/JudyEx.h Normal file
View File

@ -0,0 +1,50 @@
#ifndef _JUDYEX_INCLUDED
#define _JUDYEX_INCLUDED
#include <exception>
class JudyEx
{
private:
char* ex_message;
bool fatal;
public:
JudyEx() { ex_message = NULL; fatal = true; }
JudyEx(char* set, bool isfatal)
{
ex_message = new char[strlen(set) + 1];
strcpy(ex_message, set);
fatal = isfatal;
}
JudyEx(const JudyEx &copy)
{
ex_message = new char[strlen(copy.ex_message) + 1];
strcpy(ex_message, copy.ex_message);
fatal = copy.fatal;
}
~JudyEx() { delete ex_message; }
void Destroy() { delete ex_message; }
void SetIsFatal(bool isfatal) { fatal = isfatal; }
bool IsFatal( void ) { return fatal; }
char* SetErrorMessage(char* set)
{
ex_message = new char[strlen(set) + 1];
strcpy(ex_message, set);
}
char* ErrorMessage( void )
{
return ex_message;
}
};
#endif