You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The CPACSCreator added a new abstract base class CreateConnectedElementI for both wings and fuselage, which seems a bit intrusive to me. In addition the Open-Closed principle is violated, because we had to modify the existing classes for the new functionality in the TiGLViewer. In addition, neither a wing, nor a fuselage "is a" CreateConnectedElementI.
An alternative solution would be to have the TiGLViewer code use std::variant and std::visit (or boost::variant, if we still want to stick to C 14).
using ElementModificatorInterface = std::variant<Fuselage, Wing>; // could be apended with Duct, Pylon, tank in the future
The code changes are limited to the calling code, i.e. TiGLViewer.
The text was updated successfully, but these errors were encountered:
The CPACSCreator added a new abstract base class
CreateConnectedElementI
for both wings and fuselage, which seems a bit intrusive to me. In addition the Open-Closed principle is violated, because we had to modify the existing classes for the new functionality in the TiGLViewer. In addition, neither a wing, nor a fuselage "is a"CreateConnectedElementI
.An alternative solution would be to have the TiGLViewer code use
std::variant
andstd::visit
(orboost::variant
, if we still want to stick to C 14).The code changes are limited to the calling code, i.e. TiGLViewer.
The text was updated successfully, but these errors were encountered: