Generating Functions And Attractor Flow For N = 2 Bps Structures