Timothy Jewett
2010-04-22 17:53:01 UTC
I have a project that has a base class, inherited class and inherited class
class CSession
{
public:
BOOL Method1();
BOOL Method2();
};
class CHtml : public CSession
{
BOOL Method1();
BOOL Method2();
};
class CClient : public CHtml
{
BOOL Method1();
BOOL Method2();
};
I would like to Inherit the CHtml class from a different base class
class CSessionSSL : CSecure
{
BOOL Method1();
BOOL Method2();
};
class CHtmlSSL : public CSessionSSL
{
BOOL Method1();
BOOL Method2();
};
class CClientSSL : public CHtmlSSL
{
BOOL Method1();
BOOL Method2();
};
without redefining all the methods in the CHtml & CClient code inherited
from the new base class. I assume this can be done with templates but I do
not understand how to instantiate the top classes CClient & CClientSSL?
Thanks in advance.
class CSession
{
public:
BOOL Method1();
BOOL Method2();
};
class CHtml : public CSession
{
BOOL Method1();
BOOL Method2();
};
class CClient : public CHtml
{
BOOL Method1();
BOOL Method2();
};
I would like to Inherit the CHtml class from a different base class
class CSessionSSL : CSecure
{
BOOL Method1();
BOOL Method2();
};
class CHtmlSSL : public CSessionSSL
{
BOOL Method1();
BOOL Method2();
};
class CClientSSL : public CHtmlSSL
{
BOOL Method1();
BOOL Method2();
};
without redefining all the methods in the CHtml & CClient code inherited
from the new base class. I assume this can be done with templates but I do
not understand how to instantiate the top classes CClient & CClientSSL?
Thanks in advance.
--
Timothy Jewett
***@online.nospam
Timothy Jewett
***@online.nospam