C++

Stroustrup's favourite computer programming language.

Total decoupling

Well, not expected that it really works out, I was very impressed: 1500 lines of code of the state machine engine made it possible to replace all (around 20) hand crafted switch/case based state machines in one of the asynchronous frameworks I am working at. The state machines are specified by a syntax directly reflecting the UML state chart terminology, making the state machines much more transparent and extensible.

Yet, the state machine module is not finalized: missing are history feature and a proper documentation. If you know UML state charts and would like to try it out, please drop me a note.

But that’s not actually what I wanted to write about today. As the title implies, this post is more about object orientation and object models.

State machines

It was about time: David Harel and the Rational/IBM/UML gang fully specified state machines syntax and semantics and its graphical representation. Combined with a network transparent asynchronous messaging system based on Robin Milner’s Pi Calculus, the justification to model state machines to be used in C++ component development is reborn.

As Alan Cox pointed out
“A computer is a state machine. Threads are for people who can’t program state machines.”
creating a statemachine is not always that easy. But with a little help, we – the small group of 3 million C++ hackers – might get it right for the first time modeling a state machine by breaking it down into states, events and transitions instead of creating chaotic switch case monsters.

Elists, new homepage colors and Libsmart conventions

So, for the last few days I was not continuing working at the Paramatrix project and focused on some things to be finished going back to as early as in November 2004.

First of all, I found a solution to create Docbook documentation WYSIWYG. After evaluating several software packages I found that XMLMind is the editor of choice.

Secondly, there was a new cyclic list container I have created and used in the last few months with very much success, so I finished the paper and made a contribution to the Libsmart Project. The actual announcement is at this page. You can download the header file for free, it has a BSD style license. There is even a forum set up to collect your experience and questions.

Associating instances

So, to implement the Focusmanager I found out, that there is another small technology needed. Basically, I need some kind of an association system to link arbitrary typed instances to the scenegraph nodes. While rendering the scenegraph, this could have multiple uses:

  • OpenGL or other scenegraph renderer need some kind of optimisation attachments, based on the scenegraph node-level. I don’t like the idea of creating inheritance hierarchies for the scene nodes to specialise them. I want them to be allocated and attached separately, and I want to attach instances based on classes not derived from the same baseclass.
  • Additionally, the Focusmanager may attach information on a per node granularity, for example to store the relevant information to interpolate quaternions.
Syndicate content