std::string EnumContainer<EnumType>::GetKey(const Argument &value) const { typedef typename std::underlying_type< EnumType >::type UnderlyingType; auto type = value.GetType( ); // invalid type if (type != typeof( EnumType ) && type != typeof( UnderlyingType )) { return std::string( ); } auto &converted = value.GetValue<EnumType>( ); for (auto &entry : m_keyToValue) { if (entry.second == converted) return entry.first; } return std::string( ); }
GeneratorArgument::GeneratorArgument(Generator &generator, const Argument &arg) : argumentM(arg) { pTypeM = generator.GetGeneratorType(&arg.GetType()); }