D-branes and topological field theories