Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Question on class hierarchy of CBuildConfiguration


I don't know why in some cases extensions to interfaces don't extend the initial interface. I find that irritating and I would simply vote for the *2 to extend the original and then you can use that interface everywhere. Perhaps someone knows why it wasn't done that way initially? 

Although it sounds moot in this case now. But the general sentiment applies and CDT 10.0 is a good opportunity to make that change with minimal disruption. 

Jonah

On Fri., Jul. 17, 2020, 14:57 15 knots, <fifteenknots505@xxxxxxxxx> wrote:
Hi gurus,

Currently my code takes a CBuildConfiguration object as an argument in its public API.
CBuildConfiguration is an abstract class and I would like to use an interface instead.
Looking at the class hierarchy of CBuildConfiguration, I can find it implements interface ICBuildConfiguration and interface ICBuildConfiguration2.

If I choose ICBuildConfiguration as a replacement for the abstract class, I can read the IProject object my code needs. Unfortunately, it does not give me the build directory, I need an instance of ICBuildConfiguration2 to get the directory.
But ICBuildConfiguration2 does not extend ICBuildConfiguration. Is that by intent?
Or is it fine to stay using the abstract class CBuildConfiguration?

Martin
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev

Back to the top