[kea-dev] Converting configuration back to JSON (unparsing)

Francis Dupont fdupont at isc.org
Thu Feb 23 20:41:01 UTC 2017


Thomas Markwalder writes:
> My point is that objects that embody our configuration may have other
> things in common eventually besides just implementing a toElement() method.

=> if this happens we can change the name at that time.

> If Configurable::toElement() is an abstract method it would be pretty
> clear that anything deriving from it has to implement it.

=> not only it must but if it is not it will not build. I know the
signature / implementation split design comes from outside C++ but
there is no reason to not use it.

> If that's the criteria you would need a separate base class for
> every abstract method.

=> for every independent/not-related abstract method? IMHO it is the
right idea. It costs a few line in a header, a ": public name" in
derived class declarations and you can cut & paste the doxygen comment
of the method from a known source. In fact it is a smart form of
code sharing, I can't see a reason to not use it.

Regards

Francis Dupont <fdupont at isc.org>


More information about the kea-dev mailing list