-1

I use edg software (Edison Design Group)to parse C++ code. I need to get information about all friends classes.

For example for

class A;
class B;
class C{
   private:
      int x;
      double y;
   public: 
       friend class A;
       friend class B;
}

I need to get that A,B classes are friends for C,when parsing C class. I tried to look for this info in class_struct_union fields,but unfortunatelly didn`t find anything

For example from the variant.class_struct_union.field_list I can get the information for class data members(x and y).I look for the way to get the information about friend classes (A and B)

Can anyone tell me, where can I find the info for freinds classes ? And may be give some code for example for friends data retreiving?

YAKOVM
  • 9,805
  • 31
  • 116
  • 217
  • Should be `friend class A` (though GCC accepts your code as an extension in some situations, and the EDG documentation seems to accept it too.) – Lightness Races in Orbit Sep 05 '11 at 13:57
  • 1
    "Get" how? Be less vague please. – Lightness Races in Orbit Sep 05 '11 at 14:00
  • @ Tomalak Geret'kal -For example from the variant.class_struct_union.field_list I can get the information for class data members.I need the same source of information for friends classes – YAKOVM Sep 05 '11 at 14:07
  • That's just repeating your question. There is no information added by your comment. Let's see some description of how you're "getting" this `class_struct_union`, how you're using the results of the parsing, and so on.. – Lightness Races in Orbit Sep 05 '11 at 14:12
  • for (fieldDecl = astType->variant.class_struct_union.field_list, fieldNo = 0; fieldDecl != NULL; fieldDecl = fieldDecl->next, ++ fieldNo)//a_type_ptr astType – YAKOVM Sep 05 '11 at 14:17

1 Answers1

3

Can anyone tell me, where can I find the info for freinds classes ? And may be give some code for example for friends data retreiving?

Yes, there is someone, who can. As i know, edg is commercial product (closed-source) and if you can use it, you or your company have a commercial support plan. So, you can ask the EDG directly.

And if you have access to EDG code, just try a grep friend *.h *.hpp */*.h */*.hpp. Or you can find the definition of class_struct_union and check its fields.

AFAIK, there is no access of general public to EDG source so no-one is able to help you when asking this on forums or any open internet site.

osgx
  • 90,338
  • 53
  • 357
  • 513