Skip to content

Draft: PImpl Attribute classes

Michal Liszcz requested to merge github/fork/mliszcz/pimpl-attribute into main

This PR changes Attribute and derived classes to use PImpl idiom. We have two class hierarchies now:

  • AttributePrivate <- WAttributePrivate <- FwdAttributePrivate, which are just renamed Attribute, WAttribute and FwdAttribute (as we knew them before this PR),
  • Attribute <- WAttribute <- FwdAttribute, which contain only public methods from the corresponding Private classes. Additionally Attribute contains owning pointer to AttributePrivate.

In cppTango library code we try to use normal (public) classes when possible, but in places where we need to break encapsulation, we can call Attribute::get_impl() to access private implementation.

The new classes (and their dependencies) are declared in headers located in cppapi/include. In long term only this directory should be visible for the users (and copied to their machines as part of install target).

See also #735 (closed).

Edited by Thomas Juerges

Merge request reports