|[QVTo] How to create a model (extent) from an element. [message #529855]
||Tue, 27 April 2010 13:21
Originally posted by: dhendriksREMOVE_THIS.tueREMOVE.THIS.nl|
I have a QVTo transformation X, and I want to instantiate another
subtransformation Y at runtime.
The subtransformation looks like this:
transformation Y(inout inOutModel : mm_cif);
I want to create an instance of Y from transformation X as follows:
var subtrans : Y := new Y(m);
the problem is how to construct m. I do have an object of the mm_cif
metamodel (which automatically is a Stdlib::Element), but in order to
create the subtransformation, I need a model extent (which is a
I know I can create an empty model extent using:
var m : mm_cif := mm_cif.createEmptyModel().oclAsType(mm_cif);
However, I don't know how to create a model extent with anything in it,
or how to fill an empty model extent with (root) objects.
Does anyone know how to create a model (extent) from an element, or how
to add elements to a model extent created at runtime?
Powered by FUDForum
. Page generated in 0.02903 seconds