changed Awk to use HashTable instead of htb.

added Cstr, Mcstr, Wcstr.
changed Awk not to use in-class placement new in allocating a value
This commit is contained in:
2015-03-11 13:33:23 +00:00
parent cb62c4ecd1
commit a212a8ebf2
14 changed files with 339 additions and 84 deletions

View File

@ -25,6 +25,7 @@
*/
#include <qse/awk/StdAwk.hpp>
#include <qse/cmn/HeapMmgr.hpp>
#include <qse/cmn/opt.h>
#include <qse/cmn/main.h>
#include <qse/cmn/mbwc.h>
@ -52,7 +53,7 @@ typedef QSE::StdAwk::Value Value;
class MyAwk: public StdAwk
{
public:
MyAwk () { }
MyAwk (QSE::Mmgr* mmgr = QSE_NULL): StdAwk (mmgr) { }
~MyAwk () { close (); }
int open ()
@ -428,6 +429,8 @@ static int awk_main_2 (MyAwk& awk, int argc, qse_char_t* argv[])
static int awk_main (int argc, qse_char_t* argv[])
{
//QSE::HeapMmgr hm (1000000);
//MyAwk awk (&hm);
MyAwk awk;
if (awk.open() <= -1)

View File

@ -17,7 +17,7 @@ public:
// printf ("destructor\n");
}
bool operator== (const T& x) const { return this->x == x.x; }
qse_size_t hashCode() const { return x; }
qse_size_t getHashCode() const { return x; }
int getValue() const { return this->x; }
int getY() const { return this->y; }