Inheriting from a CMap<> definedclass?
Mark Stevens -- MStevens@msn.com
Wednesday, December 20, 1995
Does anyone know if it is possible to create a class using a template to get
typesafe access and then derive a class from that definition to add additional
functionality?
something which would achieve this effect (if a typedef was a 'real' class)...
typedef CMap CMapWordToString;
class CMyStrings : CMapWordToString
{
CMyStrings();
DoSomethingSpecialWithMyStrings();
}
I have looked at the template definition for CMap<> but I still can't figure
out what name it gets resolved to at compiletime?
Thanks for the help if anyone has done this.
Mark Stevens (markst@Gramercy.ios.com)
Tomasz Pawlowski -- tomasz@ix.netcom.com
Monday, January 01, 1996
Following class definition works well in my program:
class
CPlayersPicks: public CMap
{
public:
CSize Draw(CDC* pDC);
};
Tomasz
tomasz@ix.netcom.com
Mark Stevens wrote:
>
> Does anyone know if it is possible to create a class using a template to get
> typesafe access and then derive a class from that definition to add additional
> functionality?
>
> something which would achieve this effect (if a typedef was a 'real' class)...
>
> typedef CMap CMapWordToString;
> class CMyStrings : CMapWordToString
> {
> CMyStrings();
> DoSomethingSpecialWithMyStrings();
> }
>
> I have looked at the template definition for CMap<> but I still can't figure
> out what name it gets resolved to at compiletime?
>
> Thanks for the help if anyone has done this.
>
> Mark Stevens (markst@Gramercy.ios.com)
| Вернуться в корень Архива
|