Browse Source

Wrapped more information about comments for better generation.

Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
pull/642/head
Dimitar Dobrev 10 years ago
parent
commit
cf479f4409
  1. 9
      src/AST/Comment.cs
  2. 15
      src/Core/Parser/ASTConverter.cs
  3. 7
      src/CppParser/AST.cpp
  4. 2
      src/CppParser/AST.h
  5. 20
      src/CppParser/Bindings/CLI/AST.cpp
  6. 12
      src/CppParser/Bindings/CLI/AST.h
  7. 99
      src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/AST.cs
  8. 99
      src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/AST.cs
  9. 75
      src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/AST.cs
  10. 75
      src/CppParser/Bindings/CSharp/x86_64-linux-gnu/AST.cs
  11. 75
      src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/AST.cs
  12. 11
      src/CppParser/Comments.cpp

9
src/AST/Comment.cs

@ -332,6 +332,8 @@ namespace CppSharp.AST @@ -332,6 +332,8 @@ namespace CppSharp.AST
{
Kind = CommentKind.InlineContentComment;
}
public bool HasTrailingNewline { get; set; }
}
/// <summary>
@ -426,6 +428,13 @@ namespace CppSharp.AST @@ -426,6 +428,13 @@ namespace CppSharp.AST
RenderEmphasized
}
public uint CommandId { get; set; }
public CommentCommandKind CommandKind
{
get { return (CommentCommandKind) CommandId; }
}
public RenderKind CommentRenderKind;
public List<Argument> Arguments;

15
src/Core/Parser/ASTConverter.cs

@ -1720,22 +1720,33 @@ namespace CppSharp @@ -1720,22 +1720,33 @@ namespace CppSharp
htmlStartTagComment.Attributes.Add(attribute);
}
htmlStartTagComment.TagName = comment.TagName;
htmlStartTagComment.HasTrailingNewline = comment.HasTrailingNewline;
return htmlStartTagComment;
}
protected override AST.Comment VisitHTMLEndTagComment(HTMLEndTagComment comment)
{
return new AST.HTMLEndTagComment { TagName = comment.TagName };
return new AST.HTMLEndTagComment
{
TagName = comment.TagName,
HasTrailingNewline = comment.HasTrailingNewline
};
}
protected override AST.Comment VisitTextComment(TextComment comment)
{
return new AST.TextComment { Text = comment.Text };
return new AST.TextComment
{
Text = comment.Text,
HasTrailingNewline = comment.HasTrailingNewline
};
}
protected override AST.Comment VisitInlineCommandComment(InlineCommandComment comment)
{
var inlineCommandComment = new AST.InlineCommandComment();
inlineCommandComment.HasTrailingNewline = comment.HasTrailingNewline;
inlineCommandComment.CommandId = comment.CommandId;
for (uint i = 0; i < comment.ArgumentsCount; i++)
{
var argument = new AST.InlineCommandComment.Argument { Text = comment.getArguments(i).Text };

7
src/CppParser/AST.cpp

@ -934,9 +934,9 @@ HTMLEndTagComment::HTMLEndTagComment() : HTMLTagComment(CommentKind::HTMLEndTagC @@ -934,9 +934,9 @@ HTMLEndTagComment::HTMLEndTagComment() : HTMLTagComment(CommentKind::HTMLEndTagC
DEF_STRING(HTMLEndTagComment, TagName)
InlineContentComment::InlineContentComment() : Comment(CommentKind::InlineContentComment) {}
InlineContentComment::InlineContentComment() : Comment(CommentKind::InlineContentComment), HasTrailingNewline(false) {}
InlineContentComment::InlineContentComment(CommentKind Kind) : Comment(Kind) {}
InlineContentComment::InlineContentComment(CommentKind Kind) : Comment(Kind), HasTrailingNewline(false) {}
TextComment::TextComment() : InlineContentComment(CommentKind::TextComment) {}
@ -948,7 +948,8 @@ InlineCommandComment::Argument::Argument(const Argument& rhs) : Text(rhs.Text) { @@ -948,7 +948,8 @@ InlineCommandComment::Argument::Argument(const Argument& rhs) : Text(rhs.Text) {
DEF_STRING(InlineCommandComment::Argument, Text)
InlineCommandComment::InlineCommandComment() : InlineContentComment(CommentKind::InlineCommandComment), CommentRenderKind(RenderNormal) {}
InlineCommandComment::InlineCommandComment()
: InlineContentComment(CommentKind::InlineCommandComment), CommandId(0), CommentRenderKind(RenderNormal) {}
DEF_VECTOR(InlineCommandComment, InlineCommandComment::Argument, Arguments)

2
src/CppParser/AST.h

@ -955,6 +955,7 @@ class CS_API InlineContentComment : public Comment @@ -955,6 +955,7 @@ class CS_API InlineContentComment : public Comment
public:
InlineContentComment();
InlineContentComment(CommentKind Kind);
bool HasTrailingNewline;
};
class CS_API ParagraphComment : public BlockContentComment
@ -1045,6 +1046,7 @@ public: @@ -1045,6 +1046,7 @@ public:
STRING(Text)
};
InlineCommandComment();
unsigned CommandId;
RenderKind CommentRenderKind;
VECTOR(Argument, Arguments)
};

20
src/CppParser/Bindings/CLI/AST.cpp

@ -4614,6 +4614,16 @@ CppSharp::Parser::AST::InlineContentComment::InlineContentComment(CppSharp::Pars @@ -4614,6 +4614,16 @@ CppSharp::Parser::AST::InlineContentComment::InlineContentComment(CppSharp::Pars
NativePtr = new ::CppSharp::CppParser::AST::InlineContentComment(arg0);
}
bool CppSharp::Parser::AST::InlineContentComment::HasTrailingNewline::get()
{
return ((::CppSharp::CppParser::AST::InlineContentComment*)NativePtr)->HasTrailingNewline;
}
void CppSharp::Parser::AST::InlineContentComment::HasTrailingNewline::set(bool value)
{
((::CppSharp::CppParser::AST::InlineContentComment*)NativePtr)->HasTrailingNewline = value;
}
CppSharp::Parser::AST::ParagraphComment::ParagraphComment(::CppSharp::CppParser::AST::ParagraphComment* native)
: CppSharp::Parser::AST::BlockContentComment((::CppSharp::CppParser::AST::BlockContentComment*)native)
{
@ -5234,6 +5244,16 @@ unsigned int CppSharp::Parser::AST::InlineCommandComment::ArgumentsCount::get() @@ -5234,6 +5244,16 @@ unsigned int CppSharp::Parser::AST::InlineCommandComment::ArgumentsCount::get()
return __ret;
}
unsigned int CppSharp::Parser::AST::InlineCommandComment::CommandId::get()
{
return ((::CppSharp::CppParser::AST::InlineCommandComment*)NativePtr)->CommandId;
}
void CppSharp::Parser::AST::InlineCommandComment::CommandId::set(unsigned int value)
{
((::CppSharp::CppParser::AST::InlineCommandComment*)NativePtr)->CommandId = value;
}
CppSharp::Parser::AST::InlineCommandComment::RenderKind CppSharp::Parser::AST::InlineCommandComment::CommentRenderKind::get()
{
return (CppSharp::Parser::AST::InlineCommandComment::RenderKind)((::CppSharp::CppParser::AST::InlineCommandComment*)NativePtr)->CommentRenderKind;

12
src/CppParser/Bindings/CLI/AST.h

@ -2582,6 +2582,12 @@ namespace CppSharp @@ -2582,6 +2582,12 @@ namespace CppSharp
InlineContentComment(CppSharp::Parser::AST::InlineContentComment^ _0);
~InlineContentComment();
property bool HasTrailingNewline
{
bool get();
void set(bool);
}
};
public ref class ParagraphComment : CppSharp::Parser::AST::BlockContentComment
@ -2853,6 +2859,12 @@ namespace CppSharp @@ -2853,6 +2859,12 @@ namespace CppSharp
unsigned int get();
}
property unsigned int CommandId
{
unsigned int get();
void set(unsigned int);
}
property CppSharp::Parser::AST::InlineCommandComment::RenderKind CommentRenderKind
{
CppSharp::Parser::AST::InlineCommandComment::RenderKind get();

99
src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/AST.cs

@ -10545,12 +10545,15 @@ namespace CppSharp @@ -10545,12 +10545,15 @@ namespace CppSharp
public unsafe partial class InlineContentComment : CppSharp.Parser.AST.Comment, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 4)]
[StructLayout(LayoutKind.Explicit, Size = 8)]
public new partial struct Internal
{
[FieldOffset(0)]
public CppSharp.Parser.AST.CommentKind Kind;
[FieldOffset(4)]
public byte HasTrailingNewline;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST20InlineContentCommentC2Ev")]
@ -10579,7 +10582,7 @@ namespace CppSharp @@ -10579,7 +10582,7 @@ namespace CppSharp
private static void* __CopyValue(InlineContentComment.Internal native)
{
var ret = Marshal.AllocHGlobal(4);
var ret = Marshal.AllocHGlobal(8);
*(InlineContentComment.Internal*) ret = native;
return ret.ToPointer();
}
@ -10603,7 +10606,7 @@ namespace CppSharp @@ -10603,7 +10606,7 @@ namespace CppSharp
public InlineContentComment()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(4);
__Instance = Marshal.AllocHGlobal(8);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@ -10612,7 +10615,7 @@ namespace CppSharp @@ -10612,7 +10615,7 @@ namespace CppSharp
public InlineContentComment(CppSharp.Parser.AST.CommentKind Kind)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(4);
__Instance = Marshal.AllocHGlobal(8);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
var arg0 = Kind;
@ -10622,11 +10625,24 @@ namespace CppSharp @@ -10622,11 +10625,24 @@ namespace CppSharp
public InlineContentComment(CppSharp.Parser.AST.InlineContentComment _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(4);
__Instance = Marshal.AllocHGlobal(8);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
*((InlineContentComment.Internal*) __Instance) = *((InlineContentComment.Internal*) _0.__Instance);
}
public bool HasTrailingNewline
{
get
{
return ((Internal*) __Instance)->HasTrailingNewline != 0;
}
set
{
((Internal*) __Instance)->HasTrailingNewline = (byte) (value ? 1 : 0);
}
}
}
public unsafe partial class ParagraphComment : CppSharp.Parser.AST.BlockContentComment, IDisposable
@ -11754,13 +11770,19 @@ namespace CppSharp @@ -11754,13 +11770,19 @@ namespace CppSharp
public unsafe partial class InlineCommandComment : CppSharp.Parser.AST.InlineContentComment, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 20)]
[StructLayout(LayoutKind.Explicit, Size = 28)]
public new partial struct Internal
{
[FieldOffset(0)]
public CppSharp.Parser.AST.CommentKind Kind;
[FieldOffset(4)]
public byte HasTrailingNewline;
[FieldOffset(8)]
public uint CommandId;
[FieldOffset(12)]
public CppSharp.Parser.AST.InlineCommandComment.RenderKind CommentRenderKind;
[SuppressUnmanagedCodeSecurity]
@ -11939,7 +11961,7 @@ namespace CppSharp @@ -11939,7 +11961,7 @@ namespace CppSharp
private static void* __CopyValue(InlineCommandComment.Internal native)
{
var ret = Marshal.AllocHGlobal(20);
var ret = Marshal.AllocHGlobal(28);
CppSharp.Parser.AST.InlineCommandComment.Internal.cctor_2(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
@ -11963,7 +11985,7 @@ namespace CppSharp @@ -11963,7 +11985,7 @@ namespace CppSharp
public InlineCommandComment()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(20);
__Instance = Marshal.AllocHGlobal(28);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@ -11972,7 +11994,7 @@ namespace CppSharp @@ -11972,7 +11994,7 @@ namespace CppSharp
public InlineCommandComment(CppSharp.Parser.AST.InlineCommandComment _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(20);
__Instance = Marshal.AllocHGlobal(28);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
@ -12019,6 +12041,19 @@ namespace CppSharp @@ -12019,6 +12041,19 @@ namespace CppSharp
}
}
public uint CommandId
{
get
{
return ((Internal*) __Instance)->CommandId;
}
set
{
((Internal*) __Instance)->CommandId = value;
}
}
public CppSharp.Parser.AST.InlineCommandComment.RenderKind CommentRenderKind
{
get
@ -12035,12 +12070,15 @@ namespace CppSharp @@ -12035,12 +12070,15 @@ namespace CppSharp
public unsafe partial class HTMLTagComment : CppSharp.Parser.AST.InlineContentComment, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 4)]
[StructLayout(LayoutKind.Explicit, Size = 8)]
public new partial struct Internal
{
[FieldOffset(0)]
public CppSharp.Parser.AST.CommentKind Kind;
[FieldOffset(4)]
public byte HasTrailingNewline;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST14HTMLTagCommentC2Ev")]
@ -12069,7 +12107,7 @@ namespace CppSharp @@ -12069,7 +12107,7 @@ namespace CppSharp
private static void* __CopyValue(HTMLTagComment.Internal native)
{
var ret = Marshal.AllocHGlobal(4);
var ret = Marshal.AllocHGlobal(8);
*(HTMLTagComment.Internal*) ret = native;
return ret.ToPointer();
}
@ -12093,7 +12131,7 @@ namespace CppSharp @@ -12093,7 +12131,7 @@ namespace CppSharp
public HTMLTagComment()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(4);
__Instance = Marshal.AllocHGlobal(8);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@ -12102,7 +12140,7 @@ namespace CppSharp @@ -12102,7 +12140,7 @@ namespace CppSharp
public HTMLTagComment(CppSharp.Parser.AST.CommentKind Kind)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(4);
__Instance = Marshal.AllocHGlobal(8);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
var arg0 = Kind;
@ -12112,7 +12150,7 @@ namespace CppSharp @@ -12112,7 +12150,7 @@ namespace CppSharp
public HTMLTagComment(CppSharp.Parser.AST.HTMLTagComment _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(4);
__Instance = Marshal.AllocHGlobal(8);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
*((HTMLTagComment.Internal*) __Instance) = *((HTMLTagComment.Internal*) _0.__Instance);
@ -12121,12 +12159,15 @@ namespace CppSharp @@ -12121,12 +12159,15 @@ namespace CppSharp
public unsafe partial class HTMLStartTagComment : CppSharp.Parser.AST.HTMLTagComment, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 28)]
[StructLayout(LayoutKind.Explicit, Size = 32)]
public new partial struct Internal
{
[FieldOffset(0)]
public CppSharp.Parser.AST.CommentKind Kind;
[FieldOffset(4)]
public byte HasTrailingNewline;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST19HTMLStartTagCommentC2Ev")]
@ -12331,7 +12372,7 @@ namespace CppSharp @@ -12331,7 +12372,7 @@ namespace CppSharp
private static void* __CopyValue(HTMLStartTagComment.Internal native)
{
var ret = Marshal.AllocHGlobal(28);
var ret = Marshal.AllocHGlobal(32);
CppSharp.Parser.AST.HTMLStartTagComment.Internal.cctor_2(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
@ -12355,7 +12396,7 @@ namespace CppSharp @@ -12355,7 +12396,7 @@ namespace CppSharp
public HTMLStartTagComment()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(28);
__Instance = Marshal.AllocHGlobal(32);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@ -12364,7 +12405,7 @@ namespace CppSharp @@ -12364,7 +12405,7 @@ namespace CppSharp
public HTMLStartTagComment(CppSharp.Parser.AST.HTMLStartTagComment _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(28);
__Instance = Marshal.AllocHGlobal(32);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
@ -12430,12 +12471,15 @@ namespace CppSharp @@ -12430,12 +12471,15 @@ namespace CppSharp
public unsafe partial class HTMLEndTagComment : CppSharp.Parser.AST.HTMLTagComment, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 16)]
[StructLayout(LayoutKind.Explicit, Size = 20)]
public new partial struct Internal
{
[FieldOffset(0)]
public CppSharp.Parser.AST.CommentKind Kind;
[FieldOffset(4)]
public byte HasTrailingNewline;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST17HTMLEndTagCommentC2Ev")]
@ -12474,7 +12518,7 @@ namespace CppSharp @@ -12474,7 +12518,7 @@ namespace CppSharp
private static void* __CopyValue(HTMLEndTagComment.Internal native)
{
var ret = Marshal.AllocHGlobal(16);
var ret = Marshal.AllocHGlobal(20);
CppSharp.Parser.AST.HTMLEndTagComment.Internal.cctor_2(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
@ -12498,7 +12542,7 @@ namespace CppSharp @@ -12498,7 +12542,7 @@ namespace CppSharp
public HTMLEndTagComment()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(16);
__Instance = Marshal.AllocHGlobal(20);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@ -12507,7 +12551,7 @@ namespace CppSharp @@ -12507,7 +12551,7 @@ namespace CppSharp
public HTMLEndTagComment(CppSharp.Parser.AST.HTMLEndTagComment _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(16);
__Instance = Marshal.AllocHGlobal(20);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
@ -12544,12 +12588,15 @@ namespace CppSharp @@ -12544,12 +12588,15 @@ namespace CppSharp
public unsafe partial class TextComment : CppSharp.Parser.AST.InlineContentComment, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 16)]
[StructLayout(LayoutKind.Explicit, Size = 20)]
public new partial struct Internal
{
[FieldOffset(0)]
public CppSharp.Parser.AST.CommentKind Kind;
[FieldOffset(4)]
public byte HasTrailingNewline;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST11TextCommentC2Ev")]
@ -12588,7 +12635,7 @@ namespace CppSharp @@ -12588,7 +12635,7 @@ namespace CppSharp
private static void* __CopyValue(TextComment.Internal native)
{
var ret = Marshal.AllocHGlobal(16);
var ret = Marshal.AllocHGlobal(20);
CppSharp.Parser.AST.TextComment.Internal.cctor_2(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
@ -12612,7 +12659,7 @@ namespace CppSharp @@ -12612,7 +12659,7 @@ namespace CppSharp
public TextComment()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(16);
__Instance = Marshal.AllocHGlobal(20);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@ -12621,7 +12668,7 @@ namespace CppSharp @@ -12621,7 +12668,7 @@ namespace CppSharp
public TextComment(CppSharp.Parser.AST.TextComment _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(16);
__Instance = Marshal.AllocHGlobal(20);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))

99
src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/AST.cs

@ -10545,12 +10545,15 @@ namespace CppSharp @@ -10545,12 +10545,15 @@ namespace CppSharp
public unsafe partial class InlineContentComment : CppSharp.Parser.AST.Comment, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 4)]
[StructLayout(LayoutKind.Explicit, Size = 8)]
public new partial struct Internal
{
[FieldOffset(0)]
public CppSharp.Parser.AST.CommentKind Kind;
[FieldOffset(4)]
public byte HasTrailingNewline;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??0InlineContentComment@AST@CppParser@CppSharp@@QAE@XZ")]
@ -10579,7 +10582,7 @@ namespace CppSharp @@ -10579,7 +10582,7 @@ namespace CppSharp
private static void* __CopyValue(InlineContentComment.Internal native)
{
var ret = Marshal.AllocHGlobal(4);
var ret = Marshal.AllocHGlobal(8);
*(InlineContentComment.Internal*) ret = native;
return ret.ToPointer();
}
@ -10603,7 +10606,7 @@ namespace CppSharp @@ -10603,7 +10606,7 @@ namespace CppSharp
public InlineContentComment()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(4);
__Instance = Marshal.AllocHGlobal(8);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@ -10612,7 +10615,7 @@ namespace CppSharp @@ -10612,7 +10615,7 @@ namespace CppSharp
public InlineContentComment(CppSharp.Parser.AST.CommentKind Kind)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(4);
__Instance = Marshal.AllocHGlobal(8);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
var arg0 = Kind;
@ -10622,11 +10625,24 @@ namespace CppSharp @@ -10622,11 +10625,24 @@ namespace CppSharp
public InlineContentComment(CppSharp.Parser.AST.InlineContentComment _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(4);
__Instance = Marshal.AllocHGlobal(8);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
*((InlineContentComment.Internal*) __Instance) = *((InlineContentComment.Internal*) _0.__Instance);
}
public bool HasTrailingNewline
{
get
{
return ((Internal*) __Instance)->HasTrailingNewline != 0;
}
set
{
((Internal*) __Instance)->HasTrailingNewline = (byte) (value ? 1 : 0);
}
}
}
public unsafe partial class ParagraphComment : CppSharp.Parser.AST.BlockContentComment, IDisposable
@ -11754,13 +11770,19 @@ namespace CppSharp @@ -11754,13 +11770,19 @@ namespace CppSharp
public unsafe partial class InlineCommandComment : CppSharp.Parser.AST.InlineContentComment, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 20)]
[StructLayout(LayoutKind.Explicit, Size = 28)]
public new partial struct Internal
{
[FieldOffset(0)]
public CppSharp.Parser.AST.CommentKind Kind;
[FieldOffset(4)]
public byte HasTrailingNewline;
[FieldOffset(8)]
public uint CommandId;
[FieldOffset(12)]
public CppSharp.Parser.AST.InlineCommandComment.RenderKind CommentRenderKind;
[SuppressUnmanagedCodeSecurity]
@ -11939,7 +11961,7 @@ namespace CppSharp @@ -11939,7 +11961,7 @@ namespace CppSharp
private static void* __CopyValue(InlineCommandComment.Internal native)
{
var ret = Marshal.AllocHGlobal(20);
var ret = Marshal.AllocHGlobal(28);
CppSharp.Parser.AST.InlineCommandComment.Internal.cctor_2(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
@ -11963,7 +11985,7 @@ namespace CppSharp @@ -11963,7 +11985,7 @@ namespace CppSharp
public InlineCommandComment()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(20);
__Instance = Marshal.AllocHGlobal(28);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@ -11972,7 +11994,7 @@ namespace CppSharp @@ -11972,7 +11994,7 @@ namespace CppSharp
public InlineCommandComment(CppSharp.Parser.AST.InlineCommandComment _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(20);
__Instance = Marshal.AllocHGlobal(28);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
@ -12019,6 +12041,19 @@ namespace CppSharp @@ -12019,6 +12041,19 @@ namespace CppSharp
}
}
public uint CommandId
{
get
{
return ((Internal*) __Instance)->CommandId;
}
set
{
((Internal*) __Instance)->CommandId = value;
}
}
public CppSharp.Parser.AST.InlineCommandComment.RenderKind CommentRenderKind
{
get
@ -12035,12 +12070,15 @@ namespace CppSharp @@ -12035,12 +12070,15 @@ namespace CppSharp
public unsafe partial class HTMLTagComment : CppSharp.Parser.AST.InlineContentComment, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 4)]
[StructLayout(LayoutKind.Explicit, Size = 8)]
public new partial struct Internal
{
[FieldOffset(0)]
public CppSharp.Parser.AST.CommentKind Kind;
[FieldOffset(4)]
public byte HasTrailingNewline;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??0HTMLTagComment@AST@CppParser@CppSharp@@QAE@XZ")]
@ -12069,7 +12107,7 @@ namespace CppSharp @@ -12069,7 +12107,7 @@ namespace CppSharp
private static void* __CopyValue(HTMLTagComment.Internal native)
{
var ret = Marshal.AllocHGlobal(4);
var ret = Marshal.AllocHGlobal(8);
*(HTMLTagComment.Internal*) ret = native;
return ret.ToPointer();
}
@ -12093,7 +12131,7 @@ namespace CppSharp @@ -12093,7 +12131,7 @@ namespace CppSharp
public HTMLTagComment()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(4);
__Instance = Marshal.AllocHGlobal(8);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@ -12102,7 +12140,7 @@ namespace CppSharp @@ -12102,7 +12140,7 @@ namespace CppSharp
public HTMLTagComment(CppSharp.Parser.AST.CommentKind Kind)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(4);
__Instance = Marshal.AllocHGlobal(8);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
var arg0 = Kind;
@ -12112,7 +12150,7 @@ namespace CppSharp @@ -12112,7 +12150,7 @@ namespace CppSharp
public HTMLTagComment(CppSharp.Parser.AST.HTMLTagComment _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(4);
__Instance = Marshal.AllocHGlobal(8);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
*((HTMLTagComment.Internal*) __Instance) = *((HTMLTagComment.Internal*) _0.__Instance);
@ -12121,12 +12159,15 @@ namespace CppSharp @@ -12121,12 +12159,15 @@ namespace CppSharp
public unsafe partial class HTMLStartTagComment : CppSharp.Parser.AST.HTMLTagComment, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 40)]
[StructLayout(LayoutKind.Explicit, Size = 44)]
public new partial struct Internal
{
[FieldOffset(0)]
public CppSharp.Parser.AST.CommentKind Kind;
[FieldOffset(4)]
public byte HasTrailingNewline;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??0HTMLStartTagComment@AST@CppParser@CppSharp@@QAE@XZ")]
@ -12331,7 +12372,7 @@ namespace CppSharp @@ -12331,7 +12372,7 @@ namespace CppSharp
private static void* __CopyValue(HTMLStartTagComment.Internal native)
{
var ret = Marshal.AllocHGlobal(40);
var ret = Marshal.AllocHGlobal(44);
CppSharp.Parser.AST.HTMLStartTagComment.Internal.cctor_2(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
@ -12355,7 +12396,7 @@ namespace CppSharp @@ -12355,7 +12396,7 @@ namespace CppSharp
public HTMLStartTagComment()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(40);
__Instance = Marshal.AllocHGlobal(44);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@ -12364,7 +12405,7 @@ namespace CppSharp @@ -12364,7 +12405,7 @@ namespace CppSharp
public HTMLStartTagComment(CppSharp.Parser.AST.HTMLStartTagComment _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(40);
__Instance = Marshal.AllocHGlobal(44);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
@ -12430,12 +12471,15 @@ namespace CppSharp @@ -12430,12 +12471,15 @@ namespace CppSharp
public unsafe partial class HTMLEndTagComment : CppSharp.Parser.AST.HTMLTagComment, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 28)]
[StructLayout(LayoutKind.Explicit, Size = 32)]
public new partial struct Internal
{
[FieldOffset(0)]
public CppSharp.Parser.AST.CommentKind Kind;
[FieldOffset(4)]
public byte HasTrailingNewline;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??0HTMLEndTagComment@AST@CppParser@CppSharp@@QAE@XZ")]
@ -12474,7 +12518,7 @@ namespace CppSharp @@ -12474,7 +12518,7 @@ namespace CppSharp
private static void* __CopyValue(HTMLEndTagComment.Internal native)
{
var ret = Marshal.AllocHGlobal(28);
var ret = Marshal.AllocHGlobal(32);
CppSharp.Parser.AST.HTMLEndTagComment.Internal.cctor_2(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
@ -12498,7 +12542,7 @@ namespace CppSharp @@ -12498,7 +12542,7 @@ namespace CppSharp
public HTMLEndTagComment()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(28);
__Instance = Marshal.AllocHGlobal(32);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@ -12507,7 +12551,7 @@ namespace CppSharp @@ -12507,7 +12551,7 @@ namespace CppSharp
public HTMLEndTagComment(CppSharp.Parser.AST.HTMLEndTagComment _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(28);
__Instance = Marshal.AllocHGlobal(32);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
@ -12544,12 +12588,15 @@ namespace CppSharp @@ -12544,12 +12588,15 @@ namespace CppSharp
public unsafe partial class TextComment : CppSharp.Parser.AST.InlineContentComment, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 28)]
[StructLayout(LayoutKind.Explicit, Size = 32)]
public new partial struct Internal
{
[FieldOffset(0)]
public CppSharp.Parser.AST.CommentKind Kind;
[FieldOffset(4)]
public byte HasTrailingNewline;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??0TextComment@AST@CppParser@CppSharp@@QAE@XZ")]
@ -12588,7 +12635,7 @@ namespace CppSharp @@ -12588,7 +12635,7 @@ namespace CppSharp
private static void* __CopyValue(TextComment.Internal native)
{
var ret = Marshal.AllocHGlobal(28);
var ret = Marshal.AllocHGlobal(32);
CppSharp.Parser.AST.TextComment.Internal.cctor_2(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
@ -12612,7 +12659,7 @@ namespace CppSharp @@ -12612,7 +12659,7 @@ namespace CppSharp
public TextComment()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(28);
__Instance = Marshal.AllocHGlobal(32);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@ -12621,7 +12668,7 @@ namespace CppSharp @@ -12621,7 +12668,7 @@ namespace CppSharp
public TextComment(CppSharp.Parser.AST.TextComment _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(28);
__Instance = Marshal.AllocHGlobal(32);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))

75
src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/AST.cs

@ -10544,12 +10544,15 @@ namespace CppSharp @@ -10544,12 +10544,15 @@ namespace CppSharp
public unsafe partial class InlineContentComment : CppSharp.Parser.AST.Comment, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 4)]
[StructLayout(LayoutKind.Explicit, Size = 8)]
public new partial struct Internal
{
[FieldOffset(0)]
public CppSharp.Parser.AST.CommentKind Kind;
[FieldOffset(4)]
public byte HasTrailingNewline;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST20InlineContentCommentC2Ev")]
@ -10578,7 +10581,7 @@ namespace CppSharp @@ -10578,7 +10581,7 @@ namespace CppSharp
private static void* __CopyValue(InlineContentComment.Internal native)
{
var ret = Marshal.AllocHGlobal(4);
var ret = Marshal.AllocHGlobal(8);
*(InlineContentComment.Internal*) ret = native;
return ret.ToPointer();
}
@ -10602,7 +10605,7 @@ namespace CppSharp @@ -10602,7 +10605,7 @@ namespace CppSharp
public InlineContentComment()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(4);
__Instance = Marshal.AllocHGlobal(8);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@ -10611,7 +10614,7 @@ namespace CppSharp @@ -10611,7 +10614,7 @@ namespace CppSharp
public InlineContentComment(CppSharp.Parser.AST.CommentKind Kind)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(4);
__Instance = Marshal.AllocHGlobal(8);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
var arg0 = Kind;
@ -10621,11 +10624,24 @@ namespace CppSharp @@ -10621,11 +10624,24 @@ namespace CppSharp
public InlineContentComment(CppSharp.Parser.AST.InlineContentComment _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(4);
__Instance = Marshal.AllocHGlobal(8);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
*((InlineContentComment.Internal*) __Instance) = *((InlineContentComment.Internal*) _0.__Instance);
}
public bool HasTrailingNewline
{
get
{
return ((Internal*) __Instance)->HasTrailingNewline != 0;
}
set
{
((Internal*) __Instance)->HasTrailingNewline = (byte) (value ? 1 : 0);
}
}
}
public unsafe partial class ParagraphComment : CppSharp.Parser.AST.BlockContentComment, IDisposable
@ -11753,13 +11769,19 @@ namespace CppSharp @@ -11753,13 +11769,19 @@ namespace CppSharp
public unsafe partial class InlineCommandComment : CppSharp.Parser.AST.InlineContentComment, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 32)]
[StructLayout(LayoutKind.Explicit, Size = 40)]
public new partial struct Internal
{
[FieldOffset(0)]
public CppSharp.Parser.AST.CommentKind Kind;
[FieldOffset(4)]
public byte HasTrailingNewline;
[FieldOffset(8)]
public uint CommandId;
[FieldOffset(12)]
public CppSharp.Parser.AST.InlineCommandComment.RenderKind CommentRenderKind;
[SuppressUnmanagedCodeSecurity]
@ -11938,7 +11960,7 @@ namespace CppSharp @@ -11938,7 +11960,7 @@ namespace CppSharp
private static void* __CopyValue(InlineCommandComment.Internal native)
{
var ret = Marshal.AllocHGlobal(32);
var ret = Marshal.AllocHGlobal(40);
CppSharp.Parser.AST.InlineCommandComment.Internal.cctor_2(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
@ -11962,7 +11984,7 @@ namespace CppSharp @@ -11962,7 +11984,7 @@ namespace CppSharp
public InlineCommandComment()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(32);
__Instance = Marshal.AllocHGlobal(40);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@ -11971,7 +11993,7 @@ namespace CppSharp @@ -11971,7 +11993,7 @@ namespace CppSharp
public InlineCommandComment(CppSharp.Parser.AST.InlineCommandComment _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(32);
__Instance = Marshal.AllocHGlobal(40);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
@ -12018,6 +12040,19 @@ namespace CppSharp @@ -12018,6 +12040,19 @@ namespace CppSharp
}
}
public uint CommandId
{
get
{
return ((Internal*) __Instance)->CommandId;
}
set
{
((Internal*) __Instance)->CommandId = value;
}
}
public CppSharp.Parser.AST.InlineCommandComment.RenderKind CommentRenderKind
{
get
@ -12034,12 +12069,15 @@ namespace CppSharp @@ -12034,12 +12069,15 @@ namespace CppSharp
public unsafe partial class HTMLTagComment : CppSharp.Parser.AST.InlineContentComment, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 4)]
[StructLayout(LayoutKind.Explicit, Size = 8)]
public new partial struct Internal
{
[FieldOffset(0)]
public CppSharp.Parser.AST.CommentKind Kind;
[FieldOffset(4)]
public byte HasTrailingNewline;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST14HTMLTagCommentC2Ev")]
@ -12068,7 +12106,7 @@ namespace CppSharp @@ -12068,7 +12106,7 @@ namespace CppSharp
private static void* __CopyValue(HTMLTagComment.Internal native)
{
var ret = Marshal.AllocHGlobal(4);
var ret = Marshal.AllocHGlobal(8);
*(HTMLTagComment.Internal*) ret = native;
return ret.ToPointer();
}
@ -12092,7 +12130,7 @@ namespace CppSharp @@ -12092,7 +12130,7 @@ namespace CppSharp
public HTMLTagComment()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(4);
__Instance = Marshal.AllocHGlobal(8);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@ -12101,7 +12139,7 @@ namespace CppSharp @@ -12101,7 +12139,7 @@ namespace CppSharp
public HTMLTagComment(CppSharp.Parser.AST.CommentKind Kind)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(4);
__Instance = Marshal.AllocHGlobal(8);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
var arg0 = Kind;
@ -12111,7 +12149,7 @@ namespace CppSharp @@ -12111,7 +12149,7 @@ namespace CppSharp
public HTMLTagComment(CppSharp.Parser.AST.HTMLTagComment _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(4);
__Instance = Marshal.AllocHGlobal(8);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
*((HTMLTagComment.Internal*) __Instance) = *((HTMLTagComment.Internal*) _0.__Instance);
@ -12126,6 +12164,9 @@ namespace CppSharp @@ -12126,6 +12164,9 @@ namespace CppSharp
[FieldOffset(0)]
public CppSharp.Parser.AST.CommentKind Kind;
[FieldOffset(4)]
public byte HasTrailingNewline;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST19HTMLStartTagCommentC2Ev")]
@ -12435,6 +12476,9 @@ namespace CppSharp @@ -12435,6 +12476,9 @@ namespace CppSharp
[FieldOffset(0)]
public CppSharp.Parser.AST.CommentKind Kind;
[FieldOffset(4)]
public byte HasTrailingNewline;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST17HTMLEndTagCommentC2Ev")]
@ -12549,6 +12593,9 @@ namespace CppSharp @@ -12549,6 +12593,9 @@ namespace CppSharp
[FieldOffset(0)]
public CppSharp.Parser.AST.CommentKind Kind;
[FieldOffset(4)]
public byte HasTrailingNewline;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST11TextCommentC2Ev")]

75
src/CppParser/Bindings/CSharp/x86_64-linux-gnu/AST.cs

@ -10544,12 +10544,15 @@ namespace CppSharp @@ -10544,12 +10544,15 @@ namespace CppSharp
public unsafe partial class InlineContentComment : CppSharp.Parser.AST.Comment, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 4)]
[StructLayout(LayoutKind.Explicit, Size = 8)]
public new partial struct Internal
{
[FieldOffset(0)]
public CppSharp.Parser.AST.CommentKind Kind;
[FieldOffset(4)]
public byte HasTrailingNewline;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST20InlineContentCommentC2Ev")]
@ -10578,7 +10581,7 @@ namespace CppSharp @@ -10578,7 +10581,7 @@ namespace CppSharp
private static void* __CopyValue(InlineContentComment.Internal native)
{
var ret = Marshal.AllocHGlobal(4);
var ret = Marshal.AllocHGlobal(8);
*(InlineContentComment.Internal*) ret = native;
return ret.ToPointer();
}
@ -10602,7 +10605,7 @@ namespace CppSharp @@ -10602,7 +10605,7 @@ namespace CppSharp
public InlineContentComment()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(4);
__Instance = Marshal.AllocHGlobal(8);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@ -10611,7 +10614,7 @@ namespace CppSharp @@ -10611,7 +10614,7 @@ namespace CppSharp
public InlineContentComment(CppSharp.Parser.AST.CommentKind Kind)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(4);
__Instance = Marshal.AllocHGlobal(8);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
var arg0 = Kind;
@ -10621,11 +10624,24 @@ namespace CppSharp @@ -10621,11 +10624,24 @@ namespace CppSharp
public InlineContentComment(CppSharp.Parser.AST.InlineContentComment _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(4);
__Instance = Marshal.AllocHGlobal(8);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
*((InlineContentComment.Internal*) __Instance) = *((InlineContentComment.Internal*) _0.__Instance);
}
public bool HasTrailingNewline
{
get
{
return ((Internal*) __Instance)->HasTrailingNewline != 0;
}
set
{
((Internal*) __Instance)->HasTrailingNewline = (byte) (value ? 1 : 0);
}
}
}
public unsafe partial class ParagraphComment : CppSharp.Parser.AST.BlockContentComment, IDisposable
@ -11753,13 +11769,19 @@ namespace CppSharp @@ -11753,13 +11769,19 @@ namespace CppSharp
public unsafe partial class InlineCommandComment : CppSharp.Parser.AST.InlineContentComment, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 32)]
[StructLayout(LayoutKind.Explicit, Size = 40)]
public new partial struct Internal
{
[FieldOffset(0)]
public CppSharp.Parser.AST.CommentKind Kind;
[FieldOffset(4)]
public byte HasTrailingNewline;
[FieldOffset(8)]
public uint CommandId;
[FieldOffset(12)]
public CppSharp.Parser.AST.InlineCommandComment.RenderKind CommentRenderKind;
[SuppressUnmanagedCodeSecurity]
@ -11938,7 +11960,7 @@ namespace CppSharp @@ -11938,7 +11960,7 @@ namespace CppSharp
private static void* __CopyValue(InlineCommandComment.Internal native)
{
var ret = Marshal.AllocHGlobal(32);
var ret = Marshal.AllocHGlobal(40);
CppSharp.Parser.AST.InlineCommandComment.Internal.cctor_2(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
@ -11962,7 +11984,7 @@ namespace CppSharp @@ -11962,7 +11984,7 @@ namespace CppSharp
public InlineCommandComment()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(32);
__Instance = Marshal.AllocHGlobal(40);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@ -11971,7 +11993,7 @@ namespace CppSharp @@ -11971,7 +11993,7 @@ namespace CppSharp
public InlineCommandComment(CppSharp.Parser.AST.InlineCommandComment _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(32);
__Instance = Marshal.AllocHGlobal(40);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
@ -12018,6 +12040,19 @@ namespace CppSharp @@ -12018,6 +12040,19 @@ namespace CppSharp
}
}
public uint CommandId
{
get
{
return ((Internal*) __Instance)->CommandId;
}
set
{
((Internal*) __Instance)->CommandId = value;
}
}
public CppSharp.Parser.AST.InlineCommandComment.RenderKind CommentRenderKind
{
get
@ -12034,12 +12069,15 @@ namespace CppSharp @@ -12034,12 +12069,15 @@ namespace CppSharp
public unsafe partial class HTMLTagComment : CppSharp.Parser.AST.InlineContentComment, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 4)]
[StructLayout(LayoutKind.Explicit, Size = 8)]
public new partial struct Internal
{
[FieldOffset(0)]
public CppSharp.Parser.AST.CommentKind Kind;
[FieldOffset(4)]
public byte HasTrailingNewline;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST14HTMLTagCommentC2Ev")]
@ -12068,7 +12106,7 @@ namespace CppSharp @@ -12068,7 +12106,7 @@ namespace CppSharp
private static void* __CopyValue(HTMLTagComment.Internal native)
{
var ret = Marshal.AllocHGlobal(4);
var ret = Marshal.AllocHGlobal(8);
*(HTMLTagComment.Internal*) ret = native;
return ret.ToPointer();
}
@ -12092,7 +12130,7 @@ namespace CppSharp @@ -12092,7 +12130,7 @@ namespace CppSharp
public HTMLTagComment()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(4);
__Instance = Marshal.AllocHGlobal(8);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@ -12101,7 +12139,7 @@ namespace CppSharp @@ -12101,7 +12139,7 @@ namespace CppSharp
public HTMLTagComment(CppSharp.Parser.AST.CommentKind Kind)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(4);
__Instance = Marshal.AllocHGlobal(8);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
var arg0 = Kind;
@ -12111,7 +12149,7 @@ namespace CppSharp @@ -12111,7 +12149,7 @@ namespace CppSharp
public HTMLTagComment(CppSharp.Parser.AST.HTMLTagComment _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(4);
__Instance = Marshal.AllocHGlobal(8);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
*((HTMLTagComment.Internal*) __Instance) = *((HTMLTagComment.Internal*) _0.__Instance);
@ -12126,6 +12164,9 @@ namespace CppSharp @@ -12126,6 +12164,9 @@ namespace CppSharp
[FieldOffset(0)]
public CppSharp.Parser.AST.CommentKind Kind;
[FieldOffset(4)]
public byte HasTrailingNewline;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST19HTMLStartTagCommentC2Ev")]
@ -12435,6 +12476,9 @@ namespace CppSharp @@ -12435,6 +12476,9 @@ namespace CppSharp
[FieldOffset(0)]
public CppSharp.Parser.AST.CommentKind Kind;
[FieldOffset(4)]
public byte HasTrailingNewline;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST17HTMLEndTagCommentC2Ev")]
@ -12549,6 +12593,9 @@ namespace CppSharp @@ -12549,6 +12593,9 @@ namespace CppSharp
[FieldOffset(0)]
public CppSharp.Parser.AST.CommentKind Kind;
[FieldOffset(4)]
public byte HasTrailingNewline;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZN8CppSharp9CppParser3AST11TextCommentC2Ev")]

75
src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/AST.cs

@ -10545,12 +10545,15 @@ namespace CppSharp @@ -10545,12 +10545,15 @@ namespace CppSharp
public unsafe partial class InlineContentComment : CppSharp.Parser.AST.Comment, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 4)]
[StructLayout(LayoutKind.Explicit, Size = 8)]
public new partial struct Internal
{
[FieldOffset(0)]
public CppSharp.Parser.AST.CommentKind Kind;
[FieldOffset(4)]
public byte HasTrailingNewline;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0InlineContentComment@AST@CppParser@CppSharp@@QEAA@XZ")]
@ -10579,7 +10582,7 @@ namespace CppSharp @@ -10579,7 +10582,7 @@ namespace CppSharp
private static void* __CopyValue(InlineContentComment.Internal native)
{
var ret = Marshal.AllocHGlobal(4);
var ret = Marshal.AllocHGlobal(8);
*(InlineContentComment.Internal*) ret = native;
return ret.ToPointer();
}
@ -10603,7 +10606,7 @@ namespace CppSharp @@ -10603,7 +10606,7 @@ namespace CppSharp
public InlineContentComment()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(4);
__Instance = Marshal.AllocHGlobal(8);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@ -10612,7 +10615,7 @@ namespace CppSharp @@ -10612,7 +10615,7 @@ namespace CppSharp
public InlineContentComment(CppSharp.Parser.AST.CommentKind Kind)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(4);
__Instance = Marshal.AllocHGlobal(8);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
var arg0 = Kind;
@ -10622,11 +10625,24 @@ namespace CppSharp @@ -10622,11 +10625,24 @@ namespace CppSharp
public InlineContentComment(CppSharp.Parser.AST.InlineContentComment _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(4);
__Instance = Marshal.AllocHGlobal(8);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
*((InlineContentComment.Internal*) __Instance) = *((InlineContentComment.Internal*) _0.__Instance);
}
public bool HasTrailingNewline
{
get
{
return ((Internal*) __Instance)->HasTrailingNewline != 0;
}
set
{
((Internal*) __Instance)->HasTrailingNewline = (byte) (value ? 1 : 0);
}
}
}
public unsafe partial class ParagraphComment : CppSharp.Parser.AST.BlockContentComment, IDisposable
@ -11754,13 +11770,19 @@ namespace CppSharp @@ -11754,13 +11770,19 @@ namespace CppSharp
public unsafe partial class InlineCommandComment : CppSharp.Parser.AST.InlineContentComment, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 32)]
[StructLayout(LayoutKind.Explicit, Size = 40)]
public new partial struct Internal
{
[FieldOffset(0)]
public CppSharp.Parser.AST.CommentKind Kind;
[FieldOffset(4)]
public byte HasTrailingNewline;
[FieldOffset(8)]
public uint CommandId;
[FieldOffset(12)]
public CppSharp.Parser.AST.InlineCommandComment.RenderKind CommentRenderKind;
[SuppressUnmanagedCodeSecurity]
@ -11939,7 +11961,7 @@ namespace CppSharp @@ -11939,7 +11961,7 @@ namespace CppSharp
private static void* __CopyValue(InlineCommandComment.Internal native)
{
var ret = Marshal.AllocHGlobal(32);
var ret = Marshal.AllocHGlobal(40);
CppSharp.Parser.AST.InlineCommandComment.Internal.cctor_2(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
@ -11963,7 +11985,7 @@ namespace CppSharp @@ -11963,7 +11985,7 @@ namespace CppSharp
public InlineCommandComment()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(32);
__Instance = Marshal.AllocHGlobal(40);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@ -11972,7 +11994,7 @@ namespace CppSharp @@ -11972,7 +11994,7 @@ namespace CppSharp
public InlineCommandComment(CppSharp.Parser.AST.InlineCommandComment _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(32);
__Instance = Marshal.AllocHGlobal(40);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
@ -12019,6 +12041,19 @@ namespace CppSharp @@ -12019,6 +12041,19 @@ namespace CppSharp
}
}
public uint CommandId
{
get
{
return ((Internal*) __Instance)->CommandId;
}
set
{
((Internal*) __Instance)->CommandId = value;
}
}
public CppSharp.Parser.AST.InlineCommandComment.RenderKind CommentRenderKind
{
get
@ -12035,12 +12070,15 @@ namespace CppSharp @@ -12035,12 +12070,15 @@ namespace CppSharp
public unsafe partial class HTMLTagComment : CppSharp.Parser.AST.InlineContentComment, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 4)]
[StructLayout(LayoutKind.Explicit, Size = 8)]
public new partial struct Internal
{
[FieldOffset(0)]
public CppSharp.Parser.AST.CommentKind Kind;
[FieldOffset(4)]
public byte HasTrailingNewline;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0HTMLTagComment@AST@CppParser@CppSharp@@QEAA@XZ")]
@ -12069,7 +12107,7 @@ namespace CppSharp @@ -12069,7 +12107,7 @@ namespace CppSharp
private static void* __CopyValue(HTMLTagComment.Internal native)
{
var ret = Marshal.AllocHGlobal(4);
var ret = Marshal.AllocHGlobal(8);
*(HTMLTagComment.Internal*) ret = native;
return ret.ToPointer();
}
@ -12093,7 +12131,7 @@ namespace CppSharp @@ -12093,7 +12131,7 @@ namespace CppSharp
public HTMLTagComment()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(4);
__Instance = Marshal.AllocHGlobal(8);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@ -12102,7 +12140,7 @@ namespace CppSharp @@ -12102,7 +12140,7 @@ namespace CppSharp
public HTMLTagComment(CppSharp.Parser.AST.CommentKind Kind)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(4);
__Instance = Marshal.AllocHGlobal(8);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
var arg0 = Kind;
@ -12112,7 +12150,7 @@ namespace CppSharp @@ -12112,7 +12150,7 @@ namespace CppSharp
public HTMLTagComment(CppSharp.Parser.AST.HTMLTagComment _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(4);
__Instance = Marshal.AllocHGlobal(8);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
*((HTMLTagComment.Internal*) __Instance) = *((HTMLTagComment.Internal*) _0.__Instance);
@ -12127,6 +12165,9 @@ namespace CppSharp @@ -12127,6 +12165,9 @@ namespace CppSharp
[FieldOffset(0)]
public CppSharp.Parser.AST.CommentKind Kind;
[FieldOffset(4)]
public byte HasTrailingNewline;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0HTMLStartTagComment@AST@CppParser@CppSharp@@QEAA@XZ")]
@ -12436,6 +12477,9 @@ namespace CppSharp @@ -12436,6 +12477,9 @@ namespace CppSharp
[FieldOffset(0)]
public CppSharp.Parser.AST.CommentKind Kind;
[FieldOffset(4)]
public byte HasTrailingNewline;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0HTMLEndTagComment@AST@CppParser@CppSharp@@QEAA@XZ")]
@ -12550,6 +12594,9 @@ namespace CppSharp @@ -12550,6 +12594,9 @@ namespace CppSharp
[FieldOffset(0)]
public CppSharp.Parser.AST.CommentKind Kind;
[FieldOffset(4)]
public byte HasTrailingNewline;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0TextComment@AST@CppParser@CppSharp@@QEAA@XZ")]

11
src/CppParser/Comments.cpp

@ -81,6 +81,12 @@ ConvertParamPassDirection(clang::comments::ParamCommandComment::PassDirection Di @@ -81,6 +81,12 @@ ConvertParamPassDirection(clang::comments::ParamCommandComment::PassDirection Di
llvm_unreachable("Unknown parameter pass direction");
}
static void HandleInlineContent(const clang::comments::InlineContentComment *CK,
InlineContentComment* IC)
{
IC->HasTrailingNewline = CK->hasTrailingNewline();
}
static void HandleBlockCommand(const clang::comments::BlockCommandComment *CK,
BlockCommandComment* BC)
{
@ -187,6 +193,7 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C) @@ -187,6 +193,7 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C)
auto CK = cast<clang::comments::HTMLStartTagComment>(C);
auto TC = new HTMLStartTagComment();
_Comment = TC;
HandleInlineContent(CK, TC);
TC->TagName = CK->getTagName();
for (unsigned I = 0, E = CK->getNumAttrs(); I != E; ++I)
{
@ -203,6 +210,7 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C) @@ -203,6 +210,7 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C)
auto CK = cast<clang::comments::HTMLEndTagComment>(C);
auto TC = new HTMLEndTagComment();
_Comment = TC;
HandleInlineContent(CK, TC);
TC->TagName = CK->getTagName();
break;
}
@ -211,6 +219,7 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C) @@ -211,6 +219,7 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C)
auto CK = cast<clang::comments::TextComment>(C);
auto TC = new TextComment();
_Comment = TC;
HandleInlineContent(CK, TC);
TC->Text = CK->getText();
break;
}
@ -219,6 +228,8 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C) @@ -219,6 +228,8 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C)
auto CK = cast<clang::comments::InlineCommandComment>(C);
auto IC = new InlineCommandComment();
_Comment = IC;
HandleInlineContent(CK, IC);
IC->CommandId = CK->getCommandID();
IC->CommentRenderKind = ConvertRenderKind(CK->getRenderKind());
for (unsigned I = 0, E = CK->getNumArgs(); I != E; ++I)
{

Loading…
Cancel
Save