Browse Source

Merge pull request #317 from ddobrev/master

Fixed the advanced pass for properties to skip ignored methods
pull/318/head
João Matos 11 years ago
parent
commit
89bcf78834
  1. 2
      src/Generator/Passes/GetterSetterToPropertyAdvancedPass.cs
  2. 10
      tests/CSharpTemp/CSharpTemp.cpp
  3. 14
      tests/CSharpTemp/CSharpTemp.h

2
src/Generator/Passes/GetterSetterToPropertyAdvancedPass.cs

@ -25,7 +25,7 @@ namespace CppSharp.Passes
{ {
this.log = log; this.log = log;
foreach (var method in @class.Methods.Where( foreach (var method in @class.Methods.Where(
m => !m.IsConstructor && !m.IsDestructor && !m.IsOperator)) m => !m.IsConstructor && !m.IsDestructor && !m.IsOperator && m.IsGenerated))
DistributeMethod(method); DistributeMethod(method);
} }

10
tests/CSharpTemp/CSharpTemp.cpp

@ -257,3 +257,13 @@ void HasPrivateOverrideBase::privateOverride(int i)
void HasPrivateOverride::privateOverride(int i) void HasPrivateOverride::privateOverride(int i)
{ {
} }
IgnoredType<int> PropertyWithIgnoredType::ignoredType()
{
return _ignoredType;
}
void PropertyWithIgnoredType::setIgnoredType(const IgnoredType<int> &value)
{
_ignoredType = value;
}

14
tests/CSharpTemp/CSharpTemp.h

@ -216,3 +216,17 @@ class DLL_API AbstractWithProperty
public: public:
virtual int property() = 0; virtual int property() = 0;
}; };
template <typename T>
class DLL_API IgnoredType
{
};
class DLL_API PropertyWithIgnoredType
{
public:
IgnoredType<int> ignoredType();
void setIgnoredType(const IgnoredType<int>& value);
private:
IgnoredType<int> _ignoredType;
};

Loading…
Cancel
Save