Archiv der Kategorie: C++

Object Instance Creation

Whenever you write an application in C++ you will create a lot of object instances. So, this is a base development task. C++ offers several ways to initialize variables. These are not just syntactical variations for the same task. The … Weiterlesen

Veröffentlicht unter C++ | Kommentar hinterlassen

ctor types in C++

In C++ you will find several ways to initialize an object instance. For example, think about a class “MyClass” which can be constructed with a parameter. The object initialization can be done in several ways: MyClass x{y}; MyClass x(y); MyClass … Weiterlesen

Veröffentlicht unter C++ | Kommentar hinterlassen

Software Transactional Memory

One of the main challenges in multithreading applications is the access to shared memory. In case you have several software-components which want to read and write to shared memory you must synchronize these data access. The concept of Software Transactional … Weiterlesen

Veröffentlicht unter C++ | Kommentar hinterlassen

std::atomic

Within multithreading applications even trivial functions like reading and writing values may create issues. The std::atomic template can be used in such situations. Within this article I want to give a short introduction into this topic.   Atomic operations Let’s … Weiterlesen

Veröffentlicht unter C++ | Kommentar hinterlassen

The Visitor Pattern – part 9: summary

This article is one part of a series about the Visitor pattern. Please read the previous articles to get an overview about the pattern and to get the needed basics to understand this article. As this article is the last … Weiterlesen

Veröffentlicht unter C++ | Kommentar hinterlassen

The Visitor Pattern – part 8: over engineering

This article is one part of a series about the Visitor pattern. Please read the previous articles to get an overview about the pattern and to get the needed basics to understand this article.   Motivation Normally, I would like … Weiterlesen

Veröffentlicht unter C++ | Kommentar hinterlassen

The Visitor Pattern – part 7: reusable enumerator and query visitors

This article is one part of a series about the Visitor pattern. Please read the previous articles to get an overview about the pattern and to get the needed basics to understand this article. The example implementation of this article … Weiterlesen

Veröffentlicht unter C++ | Kommentar hinterlassen