Ask Your Question
1

Motivation behind VizImpl

asked 2014-10-15 22:20:19 -0500

JiayiLiu gravatar image

Just noticed that, in the viz module, the implementation of the functions of the Viz3d class is not realized inside the class. Instead, it is implemented in a VizImpl struct which itself is a private member of the Viz3d class.

So whenever an Viz3d function is called, that dummy Viz3d function calls the real VizImpl function instead.

I'm just purely curious about the initial consideration of implementing it this way. Thank you!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2014-10-16 03:40:19 -0500

Guessing this is done to make a front and backend structure. The frontend will never change but the backend allows the author to effictively adapt the code with only the need of adapting the conversion/linking code between both pieces. It is a quite common approach in software programming.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

Stats

Asked: 2014-10-15 22:20:19 -0500

Seen: 91 times

Last updated: Oct 15 '14