ssriram1992 / EPECsolve

Code to compute mixed-equilibrium in linear EPECs
https://ssriram1992.github.io/EPECsolve/html/index.html
GNU General Public License v3.0
6 stars 2 forks source link

Data hiding in Game::EPEC #9

Closed ssriram1992 closed 4 years ago

ssriram1992 commented 4 years ago

Game::EPEC has a lot of members and datafields (especially!) in protected level visibility. A bunch of these should not be visible from a derived class, and even more of them should not be editable from a derived class!

Make the visibility to private for the fields that need not be visible from a derived class, and use const getters for view access to read-only datafields.

gdragotto commented 4 years ago

In 35957e4:

  1. Some fields are moved to private.
  2. Const reading methods are implemented.
gdragotto commented 4 years ago

12c2a52 incorporates algorithms param in the Status::EPECAlgorithmParam field