这样就可以装配组合对象,而不会造成把所有成员在类中声明可能造成的一般冲突和交互。
That gives you a way to assemble composite objects without the usual collisions and interactions possible if all members were declared in the class itself.
当类的变量被声明为类的成员变量时,找到所有权关系是更加可靠的。
It was more reliable at finding ownership relationships when the variables were declared as member variables of the class.
不过,在某些情况下,若能保持所声明的类成员的顺序将非常有用。
However, there are several cases in which preserving the order of declared class members would be useful.
应用推荐