Forward/Reverse error in c++?

General discussions about code engineering

Moderator: Moderators

Forward/Reverse error in c++?

Postby michael.guist@h-da.de » Fri Sep 28, 2012 2:25 am

We use MagicDraw 17.0.02 and observe strange behavior of the code engineering facilities for c++. We use the C++/ANSI code engineering set.

When we do reverse engineering of c++ code and then generate the code again with forward engineering it happens that the code of a couple files will be appended to the file. This is the file Cntrl.h from the MagicDraw sample after reverse/forward engineering.
Code: Select all
#ifndef __CNTLR_H
#define __CNTLR_H
#include "Crypter.h"
#include "Intfcr.h"
class Controller {
public:
   Controller();
   void Encrypt(char *text);
   void Decrypt(char *text);
   void Start();
private:
   Crypter    cp;
   Interfacer   inf;
   MessageHandler    mh;
};
#endif
#include "Crypter.h"
#include "Intfcr.h"

class Controller
{
   public:
   
   Controller( );
   
   void Decrypt( char * text );
   
   void Encrypt( char * text );
   
   void Start( );
   private:
   
   Crypter cp;
   
   Interfacer inf;
   
   MessageHandler mh;
   
};


All other files are OK.

Sometime MagicDraw deletes a semicolon in c++ code and concatenates two lines.

Are there errors in the c++ parser? Or does anybody know how to avoid this behavior?
michael.guist@h-da.de
Forum Newbie
Forum Newbie
 
Posts: 1
Posts Rating:0
Joined: Mon May 14, 2012 5:42 am

Return to Code engineering

Who is online

Users browsing this forum: No registered users and 0 guests