A class of force-free magnetic fields for modeling pre-flare coronal magnetic configurations