C + + appears computer terminology 5

Source: Internet
Author: User
Tags types of functions

class Template

You can use to define a class that defines a specific set of types. Class templates template keyword is followed by a list of angle brackets (<>) attached, defined.

Export keyword (exporting keywords)

The keyword used to indicate that the compiler must remember the location of the relevant template definition. Compilers that support Template instantiation are used by the compiler to compile the model separately. Exportkeyword generally appear with function definitions, and classes are typically declared as export in the relevant class implementation file. In a program, a template can be defined only once with export keyword.

function template (Functional templates)

Can be used for definitions of different types of functions. The function template is defined by using the Templates keyword followed by a comma-delimited list of one or more shapes enclosed by angle brackets (<>).

Generic handle class (generic handle Class)

A class that saves and manages pointers to other classes.

Generic handles accept a single type of participation. and assigns and manages pointers to objects of that type. The handle class defines the necessary replication control members, and it also defines the understanding reference operator (*) and the arrow member access operator (-). A generic sentence does not need to know the type it manages.

Inclusion Compilationmodel (including compilation model)

The compiler is used to look for a template definition mechanism, which relies on template definitions to be included in each file that uses the template. Typically, template definitions are stored in a header file. A random file that uses a template must include the file.

Instantiation (instantiation)

An actual template is used to generate a compiler procedure for a specific instance of a template, in which the corresponding actual participation is substituted for the formal participation. The function is actively instantiated based on the arguments used in the call, and the template implementation must be explicitly provided when using the class template.

Abort

An exception terminates the library function that the program runs.

Typically, abort is called by Terminate, and the program can call abort directly. The abort is defined in the header file Cstdlib.

Auto_ptr

A library class template that provides access to the exception security of dynamically allocated objects.

You cannot bind an Auto_ptr object to an array or to a variable pointer. copying and assigning a Auto_ptr object is a destructive operation: the entire right of the object is transferred from the right operand to the left operand. Assigns a value to the Auto_ptr object to delete the object in the left operand, so. The Auto_ptrs object cannot be stored in a container.

Catch-all (Catch all exception clauses)

Exception description Identifier (...) The catch clause. Such clauses can catch arbitrary types of exceptions, which are often used to capture anomalies that are detected locally for local cleanup. Exceptions are thrown again to other parts of the program to address the underlying cause of the problem.

Catch clause (catch clause)

The part of the program that handles exceptions, also known as Exception handling code.

The catch clause is composed of a keywordcatch followed by an exception specifier and a statement block. The code inside the catch is done with the necessary work to handle the exception of the type defined by the exception descriptor.

Constructor Order (constructor order)

In general, the base class should be constructed according to the order specified in the class derivation list, and the derived class constructor should explicitly initialize each base class through the constructor initialization list. The order of the specified base class in the constructor initialization list does not affect the order in which the base class is constructed.

In virtual inheritance. Virtual base classes are constructed before any other base class, and they are constructed in the order in which they are derived, either directly or indirectly, in the derivation list of the derived type. Only the lowest layer derived type can initialize the virtual base class, and the base class constructor initialization list that appears in the intermediate base class is ignored.

destructor Order (destructor order)

You should undo the derived class object in reverse order of construction-first undo the derived part, and then, starting with the last base class, revoke the class specified in the class-derived list. Classes that are base classes in multiple inheritance hierarchies should typically define their number of destructors as virtual functions.

Exception handler (Exception handling code)

There is also a name for the catch clause.

Exception handling (Exception handling)

Manages language-level support for exceptions at execution time.

An independently developed part of the code can detect and "throw" an exception, and a separately developed part of the program "handles" the exception.

In other words, the error detection part of the program throws an exception. The error handling section handles exceptions in the catch clause of the try block.

Exception object (Exception object)

The object used to communicate between the throw and catch parties of the exception. The object is created at the throw point. The object is a copy of the thrown expression. The exception object persists until the last processing code of the exception finishes. The type of the exception object is the type of the thrown expression.

Exception safe (exceptionally safe)

A term used to describe a program that behaves correctly when an exception is thrown.

Exceptionspecification (Exception description)

Used on a function declaration to indicate what (dummy) exception type the function throws. Specify the exception type in parentheses around the list, separated by commas, followed by Keywordthrow. An empty list indicates that a function does not throw an exception, and a function without an exception can throw no exception.

Exception specifier (exception specifier)

Describes the stoneware of the exception that is handled by the given catch clause.

The behavior form of the exception specifier, initialized by the exception object to its single-form participation. The exception object is copied to the catch, assuming that the exception specifier is a non-reference type, as in the case of a parameter pass.

File static

The name of the file to be declared with keywordstatic. In C + +, which precedes the standard version number, the static declarations in the file are used to declare objects that can only be used in a single file, and C + + does not agree with the file static, and has replaced it with an unnamed namespace.

Function try block (functional test blocks)

Is the try block of the function body.

Keywordtry the left curly brace of the function body today, ending with a catch clause after the right curly brace of the function body.

A function test block is most often used to enclose a constructor definition in order to catch an exception thrown by a constructor initializer.

Global namespace (globally named space)

All globally defined (implicit) namespaces are saved in each program.

Multiple inheritance (multiple inheritance)

Class has multiple inheritance of direct base classes. Derived classes inherit the members of all base classes and define multiple base classes by specifying multiple base classes in the class-derived list. Each base class requires a separate access designator.

Namespace (namespace)

The mechanism of focusing all the names defined by a library or other program collection into a single scope. Unlike other scopes in C + +, namespace scopes can be defined in several parts, and namespaces can be open, closed, and open again in different parts of the program.

namespace alias (namespace alias)

A mechanism for defining synonyms for a given namespace.

namespace N1 = N;

There is also a name for the namespace defined as N1 named N. A namespace can have multiple aliases, and the namespace name and its alias can be used interchangeably.

namespace pollution (namespace pollution)

A term used to describe what happens when the full name of a narrative class and function is placed in the global namespace. Assume that the name is global. Large programs that use code written by multiple independent teams often encounter name collisions.

Raise (raised)

Commonly used as a synonym for throwing.

C + + program apes use the "throw" exception or the "throw" exception interchangeably.

Rethrow (once again thrown)

An empty throw--does not specify a throw. Only a catch clause or a function that is called directly or indirectly from a catch is valid again, and the effect is that the exception object being received is again thrown.

Scope operator (scope operator)

An operator that is used to access names in a namespace or class.

Stack unwinding (Stack expansion)

Used to describe the process of exiting a function that causes an exception to be thrown when a catch is found. Before entering the corresponding catch. Revokes a local object that was constructed before the exception.

Terminate

A library function. This library function is called if no exception is caught or an exception occurs during exception handling. This function usually calls the Abort function to end the program.

Throw E

An expression that interrupts the current run path. Each throw will control to the immediate perimeter catch clause that can handle the type of thrown exception, and the expression E is copied to the exception object.

Try block (test blocks)

A block of statements surrounded by keywordtry and one or more try clauses. Suppose the code inside the try block throws an exception, and a catch clause matches the type of the exception. The exception is handled by the catch. Otherwise. Passes an exception out of the try to a higher catch in the call chain.

Unexpected

A library function that is called when the exception description of the function is thrown in violation of the exception.

Unnamed namespace (unnamed namespace)

namespace with no name defined.

Names defined in unnamed namespaces can be directly interviewed without using the scope operator. Each file has its own unnamed namespace, and the name in the file is not visible outside the file.

Using declaration (using declaration)

The mechanism to inject a single name in the namespace into the current scope.

Using Std::cout;

Makes the name cout in the namespace STD visible in the current scope. Ability to use the name cout without qualifier std::.

using directive (using indication)

A mechanism that enables all names in a namespace to be visible in the using indicator and in the immediate scope of the namespace itself.

Virtual base class (virtual)

Base class that uses keywordvirtual inheritance. Even if the same class occurs more than once in the hierarchy as a virtual base class, the virtual base class part of the derived class object appears only once. In non-virtual inheritance. Constructors can only initialize their direct base classes, and when virtual inheritance is made to a class, the class is initialized by the lowest-level derived class. Therefore, the lowest-level derived class should include the initialization for all of its virtual parent classes.

Virtual inheritance (Virtual inheritance)

Multiple inheritance forms, such as the shape where, derived classes are included in a hierarchical shared copy of the base class multiple times.

Copyright notice: This article blog original article. Blogs, without consent, may not be reproduced.

C + + appears computer terminology 5

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.