BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

how to make bcb generate hpp without omitting default parame

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Development)
View previous topic :: View next topic  
Author Message
vavan
Guest





PostPosted: Tue Nov 23, 2004 2:25 pm    Post subject: how to make bcb generate hpp without omitting default parame Reply with 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?

thank you

--
Vladimir Ulchenko aka vavan
Back to top
OBones
Guest





PostPosted: Tue Nov 23, 2004 2:47 pm    Post subject: Re: how to make bcb generate hpp without omitting default pa Reply with quote



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





PostPosted: Tue Nov 23, 2004 3:39 pm    Post subject: Re: how to make bcb generate hpp without omitting default pa Reply with quote



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





PostPosted: Tue Nov 23, 2004 4:23 pm    Post subject: Re: how to make bcb generate hpp without omitting default pa Reply with quote

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





PostPosted: Tue Nov 23, 2004 6:57 pm    Post subject: Re: how to make bcb generate hpp without omitting default pa Reply with quote


"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





PostPosted: Tue Nov 23, 2004 6:59 pm    Post subject: Re: how to make bcb generate hpp without omitting default pa Reply with quote

"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





PostPosted: Wed Nov 24, 2004 6:40 am    Post subject: Re: how to make bcb generate hpp without omitting default pa Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Development) 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.