[KinoSearch] adding a proximity scorer - Boilerplater
Nathan Kurz
nate at verse.com
Fri Jun 15 13:52:39 PDT 2007
On 6/15/07, Marvin Humphrey <marvin at rectangular.com> wrote:
> To subclass OrScorer, create MyOrScorer.c and MyOrScorer.h following
> the guidelines documented in the POD for devel/lib/BoilerPlater.pm.
> All you'll need is a constructor and a MyOrScorer_tally function.
> The rest will inherit.
Got it, and it seems to Build correctly. But I'll find out for sure
when I actually write something that calls it!
First subclass subquestion: why do I actually need a constructor? Is
the class_name field actually used at runtime? And if I do need a
constructor, is it possible to piggyback on top of the constructor for
the class I'm inheriting from? Something like:
MyORScorer *self = STEAL(MyORScorer, ORScorer_new(sim, subscorers));
(or BLESS, or RECREATE,
RECLASS, whatever)
I don't understand the innards of your vtable implementation well
enough to know quite what this would need to do, but if it is possible
it seems likely you've already done it somewhere but I just haven't
found where.
Nathan Kurz
nate at verse.com
More information about the kinosearch
mailing list