Original Post
Hi all, I've oveloaded the -> operator in my VTcMemSlot class but when i do slot->getPtr the overloaded operator isn't called.(slot is of type VTcRAMSlot which inherit from VTcMemSlot) thx in advance
class VTcMemSlot
{
friend class VTcCacheManager;
friend class VTcCacheSlotOwner;
public:
VTcMemSlot(VTcCacheManager* manager, unsigned int bytes);
~VTcMemSlot();
inline VTcMemSlot* VTcMemSlot::operator ->()
{
manager->logger->wrStr(1,"operator->");
if(prev == NULL)
manager->cacheListsLRU[indexInCacheList] = next;//zet de tweede op de eerste plaats
else
{
//link prev and next
prev->next = next;
next->prev = prev;
}
//move slot to end of linked list
manager->lastUsedSlots[indexInCacheList]->next = this;
prev = manager->lastUsedSlots[indexInCacheList];
next = NULL;
manager->lastUsedSlots[indexInCacheList] = this;
return this;
}
void splitSlot ();
void setSizeInBytes (unsigned int bytes){this->bytes = bytes;}
virtual void* getPtr() = 0;