Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: VDR Plugin System - First Step
On 10 May 2002 Klaus Schmidinger <Klaus.Schmidinger@cadsoft.de> wrote:
>> @@ -147,8 +149,8 @@
>> T *Get(int Index) const { return (T *)cListBase::Get(Index); }
>> T *First(void) const { return (T *)objects; }
>> T *Last(void) const { return (T *)lastObject; }
>> - T *Prev(const T *object) const { return (T *)object->Prev(); }
>> - T *Next(const T *object) const { return (T *)object->Next(); }
>> + T *Prev(const T *object) const { return (T *)object->cListObject::Prev(); }
>> + T *Next(const T *object) const { return (T *)object->cListObject::Next(); }
>> };
>>
>> else compiling fails for classes which are ListObject and
>> ListBase at one. e.g.:
>>
>> class cPlayList : public cConfig<cMP3>, public cListObject {
>> };
>
> Is that really a good idea to derive cPlayList from cConfig *and* cListObject?
> Shouldn't cPlayList rather have a *member* of type cConfig?
Oh, I think the structure is not visible from this small piece of
code. Actually I have
class cPlayLists : public cList<cPlayList>
class cPlayList : public cConfig<cMP3>, public cListObject
class cMP3 : public cListObject
so cPlaylist is a cListObject in cPlayLists AND a cListBase for
cList<cMP3> (covered in cConfig<cMP3> to use the parsing
functions).
In this case cPlayList::Next() is ambiguous (cListObject::Next()
or cListBase::Next()) The same for Prev().
Hope that this isn't to weird :-)
--
Stefan Huelswitt
huels@iname.com | http://home.pages.de/~nathan
Home |
Main Index |
Thread Index