catch_enum_values_registry.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * Created by Phil on 4/4/2019.
  3. * Copyright 2019 Two Blue Cubes Ltd. All rights reserved.
  4. *
  5. * Distributed under the Boost Software License, Version 1.0. (See accompanying
  6. * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  7. */
  8. #ifndef TWOBLUECUBES_CATCH_ENUMVALUESREGISTRY_H_INCLUDED
  9. #define TWOBLUECUBES_CATCH_ENUMVALUESREGISTRY_H_INCLUDED
  10. #include "catch_interfaces_enum_values_registry.h"
  11. #include <vector>
  12. #include <memory>
  13. namespace Catch {
  14. namespace Detail {
  15. std::unique_ptr<EnumInfo> makeEnumInfo( StringRef enumName, StringRef allValueNames, std::vector<int> const& values );
  16. class EnumValuesRegistry : public IMutableEnumValuesRegistry {
  17. std::vector<std::unique_ptr<EnumInfo>> m_enumInfos;
  18. EnumInfo const& registerEnum( StringRef enumName, StringRef allEnums, std::vector<int> const& values) override;
  19. };
  20. std::vector<StringRef> parseEnums( StringRef enums );
  21. } // Detail
  22. } // Catch
  23. #endif //TWOBLUECUBES_CATCH_ENUMVALUESREGISTRY_H_INCLUDED