Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[m2m-dev] Do inout mappings instantiate a trace instance?

Hi,

it seems to me that trace instances are only created when object creation takes place in a mapping.

So it is not possibly to refer to a inout parameter of a mapping like this:

mapping inout Package::copyFields()
{
	init {
		var classA:Class := self.getClassForName('A');
		var classB:Class := self.getClassForName('B');
		
		map copyFields(classA, classB);
		
	}
}


And what is about a mapping like this:

mapping copyFields(in sourceClass: Class, inout targetClass: Class)
{
	init {
		targetClass.members += sourceClass.members[Field]->
		map copyField(sourceClass);
	}
}

I expected invresolveIn(copyFields, Package) to return a set of Package objects that a involved in the mapping.

If I'm right with my assumption, that resolving trace models only works for mappings which create new instances, my question is:

Is there any hint in the QVT standard that suggests this behavior or is it a decision that is implementation specific?

Thanks,

Marcel


Back to the top