[Click] hastable/HashMap
Marco Wenzel
marco.wenzel at stud.tu-ilmenau.de
Fri Oct 5 12:53:37 EDT 2007
Hi Eddie,
thank you very much, now it works :)
btw: About a half year ago, I wrote my study-project about click. It's
in german and contains a tutorial for the usage of click. I also made
some tests with Bart Braem's AODV-Implementation and verified it's
functions in a testbed with different wireless nodes. Maybe you want to
add it on the publications-website:
<http://zack1.e-technik.tu-ilmenau.de/~webkn/Arbeiten/STUDREFERAT/wenzelmarco.html>
Best regards,
Marco.
Eddie Kohler schrieb:
> Hi Marco,
>
> We needed to provide a template<class T> hashcode(T *) specialization,
> which we had not done. Now we do.
>
> Eddie
>
> Marco Wenzel wrote:
>> Hi,
>>
>> since I updated Click to the current git-sources (last version was from
>> 2007-07-10), I've got a problem with the usage of HashTable.
>> The code
>>
>>> dsttable->remove(packet);
>>
>> where dsttable is
>>
>>> typedef HashMap<Packet*, IPAddress*> DstMap;
>>> DstMap* dsttable;
>>
>> and packet is a
>>
>>> WritablePacket * packet;
>>
>> causes thefollowing compile-error:
>>
>> ../include/click/hashcode.hh: In function 'size_t hashcode(const T&)
>> [with T =
>> Packet*]':
>> ../include/click/hashmap.cc:510: instantiated from 'size_t HashMap<K,
>> void*>::bucket(const K&) const [with K = Packet*]'
>> ../include/click/hashmap.cc:609: instantiated from 'bool HashMap<K,
>> void*>::remove(const K&) [with K = Packet*]'
>> ../elements/local/myelement.cc:49: instantiated from here
>> ../include/click/hashcode.hh:9: error: request for member 'hashcode'
>> in 'x',
>> which is of non-class type 'Packet* const'
>>
>> It worked correctly before and I don't know how to interpret this
>> error. Sorry,
>> if this question is too trivial, but if anyone could help me, I would
>> be very
>> glad. Thanks a lot.
>>
>> Regards,
>> Marco.
More information about the click
mailing list