Book a Demo

Author Topic: MDA transformation - how set the value of a string  (Read 2862 times)

Thomas_Arnbjerg

  • EA User
  • **
  • Posts: 80
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
MDA transformation - how set the value of a string
« on: August 11, 2010, 07:31:35 pm »
Hi all,

How do you set the value of a string member from a MDA script when the quote is a reserved character?

The fragment below describes a constructor in C++ with relevant initialization (which will fail since quotes are illegal) where the member 'name' should be initialized with the model attribute 'className':

Operation
      {
            name=%qt%%className%%qt%
            Tag
            {
                  name="initializer"
                  value=%qt%name("%className%")%qt%
            }      }
      }

Thomas_Arnbjerg

  • EA User
  • **
  • Posts: 80
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: MDA transformation - how set the value of a st
« Reply #1 on: August 11, 2010, 11:19:56 pm »
Found a temporary solution using macros - i.e. the MDA transformation uses the member as an argument to a macro. The macro then 'stringifies' the argument:

#define QUOTE(x) #x

Not the best solution and a more proper one is still wanted..