cmCTestResourceGroupsLexerHelper.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #ifndef cmCTestResourceGroupsLexerHelper_h
  4. #define cmCTestResourceGroupsLexerHelper_h
  5. #include <string>
  6. #include <vector>
  7. #include "cmCTestTestHandler.h"
  8. class cmCTestResourceGroupsLexerHelper
  9. {
  10. public:
  11. struct ParserType
  12. {
  13. };
  14. cmCTestResourceGroupsLexerHelper(
  15. std::vector<
  16. std::vector<cmCTestTestHandler::cmCTestTestResourceRequirement>>&
  17. output);
  18. ~cmCTestResourceGroupsLexerHelper() = default;
  19. bool ParseString(const std::string& value);
  20. void SetProcessCount(unsigned int count);
  21. void SetResourceType(const std::string& type);
  22. void SetNeededSlots(int count);
  23. void WriteRequirement();
  24. void WriteProcess();
  25. private:
  26. std::vector<std::vector<cmCTestTestHandler::cmCTestTestResourceRequirement>>&
  27. Output;
  28. unsigned int ProcessCount = 1;
  29. std::string ResourceType;
  30. int NeededSlots;
  31. std::vector<cmCTestTestHandler::cmCTestTestResourceRequirement> Process;
  32. };
  33. #define YY_EXTRA_TYPE cmCTestResourceGroupsLexerHelper*
  34. #endif