| View previous topic :: View next topic |
| Author |
Message |
Christopher Benson-Manica Guest
|
Posted: Fri Feb 27, 2004 2:42 pm Post subject: Change destructor qualifier |
|
|
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
|
Posted: Fri Feb 27, 2004 2:57 pm Post subject: Re: Change destructor qualifier |
|
|
"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
|
|
| Back to top |
|
 |
Christopher Benson-Manica Guest
|
Posted: Fri Feb 27, 2004 3:16 pm Post subject: Re: Change destructor qualifier |
|
|
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
|
Posted: Fri Feb 27, 2004 3:17 pm Post subject: Re: Change destructor qualifier |
|
|
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
|
Posted: Fri Feb 27, 2004 10:28 pm Post subject: Re: Change destructor qualifier |
|
|
| 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
|
Posted: Fri Feb 27, 2004 10:31 pm Post subject: Re: Change destructor qualifier |
|
|
"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
|
Posted: Wed Mar 03, 2004 2:30 pm Post subject: Re: Change destructor qualifier |
|
|
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 |
|
 |
|