On Nov 27, 11:09 am, "Gaurav" <gauravgoyal...@gmail.comwrote:
Hi,
What is syntactic and binary encapsulation. and what is the difference
between the two.
Any pointers?
Syntactic encapsulation is what you achieve by encapsulating an object
by keeping an instance of it (or a reference to it) as a private or
protected member, and the only way to access the object is throgh
public members.
Binary encapsulation is not directly supported by C++ and is when you
(the compiler) don't have to know the details of an object to
instanciate and use it. In C++ this can't be done since the compiler
need to know the type and sice of all members to instanciate the
object.
At least that's what I can come up with after a quick seach and reading
this sample chapter:
http://www.awprofessional.com/conten...r%5Cchap01.pdf
--
Erik Wikström