intermediate

Messaging and signaling in C++

The 7th part of my series on writing applications in C++ using Qt and boost:

Messaging and Signaling in C++

by Jens Weller

From the article:

This time it is about how to notify one part of our application that something has happened somewhere else. I will start with Qt, as it brings with signals and slots a mechanism to do exactly that. But, as I have the goal not to use Qt mainly in the UI Layer, I will also look on how to notify other parts of the application, when things are changing.

Object Oriented Programming without Inheritance - ECOOP 2015--Bjarne Stroustrup

Here is the last talk from Bjarne Stroustrup:

Object Oriented Programming without Inheritance

by Bjarne Stroustrup

Abstract:

Object-oriented programming is often characterized as encapsulation plus polymorphism plus inheritance. The original Simula67 demonstrated that we could do without encapsulation and Kristen Nygaard insisted that some OOP could be done without inheritance. I present generic programming as providing encapsulation plus polymorphism. In C++, this view is directly supported by language facilities, such as classes, templates and (only recently) concepts. I show a range of type-and-resource-safe techniques covering a wide range of applications including containers, algebraic concepts, and numerical and non-numerical algorithms.

Foreign Constructors--Gerard Meier

A nice technique to initialize complex objects simply with one constructor:

Foreign Constructors

by Gerard Meier

From the article:

Recently I found myself extending a game engine with font rendering support. Fonts have a lot of properties, so naturally I created a tidy structure to hold all parameters. Whenever drawing a piece of text: I'd simply pass this structure along.

A philosophy I follow, is one of programmer convenience. For example: I always specify default values; when you instantiate a class without any parameters, it is directly usable. Following from that, whenever you call an method or constructor - you should not have to specify not used parameters. This adds a practical issue: it requires all kinds of constructors...

 

QWidgets and data

The sixt part of my series takes a look at QWidgets and how to exchange data:

QWidgets and data

by Jens Weller

From the article:

The sixt part of my series about writing applications in C++ using Qt and boost is about my thoughts on widgets and how to interact with data from them.