MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/SPlisHSPlasH / IMutableEnumValuesRegistry

Class IMutableEnumValuesRegistry

extern/Catch2/catch.hpp:1476–1490  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1474 } // namespace Detail
1475
1476 struct IMutableEnumValuesRegistry {
1477 virtual ~IMutableEnumValuesRegistry();
1478
1479 virtual Detail::EnumInfo const& registerEnum( StringRef enumName, StringRef allEnums, std::vector<int> const& values ) = 0;
1480
1481 template<typename E>
1482 Detail::EnumInfo const& registerEnum( StringRef enumName, StringRef allEnums, std::initializer_list<E> values ) {
1483 static_assert(sizeof(int) >= sizeof(E), "Cannot serialize enum to int");
1484 std::vector<int> intValues;
1485 intValues.reserve( values.size() );
1486 for( auto enumValue : values )
1487 intValues.push_back( static_cast<int>( enumValue ) );
1488 return registerEnum( enumName, allEnums, intValues );
1489 }
1490 };
1491
1492} // Catch
1493

Callers

nothing calls this directly

Calls 3

reserveMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected