Computer terminology that appears in C + + 4

Source: Internet
Author: User
Tags define abstract

Adaptor (Adapter)

A standard library type, function, or iterator that makes a standard library type, function, or iterator behave like the second standard library type, function, or iterator. The system provides three sequential container adapters: Stack (stack), queue (queued), and priority_queue (priority queue). All adapters define a new interface on their underlying order container.

Begin (Begin action)

A container operation. Suppose there is an element in the container that returns an iterator that points to the first element in the container, and if the container is empty, the end iterator is returned.

Container (Container)

A type that stores a collection of objects of a given type. All standard library container types are template types. When you define a container, you must specify what type of element is stored in the container. The standard library container has a variable length.

Deque (double-ended queue)

A sequential container. The elements stored in the deque are visited by their subscript location. The container type is the same in many ways as the vector, the only difference is that the deque type supports inserting new elements at high speed in the container header, just as at the end of the insertion, and no matter which side of the container is inserted or deleted, it does not cause the element to be positioned again.

End (end action)

A container operation that returns an iterator that points to the next position of the container beyond the end.

Invalidated iterator (invalid iterator)

An iterator that points to an element that no longer exists. The use of an invalid iterator is not defined and can result in a serious execution-time error.

Iterator (iterator)

A type whose operations support the operation of traversing and inspecting container elements. All standard library containers define the 4 types of iterators listed in table 9.5 to work together. Standard library iterators support the dereference (*) operator and the arrow (-) operator, which is used to check the element values that the iterator points to. They also support both pre-and post-increment (+ +), decrement operators (-), and equal (= =) and unequal (! =) operators.

Iterator range (iterator range)

The range of elements that are marked by a pair of iterators. The first iterator points to the first element in the sequence, and the second iterator points to the next position of the last element in the range. Assuming this span is empty, the two iterators are equal (and vice versa-assuming that the two iterators are equal, they mark an empty range). Assume that the range is non-empty, then to the first empty range). If the range of 465 is not empty, then the first iterator is repeatedly self-increment and must be able to reach the second iterator. With this process of self-increment of iterators, all elements in the sequence can be processed.

Left-inclusiveinterval (left closing interval)

A range that includes the first element but does not include the last element. is generally expressed as [I, j), which means that the sequence starts from I (including i) until J, but does not include J.

List (lists)

A sequential container. Elements in list can only be visited sequentially-starting with a given element, to get an element, you must traverse the entire element between the two elements through the operation of the self-increment or decrement iterator. The list container supports high-speed insert (or delete) operations wherever the container is located. The insertion of the new element does not affect other elements in the list. The iterator remains in effect when the element is inserted, and only the iterator that points to the element is invalidated when the element is deleted.

Priority_queue (priority queue)

A sequential container adapter. In such a queue, the new element is not inserted at the end of the queue, but instead is inserted according to the specified priority level. By default, the priority of an element is determined by the less-than operator of the element type.

Queue (Queues)

A sequential container adapter. In such a queue, it is guaranteed that only new elements are inserted at the end of the team, and only the elements are deleted at the first team.

Sequential container (Sequential container)

Stores the type of a single type object in an ordered collection. The elements in the sequential container can be visited by subscript.

Stack (Stack)

A sequential container adapter that can only insert and delete elements at one end.

Vectors (vector)

A sequential container. The elements in the vector are interviewed by their location. You can add elements to the vector by calling the Push_back or insert function. Adding elements to the vector may cause the container to be allocated memory space again, or it may invalidate all iterators. adding (or deleting) elements in the middle of a vector container invalidates the iterator that points all the elements that follow the insertion (or deletion) point.

Associative array (associative array)

An array of elements indexed by a key rather than a position. Typically descriptive narratives are: such arrays map keys to their associated values.

Associative container (Associative container)

Stores the type of object collection, which supports efficient querying through keys.

Key_type

The type of the association container definition that represents the type of key that the container uses when storing or reading values. For a map container, Key_type is the type used to index the container. For set containers, Key_type and Value_type are the same.

Map

Defines the associated container type for an associative array. Like a vector container, map is also a class template. However, the map container defines two types: the key type and its associated value type. In a map, each key can only appear once and correlate a detailed value. Dereferencing an iterator to a map container will get a pair object that stores a const key and the value it is associated with.

Mapped_type

A type defined by a map or Multimap container that represents the type of value stored in the map container.

Multimap

An associative container similar to map. In a Multimap container, a key can appear multiple times.

Multiset

Only the associated container type that stores the key. In a multiset container, a key can appear multiple times.

Pair

A type that has two public data members named first and second respectively. The pair type is a template type with two type parameters, and its type is used as the type of the data member.

Set

Only the associated container that stores the key. In a set container, a key can only appear once.

Strict weak ordering (strict weak sort)

The comparison between the keys used by the associated container. In such a relationship, random two elements can be compared, and can determine who is smaller than the two. Assuming that two values are not smaller than the other, the two values are equal.

Value_type

The type of the element that is stored in the container. For set and Multiset containers, Value_type is the same as Key_type. For the map and Multimap containers, the type is pair type,

Its first member is the const key_type type, and the second member is the Mapped_type type.

* operator (dereference operator)

When used with a map, set, Multimap, or Multiset iterator, the dereference operator generates a value of type Value_type. Note that for the map and Multimap containers, Value_type is the pair type.

[] Operator (subscript operator)

Subscript operator. When you use the subscript operator on a map container, the index in [] must be a value of type key_type (or a type that can be converted to key_type), which generates a value of type Mapped_type.

Back_inserter

An iterator adapter that refers to a reference to a container that generates an insert iterator that uses push_back to add elements to the specified container.

Bidirectionaliterator (bidirectional iterator)

In addition to providing the same operations as forward iterators, the use-operator is also supported to traverse the sequence backwards.

Forward iterator (forward iterator)

An iterator that reads and writes elements, but does not support the--operator.

Front_inserter

An iterator adapter that generates an insert iterator that uses Push_front to add new elements at the beginning of the specified container.

Generic algorithms (Generic algorithm)

The type-independent algorithm.

Input iterator (enter iterator)

Only iterators that cannot write elements can be read.

Insert iterator (insertion iterator)

An iterator that uses a container operation to insert an element rather than overwrite an element. Assigning a value to an insert iterator is equivalent to inserting a new element with the assigned value into the sequence.

Inserter (Insertion device)

An iterator adapter that is shaped as an iterator and a reference to a container, generates an insert iterator that uses insert to add elements to the container, and inserts a new element in front of the element that the adapter's iterator shape refers to.

Istream_iterator

A stream iterator that reads the input stream.

Iterator categories (iterator type)

Based on the operations supported by Iterators, the iterators are conceptually categorized. Iterator types form a hierarchy, and the more powerful iterator types provide all the operations of a weaker iterator.

The algorithm uses an iterator kind to specify what operations it must support for its iterator implementation. This algorithm can be used only if the iterator provides at least this level of operation. For example, some algorithms simply require an input iterator,

This algorithm can be invoked using a random iterator other than the output iterator. The algorithm that requires the use of random-access iterators can only be used on iterators that support random interviewing operations.

Off-the-end iterator (beyond end iterators)

An iterator that marks the end position of an element range in a sequence. The end iterator is used as the "Sentinel" for the end traversal, pointing to the next position in the last element in the range.

An out-of-end iterator might point to an element that does not exist, so you can never do a dereference operation.

Ostream_iterator

Writes an iterator to the output stream.

Output iterator (export iterator)

Can only write iterators that cannot read elements. Writes an iterator to the output stream.

Output iterator (export iterator)

Can only write iterators that cannot read elements.

predicate (predicate)

A function whose return type can be converted to a bool value. Typically used by generic algorithms to examine elements. The predicate function used by the standard library is not a unary (requires an actual participation) that is two yuan (requires two actual participation).

Random-accessiterator (Random interview iterator)

In addition to the same operations that support bidirectional iterators, it provides the ability to use relational operations to compare iterator values, and the ability to do arithmetic operations on iterators. Therefore, this type of iterator supports random access elements.

Reverse iterator (reverse iterator)

Iterates backwards through the sequence of iterators. These iterators invert the meaning of + + and--.

Stream iterator (Stream iterator)

An iterator that can be bound together with a stream.

Abstract data type

Using encapsulation to hide the de facto data structure, consent to the use of types of program apes to think abstractly about what the type does, rather than how the type is represented in detail. Classes in C + + can be used to define abstract data types.

Access label (Interview label)

Public or private label, which specifies that subsequent members can be interviewed by the class's users or simply be interviewed by the class's friends and members. Each label sets the access protection for the member that is declared between the label and the next label. The label can appear multiple times in the class.

Class (classes)

is a mechanism for defining abstract data types in C + +, which can have data, functions, or type members. A class defines a new type and a new scope.

class declaration (Category declaration)

Class can be declared before it is defined. A class declaration is represented by a keywordclass (or struct) followed by a class name and a semicolon. A class that has been declared but not defined is an incomplete type.

class keyword (class keyword)

In classes defined in class keyword, the initial implicit access label is private.

Class scope (classes scope)

Each class defines a scope. Class scopes are much more complex than other scopes-the member functions defined within the definition of a class can use the name that follows the definition today.

Concrete Class (Detail Class)

Exposing the actual details of the class.

Const member function (constant member functions)

A member function that cannot change an object's normal (that is, neither static nor mutable) data members. The this pointer in the const member points to the Const object. The ability of a member function to be overloaded depends on whether the function is const.

Constructorinitializer List (constructor initialization lists)

Specifies the initial value of the data member of the class. Initializes the member with the value specified in the initialization list before the constructor embodies the run. Class members that are not initialized in the initialization list are implicitly initialized with their default constructors.

Conversionconstructor (conversion constructor)

A non-explicit constructor that can be called with a single actual participation. The conversion constructor is used implicitly to convert the type of an argument to a class type.

Data Abstraction (abstract)

Programming techniques that focus on type interfaces. The data abstraction agrees that the program ape ignores the details of how the type is represented, and only considers the operations that the type can run. Data abstraction is the foundation of object-oriented programming and generic programming.

Default constructor (constructor)

The constructor used when initializing is not specified.

Encapsulation (Package)

Implement separation from the interface. Closure hides the implementation details of the type. In C + +, implementing encapsulation prevents the private portion of the class from being visited by ordinary users.

Explicit constructor (explicit constructor)

A constructor that can be invoked with a single actual argument but cannot be used to run an implicit conversion. It is set to explicit by placing keywordexplicit before the declaration of the constructor.

Forward declaration (Forward statement)

A declaration of a name that is not yet defined. Most are used to refer to class declarations that precede today's class definitions. See not all types.

Friend (Friend)

Class authorizes access to the mechanism of its non-public members. Classes and functions can be specified as friends. Friends have the same access as members.

Incomplete type (not fully typed)

A type that has been declared but not defined. You cannot define a variable or class member by using an incomplete type. It is legal to define a reference or pointer to an incomplete type.

member function (member functions)

A function member of the class. The normal member function is bound to an object of class type by an implicit this pointer. The static member function is not bound to the object and does not have the this pointer. member functions can be

Overload, only the version number of the function can vary by the number or type of the form.

mutable data member (variable member)

A data member that can never be a const object, even if it is a member of a const object, it cannot be a const object. Mutable members can be changed in the const function.

Name lookup (name lookup)

A process that matches the use of a name with its corresponding declaration.

Private members (privately owned)

Members defined after the private access label are only able to be interviewed by friends and other members of the class. The data members and useful functions used by a class are usually declared private when they are not part of a type interface.

Public members (common member)

Members defined after public access to the label can be interviewed by the class's discretionary users. Generally, only functions that define class interfaces should be defined in the public section.

Static member (statically member)

Data or function members that are not part of a random object, but are shared by the entire object of a given class.

struct keyword (struct keyword)

In a class defined by struct keyword, the initial implicit access label is public.

Synthesized default constructor (constructor for composition)

The compiler creates (synthesizes) a constructor for a class that is undefined, regardless of the constructor. This constructor initializes a member of the class type by executing the class's default constructor, and the members of the built-in type are not initialized.

Computer terminology that appears in C + + 4

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.