separating interface and implementation



Hi all,

I would like to have some clean interfaces in the Midnight Commander. To realize this, I would like to split some headers (dialog.h, widget.h) into an interface part, which exports only the type names (WButton), but not the implementation (struct WButton). It would look like:

widget.h:
    typedef struct WButton WButton;

widget-impl.h:
    struct WButton { ... };

Then we can encourage ourselves not to use the *-impl.h headers where it is not necessary. And when only a few files do use the implementation, we can change it more easily, if that ever becomes necessary.

Roland



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]