From: Eric B. <er...@go...> - 2007-08-09 16:31:13
|
Howard Thomson wrote: > Hi Wolfgang and Eric, > > According to ETL, the '$' operator applied to a non-constant feature should > provide its POINTER address, such that when the pointer is passed to an > external routine, that routine can modify the feature, probably returning a > previously supplied value. > > Unfortunately, EiffelStudio (I think) does not follow ETL and uses, for a > reference feature, the '$' operator as an equivalent of SmartEiffel's > to_external concept to return the POINTER equivalent of the address of the > referred-to object, which is what Eric has implemented to be compatible with > ES Yes. I think that the idea is that $ does not return the address of the attribute entity in the enclosing object, but the address of the attribute object. So if the attribute is expanded, the address of the object is indeed the same as the address of the attribute entity in the enclosing object. But for reference attributes, the address of the object is what is stored in the attribute entity. So, in a sense it is consistent between expanded and reference. It's just that it is returning the address of the attribute object and not the address of the attribute entity. I think that ISE gives access to the attribute entity address through its class INTERNAL. Because I want to implement features of INTERNAL in terms of features of class TYPE, I think that I will make this functionality available in class TYPE. -- Eric Bezault mailto:er...@go... http://www.gobosoft.com |