Search code examples
c++parsingcompilationedg

EDG ,get C++ friend data


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?


Solution

  • 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.