NMBU REALTEK, INF205, 2022 høst: Glossary

Allocation

(under construction)

See also: Deallocation, pointer, rule of five.

Boolean variable

Definition: A Boolean variable is a variable that can hold the values true and false.

Compilation

Definition: Compilation (or compiling) is the process of transforming a human-readable source code into a lower-level machine code. It is done by a compiler.

See also: Linking.

Concurrency

Definition: Two operations are concurrent if they can be parallelized.

See also: Discrete event system, strong scaling.

Container

Definition (Stroustrup, 2018, p. 137): "A class with the main purpose of holding objects is commonly called a container."

See also: Graph, queue.

Deallocation

(under construction)

See also: Allocation, pointer.

Dereferencing

Definition: Referencing is the act of accessing the data stored at a given memory address. In C++ this is done using the * operator: *y is the data item stored at the address y.

See also: Pointer, reference, referencing.

Discrete event system

See also: Concurrency

Function

Definition: A function is a block of code that can be called with parameters.

See also: Pass by reference, pass by value, procedural programming, return value, void.

Global variable

Definition: A global variable is a variable that can be accessed through a name with an unrestricted scope. It has a name that resolves everywhere in the code.

See also: Namespace, procedural programming, scope.

Graph

Definition: A graph is a container data structure consisting of nodes (also called vertices) and edges; an edge is a connection between two nodes.

See also: Container.

Heap

(under construction)

Linking

(under construction)

See also: Compilation.

Method

Definition: A method is a function that is declared as part of a class definition. Each method call it carried out for an individual object that instantiates this class.

Namespace

Definition: A namespace is a subset of all the names that can be accessed globally, i.e., from anywhere in the source code.

See also: Global variable, scope.

Pass by reference

(under construction)

See also: Function, pass by value, pointer, reference.

Pass by value

Summary: When an argument is passed by value to a function, a copy of the argument values is created in memory (on the stack, in the stack frame of the called function). The function works with its own copy; it cannot access the original variable.

See also: Function, pass by reference.

Queue

A queue is a sequential (list-like) dynamic data structure that functions by the principle first in, first out (FIFO). It has a method for appending an element, usually called push and done on one end of the queue (e.g., push_back), and a method for detaching an element, usually called pop and done at the other end of the queue (e.g., pop_front).

See also: Container.

Pointer

Definition: A pointer is a variable that has a memory address as its value.

See also: Allocation, dereferencing, pass by reference, reference, referencing, void.

Procedural programming

Definition: Procedural programming is the programming paradigm where procedures (called functions in C/C++) are employed as the highest-level device for structuring code and the program control flow.

See also: Function, global variable, return value.

Reference

Definition: A reference is an alias for the data item stored at a given memory address; the address remains hidden from the programmer, who can use the reference as if it was the data item itself.

See also: Dereferencing, pass by reference, pointer.

Referencing

Definition: Referencing is the act of obtaining the address of a variable. In C++ this is done using the & operator: &x is the address of x.

See also: Dereferencing, pointer.

Return value

Definition: Value returned by a called function to the function from which it was called; in C/C++ and most other languages that support procedural programming, this is done through a return statement. The function call in the calling function then resolves (i.e., evaluates) to the return value.

See also: Function, procedural programming, void.

Rule of five

Explanation: The rule of five applies to self-designed containers that rely at least partly on manual memory management for the data of which they have ownership. It states that for such classes, the programmer should implement each of the following, or else they will be restricted in their functionality:

See also: Allocation, deallocation.

Scope

Definition: The scope of a name (e.g., for the name of a variable or function) is the region within the source code to which the declaration of that name applies.

See also: Global variable, namespace.

Strong scaling

See also: Concurrency

void

Summary (not a definition): "void" is a keyword from the C/C++ programming language; it is not a data type, but can be used where C/C++ syntax would otherwise require a data type, e.g., in the position of the return type for a function that does not have a return value.

See also: Function, pointer, return value.

Index