Book a Demo

Author Topic: Reverse Engineering - Problems with Friends  (Read 7706 times)

Si Perry

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Reverse Engineering - Problems with Friends
« on: February 12, 2002, 09:01:27 pm »
Hi

I have a file of the form:

Code: [Select]
class NovaDate  
{
   // FRIENDS
   // @friend NovaTime | Time (and date) class
   friend class NovaTime;
   friend class NovaDSTBoundary;

// @access Public Members & Methods
public:
     NovaDate();

// etc other methods and members here

};


When I reverse engineer this class I get a dialog saying "Error Reading File".

When I hit okay, the file seems to import. However, on viewing the class, a number of problems exist:
1. ALL the methods AND members have been marked as friend and hence do not appear in the class diagram.
2. Some members, of the form
Code: [Select]

   static const unsigned ms_DaysInMonth[12];          
   static const unsigned ms_FirstDayOfEachMonth[12];


are incorrectly imported. They have no name, and the name is used as the type.
3. Some methods, for example
Code: [Select]

unsigned dayOfMonth() const;


are incorrectly imported. They have no type, and name unsigned dayOfMonth.

Can anyone advise?

Thanks,

Si

TorbenKoch

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: Reverse Engineering - Problems with Friends
« Reply #1 on: February 13, 2002, 05:20:02 am »
I am using EA 3.10 build 461.

I am not sure whether my problem is caused by the same as yours, but I also do get the Error reading file error when reading the following:

Code: [Select]

class OutputPort : public JobReceivingModule
{
//!Construction:
public:
     // Construct an output port, using the passed configuration.
     OutputPort(const String &moduleName, ModuleConfiguration *configuration, CommController *comm);

     virtual ~OutputPort();


     virtual String      getModuleType();

protected:
     void onPauseProcessing() { JobReceivingModule::onPauseProcessing(); }

     void onScheduler(int ScheduleID) { }

     void onStopProcessing()      { JobReceivingModule::onStopProcessing(); }

     void onStartProcessing() { JobReceivingModule::onStartProcessing(); }



};



What is actually imported looks like this when generated:


Code: [Select]


class OutputPort : public JobReceivingModule
{

public:
     OutputPort();

public:
     OutputPort(const String& moduleName,ModuleConfiguration* configuration,CommController* comm);
     virtual ~OutputPort();
     virtual String getModuleType();

protected:
     void onPauseProcessing();
};



As it can be seen it is clear that everything that follows an inline function is not imported  8).

I'm glad that it's not me who's building this importer...! ;)