Book a Demo

Author Topic: Types for method parameters  (Read 4145 times)

harri

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Types for method parameters
« on: May 09, 2008, 01:55:34 am »
Hello,

when editing method parameters i would like to define that the parameter is given as reference. (C reference &). One way i can see is to add the '&'  at the end of the type. But i am searching for a smarter way to do that.
Something like using "out" in the "Kind Combobox". There i can define in/out/inout/return.
Maybe there is a way to define another "parameter-kind" lets say "reference".
Maybe there is another way to do that?

Thanks for your Help

Harri E.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Types for method parameters
« Reply #1 on: May 09, 2008, 04:17:50 am »
Check the Tools | Options | Objects dialog. There's Highlight references setting, as well as an option for prefix or suffix.

HTH, David
No, you can't have it!

harri

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Types for method parameters
« Reply #2 on: May 09, 2008, 04:35:48 am »
My Problem is, that the highlighting is bound to tzhe parameter of kind [out]. That tells my that the parameter something like a "return parameter". But if the parameter is a "in parameter" (kind: [in]) but will be implemented as const reference (const MyClass&) the highlighting does not match because it is not of kind [out].

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Types for method parameters
« Reply #3 on: May 09, 2008, 07:38:45 am »
I'll look into it Harri.

[Meanwhile, you'll have to go back and delete your answer in the other forum section. I've removed my post, so when you clean out the final reply the thread will disappear.]
No, you can't have it!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Types for method parameters
« Reply #4 on: May 09, 2008, 09:32:57 am »
Just a note.

C++ code engineering does not use the parameter kind.  So although your diagram will look right if you set those options.  It won't generate out.  You can change the templates, but then it won't synchronize.