Friend function
In object-oriented programming, a friend function, that is a "friend" of a given class, is a function that is given the same access as methods to private and protected data. A friend function is declared by the class that is granting access, so friend functions are part of the class interface, like methods. Friend functions allow alternative syntax to use objects, for instance f(x) instead of x.f(), or g(x,y) instead of x.g(y). Friend functions have the same implications on encapsulation as methods. A similar concept is that of friend class.
Wikipage disambiguates
primaryTopic
Friend function
In object-oriented programming, a friend function, that is a "friend" of a given class, is a function that is given the same access as methods to private and protected data. A friend function is declared by the class that is granting access, so friend functions are part of the class interface, like methods. Friend functions allow alternative syntax to use objects, for instance f(x) instead of x.f(), or g(x,y) instead of x.g(y). Friend functions have the same implications on encapsulation as methods. A similar concept is that of friend class.
has abstract
Funkcja zaprzyjaźniona – funkcja, która ma dostęp do prywatnych składników klasy.
@pl
In object-oriented programming ...... ncept is that of friend class.
@en
Unter einer Friend-Funktion od ...... (zum Beispiel internal in C#).
@de
在物件導向程式設計中,友誼函數(friend functio ...... 函數,可能會降低封装性的價值,也可能對整個設計框架產生影響。
@zh
Link from a Wikipage to an external page
Wikipage page ID
11,017,893
Wikipage revision ID
743,580,274
hypernym
type
comment
Funkcja zaprzyjaźniona – funkcja, która ma dostęp do prywatnych składników klasy.
@pl
In object-oriented programming ...... ncept is that of friend class.
@en
Unter einer Friend-Funktion od ...... (zum Beispiel internal in C#).
@de
在物件導向程式設計中,友誼函數(friend functio ...... 函數,可能會降低封装性的價值,也可能對整個設計框架產生影響。
@zh
label
Friend function
@en
Friend-Funktion
@de
Funkcja zaprzyjaźniona
@pl
友元函数
@zh