[C++] A Boost Asio Server-Client Example
A simple server-client example in C++ with Boost Asio. Here I create a server which can accept multiple clients. For the demonstration purpose we send a simple string to the server which is then printed to stdout. This is a really simple example but it helps especially when you start with Boost Asio and networking.
[C++] Static, Dynamic Polymorphism, CRTP and C++20’s Concepts
C++20 offers really nice features and a very great one is concepts. In this article I compare existing techniques to implement interfaces (dynamic polymorphism, CRTP) to a new approach by using concepts. With concepts we have a lot of advantages and it affects the current way we write code. It’s clearer and it’s better to understand.
[TypeScript] VS Code API: Let’s Create A Tree-View (Part 3)
In the third part I finalized the cucumber TreeView example in my VS Code extension with TypeScript. We can now run our tests either from a button in our TreeView or from the context menu by clicking on the items. After we executed the tests, the result is set in the TreeView to the items with an icon. I implemented this for the C++ cucumber framework.
[TypeScript] VS Code API: Let’s Create A Tree-View (Part 2)
In my first article we started to create a TreeView in TypeScript for *.feature files from cucumber. Now we continue and add some functionality. We implement a on item clicked method which is executed after clicking on it and add a context menu for the right click on an item in the tree view.
[TypeScript] VS-Code API: Let’s Create A Tree-View (Part 1)
VS Code is my personal favorite editor. In this article we start to create a tree view with TypeScript and the vscode api. We’ll parse some test files (*.feature) from cucumber tests and display their scenario and feature files in vscode. It doesn’t matter if you’re familiar with cucumber, this article focuses on the tree view and the vscode api itself (we just parse the files).
[C++] Building And Publishing Conan Packages
Conan is a nice tool to manage packages and dependencies in C++ projects. I already wrote two articles about getting started and how to use Conan with google protobuffer. In this article I create an own library and publish it pre-build on the Artifactory. Now we can access own dependencies from our own Artifactory.
[C++] Start Using Cucumber
The Cucumber Framewrok enables behavior driven development in your projects. Add tests in a given-when-then style which are readable for basically everyone. In this post we setup cucumber for C++ on a ubuntu machine with it’s dependencies. We’ll use googletest as testframework underneath
[C++] A C++17 Statemachine using std::tuple and std::variant
One of my favorite design patterns is the state machine pattern. I used to do this pattern with an abstract where then all concrete states inherit from. During runtime I was able to assign new states to a state machine, let’s do this in another way to get rid of dynamic allocation with C++17
[C++] Tuples From Scratch
What are exactly tuples? In this article I create a tuples class to demonstrate the basic idea of tuples. Aside from the class we create access functions to get certain values and allow modification with pop_front, push_front and push_back.
[C++] Getting Started With Typelists
In this first article about C++ metaprogramming I started to introduce typelists. Providing first functions, like accessing front, push front and push back types to a list will help me in future projects and to understand C++ metaprogramming better.
[C++] Tag Dispatching To Overload Functions
Sometimes we want to have different behaviour in templated functions according to a given type. Since we can’t overload templated functions with same arguments in C++, we can use tag dispatching. With tag dispatching we can call certain implementations depending on a given type.
[C++] Function Overloading By Returntype
In C++ functions can’t be overloaded by the return type. But there is a workaround to get overloaded functions by their return type. In this article I demonstrate this.
[2D Game Engine] Starting A New Project - The Project Setup
The beginning of my 2d game engine. This first article is about the project in general, upcoming articles and the project setup. After installing external dependencies you can build and run this very first example.
[C/C++] A Lua C API Cheat Sheet
A cheat sheet for the Lua C API with 11 examples to pass variables, functions, tables, arrays, etc. from Lua to C and vice versa. This is a tutorial about the C API and explains how to work with the Lua stack. This is a guide to understand Lua in C and prepares to start writing on Lua bindings.
[C++] An Eventsystem Without std::bind / std::function
An eventsystem written in C++ without using std::bind and std::function. Define specific events and dispatch them to desired functions. A nice way to handle events and pass them to different locations in your code.
[C++] Typed Tests For Interfaces With Googletest
Typed tests with googletest are useful when we want to test interfaces. Typed testing avoids writing redundand tests for each implementation and guarantee that the all derived classes will run the same tests.
Use Frameworks But Don’t Marry Them
Using a frameworks has many benefits and takes a lot of work from you, but don’t marry the framework and avoid a hard dependency.
[C++] Protobuf: Project Setup With Conan and CMake
Creating a clean project to use protobuf with Conan and CMake