MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / TypeNameBinding

Class TypeNameBinding

src/openms/source/FORMAT/FileTypes.cpp:22–34  ·  view source on GitHub ↗

connect the type to some other information We could also use paired arrays, but this way, its less likely to have mismatches if a new type is added

Source from the content-addressed store, hash-verified

20 /// connect the type to some other information
21 /// We could also use paired arrays, but this way, its less likely to have mismatches if a new type is added
22 struct TypeNameBinding
23 {
24 FileTypes::Type type;
25 String name;
26 String description;
27 TypeNameBinding(FileTypes::Type ptype, String pname, String pdescription)
28 : type(ptype), name(std::move(pname)), description(std::move(pdescription))
29 {
30 // Check that there are no double-spaces in the description, since Qt will replace " " with " " in filters supplied to QFileDialog::getSaveFileName.
31 // And if you later ask for the selected filter, you will get a different string back.
32 assert(description.find(" ") == std::string::npos);
33 }
34 };
35
36 /// Maps the FileType::Type to the preferred extension.
37 static const std::array<TypeNameBinding, FileTypes::SIZE_OF_TYPE> type_with_annotation__ =

Callers 1

FileTypes.cppFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected