Inheriting CoClass methods.
-
I have one Coclass named CXNode which is implementing methods of interface IXNode. I want IXElement to be derived from IXNode as I want methods of IXNode. In IXElement I have two extra methods GetAttribute and SetAttribute. I don't want to rewrite methods which are already written in CXNode. Thanks in advance!!!
-
I have one Coclass named CXNode which is implementing methods of interface IXNode. I want IXElement to be derived from IXNode as I want methods of IXNode. In IXElement I have two extra methods GetAttribute and SetAttribute. I don't want to rewrite methods which are already written in CXNode. Thanks in advance!!!
sandeepkavade wrote:
I don't want to rewrite methods which are already written in CXNode
Hence derive from CXNode. :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
-
sandeepkavade wrote:
I don't want to rewrite methods which are already written in CXNode
Hence derive from CXNode. :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
-
You don't need that. You have just to derive the implementation from the C++ class (or make the CoClasses both inherit from the same C++ class, Oh yes, multiple inheritance, ATL docet). :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.