| View previous topic :: View next topic |
| Author |
Message |
vavan Guest
|
Posted: Tue Nov 23, 2004 2:25 pm Post subject: how to make bcb generate hpp without omitting default parame |
|
|
bcb5 omits default values for method parameters in .hpp generated from
delphi unit with such methods, i.e. it produces
_fastcall TSomeClass(unsigned MethodId, AnsiString Destination, int
Timeout, bool Block);
from
constructor TSomeClass.Create(MethodId: Cardinal=0; Destination:
String=''; Timeout: integer=-1; Block: boolean=false);
is there any way to overcome this?
thank you
--
Vladimir Ulchenko aka vavan
|
|
| Back to top |
|
 |
OBones Guest
|
Posted: Tue Nov 23, 2004 2:47 pm Post subject: Re: how to make bcb generate hpp without omitting default pa |
|
|
vavan wrote:
| Quote: | bcb5 omits default values for method parameters in .hpp generated from
delphi unit with such methods, i.e. it produces
_fastcall TSomeClass(unsigned MethodId, AnsiString Destination, int
Timeout, bool Block);
from
constructor TSomeClass.Create(MethodId: Cardinal=0; Destination:
String=''; Timeout: integer=-1; Block: boolean=false);
is there any way to overcome this?
|
Not that I know of. This is annoying, but is fixed in BCB6 though (well,
at least I think).
|
|
| Back to top |
|
 |
vavan Guest
|
Posted: Tue Nov 23, 2004 3:39 pm Post subject: Re: how to make bcb generate hpp without omitting default pa |
|
|
On Tue, 23 Nov 2004 15:47:58 +0100, OBones
<obones_grere_ (AT) _gregr_altern (DOT) org> wrote:
| Quote: | Not that I know of. This is annoying, but is fixed in BCB6 though (well,
at least I think).
|
thanks for the responce
so, perhaps using HPPEMIT is the only way to workaround this problem?
do you know how to correct wrong order of declarations in generated
hpp when using aforementioned HPPEMIT?
thank you
--
Vladimir Ulchenko aka vavan
|
|
| Back to top |
|
 |
OBones Guest
|
Posted: Tue Nov 23, 2004 4:23 pm Post subject: Re: how to make bcb generate hpp without omitting default pa |
|
|
vavan wrote:
| Quote: | so, perhaps using HPPEMIT is the only way to workaround this problem?
For regular functions yes. For class members no. |
| Quote: | do you know how to correct wrong order of declarations in generated
hpp when using aforementioned HPPEMIT?
Wrong order? What do you mean by that ? |
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Tue Nov 23, 2004 6:57 pm Post subject: Re: how to make bcb generate hpp without omitting default pa |
|
|
"vavan" <vavan (AT) santel (DOT) ru> wrote
| Quote: | bcb5 omits default values for method parameters in .hpp
generated from delphi unit with such methods
|
It is a bug in the compiler that was fixed in BCB6.
Gambit
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Tue Nov 23, 2004 6:59 pm Post subject: Re: how to make bcb generate hpp without omitting default pa |
|
|
"vavan" <vavan (AT) santel (DOT) ru> wrote
| Quote: | so, perhaps using HPPEMIT is the only way to workaround
this problem?
|
HPPEMIT will only allow you to add new text to the HPP file. It will not
allow you to alter anything that the compiler adds to the file
automatically.
| Quote: | do you know how to correct wrong order of declarations in
generated hpp when using aforementioned HPPEMIT?
|
HPPEMIT statements always place their code at the top of the HPP file, in
the "user supplied" section, in the order that the HPPEMITs appear in the
Delphi source file.
Gambit
|
|
| Back to top |
|
 |
vavan Guest
|
Posted: Wed Nov 24, 2004 6:40 am Post subject: Re: how to make bcb generate hpp without omitting default pa |
|
|
On Tue, 23 Nov 2004 10:59:56 -0800, "Remy Lebeau (TeamB)"
<no.spam (AT) no (DOT) spam.com> wrote:
| Quote: | HPPEMIT will only allow you to add new text to the HPP file. It will not
allow you to alter anything that the compiler adds to the file
automatically.
|
by using HPPEMIT together with EXTERNALSYM and adding couple of
forward declarations in HPPEMIT section I was able to resolve my
problem completely suppressing wrong generation of that class by
replacing it with my own declaraton
| Quote: | HPPEMIT statements always place their code at the top of the HPP file, in
the "user supplied" section, in the order that the HPPEMITs appear in the
Delphi source file.
|
thanks for the info
--
Vladimir Ulchenko aka vavan
|
|
| Back to top |
|
 |
|