Kohinoor24
May 27th, 2002, 02:31 AM
I Have 2 classes "Writerthread" and "readerThread".
I have 2 other classes "WinThread" & "LinuxThread" which are base classes for the Writerthread" and "readerThread".
I want to derive these classes say,
class WriterThread:public WinThread or
class WriterThread:public LinuxThread
The problem is I want to do it dynamically.The writerthread should derive from 1 of these classes,depending on the operating system(ie:wheather it is linux or windows).In the main(), Iam using a
#ifdef _LINUX_
#endif
#ifdef _WIN_VER
#endif
I need an architecture so that I can derive from 1 of these classes dynamically.
I dont want to use #ifdef inside the classes
Thanks
I have 2 other classes "WinThread" & "LinuxThread" which are base classes for the Writerthread" and "readerThread".
I want to derive these classes say,
class WriterThread:public WinThread or
class WriterThread:public LinuxThread
The problem is I want to do it dynamically.The writerthread should derive from 1 of these classes,depending on the operating system(ie:wheather it is linux or windows).In the main(), Iam using a
#ifdef _LINUX_
#endif
#ifdef _WIN_VER
#endif
I need an architecture so that I can derive from 1 of these classes dynamically.
I dont want to use #ifdef inside the classes
Thanks