Browse Source

Commented newly created properties.

Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
pull/77/head
Dimitar Dobrev 12 years ago
parent
commit
f086dd9051
  1. 18
      src/Generator/Passes/GetterSetterToPropertyPass.cs

18
src/Generator/Passes/GetterSetterToPropertyPass.cs

@ -151,7 +151,22 @@ namespace CppSharp.Passes
{ {
property.ExplicitInterfaceImpl = setter.ExplicitInterfaceImpl; property.ExplicitInterfaceImpl = setter.ExplicitInterfaceImpl;
} }
// TODO: add comments if (getter.Comment != null)
{
var comment = new RawComment();
comment.Kind = getter.Comment.Kind;
comment.BriefText = getter.Comment.BriefText;
comment.Text = getter.Comment.Text;
comment.FullComment = new FullComment();
comment.FullComment.Blocks.AddRange(getter.Comment.FullComment.Blocks);
if (setter != null && setter.Comment != null)
{
comment.BriefText += Environment.NewLine + setter.Comment.BriefText;
comment.Text += Environment.NewLine + setter.Comment.Text;
comment.FullComment.Blocks.AddRange(setter.Comment.FullComment.Blocks);
}
property.Comment = comment;
}
type.Properties.Add(property); type.Properties.Add(property);
getter.IsGenerated = false; getter.IsGenerated = false;
if (setter != null) if (setter != null)
@ -179,7 +194,6 @@ namespace CppSharp.Passes
return name; return name;
} }
private void DistributeMethod(Method method) private void DistributeMethod(Method method)
{ {
if (GetFirstWord(method.Name) == "set" && method.Name.Length > 3 && if (GetFirstWord(method.Name) == "set" && method.Name.Length > 3 &&

Loading…
Cancel
Save