Interface - a message transfer

Interface allows entrance to communicate forced (forced good - standardization of interfaces)

Proprietary internal interface enables active protection obtained (active)

Between the object and the object, the message still does not involve passing inside the object.

Message is transmitted by way of assignment.

Objects are input and output through the object's interface,

Example Interface (corresponding to the program): passive input function object (received parameter) / active output (return)

Active input (friend function input port) / passive output (friend class declaration)

Passive definition: not by their own change and change

Active definition: change by its own change

Active and passive symmetrical

 

Published 127 original articles · won praise 10 · views 10000 +

Guess you like

Origin blog.csdn.net/chanleoo/article/details/104374727