Skip to content

Commit

Permalink
[Shared] Introduce clang-cl build support (#3520)
Browse files Browse the repository at this point in the history
* [Shared] Introduce clang-cl build support

* Reswig with new changes
  • Loading branch information
paulcam206 committed Oct 17, 2019
1 parent fc392d8 commit 046a233
Show file tree
Hide file tree
Showing 58 changed files with 486 additions and 406 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Cc]lang-Debug/

# Visual Studio 2015 cache/options directory
.vs/
Expand Down
325 changes: 93 additions & 232 deletions source/android/adaptivecards/src/main/cpp/objectmodel_wrap.cpp

Large diffs are not rendered by default.

28 changes: 8 additions & 20 deletions source/android/adaptivecards/src/main/cpp/objectmodel_wrap.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,12 @@ class SwigDirector_BaseElement : public AdaptiveCards::BaseElement, public Swig:
virtual std::string Serialize() const;
virtual Json::Value SerializeToJsonValue() const;
virtual void GetResourceInformation(std::vector< AdaptiveCards::RemoteResourceInformation > &resourceUris);
virtual void PopulateKnownPropertiesSet();
virtual void PopulateKnownPropertiesSetSwigPublic() {
AdaptiveCards::BaseElement::PopulateKnownPropertiesSet();
}
public:
bool swig_overrides(int n) {
return (n < 6 ? swig_override[n] : false);
return (n < 5 ? swig_override[n] : false);
}
protected:
Swig::BoolArray<6> swig_override;
Swig::BoolArray<5> swig_override;
};

class SwigDirector_BaseCardElement : public AdaptiveCards::BaseCardElement, public Swig::Director {
Expand All @@ -51,23 +47,19 @@ class SwigDirector_BaseCardElement : public AdaptiveCards::BaseCardElement, publ
virtual std::string Serialize() const;
virtual Json::Value SerializeToJsonValue() const;
virtual void GetResourceInformation(std::vector< AdaptiveCards::RemoteResourceInformation > &resourceUris);
virtual void PopulateKnownPropertiesSet();
virtual void PopulateKnownPropertiesSetSwigPublic() {
AdaptiveCards::BaseCardElement::PopulateKnownPropertiesSet();
}
virtual bool GetSeparator() const;
virtual void SetSeparator(bool const value);
virtual AdaptiveCards::Spacing GetSpacing() const;
virtual void SetSpacing(AdaptiveCards::Spacing const value);
virtual bool GetIsVisible() const;
virtual void SetIsVisible(bool const value);
virtual AdaptiveCards::CardElementType const GetElementType() const;
virtual AdaptiveCards::CardElementType GetElementType() const;
public:
bool swig_overrides(int n) {
return (n < 13 ? swig_override[n] : false);
return (n < 12 ? swig_override[n] : false);
}
protected:
Swig::BoolArray<13> swig_override;
Swig::BoolArray<12> swig_override;
};

class SwigDirector_BaseActionElement : public AdaptiveCards::BaseActionElement, public Swig::Director {
Expand All @@ -84,23 +76,19 @@ class SwigDirector_BaseActionElement : public AdaptiveCards::BaseActionElement,
virtual std::string Serialize() const;
virtual Json::Value SerializeToJsonValue() const;
virtual void GetResourceInformation(std::vector< AdaptiveCards::RemoteResourceInformation > &resourceUris);
virtual void PopulateKnownPropertiesSet();
virtual void PopulateKnownPropertiesSetSwigPublic() {
AdaptiveCards::BaseActionElement::PopulateKnownPropertiesSet();
}
virtual std::string GetTitle() const;
virtual void SetTitle(std::string const &value);
virtual std::string GetIconUrl() const;
virtual void SetIconUrl(std::string const &value);
virtual std::string GetStyle() const;
virtual void SetStyle(std::string const &value);
virtual AdaptiveCards::ActionType const GetElementType() const;
virtual AdaptiveCards::ActionType GetElementType() const;
public:
bool swig_overrides(int n) {
return (n < 13 ? swig_override[n] : false);
return (n < 12 ? swig_override[n] : false);
}
protected:
Swig::BoolArray<13> swig_override;
Swig::BoolArray<12> swig_override;
};

class SwigDirector_ActionElementParser : public AdaptiveCards::ActionElementParser, public Swig::Director {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,6 @@ public class AdaptiveCardObjectModelJNI {
public final static native long BaseElement_GetRequirements(long jarg1, BaseElement jarg1_);
public final static native void BaseElement_GetResourceInformation(long jarg1, BaseElement jarg1_, long jarg2, RemoteResourceInformationVector jarg2_);
public final static native void BaseElement_GetResourceInformationSwigExplicitBaseElement(long jarg1, BaseElement jarg1_, long jarg2, RemoteResourceInformationVector jarg2_);
public final static native void BaseElement_PopulateKnownPropertiesSet(long jarg1, BaseElement jarg1_);
public final static native void BaseElement_PopulateKnownPropertiesSetSwigExplicitBaseElement(long jarg1, BaseElement jarg1_);
public final static native void BaseElement_director_connect(BaseElement obj, long cptr, boolean mem_own, boolean weak_global);
public final static native void BaseElement_change_ownership(BaseElement obj, long cptr, boolean take_or_release);
public final static native void HandleUnknownProperties(long jarg1, JsonValue jarg1_, long jarg2, long jarg3, JsonValue jarg3_);
Expand Down Expand Up @@ -421,8 +419,6 @@ public class AdaptiveCardObjectModelJNI {
public final static native int BaseCardElement_GetElementType(long jarg1, BaseCardElement jarg1_);
public final static native int BaseCardElement_GetElementTypeSwigExplicitBaseCardElement(long jarg1, BaseCardElement jarg1_);
public final static native void BaseCardElement_ParseJsonObject(long jarg1, ParseContext jarg1_, long jarg2, JsonValue jarg2_, long jarg3, BaseElement jarg3_);
public final static native void BaseCardElement_PopulateKnownPropertiesSet(long jarg1, BaseCardElement jarg1_);
public final static native void BaseCardElement_PopulateKnownPropertiesSetSwigExplicitBaseCardElement(long jarg1, BaseCardElement jarg1_);
public final static native Object BaseCardElement_swigOriginalObject(long jarg1, BaseCardElement jarg1_);
public final static native long BaseCardElement_dynamic_cast(long jarg1, BaseElement jarg1_);
public final static native void BaseCardElement_director_connect(BaseCardElement obj, long cptr, boolean mem_own, boolean weak_global);
Expand Down Expand Up @@ -450,8 +446,6 @@ public class AdaptiveCardObjectModelJNI {
public final static native long BaseActionElement_SerializeToJsonValue(long jarg1, BaseActionElement jarg1_);
public final static native long BaseActionElement_SerializeToJsonValueSwigExplicitBaseActionElement(long jarg1, BaseActionElement jarg1_);
public final static native void BaseActionElement_ParseJsonObject(long jarg1, ParseContext jarg1_, long jarg2, JsonValue jarg2_, long jarg3, BaseElement jarg3_);
public final static native void BaseActionElement_PopulateKnownPropertiesSet(long jarg1, BaseActionElement jarg1_);
public final static native void BaseActionElement_PopulateKnownPropertiesSetSwigExplicitBaseActionElement(long jarg1, BaseActionElement jarg1_);
public final static native Object BaseActionElement_swigOriginalObject(long jarg1, BaseActionElement jarg1_);
public final static native long BaseActionElement_dynamic_cast(long jarg1, BaseElement jarg1_);
public final static native void BaseActionElement_director_connect(BaseActionElement obj, long cptr, boolean mem_own, boolean weak_global);
Expand Down Expand Up @@ -539,6 +533,10 @@ public class AdaptiveCardObjectModelJNI {
public final static native long ElementParserRegistration_GetParser(long jarg1, ElementParserRegistration jarg1_, String jarg2);
public final static native void delete_ElementParserRegistration(long jarg1);
public final static native String c_adaptiveCardsFeature_get();
public final static native long new_CaseInsensitiveKeyHash();
public final static native void delete_CaseInsensitiveKeyHash(long jarg1);
public final static native long new_CaseInsensitiveKeyEquals();
public final static native void delete_CaseInsensitiveKeyEquals(long jarg1);
public final static native long new_FeatureRegistration();
public final static native void FeatureRegistration_AddFeature(long jarg1, FeatureRegistration jarg1_, String jarg2, String jarg3);
public final static native void FeatureRegistration_RemoveFeature(long jarg1, FeatureRegistration jarg1_, String jarg2);
Expand Down Expand Up @@ -1440,9 +1438,6 @@ public static long SwigDirector_BaseElement_SerializeToJsonValue(BaseElement jse
public static void SwigDirector_BaseElement_GetResourceInformation(BaseElement jself, long resourceUris) {
jself.GetResourceInformation(new RemoteResourceInformationVector(resourceUris, false));
}
public static void SwigDirector_BaseElement_PopulateKnownPropertiesSet(BaseElement jself) {
jself.PopulateKnownPropertiesSet();
}
public static String SwigDirector_BaseCardElement_GetId(BaseCardElement jself) {
return jself.GetId();
}
Expand All @@ -1458,9 +1453,6 @@ public static long SwigDirector_BaseCardElement_SerializeToJsonValue(BaseCardEle
public static void SwigDirector_BaseCardElement_GetResourceInformation(BaseCardElement jself, long resourceUris) {
jself.GetResourceInformation(new RemoteResourceInformationVector(resourceUris, false));
}
public static void SwigDirector_BaseCardElement_PopulateKnownPropertiesSet(BaseCardElement jself) {
jself.PopulateKnownPropertiesSet();
}
public static boolean SwigDirector_BaseCardElement_GetSeparator(BaseCardElement jself) {
return jself.GetSeparator();
}
Expand Down Expand Up @@ -1497,9 +1489,6 @@ public static long SwigDirector_BaseActionElement_SerializeToJsonValue(BaseActio
public static void SwigDirector_BaseActionElement_GetResourceInformation(BaseActionElement jself, long resourceUris) {
jself.GetResourceInformation(new RemoteResourceInformationVector(resourceUris, false));
}
public static void SwigDirector_BaseActionElement_PopulateKnownPropertiesSet(BaseActionElement jself) {
jself.PopulateKnownPropertiesSet();
}
public static String SwigDirector_BaseActionElement_GetTitle(BaseActionElement jself) {
return jself.GetTitle();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,6 @@ public static void ParseJsonObject(ParseContext context, JsonValue json, BaseEle
AdaptiveCardObjectModelJNI.BaseActionElement_ParseJsonObject(ParseContext.getCPtr(context), context, JsonValue.getCPtr(json), json, BaseElement.getCPtr(element), element);
}

protected void PopulateKnownPropertiesSet() {
if (getClass() == BaseActionElement.class) AdaptiveCardObjectModelJNI.BaseActionElement_PopulateKnownPropertiesSet(swigCPtr, this); else AdaptiveCardObjectModelJNI.BaseActionElement_PopulateKnownPropertiesSetSwigExplicitBaseActionElement(swigCPtr, this);
}

public Object swigOriginalObject() {
return AdaptiveCardObjectModelJNI.BaseActionElement_swigOriginalObject(swigCPtr, this);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,6 @@ public static void ParseJsonObject(ParseContext context, JsonValue json, BaseEle
AdaptiveCardObjectModelJNI.BaseCardElement_ParseJsonObject(ParseContext.getCPtr(context), context, JsonValue.getCPtr(json), json, BaseElement.getCPtr(element), element);
}

protected void PopulateKnownPropertiesSet() {
if (getClass() == BaseCardElement.class) AdaptiveCardObjectModelJNI.BaseCardElement_PopulateKnownPropertiesSet(swigCPtr, this); else AdaptiveCardObjectModelJNI.BaseCardElement_PopulateKnownPropertiesSetSwigExplicitBaseCardElement(swigCPtr, this);
}

public Object swigOriginalObject() {
return AdaptiveCardObjectModelJNI.BaseCardElement_swigOriginalObject(swigCPtr, this);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,4 @@ public void GetResourceInformation(RemoteResourceInformationVector resourceUris)
if (getClass() == BaseElement.class) AdaptiveCardObjectModelJNI.BaseElement_GetResourceInformation(swigCPtr, this, RemoteResourceInformationVector.getCPtr(resourceUris), resourceUris); else AdaptiveCardObjectModelJNI.BaseElement_GetResourceInformationSwigExplicitBaseElement(swigCPtr, this, RemoteResourceInformationVector.getCPtr(resourceUris), resourceUris);
}

protected void PopulateKnownPropertiesSet() {
if (getClass() == BaseElement.class) AdaptiveCardObjectModelJNI.BaseElement_PopulateKnownPropertiesSet(swigCPtr, this); else AdaptiveCardObjectModelJNI.BaseElement_PopulateKnownPropertiesSetSwigExplicitBaseElement(swigCPtr, this);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.0
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */

package io.adaptivecards.objectmodel;

public class CaseInsensitiveKeyEquals {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;

protected CaseInsensitiveKeyEquals(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}

protected static long getCPtr(CaseInsensitiveKeyEquals obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}

protected void finalize() {
delete();
}

public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
AdaptiveCardObjectModelJNI.delete_CaseInsensitiveKeyEquals(swigCPtr);
}
swigCPtr = 0;
}
}

public CaseInsensitiveKeyEquals() {
this(AdaptiveCardObjectModelJNI.new_CaseInsensitiveKeyEquals(), true);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.0
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */

package io.adaptivecards.objectmodel;

public class CaseInsensitiveKeyHash {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;

protected CaseInsensitiveKeyHash(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}

protected static long getCPtr(CaseInsensitiveKeyHash obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}

protected void finalize() {
delete();
}

public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
AdaptiveCardObjectModelJNI.delete_CaseInsensitiveKeyHash(swigCPtr);
}
swigCPtr = 0;
}
}

public CaseInsensitiveKeyHash() {
this(AdaptiveCardObjectModelJNI.new_CaseInsensitiveKeyHash(), true);
}

}
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26730.16
# Visual Studio Version 16
VisualStudioVersion = 16.0.29316.153
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AdaptiveCardsSharedModel", "AdaptiveCardsSharedModel\AdaptiveCardsSharedModel.vcxproj", "{430407C5-059C-48E8-9260-62A12D30F81C}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AdaptiveCardsSharedModelUnitTest", "AdaptiveCardsSharedModelUnitTest\AdaptiveCardsSharedModelUnitTest.vcxproj", "{7A653D45-32AA-4020-9D23-96C0A7D60EAA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Clang-Debug|x64 = Clang-Debug|x64
Clang-Debug|x86 = Clang-Debug|x86
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{430407C5-059C-48E8-9260-62A12D30F81C}.Clang-Debug|x64.ActiveCfg = Clang-Debug|x64
{430407C5-059C-48E8-9260-62A12D30F81C}.Clang-Debug|x64.Build.0 = Clang-Debug|x64
{430407C5-059C-48E8-9260-62A12D30F81C}.Clang-Debug|x86.ActiveCfg = Clang-Debug|Win32
{430407C5-059C-48E8-9260-62A12D30F81C}.Clang-Debug|x86.Build.0 = Clang-Debug|Win32
{430407C5-059C-48E8-9260-62A12D30F81C}.Debug|x64.ActiveCfg = Debug|x64
{430407C5-059C-48E8-9260-62A12D30F81C}.Debug|x64.Build.0 = Debug|x64
{430407C5-059C-48E8-9260-62A12D30F81C}.Debug|x86.ActiveCfg = Debug|Win32
Expand All @@ -23,6 +29,8 @@ Global
{430407C5-059C-48E8-9260-62A12D30F81C}.Release|x64.Build.0 = Release|x64
{430407C5-059C-48E8-9260-62A12D30F81C}.Release|x86.ActiveCfg = Release|Win32
{430407C5-059C-48E8-9260-62A12D30F81C}.Release|x86.Build.0 = Release|Win32
{7A653D45-32AA-4020-9D23-96C0A7D60EAA}.Clang-Debug|x64.ActiveCfg = Clang-Debug|x64
{7A653D45-32AA-4020-9D23-96C0A7D60EAA}.Clang-Debug|x86.ActiveCfg = Clang-Debug|Win32
{7A653D45-32AA-4020-9D23-96C0A7D60EAA}.Debug|x64.ActiveCfg = Debug|x64
{7A653D45-32AA-4020-9D23-96C0A7D60EAA}.Debug|x64.Build.0 = Debug|x64
{7A653D45-32AA-4020-9D23-96C0A7D60EAA}.Debug|x86.ActiveCfg = Debug|Win32
Expand Down
Loading

0 comments on commit 046a233

Please sign in to comment.