[Uml-devel] Code generation: progress and a question about decodeClip5 function in umldrag.cpp

Brian Thomas thomas at mail630.gsfc.nasa.gov
Thu Jul 24 10:50:09 UTC 2003


On Thursday 24 July 2003 01:25 pm, JR wrote:
> UMLDoc::makeNewClassifierObject() does seem to make the umldoc the
> parent which is possibly not the ideal way to do it.  You could see if
> it's possible to find the new parent UMLClassifier and make that the
> parent or you could just leave it as it is and hope for the best (is
> there are requirement to change the UMLOperation constructor or would
> it just be neater?).

	Well, I suppose changing the UMLOperation constructor is "neater" for 
	the old code, but is more or less required for the new code generation. 
	This is because of 2 things: 

	1.  it is required for the method "isConstructorOperation" (in 
	UMLOperation) which I added to work properly (as that method needs to
	 know details of its parent classifier)

	2. The code generation class "CodeOperation" needs to be able to have
	 connection via slot/signal call back mechanism in order to know when 
	to "syncToParent".

	Keeping knowledge of the parent classifier is definitely needed. How to 
	get that at the point in decodeClip5 appears challenging since I would 
	need to know where the new operation is going to be pasted. I guess I 
	could put in a "dummy" classifier in the decodeClip5 and, at the time the 
	operation is pasted, the parent classifier can be changed (although I 
	sorta hesitate to allow a public  "setParentClassifer" method).

						-b.t.


-- 

operators on strike due to broken coffee machine





More information about the umbrello-devel mailing list