Browse Source

Made whether a method is an override adjustable.

Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
pull/908/head
Dimitar Dobrev 8 years ago
parent
commit
4a0167e10c
  1. 10
      src/AST/Method.cs

10
src/AST/Method.cs

@ -117,7 +117,13 @@ namespace CppSharp.AST
public bool IsStatic { get; set; } public bool IsStatic { get; set; }
public bool IsConst { get; set; } public bool IsConst { get; set; }
public bool IsExplicit { get; set; } public bool IsExplicit { get; set; }
public bool IsOverride => OverriddenMethods.Any();
public bool IsOverride
{
get { return isOverride ?? OverriddenMethods.Any(); }
set { isOverride = value; }
}
public Method BaseMethod => IsOverride ? OverriddenMethods[0] : null; public Method BaseMethod => IsOverride ? OverriddenMethods[0] : null;
// True if the method is final / sealed. // True if the method is final / sealed.
@ -176,5 +182,7 @@ namespace CppSharp.AST
{ {
return visitor.VisitMethodDecl(this); return visitor.VisitMethodDecl(this);
} }
private bool? isOverride;
} }
} }
Loading…
Cancel
Save