Hi everyone,

I'm currently  working on compression  code in mifluz that  will maybe
divide the index size by 8 :-)

While programming,  I got a  bit frustrated of  not being able  to use
STL, and  I did something simple  that works and  might be interesting
for everyone (and uses NO templates)

The idea is to use a  "HtVectorGeneric", that is essentially a copy of
HtVector with a few small changes  and with all "Object *" replaced by
a generic type "GType".  Then  by using "#define GType mytype" you can
build HtVector's for any type you want.

That's  it,   it  works  fine,   and  it's  straight   standard  clean
template-free C++.

What do you thik of this, is it ok for htdig ?


Cheers,

Marcel.

**********Example****

myfile.h:

// ******** HtVector_byte (header)
#define GType byte
#define HtVectorGType HtVector_byte
#include "HtVectorGeneric.h"



myfile.cc
// ******** HtVector_byte (implementation)
#define GType byte
#define HtVectorGType HtVector_byte
#include "HtVectorGenericCode.h"

void
myfunction()
{
   HtVector_byte V;
   V.Add(1);
   V.Add(20);
   V.Add(31);
   for(int i=0;i<V.Count();i++){cout << V[i] << endl;}
}


    ----------------------

    Marcel Bosc

    ECILA
    100 av. du Gal Leclerc
    93500 Pantin  - France
    Tel:  33 1 56 96 10 85

------------------------------------
To unsubscribe from the htdig3-dev mailing list, send a message to
[EMAIL PROTECTED]
You'll receive a message confirming the unsubscription.

Reply via email to