There is a well known design pattern in the Object Oriented world: The Visitor pattern. This pattern, among other things, allows to extend an object without actually modifying it. It is fairly easy to implement in any good OO language such as C++, Java
Lire la suite...