You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

tag.hpp 696B

123456789101112131415161718192021222324252627282930313233
  1. #pragma once
  2. #include <vector>
  3. #include <common.hpp>
  4. namespace rack {
  5. /** Tags describing the function(s) of modules */
  6. namespace tag {
  7. /** List of tags and their aliases.
  8. The first alias of each tag `tag[tagId][0]` is the "canonical" alias.
  9. It is guaranteed to exist and should be used as the human-readable form.
  10. This list is manually alphabetized by the canonical alias.
  11. */
  12. extern const std::vector<std::vector<std::string>> tagAliases;
  13. /** Searches for a tag ID.
  14. Searches tag aliases.
  15. Case-insensitive.
  16. Returns -1 if not found.
  17. */
  18. int findId(const std::string& tag);
  19. /** Returns the main tag name by tag ID. */
  20. std::string getTag(int tagId);
  21. } // namespace tag
  22. } // namespace rack