The Artima Developer Community
Sponsored Link

News & Ideas Forum (Closed for new topic posts)
Multiple Inheritance and Interfaces

15 replies on 2 pages. Most recent reply: Oct 4, 2005 3:04 AM by Lee Powell

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 15 replies on 2 pages [ « | 1 2 ]
Lee Powell

Posts: 3
Nickname: lpowell
Registered: Oct, 2005

Re: Multiple Inheritance and Interfaces Posted: Oct 4, 2005 3:04 AM
Reply to this message Reply
In my view, the need to use dynamic_cast (and the RTTI overhead it requires) with MI class hierarchies makes widespread use of inherited C++ interface classes undesirable. It's simpler and more efficient to use interface containment in an object (by declaring an explicit pointer to each interface class). Yes, you then have to use new and delete on each pointer, but that's what your constructors and destructors are there for...

Flat View: This topic has 15 replies on 2 pages [ « | 1  2 ]
Topic: Contracts and Interoperability Previous Topic   Next Topic Topic: JavaSpaces: Data, Decoupling, and Iteration

Sponsored Links


Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use