Book a Demo

Author Topic: problem with "%classBaseName%" Macro  (Read 2422 times)

sm

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
problem with "%classBaseName%" Macro
« on: June 07, 2005, 12:00:39 am »
I have derived a class named "A" from class "B". Now i generate c++ code for the derived class.

Class A : public Class B{

};

For some reasons i need the name of the base class to be used. When i try to use the macro
%classBaseName% macro it does not display the baseclass name, instead it is empty. What's the problem here?. Can anyone help me?.

sm

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: problem with "%classBaseName%" Macro
« Reply #1 on: June 07, 2005, 05:05:26 am »
Another information: Iam trying to use this macro in "ClassBodyImpl" template.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: problem with "%classBaseName%" Macro
« Reply #2 on: June 07, 2005, 03:15:49 pm »
You can't just use %classBaseName% directly from your Class Templates, instead you need to call a list over the class bases.  The following example is from the C++ Class Inherits template.

Code: [Select]
$bases=%list="ClassBase" @separator=", "%
$interfaces=%list="ClassInterface" @separator=", "%


The ClassBase list will list over the Class Base template, in which you can use %classBaseName% and also the Linked Class Base template as appropriate (Class Interface does the same thing with Interfaces)

Simon