This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, Fortran] OOP cleanup


>> [Btw, after this re-shuffling of the polymorphism code I plan to do
>> some more cleanup. E.g. Tobias suggested to introduce encapsulating
>> routines for accessing attributes of class variables. This is very
>> much complicated by the presence of the class containers. It is
>> another thing which is scattered throughout the code, and depends
>> strongly on the internal representation of class variables. This point
>> surely could use some abstraction.]
>
> Yes, I agree. ?I thought to use macros in gfortran.h, such as
> CLASS_DATA(sym) to provide the data component and so on. ?I got as far
> as writing the macro and applying it in one place to check all was
> well but lost it in trying to fix the fix PR43945 (which I still have
> not figured out BTW).

Maybe even more useful would be a macro or function, which, given some
expr, returns the attributes of the expr (for a class taking those
from the $data comp). Or similar things. One should search through the
code for BT_CLASS special cases to see what's actually needed.

Do you have your macro at hand quickly, or did it get lost? I guess
I'll start dreaming up some of these macro thingies ...

Cheers,
Janus


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]