Difference between revisions of "Internal and Expanded"

(New page: Category:Persistence We are discussing here how to export the description of expanded fields in a normal object to enable a fast and efficient introspection of objects at runtime. We w...)
 
Line 1: Line 1:
 
[[Category:Persistence]]
 
[[Category:Persistence]]
 
We are discussing here how to export the description of expanded fields in a normal object to enable a fast and efficient introspection of objects at runtime. We will describe the various possibilities the last one being the implementation we have chosen in EiffelStudio.
 
We are discussing here how to export the description of expanded fields in a normal object to enable a fast and efficient introspection of objects at runtime. We will describe the various possibilities the last one being the implementation we have chosen in EiffelStudio.
 +
 +
To make the discussion consistent, let's suppose we have the following set of classes:
 +
 +
<code>
 +
class A
 +
feature
 +
b: B
 +
sa: STRING
 +
end
 +
 +
expanded class B
 +
feature
 +
c: C
 +
sb: STRING
 +
end
 +
 +
expanded class C
 +
feature
 +
sc: STRING
 +
end
 +
</code>
  
 
==Nothing special==
 
==Nothing special==
 +
As of version 6.5 and before of EiffelStudio, one can use `field' and `set_field' to get and set the expanded attributes
 +
 +
'''pros''': simple
 +
'''cons''': very inefficient
 +
 +
==Extra fields==
 +
The attributes of the expanded are also visible as extra fields of the object. In other words

Revision as of 09:32, 23 March 2010

We are discussing here how to export the description of expanded fields in a normal object to enable a fast and efficient introspection of objects at runtime. We will describe the various possibilities the last one being the implementation we have chosen in EiffelStudio.

To make the discussion consistent, let's suppose we have the following set of classes:

class A
feature
	b: B
	sa: STRING
end
 
expanded class B
feature
	c: C
	sb: STRING
end
 
expanded class C
feature
	sc: STRING
end

Nothing special

As of version 6.5 and before of EiffelStudio, one can use `field' and `set_field' to get and set the expanded attributes

pros: simple cons: very inefficient

Extra fields

The attributes of the expanded are also visible as extra fields of the object. In other words