Monatsarchiv: März 2018

Public vs. protected vs. private inheritance

In C++ you have three kind of inheritance: public, protected and private. From a technical point of view, they differ in the visibility of methods of the derived class and therefore they influence the interface of the derived class. So, … Weiterlesen

Veröffentlicht unter C++ | Kommentar hinterlassen

Private inheritance creates a “is implemented in terms of” relationship

In C++ we have three kind of inheritance: public, protected and private. Within a previous article I have shown the concepts of public inheritance. By using public inheritance, you can implement your software according to the object-oriented paradigm and create … Weiterlesen

Veröffentlicht unter C++ | 1 Kommentar

Public inheritance always creates an “is-a” relationship

The object-oriented paradigm defines inheritance as a relationship between two classes, were the derived class is a kind of the base class. This logical concept is independent of the programming language. Therefore, object-oriented languages will offer different implementations of this … Weiterlesen

Veröffentlicht unter C++ | 3 Kommentare

logger class in C++

Within this article I want to show some base implementation techniques and demonstrate them in the context of a logging class. The logging class should able to write logging information into a file. The file access should be thread safe. … Weiterlesen

Veröffentlicht unter C++ | Kommentar hinterlassen