Patterns in C: abstract-factory