How a member function changes the object?
成员函数如何更改对象?
First, it is a global function, not a member function.
第一,这是一个全局函数而不是成员函数。
Examples of how to invoke the member function when appropriate.
如何在适当时调用成员函数的示例?
Usually there's no need to override the GetSite member function.
一般情况下,没有必要重载成员函数GetSite 。
This member function ensures that every message is processed.
这个成员函数确保每个消息都被处理。
Synthesizes a member function pointer type from given properties.
根据给定的属性合成一个成员函数指针。
If a member function changes an object, then this needs to be indicated.
如果成员函数更改对象,则这需要指出。
Special member function that is used to initialize newly created objects.
用来初始化新建对象的特殊成员函数。
This information lets other programmers know what to pass to a member function.
该信息能让其它程序员知道传给成员函数的是什么。
You also need to indicate how any parameters to a member function will be used.
您还需要表示将如何使用成员函数的任何参数。
For example, the withdraw member function of a bank account modifies the account balance.
例如,银行帐户的withdraw成员函数修改帐户余额。
If neither of the two is defined, the compiler provides an implicit version that is a public member function.
如果二者都未定义,那么编译器会提供一种作为公共成员函数的隐式版本。
A member function with public visibility can be invoked by any other member function in any other object or class.
在任何其它对象或类中的任何其它成员函数都可以调用具有公有可视性的成员函数。
By documenting what a member function does, you make it easier for others to determine if they can reuse your code.
通过对成员函数所做的事情编制文档,其他人就可以更容易地确定他们是否可以重用您的代码。
When we use a member function as the right-hand operand of the dot operator, we usually do so to call that function.
通常使用成员函数作为点操作符的右操作数来调用成员函数。
Note that when you try to access an argument of a class member function the actual argument count starts from 2 instead of 1.
注意,在访问类成员函数的参数时,实际的参数编号从2而不是从1 开始。
Determines whether a given type is a member function pointer, possibly with additional properties as specified by a property tag.
判定一个给定的类型是否为成员函数指针,可以通过属性标签额外指定属性。
We define member functions similarly to how we define ordinary functions. As with any function, a member function consists of four parts.
成员函数的定义与普通函数的定义类似。和任何函数一样,成员函数也包含下面四个部分。
As you can see, the rules and notations for field visibility are consistent with those for member function visibility, as discussed last week.
您可以看到,字段可见性的规则和标记都与成员函数可见性的规则和标记一致。后者在上周讨论过。
You should document any and all exceptions that a member function throws at you so that other programmers know what their code will need to catch.
您应该对成员函数向您掷出的所有异常编制文档,以便其它程序员知道他们的代码将需要捕捉什么。
A member function with protected visibility can be invoked by any member function in the class in which it is defined or any subclasses of that class.
具有受保护可视性的成员函数可以由与该成员函数在同一个类中定义或其任何子类中定义的其它任何成员函数调用。
A member function with private visibility can only be invoked by other member functions in the class in which it is defined, but not in the subclasses.
具有私有可视性的成员函数只能由与该成员函数在同一个类中定义的其它成员函数调用,而在子类中的成员函数不能调用该成员函数。
This example shows the C++ source code that contains a non-class function, a Private member function of a class, and a Public member function of a class.
这个示例使用的 C++源代码包含一个非类函数、类的一个私有成员函数和一个公共成员函数。
If a given bug is applicable to more than one member function within a class, then it should be documented for the class instead of solely for the function.
如果某一特定的错误可适用于一个类中的多个成员函数,那么应该针对该类而不是单独为该函数编制文档。
A member function with default visibility is effectively public to all other classes within the same package, but private to classes external to the package.
具有缺省可视性的成员函数对于同一个软件包中所有其它类实际上是公有的,而对于该软件包外部的类,它是私有的。
Any outstanding problems with a member function should be documented so that other developers understand the weaknesses and difficulties with the member function.
应当对成员函数的任何未解决的问题编制文档,以便其它开发人员理解成员函数的缺点和难点。
Any outstanding problems with a member function should be documented so that other developers understand the weaknesses and difficulties with the member function.
应当对成员函数的任何未解决的问题编制文档,以便其它开发人员理解成员函数的缺点和难点。
应用推荐