Programming 版 (精华区)
发信人: netiscpu (说不如做), 信区: Programming
标 题: C++ 编程准则与忠告 之 Terminology
发信站: 紫 丁 香 (Sun Jul 26 11:07:47 1998), 转信
2 Terminology
Back to index
1 An identifier is a name which is used to refer to a variable,
constant, function or type in C++. When necessary, an identifier may
have an internal structure which consists of a prefix, a name, and a
suffix (in that order).
2 A class is a user-defined data type which consists of data elements
and functions which operate on that data. In C++, this may be declared
as a class; it may also be declared as a struct or a union. Data
defined in a class is called member data and functions defined in a
class are called member functions.
3 A class/struct/union is said to be an abstract data type if it does
not have any public or protected member data.
4 A structure is a user-defined type for which only public data is
specified.
5 Public members of a class are member data and member functions which
are everywhere accessible by specifying an instance of the class and
the name.
6 Protected members of a class are member data and member functions
which are accessible by specifying the name within member functions of
derived classes.
7 A class template defines a family of classes. A new class may be
created from a class template by providing values for a number of
arguments. These values may be names of types or constant expressions.
8 A function template defines a family of functions. A new function
may be created from a function template by providing values for a
number of arguments. These values may be names of types or constant
expressions.
9 An enumeration type is an explicitly declared set of symbolic
integral constants. In C++ it is declared as an enum.
10 A typedef is another name for a data type, specified in C++ using a
typedef declaration.
11 A reference is another name for a given variable. In C++, the
`address of' (&) operator is used immediately after the data type to
indicate that the declared variable, constant, or function argument is
a reference.
12 A macro is a name for a text string which is defined in a #define
statement. When this name appears in source code, the compiler
replaces it with the defined text string.
13 A constructor is a function which initializes an object.
14 A copy constructor is a constructor in which the first argument is
a reference to an object that has the same type as the object to be
initialized.
15 A default constructor is a constructor which needs no arguments.
16 An overloaded function name is a name which is used for two or more
functions or member functions having different types.
17 An overridden member function is a member function in a base class
which is re-defined in a derived class. Such a member function is
declared virtual.
18 A pre-defined data type is a type which is defined in the language
itself, such as int.
19 A user-defined data type is a type which is defined by a programmer
in a class, struct, union, enum, or typedef definition or as an
instantiation of a class template.
20 A pure virtual function is a member function for which no
definition is provided. Pure virtual functions are specified in
abstract base classes and must be defined (overridden) in derived
classes.
21 An accessor is a function which returns the value of a data member.
22 A forwarding function is a function which does nothing more than
call another function.
23 A constant member function is a function which may not modify data
members.
24 An exception is a run-time program anomaly that is detected in a
function or member function. Exception handling provides for the
uniform management of exceptions. When an exception is detected, it is
thrown (using a throw expression) to the exception handler.
25 A catch clause is code that is executed when an exception of a
given type is raised. The definition of an exception handler begins
with the keyword catch.
26 An abstract base class is a class from which no objects may be
created; it is only used as a base class for the derivation of other
classes. A class is abstract if it includes at least one member
function that is declared as pure virtual.
27 An iterator is an object which, when invoked, returns the next
object from a collection of objects.
28 The scope of a name refers to the context in which it is visible.
29 A compilation unit is the source code (after preprocessing) that is
submitted to a compiler for compilation (including syntax checking).
--
Enjoy Linux!
-----It's FREE!-----
※ 来源:.紫 丁 香 bbs.hit.edu.cn.[FROM: mtlab.hit.edu.cn]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:6.439毫秒