Book a Demo

Author Topic: std::list<#TYPE#> Qualified Name  (Read 3070 times)

DanG83616

  • EA User
  • **
  • Posts: 180
  • Karma: +0/-0
    • View Profile
std::list<#TYPE#> Qualified Name
« on: May 15, 2013, 05:02:09 am »
When I specify std::list<#TYPE#> as a Collection Class in the C++ options, the generated code substitutes the unqualified name. How can I get it to substitute the fully qualified name?

Code: [Select]

namespace foo
{
   class blah;
   class bar
   {
      std::list<blah> mylist; // doesn't compile because blah is not known
   };
}
« Last Edit: May 15, 2013, 05:02:39 am by dgeorge83616 »

DanG83616

  • EA User
  • **
  • Posts: 180
  • Karma: +0/-0
    • View Profile
Re: std::list<#TYPE#> Qualified Name
« Reply #1 on: May 15, 2013, 05:44:38 am »
Well, here is how:
Code: [Select]
$type=%RESOLVE_QUALIFIED_TYPE("::")%
%if linkAttCollectionClass != "" and linkCard != "" and linkCard != "0" and linkCard != "0..1" and linkCard != "1"%
$pos1=%FIND(linkAttCollectionClass, "<")%
$pos1=%MATH_ADD($pos1, "1")%
$pos2=%FIND(linkAttCollectionClass, ">")%
$count=%MATH_SUB($pos2, $pos1)%
$oldType=%MID(linkAttCollectionClass,$pos1,$count)%
$type=%REPLACE(linkAttCollectionClass, $oldType, $type)%

Why doesn't linkAttCollectionsClass do that already?  >:(