C++ encapsulation
Return to
Encapsulation
or
C++ Glossary
encapsulation
- the enforcement of
abstraction
by mechanisms that prevent
access
to
implementation details
of an
object
or a
group of objects
except through a
well-defined interface
.
C++
enforces
encapsulation
of
private members
and
proteced members
of a
class
as long as users do not violate the
type system
using
casts
. See also:
interface
and
C plus plus access control access control
.
TC++PL
15.3, 24.3.7.4,
D&E
2.10. (
BSCppG
2012
)