Next: , Up: TC-3   [Contents][Index]

4.5.1 TC-3 Goals

Things to learn during this stage that you should remember:

The Command design pattern

The Task module is based on the Command design pattern.

Writing a Container Class Template

Class template are most useful to implement containers such as misc::scoped_map.

Using methods from parents classes

super_type and qualified method invocation to factor common code.


Traits are a useful technique that allows to write (compile time) functions ranging over types. See Glossary. The implementation of both hierarchies of visitors (const or not) relies on traits. You are expected to understand the code.

Streams’ internal extensible arrays

C++ streams allows users to dynamically store information within themselves thanks to std::ios::xalloc, std::stream::iword, and std::stream::pword (see ios_base documentation by Cplusplus Ressources). Indented output can use it directly in operator<<, see lib/misc/indent.* and lib/misc/ More generally, if you have to resort to using print because you need additional arguments than the sole stream, consider using this feature instead.

Use this feature so that the PrettyPrinter can be told from the std::ostream whether escapes and bindings should be displayed.