I have a parent and a child data type with a generic type-bound procedures as follows:
PROCEDURE,PASS,PRIVATE :: MethodA
PROCEDURE,PASS,PRIVATE :: MethodB
GENERIC,PUBLIC :: GenMethod => MethodA , &
END TYPE ParentType
TYPE,EXTENDS(ParentType) :: ChildType
PROCEDURE,PASS,PRIVATE :: ChildMethodA
PROCEDURE,PASS,PRIVATE :: ChildMethodB
GENERIC,PUBLIC :: GenMethod => ChildMethodA , &
END TYPE ChildType
Procedures MethodA and ChildMethodA have the same signatures. So do MethodB and ChildMethodB. Essentially the idea is to overwrite the parent GenMethod generic procedure in ChildType. However, when I declare a ChildType variable and call ChildType%GenMethod the procedure from the parent type is executed instead of that from the ChildType.
My question: Is it possible to somehow "hide" the parent type's GenMethod so that when a client code uses ChildType it will only be aware of the ChildType's overwriting GenMethod?
Thanks for any help,