Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable new -abstract_class flag #1898

Open
wants to merge 1 commit into
base: user/chenss3/udkauthoring
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions nuget/Microsoft.Windows.CsWinRT.targets
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ Copyright (C) Microsoft Corporation. All rights reserved.
<CsWinRTEmbeddedProjection Condition="'$(CsWinRTEmbedded)' == 'true'">-embedded</CsWinRTEmbeddedProjection>
<CsWinRTEmbeddedEnums Condition="'$(CsWinRTEmbeddedPublicEnums)' == 'true'">-public_enums</CsWinRTEmbeddedEnums>
<CsWinRTPublicExclusiveTo Condition="'$(CsWinRTPublicExclusiveToInterfaces)' == 'true'">-public_exclusiveto</CsWinRTPublicExclusiveTo>
<CsWinRTAbstract Condition="'$(CsWinRTAbstractClass)' == 'true'">-abstract_class</CsWinRTAbstract>
<CsWinRTDynamicallyInterfaceCastableExclusiveTo Condition="'$(CsWinRTDynamicallyInterfaceCastableExclusiveTo)' == 'true'">-idic_exclusiveto</CsWinRTDynamicallyInterfaceCastableExclusiveTo>

<CsWinRTParams Condition="'$(CsWinRTParams)' == ''">
Expand All @@ -256,6 +257,7 @@ $(CsWinRTIncludeWinRTInterop)
$(CsWinRTEmbeddedProjection)
$(CsWinRTEmbeddedEnums)
$(CsWinRTPublicExclusiveTo)
$(CsWinRTAbstract)
$(CsWinRTDynamicallyInterfaceCastableExclusiveTo)
</CsWinRTParams>

Expand Down
4 changes: 4 additions & 0 deletions src/cswinrt/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ namespace cswinrt
{ "embedded", 0, 0, {}, "Generates an embedded projection."},
{ "public_enums", 0, 0, {}, "Used with embedded option to generate enums as public"},
{ "public_exclusiveto", 0, 0, {}, "Make exclusiveto interfaces public in the projection (default is internal)"},
{ "abstract_class", 0, 0, {}, "Enable an abstract version of a component's class"},
{ "idic_exclusiveto", 0, 0, {}, "Make exclusiveto interfaces support IDynamicInterfaceCastable (IDIC) for RCW scenarios (default is false)"},
{ "help", 0, option::no_max, {}, "Show detailed help" },
{ "?", 0, option::no_max, {}, {} },
Expand Down Expand Up @@ -105,8 +106,11 @@ Where <spec> is one or more of:
settings.embedded = args.exists("embedded");
settings.public_enums = args.exists("public_enums");
settings.public_exclusiveto = args.exists("public_exclusiveto");
settings.abstract_class = args.exists("abstract_class");
settings.idic_exclusiveto = args.exists("idic_exclusiveto");
settings.input = args.files("input", database::is_database);

printf("abstract_class value: %d\n", settings.abstract_class); //TODO: remove this line later, it's just for testing

for (auto && include : args.values("include"))
{
Expand Down
1 change: 1 addition & 0 deletions src/cswinrt/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ namespace cswinrt
bool embedded{};
bool public_enums{};
bool public_exclusiveto{};
bool abstract_class{};
bool idic_exclusiveto{};
};

Expand Down