/ externals / catch / src / catch2 / internal / catch_enum_values_registry.hpp
catch_enum_values_registry.hpp
 1  
 2  //              Copyright Catch2 Authors
 3  // Distributed under the Boost Software License, Version 1.0.
 4  //   (See accompanying file LICENSE.txt or copy at
 5  //        https://www.boost.org/LICENSE_1_0.txt)
 6  
 7  // SPDX-License-Identifier: BSL-1.0
 8  #ifndef CATCH_ENUM_VALUES_REGISTRY_HPP_INCLUDED
 9  #define CATCH_ENUM_VALUES_REGISTRY_HPP_INCLUDED
10  
11  #include <catch2/interfaces/catch_interfaces_enum_values_registry.hpp>
12  #include <catch2/internal/catch_unique_ptr.hpp>
13  #include <catch2/internal/catch_stringref.hpp>
14  
15  #include <vector>
16  
17  namespace Catch {
18  
19      namespace Detail {
20  
21          Catch::Detail::unique_ptr<EnumInfo> makeEnumInfo( StringRef enumName, StringRef allValueNames, std::vector<int> const& values );
22  
23          class EnumValuesRegistry : public IMutableEnumValuesRegistry {
24  
25              std::vector<Catch::Detail::unique_ptr<EnumInfo>> m_enumInfos;
26  
27              EnumInfo const& registerEnum( StringRef enumName, StringRef allEnums, std::vector<int> const& values) override;
28          };
29  
30          std::vector<StringRef> parseEnums( StringRef enums );
31  
32      } // Detail
33  
34  } // Catch
35  
36  #endif // CATCH_ENUM_VALUES_REGISTRY_HPP_INCLUDED