Clean up FileNameOptionStorage implementation
authorTeemu Murtola <teemu.murtola@gmail.com>
Sat, 10 May 2014 13:22:15 +0000 (16:22 +0300)
committerTeemu Murtola <teemu.murtola@gmail.com>
Sat, 7 Jun 2014 14:40:33 +0000 (16:40 +0200)
commit8d761bdfb07cb637aeea92775beb6905f4991987
treedeff681c9a659e8e5170008213cb4a518a95384e
parent1d6ad5df361f93ed933e33134b2dba9297c56e5c
Clean up FileNameOptionStorage implementation

Get rid of a separate registry, and instead use a static array that
maps OptionFileType to filenm.h types.  FileTypeHandler can now be
created directly with relatively small cost (no memory allocation),
and provide wrappers for the functionality in filenm.h.

Also, use an enum value from filenm.h as the internal type of
FileNameOptionStorage, as the option is not going to get decoupled from
those defines any time soon.  Rename some related variables for clarity.

Change-Id: I8f090c3098adb1f3d48788021f3715bb51a6b80a
src/gromacs/options/filenameoption.cpp
src/gromacs/options/filenameoption.h
src/gromacs/options/filenameoptionstorage.h