[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cdt-dev] Question on class hierarchy of CBuildConfiguration
|
Am Fr., 17. Juli 2020 um 20:56 Uhr schrieb 15 knots <fifteenknots505@xxxxxxxxx>:
>
> 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?
Well, looking at my latest code , this might be irrelevant. My code
already takes a parameter object. It would be simple to replace its
reference to CBuildConfiguration with references to the IProject and
build dir and force clients to provide the latter instead.
Martin