This commit is contained in:
Kenny Kerr 2021-03-26 13:59:04 -07:00 коммит произвёл GitHub
Родитель 1935608ceb
Коммит 122b732393
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
5 изменённых файлов: 27 добавлений и 20 удалений

Просмотреть файл

@ -2111,7 +2111,7 @@ struct __declspec(empty_bases) produce_dispatch_to_overridable<T, D, %>
D& shim() noexcept { return *static_cast<D*>(this); }
D const& shim() const noexcept { return *static_cast<const D*>(this); }
public:
using % = winrt::%;
using % = %;
% };
)";
@ -3207,7 +3207,7 @@ struct __declspec(empty_bases) produce_dispatch_to_overridable<T, D, %>
{
auto generics = type.GenericParam();
w.write(" template<%> struct hash<winrt::%> : winrt::impl::hash_base {};\n",
w.write(" template<%> struct hash<%> : winrt::impl::hash_base {};\n",
bind<write_generic_typenames>(generics),
type);
}

Просмотреть файл

@ -273,7 +273,7 @@ namespace cppwinrt
if (!empty(generics))
{
write("@::%<%>", ns, remove_tick(name), bind_list(", ", generics));
write("winrt::@::%<%>", ns, remove_tick(name), bind_list(", ", generics));
return;
}
@ -301,7 +301,7 @@ namespace cppwinrt
else if (name == "Vector3") { name = "float3"; }
else if (name == "Vector4") { name = "float4"; }
write("@::%", ns, name);
write("winrt::@::%", ns, name);
}
else if (category == category::struct_type)
{
@ -311,7 +311,7 @@ namespace cppwinrt
}
else if ((name == "Point" || name == "Size" || name == "Rect") && ns == "Windows.Foundation")
{
write("@::%", ns, name);
write("winrt::@::%", ns, name);
}
else if (delegate_types)
{
@ -343,11 +343,11 @@ namespace cppwinrt
else if (name == "Vector3") { name = "float3"; }
else if (name == "Vector4") { name = "float4"; }
write("@::%", ns, name);
write("winrt::@::%", ns, name);
}
else
{
write("@::%", ns, name);
write("winrt::@::%", ns, name);
}
}
}
@ -400,14 +400,14 @@ namespace cppwinrt
if (consume_types)
{
static constexpr std::string_view iterable("Windows::Foundation::Collections::IIterable<"sv);
static constexpr std::string_view vector_view("Windows::Foundation::Collections::IVectorView<"sv);
static constexpr std::string_view map_view("Windows::Foundation::Collections::IMapView<"sv);
static constexpr std::string_view vector("Windows::Foundation::Collections::IVector<"sv);
static constexpr std::string_view map("Windows::Foundation::Collections::IMap<"sv);
static constexpr std::string_view iterable("winrt::Windows::Foundation::Collections::IIterable<"sv);
static constexpr std::string_view vector_view("winrt::Windows::Foundation::Collections::IVectorView<"sv);
static constexpr std::string_view map_view("winrt::Windows::Foundation::Collections::IMapView<"sv);
static constexpr std::string_view vector("winrt::Windows::Foundation::Collections::IVector<"sv);
static constexpr std::string_view map("winrt::Windows::Foundation::Collections::IMap<"sv);
consume_types = false;
auto full_name = write_temp("@::%<%>", ns, name, bind_list(", ", type.GenericArgs()));
auto full_name = write_temp("winrt::@::%<%>", ns, name, bind_list(", ", type.GenericArgs()));
consume_types = true;
if (starts_with(full_name, iterable))
@ -459,7 +459,7 @@ namespace cppwinrt
}
else
{
write("@::%<%>", ns, name, bind_list(", ", type.GenericArgs()));
write("winrt::@::%<%>", ns, name, bind_list(", ", type.GenericArgs()));
}
}
}

Просмотреть файл

@ -4,11 +4,11 @@
namespace winrt::test_component::Windows::implementation
{
void Class::StaticMethod()
void Class::StaticMethod(winrt::test_component::Windows::Struct const&)
{
throw hresult_not_implemented();
}
void Class::Method()
void Class::Method(winrt::Windows::Foundation::Uri const&)
{
throw hresult_not_implemented();
}

Просмотреть файл

@ -7,8 +7,8 @@ namespace winrt::test_component::Windows::implementation
{
Class() = default;
static void StaticMethod();
void Method();
static void StaticMethod(winrt::test_component::Windows::Struct const& param);
void Method(winrt::Windows::Foundation::Uri const& param);
};
}
namespace winrt::test_component::Windows::factory_implementation

Просмотреть файл

@ -280,11 +280,18 @@ namespace test_component
namespace Windows
{
struct Struct
{
Windows.Foundation.Rect rect;
Windows.Foundation.Numerics.Matrix3x2 matrix;
Windows.Foundation.IReference<Windows.Foundation.Rect> ref_rect;
};
runtimeclass Class
{
Class();
static void StaticMethod();
void Method();
static void StaticMethod(Struct param);
void Method(Windows.Foundation.Uri param);
}
}
}