Here is a prototype of flexible object construction in C++