public bool VisitParamCommand(ParamCommandComment comment) { if (comment.Direction == ParamCommandComment.PassDirection.In) { return(false); } if (!comment.IsParamIndexValid) { return(false); } var parameter = currentMethod.Parameters[(int)comment.ParamIndex]; parameter.Usage = GetParameterUsageFromDirection(comment.Direction); return(true); }
protected ParamCommandComment(ParamCommandComment.Internal* native, bool isInternalImpl = false) : base((CppSharp.Parser.AST.BlockCommandComment.Internal*) native) { }
private ParamCommandComment(ParamCommandComment.Internal native) : this(__CopyValue(native)) { __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; }
private static ParamCommandComment.Internal* __CopyValue(ParamCommandComment.Internal native) { var ret = Marshal.AllocHGlobal(40); CppSharp.Parser.AST.ParamCommandComment.Internal.cctor_1(ret, new global::System.IntPtr(&native)); return (ParamCommandComment.Internal*) ret; }
public static ParamCommandComment __CreateInstance(ParamCommandComment.Internal native) { return new ParamCommandComment(native); }
protected ParamCommandComment(ParamCommandComment.Internal* native, bool skipVTables = false) : base((CppSharp.Parser.AST.BlockCommandComment.Internal*) null) { __PointerAdjustment = 0; if (native == null) return; __Instance = new global::System.IntPtr(native); }
private ParamCommandComment(ParamCommandComment.Internal native, bool skipVTables = false) : this(__CopyValue(native), skipVTables) { __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; }
public static ParamCommandComment __CreateInstance(ParamCommandComment.Internal native, bool skipVTables = false) { return new ParamCommandComment(native, skipVTables); }
private static void* __CopyValue(ParamCommandComment.__Internal native) { var ret = Marshal.AllocHGlobal(32); global::CppSharp.Parser.AST.ParamCommandComment.__Internal.cctor_2(ret, new global::System.IntPtr(&native)); return ret.ToPointer(); }
public override bool VisitDeclaration(Declaration declaration) { if (AlreadyVisited(declaration)) { return(false); } //if (declaration.TranslationUnit == null || !declaration.TranslationUnit.FileName.StartsWith("Chakra")) // return false; if (declaration.Comment != null) { var xDoc = GetOriginalDocumentationDocument(declaration.Comment.Text); var xRoot = xDoc.Root; declaration.Comment.Kind = CommentKind.BCPLSlash; var fullComment = declaration.Comment.FullComment; fullComment.Blocks.Clear(); var summaryPara = new ParagraphComment(); var summaryElement = xRoot.Element("summary"); summaryPara.Content.Add(new TextComment { Text = summaryElement == null ? "" : summaryElement.Value.ReplaceLineBreaks("").Trim() }); fullComment.Blocks.Add(summaryPara); var remarksElement = xRoot.Element("remarks"); if (remarksElement != null) { foreach (var remarksLine in remarksElement.Value.Split('\n')) { var remarksPara = new ParagraphComment(); remarksPara.Content.Add(new TextComment { Text = remarksLine.ReplaceLineBreaks("").Trim() }); fullComment.Blocks.Add(remarksPara); } } var paramElements = xRoot.Elements("param"); foreach (var paramElement in paramElements) { var paramComment = new ParamCommandComment(); paramComment.Arguments.Add(new BlockCommandComment.Argument { Text = paramElement.Attribute("name").Value }); paramComment.ParagraphComment = new ParagraphComment(); StringBuilder paramTextCommentBuilder = new StringBuilder(); foreach (var paramLine in paramElement.Value.Split('\n')) { paramTextCommentBuilder.Append(paramLine.ReplaceLineBreaks("").Trim() + " "); } paramComment.ParagraphComment.Content.Add(new TextComment { Text = paramTextCommentBuilder.ToString() }); fullComment.Blocks.Add(paramComment); } } //Fix Enum comments if (declaration is Enumeration enumDecl) { foreach (var item in enumDecl.Items.Where(i => i.Comment != null)) { item.Comment.BriefText = item.Comment.BriefText.Replace("<summary>", "").Replace("</summary>", "").Trim(); } } return(true); }
public bool VisitParamCommand(ParamCommandComment comment) { return(true); }
public bool VisitParamCommand(ParamCommandComment comment) => true;