|
|
@@ -105,6 +105,17 @@ void CSClassWriter::WriteManagedProperties(String& sourceOut)
|
|
|
if (CSTypeHelper::OmitFunction(prop->getter_) || CSTypeHelper::OmitFunction(prop->setter_))
|
|
|
continue;
|
|
|
|
|
|
+ if (klass_->IsInterface())
|
|
|
+ {
|
|
|
+ if ((prop->getter_ && prop->getter_->IsInheritedInterface()) ||
|
|
|
+ (prop->setter_ && prop->setter_->IsInheritedInterface()))
|
|
|
+ {
|
|
|
+ // note possibility of mismatched inheritance on get/set
|
|
|
+ // if possible to trip this in C#, will need to be addressed here
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if (prop->getter_ && !prop->getter_->Skip())
|
|
|
{
|
|
|
fType = getType = prop->getter_->GetReturnType();
|
|
|
@@ -223,17 +234,21 @@ void CSClassWriter::GenerateManagedSource(String& sourceOut)
|
|
|
|
|
|
JSBClass* baseClass = klass_->GetBaseClass();
|
|
|
const StringVector& csharpInterfaces = klass_->GetCSharpInterfaces();
|
|
|
+ const PODVector<JSBClass*>& nativeInterfaces = klass_->GetInterfaces();
|
|
|
+
|
|
|
+ String classString = "class";
|
|
|
|
|
|
- if (baseClass || csharpInterfaces.Size())
|
|
|
+ if (klass_->IsInterface())
|
|
|
+ classString = "interface";
|
|
|
+
|
|
|
+ if (baseClass || csharpInterfaces.Size() || nativeInterfaces.Size())
|
|
|
{
|
|
|
StringVector baseStrings;
|
|
|
|
|
|
if (baseClass)
|
|
|
{
|
|
|
baseStrings.Push(baseClass->GetName());
|
|
|
- }
|
|
|
-
|
|
|
- const PODVector<JSBClass*>& nativeInterfaces = klass_->GetInterfaces();
|
|
|
+ }
|
|
|
|
|
|
for (unsigned i = 0; i < nativeInterfaces.Size(); i++)
|
|
|
{
|
|
|
@@ -245,18 +260,12 @@ void CSClassWriter::GenerateManagedSource(String& sourceOut)
|
|
|
baseStrings.Push(csharpInterfaces[i]);
|
|
|
}
|
|
|
|
|
|
+ String baseString = String::Joined(baseStrings, ", ");
|
|
|
|
|
|
- String baseString = String::Joined(baseStrings, ",");
|
|
|
-
|
|
|
- line = ToString("public partial class %s%s : %s\n", klass_->GetName().CString(), klass_->IsGeneric() ? "<T>" : "", baseString.CString());
|
|
|
+ line = ToString("public partial %s %s%s : %s\n", classString.CString(), klass_->GetName().CString(), klass_->IsGeneric() ? "<T>" : "", baseString.CString());
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- String classString = "class";
|
|
|
-
|
|
|
- if (klass_->IsInterface())
|
|
|
- classString = "interface";
|
|
|
-
|
|
|
line = ToString("public partial %s %s%s\n", classString.CString(), klass_->GetName().CString(), klass_->IsGeneric() ? "<T>" : "");
|
|
|
}
|
|
|
|
|
|
@@ -303,6 +312,9 @@ void CSClassWriter::GenerateManagedSource(String& sourceOut)
|
|
|
if (function->IsDestructor())
|
|
|
continue;
|
|
|
|
|
|
+ if (klass_->IsInterface() && function->IsInheritedInterface())
|
|
|
+ continue;
|
|
|
+
|
|
|
if (CSTypeHelper::OmitFunction(function))
|
|
|
continue;
|
|
|
|