[Issue 6438] New - UML class to c++ bug
| Newsgroups | gmane.comp.lang.uml.argouml.issues |
|---|---|
| Message-ID | <[email protected]> |
http://argouml.tigris.org/issues/show_bug.cgi?id=6438
Issue #|6438
Summary|UML class to c++ bug
Component|argouml
Version|current
Platform|PC
URL|
OS/Version|Linux
Status|NEW
Status whiteboard|
Keywords|
Resolution|
Issue type|DEFECT
Priority|P3
Subcomponent|Class Diagram
Assigned to|bobtarling
Reported by|edimartin
------- Additional comments from [email protected] Fri Aug 17 07:02:55 -0700 2012 -------
Hi. I am using ArgoUML to Generate my C++ class. I test a simple class and
convert to c++ and I have a little bug.
I have one class called ArgoUML (just for test).
I have another class called bug (just fot test).
I made one single association (I sorry. I am using argoUML in Brazillian
Portuguese) between ArgoUML and bug. The class argoUML need have one bug. I set
this as name: theBug and association 1.
The code in Java is correct:
public class argoUML {
public bug theBug; //just one bug
}
But the code in c++ in wrong:
#ifndef argoUML_h
#define argoUML_h
class bug; //not include the another class
class argoUML {
public:
bug *theBug; //more then one bug
};
#endif // argoUML_h
I try set up association to 0..1 (to real make a pointer).
in Java I have:
public class argoUML {
public bug theBug; //Java is all pointers
}
But in c++ I have:
#ifndef argoUML_h
#define argoUML_h
class bug; //the same thing
class argoUML {
public:
bug ** theBug; //pointer of the pointer.
};
#endif // argoUML_h
The problem is. I need have one object in my Class, and the ArgoUML thing this
object need be a pointer. And it create a classe in the same file.
In the last I create a atribute caled: "+ theBug : bug".
In Java I have:
public class argoUML {
public bug theBug;
}
in c++ I have the correct code:
#ifndef argoUML_h
#define argoUML_h
#include "bug.h"
class argoUML {
public:
bug theBug;
};
#endif // argoUML_h
------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=448&dsMessageId=2999144
To unsubscribe from this list, e-mail: [[email protected]].
Please do not reply to this mail. Instead, add your comments in the issue.