C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Change destructor qualifier

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++)
View previous topic :: View next topic  
Author Message
Christopher Benson-Manica
Guest





PostPosted: Fri Feb 27, 2004 2:42 pm    Post subject: Change destructor qualifier Reply with quote



I swear, this godforsaken __fastcall qualifier that Borland came up
with is going to drive me insane! All I want is to subclass from a
class A with a destructor declared

virtual __fastcall ~A();

Is there any way for a subclass of A to have a destructor that ISN'T
__fastcall qualified? I cannot believe how lame this __fastcall crap
is...

--
Christopher[ Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
Back to top
Duane
Guest





PostPosted: Fri Feb 27, 2004 2:57 pm    Post subject: Re: Change destructor qualifier Reply with quote




"Christopher Benson-Manica" <ataru (AT) nospam (DOT) cyberspace.org> wrote

Quote:
I swear, this godforsaken __fastcall qualifier that Borland came up
with is going to drive me insane! All I want is to subclass from a
class A with a destructor declared

virtual __fastcall ~A();

Is there any way for a subclass of A to have a destructor that ISN'T
__fastcall qualified? I cannot believe how lame this __fastcall crap
is...

If A is your base class, lose the __fastcall. If A is derived from
a VCL class the dtor is declared with virtual __fastcall and so the
derived class will inherit it (the ctor is also virtual __fastcall). You're
only forced to use __fastcall with classes derived from Delphi classes.



Back to top
Thomas Matthews
Guest





PostPosted: Fri Feb 27, 2004 3:10 pm    Post subject: Re: Change destructor qualifier Reply with quote



Christopher Benson-Manica wrote:
Quote:
I swear, this godforsaken __fastcall qualifier that Borland came up
with is going to drive me insane! All I want is to subclass from a
class A with a destructor declared

virtual __fastcall ~A();

Is there any way for a subclass of A to have a destructor that ISN'T
__fastcall qualified? I cannot believe how lame this __fastcall crap
is...


From my experience with Borland, one it places a __fastcall
on a destructor (including a virtual one), it sticks.

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book


Back to top
Christopher Benson-Manica
Guest





PostPosted: Fri Feb 27, 2004 3:16 pm    Post subject: Re: Change destructor qualifier Reply with quote

Duane <spoo (AT) zowie_flarn (DOT) com> spoke thus:

Quote:
If A is your base class, lose the __fastcall.

It's a base class I can't change, because my boss wrote it. Oh well.

--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.

Back to top
Christopher Benson-Manica
Guest





PostPosted: Fri Feb 27, 2004 3:17 pm    Post subject: Re: Change destructor qualifier Reply with quote

Thomas Matthews <Thomas_MatthewsSpitsOnSpamBots (AT) sbcglobal (DOT) net> spoke thus:

Quote:
From my experience with Borland, one it places a __fastcall
on a destructor (including a virtual one), it sticks.

Well, that's certainly unfortunate behavior. *gnashes teeth* Guess
my plans are kaput...

--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.

Back to top
Duane
Guest





PostPosted: Fri Feb 27, 2004 10:28 pm    Post subject: Re: Change destructor qualifier Reply with quote

Quote:

From my experience with Borland, one it places a __fastcall
on a destructor (including a virtual one), it sticks.

With Borland, most of the VCL is derived from a couple of base classes.
Both the ctor and dtor are virtual and __fastcall. Any derived class cannot change this.
If you write non GUI straight C++ classes, you can do whatever you like.
The OP's base class is probably written using __fastcall. If it's not
derived from a VCL class, it shouldn't be. If it is, there's not much
he can do.



Back to top
Duane
Guest





PostPosted: Fri Feb 27, 2004 10:31 pm    Post subject: Re: Change destructor qualifier Reply with quote


"Christopher Benson-Manica" <ataru (AT) nospam (DOT) cyberspace.org> wrote

Quote:
Duane <spoo (AT) zowie_flarn (DOT) com> spoke thus:

If A is your base class, lose the __fastcall.

It's a base class I can't change, because my boss wrote it. Oh well.

In my experience with BCB it is important to keep the GUI code separate
from the non GUI code (a good idea in any case). I wouldn't write code
that wasn't derived from VCL with any VCL extensions. Now that
BCB is at end of life, this is particularly a bad idea.

There's been some traffic on the newsgroups (check mers.com)
about using __fastcall and efficiency.



Back to top
Richard Herring
Guest





PostPosted: Wed Mar 03, 2004 2:30 pm    Post subject: Re: Change destructor qualifier Reply with quote

In message <mzP%b.21332$253.1346588 (AT) news20 (DOT) bellglobal.com>, Duane
<spoo (AT) zowie_flarn (DOT) com> writes
Quote:

"Christopher Benson-Manica" <ataru (AT) nospam (DOT) cyberspace.org> wrote in message
news:c1nn0k$of2$1 (AT) chessie (DOT) cirr.com...
Duane <spoo (AT) zowie_flarn (DOT) com> spoke thus:

If A is your base class, lose the __fastcall.

It's a base class I can't change, because my boss wrote it. Oh well.

In my experience with BCB it is important to keep the GUI code separate
from the non GUI code (a good idea in any case). I wouldn't write code
that wasn't derived from VCL with any VCL extensions. Now that
BCB is at end of life,

???

Quote:
this is particularly a bad idea.

There's been some traffic on the newsgroups (check mers.com)
about using __fastcall and efficiency.



--
Richard Herring

Back to top
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.