Terminology

Terminology#

C linkage#
C++ linkage#
language linkage#

The language linkage is a property of entities that have external linkage in a C++ program. A function/variable that is intended to be usable from C must have C linkage specified when it is defined in C++.

elaborated name#
elaborated type specifier#

In C++, an elaborated type name/specifier is a type specifier that disambiguates with a preceding class/struct/union/enum tag keyword.

In C, “elaborated type specifiers” are the “default” syntax for struct/union/enum types. This can be changed by using an unqualified name for the equivalent type that was declared using a typedef. Unless such a typedef exists, the tag-qualified name must be used.

emitter#

An emitter is the core of the amongoc async model. It is an object that defines a prepared asynchronous operation (i.e. “what to do”), but does not yet have a continuation. It must be connected to a handler and this will produce the operation state object.

The amongoc emitter is defined by the amongoc_emitter type.

See: Emitters

external linkage#

In C and C++ programs, if an entity (function, variable, or type) has external linkage, this means that all references to that entity have the same identity between all translation units.

function-like macro#

A function-like macro is a preprocessor macro that requires parentheses in order to expand:

#define ONE_MORE(N) (N + 1)  // "ONE_MORE" is a function macro

This contrasts with object-like macros.

handler#

A handler is an object that defines the continuation of an asynchronous operation (i.e. “what to do next”). A handler also tells an operation how to handle cancellation.

Generally, an amongoc user won’t be working with handlers directly, as they are used as the building blocks for more complete asynchronous algorithms.

The amongoc handler is defined by the amongoc_handler type.

See: Handlers

lvalue#
lvalue expression#

An lvalue expression is an expression which carries the identity of some object. In particular, the name of a variable, dereferencing of a pointer, a subscript into an array, and accessing the member of an class/struct/union are all lvalue expressions.

As a rule of thumb: If you can take the address of the expression with the & operator, it is an lvalue expression.

A modifiable lvalue is an lvalue that can be used on the left-hand of an assignment operator. e.g. dereferencing a pointer-to-const is an lvalue, but it is not valid to assign to such an expression.

object-like macro#

An object macro is a preprocessor macro that does not require parentheses in order to expand:

#define FOO 42  // "FOO" is an object-macro

This contrasts with function-like macros.

operation state#

The operation state is an object created by connecting an emitter to a handler. It must be explicitly started to launch the operation.

This is defined by the amongoc_operation type. Typically, you will only have a few of these in an application, possibly only one for the entire program.

translation unit#

In C and C++, a translation unit consists of the total textual input given to a compiler when a source file is compiled. This includes the main source file, as well as all headers that are included by that file.