[Uml-devel] kdesdk/umbrello/umbrello
Oliver Kellogg
okellogg at users.sourceforge.net
Sat Oct 18 05:26:03 UTC 2003
CVS commit by okellogg:
Remove friend permission from UMLDoc to ClassImport.
M +10 -19 classimport.cpp 1.10
M +1 -1 classimport.h 1.5
M +0 -3 umldoc.h 1.43
--- kdesdk/umbrello/umbrello/classimport.cpp #1.9:1.10
@@ -28,27 +28,18 @@ ClassImport::~ClassImport() {}
UMLObject *ClassImport::createUMLObject(QString className, Uml::UMLObject_Type type) {
-
- UMLObject * o = findUMLObject(type, className);
-
- if(!o) {
- if(type == Uml::ot_Class) {
- UMLClass *c = new UMLClass(this, className, ++uniqueID);
- o = (UMLObject*)c;
- } else {
+ if (type != Uml::ot_Class) {
kdDebug() << "CreateUMLObject(int) error" << endl;
- return o;
+ return NULL;
}
- objectList.append(o);
- emit sigObjectCreated(o);
- setModified(true);
+ UMLObject * o = findUMLObject(type, className);
+ if (o == NULL)
+ o = UMLDoc::createUMLObject( type, className );
return o;
- }
- return o;//gustavo - I put it here after compiler warning
}
/** No descriptions */
void ClassImport::insertAttribute(UMLObject *o, Uml::Scope scope, QString name, QString type, QString value /*= ""*/) {
- int attID = ++uniqueID;
+ int attID = getUniqueID();
UMLAttribute *temp = reinterpret_cast<UMLAttribute *>(((UMLClass*)o)->addAttribute(name , attID));
@@ -63,5 +54,5 @@ void ClassImport::insertAttribute(UMLObj
/** No descriptions */
void ClassImport::insertMethod(UMLObject *o, Uml::Scope scope, QString name, QString type, UMLAttributeList *parList /*= NULL*/) {
- int attID = ++uniqueID;
+ int attID = getUniqueID();
UMLClassifier *classifier = dynamic_cast<UMLClassifier*>(o);
if(!classifier)
@@ -78,5 +69,5 @@ void ClassImport::insertMethod(UMLObject
for( ; it.current(); ++it ) {
UMLAttribute *par = it.current();
- int parID = ++uniqueID;
+ int parID = getUniqueID();
par->setID(parID);
op->addParm(par);
--- kdesdk/umbrello/umbrello/classimport.h #1.4:1.5
@@ -21,5 +21,5 @@
*/
-class ClassImport : private UMLDoc {
+class ClassImport : public UMLDoc {
public:
ClassImport(QWidget *parent, const char *name);
--- kdesdk/umbrello/umbrello/umldoc.h #1.42:1.43
@@ -78,7 +78,4 @@ class UMLDoc : public QObject {
Q_OBJECT
public:
- friend class ClassImport;
- friend class UMLDrag;
-
/**
* Constructor for the fileclass of the application
More information about the umbrello-devel
mailing list