Book a Demo

Author Topic: 'classIsInstantiated' substitution field  (Read 4995 times)

Andreas_G

  • EA User
  • **
  • Posts: 125
  • Karma: +0/-0
  • And that's the way the cookie crumbles.
    • View Profile
'classIsInstantiated' substitution field
« on: September 27, 2005, 08:23:26 am »
Hello out there,

I try to generate code like the following
Code: [Select]
class MyClass : public MyTemplateClass<AnyType>
{
};

I know this is possible because I found in the code template 'Class Base' the substitution field [size=16]classIsInstantiated[/size]  ;D

But I can't find how to set this value to [size=16]true[/size], and I also don't know how to set a value to [size=16]classArguments[/size] also in the 'Class Base'.

May be I have tomatos on my eyes, so please tell me, who to set this values in the GUI!

bye
Andreas
bye
Andreas

Andreas_G

  • EA User
  • **
  • Posts: 125
  • Karma: +0/-0
  • And that's the way the cookie crumbles.
    • View Profile
Re: 'classIsInstantiated' substitution field
« Reply #1 on: September 27, 2005, 08:41:52 am »
I think I found it.

It's in the Parameterized Classes (Templates)
Dialog
.

Here you have to set the Tpye to Instantiated and enter some Arguments.

May be, I'm wrong, but is this not the wrong place for this parameters?  ???
Shouldn't it be in the Generalization Properties?

Explain me, if I'm wrong!

bye
Andreas
bye
Andreas

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: 'classIsInstantiated' substitution field
« Reply #2 on: October 02, 2005, 04:38:28 pm »
Hello Andreas,

Sure, instantiation information could be on the generalization properties, but I don't see any reason why that is where it has to be.

Not that I'm saying there isn't any room for improvement.  There is and I know that there are plans to do that.
« Last Edit: October 02, 2005, 04:41:40 pm by simonm »

Andreas_G

  • EA User
  • **
  • Posts: 125
  • Karma: +0/-0
  • And that's the way the cookie crumbles.
    • View Profile
Re: 'classIsInstantiated' substitution field
« Reply #3 on: October 04, 2005, 01:54:23 am »
Hi Simon,

Quote
Sure, instantiation information could be on the generalization properties, but I don't see any reason why that is where it has to be.

I think one reason is multiple inheritance (I don't use it, but may be other users). If you need different parameters for each base class, it's not possilbe with the actual solution.
bye
Andreas

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: 'classIsInstantiated' substitution field
« Reply #4 on: October 04, 2005, 02:07:16 am »
Quote
Hi Simon,

I think one reason is multiple inheritance (I don't use it, but may be other users). If you need different parameters for each base class, it's not possible with the actual solution.
That's exactly right Andreas!

The Parameter Bindings should be on the Generalization Link not the Class!

The parameter list is defined on the Parameterized Class and the binding of the parameter value for a specific Generalization should be attached to the link.  Thus if you inherit from multiple sources, each one specifies what gets bound.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: 'classIsInstantiated' substitution field
« Reply #5 on: October 04, 2005, 03:42:28 pm »
Yes, the current system doesn't handle templates with multiple inheritance.  We realize that, and as I said, we have plans to improve the template handling.