Data structure for driver code generation

At the moment we use a series of functions to generate driver code. For a typical driver object you need

typedef_foo(...)
type_foo(...)
declare_foo(...)
define_foo(...)
name_foo(...)

Currently those functions exist for all driver objects and everything needs to be reproduced every time.

There are two ways of improving this situation:

  1. Create a class for every driver object, that collects all the functions for this object. This way they are at least collected in one place.

  2. Design a data structure that also takes care of creating the boilerplate parts, eg the type_ functions that are almost identical for all obejcts. The dream scenario would be to only provide the things that are essential:

  • How to create the name of the object
  • How to create the name of the type
  • What arguments need to be created and passed for define... and typedef_...

For now this issue just exists to discuss:

  1. What kind of changes would we like for the driver generation code?
  2. Is it worth doing it?

Note: This discussion came up in !422 (merged).