Author Archive for thetoeb

E2E Tests for OWIN based Web Application

Motivation End to End tests have alluded me for a while in .Net/OWIN/WepApi/Angular/etc. Now I have finally found my solution and I thought I would share it with you. Btw please let me know if this is usefull or if you have suggestions to improve it. Abstract I provide you wiuth a GitHub repository containing…

Renameable Namespaces using the Preprocessor

Motivation If you are starting to work on a library and do not know exactly how your namespaces are going end up these macro helper are for you. I have written helpers that simplify using namespaces and lets you build up your namespaces with preprocessor defines. This allows you to quickly rename your namespaces which…

An Alternative typedef Syntax using the C++ Preprocessor

Disclaimer: This post will be more interesting to you if you work with the preprocessor. Here you can find a preprocessor only solution for changing the typedef syntax from typedef int number_type; to int typedef_as number_type; – an alternative typedef Syntax. If your wondering where this might be useful let me tell you why I…

An Implementation of the Dynamic Object in C++

You can find my implementation at https://github.com/toeb/cppdynamic it is licensed under the MIT license. I’d be happy for feedback and or optimizations 🙂 Dynamic object are useful, especially in rapid prototyping, non-performance critical situations, and situations in which data/functions -bags are needed (non schema specific data). Also when serializing and deserializing dynamic objects can be…

Useful extensions for CMake

When using cmake for more than just simple projects it is lacking in various aspects. Some list and string functions are missing. Interaction with command line applications and the file system are harder than they need to be. Especially however using structured data (maps and objects) and more complex funtional programming is not easy at…

dynamically calling “any” thing in C++

Extending upon boost’s any class which stores a type and a void ptr to any type of value, I created a callable version were you can assign any function, lambda, memberfunction etc. to the any and call it dynamically. This is a basic and important step for runtime reflection which I’m currently working on. Tell…

is_callable type trait

I’ve developed a type_trait for checking if a type is callable, ie has defined a single operator(). Also on ideone Tell me if you like it or if you know of a better version 😀 /// function traits for member functions // gives you the class_type, return_type and arguments tuple for any member function (const…

Reading and Writing JSON with CMake

While working on a package manager for CMake I came across the problem of finding a suitable format for my package descriptor files. First I thought about and tried using plain old CMake file that simply sets variables and can be included to access its contents. It was very quick and easy to implement. Hierarchical…

Object Oriented CMake: Next Iteration

I worked on my object oriented extensions for CMake  and am on a much higher level of usability than before! try it at https://github.com/toeb/oo-cmake  and as always: Feedback is most welcome See the following object tutorial for ease of use: (for the current version look at the readme.md on github) ### using objects ### =============…

Objects and Maps in CMake

Get it at https://github.com/toeb/oo-cmake and tell me if you like it For more complex build system features oo programming would be a major boon. So I took it upon myself to create a usable and tested oo-extension for cmake (in pure CMake) so I could continue developing and extending my plattform independent tooling support (cutil) . It’s…