Book a Demo

Author Topic: vb.net class code generation  (Read 3103 times)

robertsong

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
vb.net class code generation
« on: May 05, 2004, 05:16:42 pm »
Dear all,

I am new to using EA generater vb.net coding. Have a question is: How EA choose some linked classes as the attribute members of my destination class and some linked classes were not chosen? and add a prefix of 'm_'?

For example, Generated coding like following:

Public Class Tickler

     Private name As String
     Private ticklerNo As Integer
     Public m_Action As Action
     Public m_TicklerTemplate As TicklerTemplate
...
end class

In the class model, Tickler totally have four classes linked to it, how come EA just choose two of them as the member of Tickler? why have the 'm_' prefix?

Robert


Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: vb.net class code generation
« Reply #1 on: May 05, 2004, 09:36:24 pm »
Hi robertsong,

While I couldn't say why only two of your linked classes are being generated without seeing your model, I can tell you about the prefix.

The 'm_' is there because you haven't specified a role name for the link. Because most languages don't allow a variable name to be the same name as a type it needs some other name.  EA gives users an option for what this name should be in the Attributes/Operations page.  Of course, if you specify an role name on the link it should be ignored.

Simon

robertsong

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: vb.net class code generation
« Reply #2 on: May 06, 2004, 03:01:57 pm »
Thank you Simon, I got it.

Robert Song