Book a Demo

Author Topic: displaying const parameter/method attribute  (Read 4332 times)

v01d

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
displaying const parameter/method attribute
« on: September 18, 2006, 12:41:45 am »
Hello there,

When defining a C++ class operation with a return type const (Const check-box is ticked), the code being generated does have it, but on the diagram, it does not get displayed.

I've checked the diagram properties dialog, set it to display all parameter details, but nothing about return types.

Alternatively I could however just type it in, preceding the return type. This would get displayed & generated in code.



Also, if you tick 'IsQuery' for the method (to make it const on the class), this fact also does not get displayed on the diagram, but does get generated in code.

Anyway to make those work ?

Thank you

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: displaying const parameter/method attribute
« Reply #1 on: September 18, 2006, 01:04:49 am »
I think isQuery just annotates the method as "read only"?
Haven't got time to check the spec.

bruce
"It is not so expressed, but what of that?
'Twere good you do so much for charity."

Oh I forgot, we aren't doing him are we.

v01d

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: displaying const parameter/method attribute
« Reply #2 on: September 18, 2006, 02:55:24 am »
isQuery  does make method as if read-only.
Like, size_t Bla::size() const
I wanted to know how to make that 'const' be displayed on the class diagram, because it is not displayed normally seems.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: displaying const parameter/method attribute
« Reply #3 on: September 18, 2006, 03:39:54 pm »
IsQuery can be displayed on the diagram, just open the diagram properties and check 'Show Feature Property String'.

A const return type can't be diplayed.

v01d

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: displaying const parameter/method attribute
« Reply #4 on: September 19, 2006, 03:50:50 am »
Hello there simonm,
Thank you for help,

I however cannot find that option you are talking about :
The only Show options I have in the diagram properties are :

Show Pager Border
Show Table Owner
Show package contents
Show details on the diag
Show sequence notes
Show tags
Show reqs
Show constraints
Show testing
Show maintenance

and a combo Show parameter detail.

The 'Show Feature property string' nowhere to be found, and I've tried searching the help file, and it doesn't seem to refer to property string anywhere .

Jan ´Bary´ Glas

  • EA User
  • **
  • Posts: 408
  • Karma: +0/-0
  • Bary
    • View Profile
Re: displaying const parameter/method attribute
« Reply #5 on: September 19, 2006, 04:34:08 am »
'Show Feature Property String' is in EA 6.5.
Jan 'Bary' Glas

v01d

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: displaying const parameter/method attribute
« Reply #6 on: September 19, 2006, 06:11:50 am »
Ah, i see.

Thank you :)