https://github.com/lballabio/QuantLib
Also, there is a book which describes the different patterns used:
https://leanpub.com/implementingquantlib