QT Based Class Factory Implementation