Re: C++ interface
From: E. Robert Tisdale (E.Robert.Tisdale_at_jpl.nasa.gov)
Date: 12/23/03
- Next message: Jeff Schwab: "Re: Question about C++ Allocatars"
- Previous message: E. Robert Tisdale: "Off Topic: C++/ UNIX/ CONTRACT/ IMMEDIATE"
- In reply to: The Directive: "C++ interface"
- Next in thread: Cy Edmunds: "Re: C++ interface"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 23 Dec 2003 09:37:41 -0800
The Directive wrote:
> Is there a way in C++ to create a "true" interface. I want to create
> an absract class that other classes can inherit from and be forced to
> implement the interface's abstract (pure virtual) methods. However, it
> has to be a true interface in that it doesn't add any overhead (when
> the derived object is created) with the interface's constructors and
> destructor because they don't exist for the interface. Does that make
> sense? I just want an interface, not all the OOP stuff like
> constructors, destructor and etc. In other words, I don't want the
> interface's (system default or user defined) constructors & destructor
> to be called.
A good optimizing C++ compiler should not add any overhead.
Can you show us an example where your C++ compiler adds such overhead?
- Next message: Jeff Schwab: "Re: Question about C++ Allocatars"
- Previous message: E. Robert Tisdale: "Off Topic: C++/ UNIX/ CONTRACT/ IMMEDIATE"
- In reply to: The Directive: "C++ interface"
- Next in thread: Cy Edmunds: "Re: C++ interface"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|