boxer41a@yahoo.com [eiffel_software]
2015-09-18 17:11:09 UTC
I just realized that I cannot say: create {REFLECTED_COPY_SEMANTICS_OBJECT} r1.make (x, 1)
because `make' is only visible to {REFLECTED_OBJECT}, so I can only get a {REFLECTED_COPY_SEMANTICS_OBJECT from a previously created {REFLECTED_REFERENCE_OBJECT}, right?
I think there are two ways to get copy semantics:
1) declare a class as expanded with "expanded class MY_CLASS...", or
2) declare an entry as expanded, as in "my_attribute: expanded NORMAL_CLASS"
Is that right?
Given an object from either of the above senarios, how do I get a REFLECTED_COPY_SEMANTICS_OBJECT? Do I use `copy_semantics_field (i)'?
If so, how do I determine if a particular field (i.e. index) meets the preconditions?
I have tried looping on `i' through the enclosing reflected object `r' with:
1) if r.is_field_statically_expanded (i) then ...
2) if r.field_type (i) = {REFLECTOR_CONSTANTS}.reference_type and then
r.is_copy_semantics_field (i) then ...
Both fail to find the expanded case #1 above. I'm not sure about case #2.
Thanks,
jjj
[Non-text portions of this message have been removed]
because `make' is only visible to {REFLECTED_OBJECT}, so I can only get a {REFLECTED_COPY_SEMANTICS_OBJECT from a previously created {REFLECTED_REFERENCE_OBJECT}, right?
I think there are two ways to get copy semantics:
1) declare a class as expanded with "expanded class MY_CLASS...", or
2) declare an entry as expanded, as in "my_attribute: expanded NORMAL_CLASS"
Is that right?
Given an object from either of the above senarios, how do I get a REFLECTED_COPY_SEMANTICS_OBJECT? Do I use `copy_semantics_field (i)'?
If so, how do I determine if a particular field (i.e. index) meets the preconditions?
I have tried looping on `i' through the enclosing reflected object `r' with:
1) if r.is_field_statically_expanded (i) then ...
2) if r.field_type (i) = {REFLECTOR_CONSTANTS}.reference_type and then
r.is_copy_semantics_field (i) then ...
Both fail to find the expanded case #1 above. I'm not sure about case #2.
Thanks,
jjj
[Non-text portions of this message have been removed]