-/* these MUST correspond to the enum in hackblock.h */
-const char* btsNames[ebtsNR] = { "bonds", "angles", "dihedrals", "impropers", "exclusions", "cmap" };
-const int btsNiatoms[ebtsNR] = { 2, 3, 4, 4, 2, 5 };
+const char* enumValueToString(BondedTypes enumValue)
+{
+ /* these MUST correspond to the enum in hackblock.h */
+ constexpr gmx::EnumerationArray<BondedTypes, const char*> bondedTypeNames = {
+ "bonds", "angles", "dihedrals", "impropers", "exclusions", "cmap"
+ };
+ return bondedTypeNames[enumValue];
+}
+
+int enumValueToNumIAtoms(BondedTypes enumValue)
+{
+ constexpr gmx::EnumerationArray<BondedTypes, int> bondedTypeIAtoms = { 2, 3, 4, 4, 2, 5 };
+ return bondedTypeIAtoms[enumValue];
+}