Skip to content

Commit

Permalink
Mark virtual members
Browse files Browse the repository at this point in the history
  • Loading branch information
karimi committed Nov 27, 2023
1 parent 20467fb commit e34fbb2
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
4 changes: 4 additions & 0 deletions quasar_site/src/pages/DataType.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@
<q-icon name="mdi-key-variant" />
<q-tooltip>Protected Member</q-tooltip>
</q-badge>
<q-badge v-if="section.type == 'methods' && member.virtual" color='info' outline>
<q-icon name="mdi-alpha-v" />
<q-tooltip>Virtual Member</q-tooltip>
</q-badge>
<q-badge v-if="member.signature.includes('static')" color='info' outline>
<q-icon name="mdi-alpha-s" />
<q-tooltip>Static Member</q-tooltip>
Expand Down
3 changes: 3 additions & 0 deletions quasar_site/src/pages/MemberDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@
<q-badge v-if="member.protected" outline color="warning" class="q-ma-sm"
>protected
</q-badge>
<q-badge v-if="member.virtual" outline color="warning" class="q-ma-sm"
>virtual
</q-badge>
<q-badge v-if="member.deprecated" outline color="negative" class="q-ma-sm"
>deprecated in {{ member.deprecated }}
<q-tooltip
Expand Down
2 changes: 2 additions & 0 deletions src/Parse/JsonBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,8 @@ static string MembersAsJsonArray(ParsedType type, ParsedMemberType filter, bool
//sb.Append($" signature: '{member.Signature(false)}'");
sb.AppendLine(",");
sb.Append(KeyValBool(8, "protected", member.IsProtected, asJavascript));
sb.AppendLine(",");
sb.Append(KeyValBool(8, "virtual", member.IsVirtual, asJavascript));

string summary = member.Summary();
if (!string.IsNullOrWhiteSpace(summary))
Expand Down
10 changes: 10 additions & 0 deletions src/Parse/ParsedMember.cs
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,16 @@ public bool IsProtected { get {

}}

public bool IsVirtual { get {
foreach (var modifier in Member.Modifiers)
{
if (modifier.Text == "virtual")
return true;
}
return false;

}}

public bool IsStatic { get { return Member.IsStatic(); } }

public string IsObsolete { get { return Member.IsObsolete(); } }
Expand Down

0 comments on commit e34fbb2

Please sign in to comment.