Browse Source

Exposed in our AST the real comment behind a block comment.

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

2
src/AST/Comment.cs

@ -174,6 +174,8 @@ namespace CppSharp.AST @@ -174,6 +174,8 @@ namespace CppSharp.AST
get { return (CommentCommandKind) CommandId; }
}
public ParagraphComment ParagraphComment { get; set; }
public List<Argument> Arguments;
public BlockCommandComment()

4
src/Core/Parser/ASTConverter.cs

@ -1670,6 +1670,7 @@ namespace CppSharp @@ -1670,6 +1670,7 @@ namespace CppSharp
break;
}
paramCommandComment.ParamIndex = comment.ParamIndex;
VisitBlockCommandComment(paramCommandComment, comment);
return paramCommandComment;
}
@ -1748,9 +1749,10 @@ namespace CppSharp @@ -1748,9 +1749,10 @@ namespace CppSharp
return new AST.VerbatimBlockLineComment { Text = comment.Text };
}
private static void VisitBlockCommandComment(AST.BlockCommandComment blockCommandComment, BlockCommandComment comment)
private void VisitBlockCommandComment(AST.BlockCommandComment blockCommandComment, BlockCommandComment comment)
{
blockCommandComment.CommandId = comment.CommandId;
blockCommandComment.ParagraphComment = (AST.ParagraphComment) Visit(comment.ParagraphComment);
for (uint i = 0; i < comment.ArgumentsCount; i++)
{
var argument = new AST.BlockCommandComment.Argument { Text = comment.getArguments(i).Text };

9
src/CppParser/AST.cpp

@ -848,9 +848,14 @@ BlockCommandComment::Argument::Argument(const Argument& rhs) : Text(rhs.Text) {} @@ -848,9 +848,14 @@ BlockCommandComment::Argument::Argument(const Argument& rhs) : Text(rhs.Text) {}
DEF_STRING(BlockCommandComment::Argument, Text)
BlockCommandComment::BlockCommandComment() : BlockContentComment(CommentKind::BlockCommandComment), CommandId(0) {}
BlockCommandComment::BlockCommandComment() : BlockContentComment(CommentKind::BlockCommandComment), CommandId(0), ParagraphComment(0) {}
BlockCommandComment::BlockCommandComment(CommentKind Kind) : BlockContentComment(Kind) {}
BlockCommandComment::BlockCommandComment(CommentKind Kind) : BlockContentComment(Kind), CommandId(0), ParagraphComment(0) {}
BlockCommandComment::~BlockCommandComment()
{
delete ParagraphComment;
}
DEF_VECTOR(BlockCommandComment, BlockCommandComment::Argument, Arguments)

34
src/CppParser/AST.h

@ -950,6 +950,22 @@ public: @@ -950,6 +950,22 @@ public:
VECTOR(BlockContentComment*, Blocks)
};
class CS_API InlineContentComment : public Comment
{
public:
InlineContentComment();
InlineContentComment(CommentKind Kind);
};
class CS_API ParagraphComment : public BlockContentComment
{
public:
ParagraphComment();
~ParagraphComment();
bool IsWhitespace;
VECTOR(InlineContentComment*, Content)
};
class CS_API BlockCommandComment : public BlockContentComment
{
public:
@ -962,7 +978,9 @@ public: @@ -962,7 +978,9 @@ public:
};
BlockCommandComment();
BlockCommandComment(CommentKind Kind);
~BlockCommandComment();
unsigned CommandId;
ParagraphComment* ParagraphComment;
VECTOR(Argument, Arguments)
};
@ -1009,22 +1027,6 @@ public: @@ -1009,22 +1027,6 @@ public:
STRING(Text)
};
class CS_API InlineContentComment : public Comment
{
public:
InlineContentComment();
InlineContentComment(CommentKind Kind);
};
class CS_API ParagraphComment : public BlockContentComment
{
public:
ParagraphComment();
~ParagraphComment();
bool IsWhitespace;
VECTOR(InlineContentComment*, Content)
};
class CS_API InlineCommandComment : public InlineContentComment
{
public:

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

@ -4575,6 +4575,118 @@ unsigned int CppSharp::Parser::AST::FullComment::BlocksCount::get() @@ -4575,6 +4575,118 @@ unsigned int CppSharp::Parser::AST::FullComment::BlocksCount::get()
return __ret;
}
CppSharp::Parser::AST::InlineContentComment::InlineContentComment(::CppSharp::CppParser::AST::InlineContentComment* native)
: CppSharp::Parser::AST::Comment((::CppSharp::CppParser::AST::Comment*)native)
{
}
CppSharp::Parser::AST::InlineContentComment^ CppSharp::Parser::AST::InlineContentComment::__CreateInstance(::System::IntPtr native)
{
return gcnew ::CppSharp::Parser::AST::InlineContentComment((::CppSharp::CppParser::AST::InlineContentComment*) native.ToPointer());
}
CppSharp::Parser::AST::InlineContentComment::~InlineContentComment()
{
}
CppSharp::Parser::AST::InlineContentComment::InlineContentComment()
: CppSharp::Parser::AST::Comment((::CppSharp::CppParser::AST::Comment*)nullptr)
{
__ownsNativeInstance = true;
NativePtr = new ::CppSharp::CppParser::AST::InlineContentComment();
}
CppSharp::Parser::AST::InlineContentComment::InlineContentComment(CppSharp::Parser::AST::CommentKind Kind)
: CppSharp::Parser::AST::Comment((::CppSharp::CppParser::AST::Comment*)nullptr)
{
__ownsNativeInstance = true;
auto arg0 = (::CppSharp::CppParser::AST::CommentKind)Kind;
NativePtr = new ::CppSharp::CppParser::AST::InlineContentComment(arg0);
}
CppSharp::Parser::AST::InlineContentComment::InlineContentComment(CppSharp::Parser::AST::InlineContentComment^ _0)
: CppSharp::Parser::AST::Comment((::CppSharp::CppParser::AST::Comment*)nullptr)
{
__ownsNativeInstance = true;
if (ReferenceEquals(_0, nullptr))
throw gcnew ::System::ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
auto &arg0 = *(::CppSharp::CppParser::AST::InlineContentComment*)_0->NativePtr;
NativePtr = new ::CppSharp::CppParser::AST::InlineContentComment(arg0);
}
CppSharp::Parser::AST::ParagraphComment::ParagraphComment(::CppSharp::CppParser::AST::ParagraphComment* native)
: CppSharp::Parser::AST::BlockContentComment((::CppSharp::CppParser::AST::BlockContentComment*)native)
{
}
CppSharp::Parser::AST::ParagraphComment^ CppSharp::Parser::AST::ParagraphComment::__CreateInstance(::System::IntPtr native)
{
return gcnew ::CppSharp::Parser::AST::ParagraphComment((::CppSharp::CppParser::AST::ParagraphComment*) native.ToPointer());
}
CppSharp::Parser::AST::ParagraphComment::~ParagraphComment()
{
if (NativePtr)
{
auto __nativePtr = NativePtr;
NativePtr = 0;
delete (::CppSharp::CppParser::AST::ParagraphComment*) __nativePtr;
}
}
CppSharp::Parser::AST::ParagraphComment::ParagraphComment()
: CppSharp::Parser::AST::BlockContentComment((::CppSharp::CppParser::AST::BlockContentComment*)nullptr)
{
__ownsNativeInstance = true;
NativePtr = new ::CppSharp::CppParser::AST::ParagraphComment();
}
CppSharp::Parser::AST::InlineContentComment^ CppSharp::Parser::AST::ParagraphComment::getContent(unsigned int i)
{
auto __ret = ((::CppSharp::CppParser::AST::ParagraphComment*)NativePtr)->getContent(i);
if (__ret == nullptr) return nullptr;
return (__ret == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::InlineContentComment((::CppSharp::CppParser::AST::InlineContentComment*)__ret);
}
void CppSharp::Parser::AST::ParagraphComment::addContent(CppSharp::Parser::AST::InlineContentComment^ s)
{
if (ReferenceEquals(s, nullptr))
throw gcnew ::System::ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
auto arg0 = (::CppSharp::CppParser::AST::InlineContentComment*)s->NativePtr;
((::CppSharp::CppParser::AST::ParagraphComment*)NativePtr)->addContent(arg0);
}
void CppSharp::Parser::AST::ParagraphComment::clearContent()
{
((::CppSharp::CppParser::AST::ParagraphComment*)NativePtr)->clearContent();
}
CppSharp::Parser::AST::ParagraphComment::ParagraphComment(CppSharp::Parser::AST::ParagraphComment^ _0)
: CppSharp::Parser::AST::BlockContentComment((::CppSharp::CppParser::AST::BlockContentComment*)nullptr)
{
__ownsNativeInstance = true;
if (ReferenceEquals(_0, nullptr))
throw gcnew ::System::ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
auto &arg0 = *(::CppSharp::CppParser::AST::ParagraphComment*)_0->NativePtr;
NativePtr = new ::CppSharp::CppParser::AST::ParagraphComment(arg0);
}
unsigned int CppSharp::Parser::AST::ParagraphComment::ContentCount::get()
{
auto __ret = ((::CppSharp::CppParser::AST::ParagraphComment*)NativePtr)->getContentCount();
return __ret;
}
bool CppSharp::Parser::AST::ParagraphComment::IsWhitespace::get()
{
return ((::CppSharp::CppParser::AST::ParagraphComment*)NativePtr)->IsWhitespace;
}
void CppSharp::Parser::AST::ParagraphComment::IsWhitespace::set(bool value)
{
((::CppSharp::CppParser::AST::ParagraphComment*)NativePtr)->IsWhitespace = value;
}
CppSharp::Parser::AST::BlockCommandComment::Argument::Argument(::CppSharp::CppParser::AST::BlockCommandComment::Argument* native)
: __ownsNativeInstance(false)
{
@ -4711,6 +4823,16 @@ void CppSharp::Parser::AST::BlockCommandComment::CommandId::set(unsigned int val @@ -4711,6 +4823,16 @@ void CppSharp::Parser::AST::BlockCommandComment::CommandId::set(unsigned int val
((::CppSharp::CppParser::AST::BlockCommandComment*)NativePtr)->CommandId = value;
}
CppSharp::Parser::AST::ParagraphComment^ CppSharp::Parser::AST::BlockCommandComment::ParagraphComment::get()
{
return (((::CppSharp::CppParser::AST::BlockCommandComment*)NativePtr)->ParagraphComment == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::ParagraphComment((::CppSharp::CppParser::AST::ParagraphComment*)((::CppSharp::CppParser::AST::BlockCommandComment*)NativePtr)->ParagraphComment);
}
void CppSharp::Parser::AST::BlockCommandComment::ParagraphComment::set(CppSharp::Parser::AST::ParagraphComment^ value)
{
((::CppSharp::CppParser::AST::BlockCommandComment*)NativePtr)->ParagraphComment = (::CppSharp::CppParser::AST::ParagraphComment*)value->NativePtr;
}
CppSharp::Parser::AST::ParamCommandComment::ParamCommandComment(::CppSharp::CppParser::AST::ParamCommandComment* native)
: CppSharp::Parser::AST::BlockCommandComment((::CppSharp::CppParser::AST::BlockCommandComment*)native)
{
@ -4994,118 +5116,6 @@ void CppSharp::Parser::AST::VerbatimLineComment::Text::set(System::String^ s) @@ -4994,118 +5116,6 @@ void CppSharp::Parser::AST::VerbatimLineComment::Text::set(System::String^ s)
((::CppSharp::CppParser::AST::VerbatimLineComment*)NativePtr)->setText(arg0);
}
CppSharp::Parser::AST::InlineContentComment::InlineContentComment(::CppSharp::CppParser::AST::InlineContentComment* native)
: CppSharp::Parser::AST::Comment((::CppSharp::CppParser::AST::Comment*)native)
{
}
CppSharp::Parser::AST::InlineContentComment^ CppSharp::Parser::AST::InlineContentComment::__CreateInstance(::System::IntPtr native)
{
return gcnew ::CppSharp::Parser::AST::InlineContentComment((::CppSharp::CppParser::AST::InlineContentComment*) native.ToPointer());
}
CppSharp::Parser::AST::InlineContentComment::~InlineContentComment()
{
}
CppSharp::Parser::AST::InlineContentComment::InlineContentComment()
: CppSharp::Parser::AST::Comment((::CppSharp::CppParser::AST::Comment*)nullptr)
{
__ownsNativeInstance = true;
NativePtr = new ::CppSharp::CppParser::AST::InlineContentComment();
}
CppSharp::Parser::AST::InlineContentComment::InlineContentComment(CppSharp::Parser::AST::CommentKind Kind)
: CppSharp::Parser::AST::Comment((::CppSharp::CppParser::AST::Comment*)nullptr)
{
__ownsNativeInstance = true;
auto arg0 = (::CppSharp::CppParser::AST::CommentKind)Kind;
NativePtr = new ::CppSharp::CppParser::AST::InlineContentComment(arg0);
}
CppSharp::Parser::AST::InlineContentComment::InlineContentComment(CppSharp::Parser::AST::InlineContentComment^ _0)
: CppSharp::Parser::AST::Comment((::CppSharp::CppParser::AST::Comment*)nullptr)
{
__ownsNativeInstance = true;
if (ReferenceEquals(_0, nullptr))
throw gcnew ::System::ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
auto &arg0 = *(::CppSharp::CppParser::AST::InlineContentComment*)_0->NativePtr;
NativePtr = new ::CppSharp::CppParser::AST::InlineContentComment(arg0);
}
CppSharp::Parser::AST::ParagraphComment::ParagraphComment(::CppSharp::CppParser::AST::ParagraphComment* native)
: CppSharp::Parser::AST::BlockContentComment((::CppSharp::CppParser::AST::BlockContentComment*)native)
{
}
CppSharp::Parser::AST::ParagraphComment^ CppSharp::Parser::AST::ParagraphComment::__CreateInstance(::System::IntPtr native)
{
return gcnew ::CppSharp::Parser::AST::ParagraphComment((::CppSharp::CppParser::AST::ParagraphComment*) native.ToPointer());
}
CppSharp::Parser::AST::ParagraphComment::~ParagraphComment()
{
if (NativePtr)
{
auto __nativePtr = NativePtr;
NativePtr = 0;
delete (::CppSharp::CppParser::AST::ParagraphComment*) __nativePtr;
}
}
CppSharp::Parser::AST::ParagraphComment::ParagraphComment()
: CppSharp::Parser::AST::BlockContentComment((::CppSharp::CppParser::AST::BlockContentComment*)nullptr)
{
__ownsNativeInstance = true;
NativePtr = new ::CppSharp::CppParser::AST::ParagraphComment();
}
CppSharp::Parser::AST::InlineContentComment^ CppSharp::Parser::AST::ParagraphComment::getContent(unsigned int i)
{
auto __ret = ((::CppSharp::CppParser::AST::ParagraphComment*)NativePtr)->getContent(i);
if (__ret == nullptr) return nullptr;
return (__ret == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::InlineContentComment((::CppSharp::CppParser::AST::InlineContentComment*)__ret);
}
void CppSharp::Parser::AST::ParagraphComment::addContent(CppSharp::Parser::AST::InlineContentComment^ s)
{
if (ReferenceEquals(s, nullptr))
throw gcnew ::System::ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
auto arg0 = (::CppSharp::CppParser::AST::InlineContentComment*)s->NativePtr;
((::CppSharp::CppParser::AST::ParagraphComment*)NativePtr)->addContent(arg0);
}
void CppSharp::Parser::AST::ParagraphComment::clearContent()
{
((::CppSharp::CppParser::AST::ParagraphComment*)NativePtr)->clearContent();
}
CppSharp::Parser::AST::ParagraphComment::ParagraphComment(CppSharp::Parser::AST::ParagraphComment^ _0)
: CppSharp::Parser::AST::BlockContentComment((::CppSharp::CppParser::AST::BlockContentComment*)nullptr)
{
__ownsNativeInstance = true;
if (ReferenceEquals(_0, nullptr))
throw gcnew ::System::ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
auto &arg0 = *(::CppSharp::CppParser::AST::ParagraphComment*)_0->NativePtr;
NativePtr = new ::CppSharp::CppParser::AST::ParagraphComment(arg0);
}
unsigned int CppSharp::Parser::AST::ParagraphComment::ContentCount::get()
{
auto __ret = ((::CppSharp::CppParser::AST::ParagraphComment*)NativePtr)->getContentCount();
return __ret;
}
bool CppSharp::Parser::AST::ParagraphComment::IsWhitespace::get()
{
return ((::CppSharp::CppParser::AST::ParagraphComment*)NativePtr)->IsWhitespace;
}
void CppSharp::Parser::AST::ParagraphComment::IsWhitespace::set(bool value)
{
((::CppSharp::CppParser::AST::ParagraphComment*)NativePtr)->IsWhitespace = value;
}
CppSharp::Parser::AST::InlineCommandComment::Argument::Argument(::CppSharp::CppParser::AST::InlineCommandComment::Argument* native)
: __ownsNativeInstance(false)
{

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

@ -2569,6 +2569,51 @@ namespace CppSharp @@ -2569,6 +2569,51 @@ namespace CppSharp
void clearBlocks();
};
public ref class InlineContentComment : CppSharp::Parser::AST::Comment
{
public:
InlineContentComment(::CppSharp::CppParser::AST::InlineContentComment* native);
static InlineContentComment^ __CreateInstance(::System::IntPtr native);
InlineContentComment();
InlineContentComment(CppSharp::Parser::AST::CommentKind Kind);
InlineContentComment(CppSharp::Parser::AST::InlineContentComment^ _0);
~InlineContentComment();
};
public ref class ParagraphComment : CppSharp::Parser::AST::BlockContentComment
{
public:
ParagraphComment(::CppSharp::CppParser::AST::ParagraphComment* native);
static ParagraphComment^ __CreateInstance(::System::IntPtr native);
ParagraphComment();
ParagraphComment(CppSharp::Parser::AST::ParagraphComment^ _0);
~ParagraphComment();
property unsigned int ContentCount
{
unsigned int get();
}
property bool IsWhitespace
{
bool get();
void set(bool);
}
CppSharp::Parser::AST::InlineContentComment^ getContent(unsigned int i);
void addContent(CppSharp::Parser::AST::InlineContentComment^ s);
void clearContent();
};
public ref class BlockCommandComment : CppSharp::Parser::AST::BlockContentComment
{
public:
@ -2623,6 +2668,12 @@ namespace CppSharp @@ -2623,6 +2668,12 @@ namespace CppSharp
void set(unsigned int);
}
property CppSharp::Parser::AST::ParagraphComment^ ParagraphComment
{
CppSharp::Parser::AST::ParagraphComment^ get();
void set(CppSharp::Parser::AST::ParagraphComment^);
}
CppSharp::Parser::AST::BlockCommandComment::Argument^ getArguments(unsigned int i);
void addArguments(CppSharp::Parser::AST::BlockCommandComment::Argument^ s);
@ -2748,51 +2799,6 @@ namespace CppSharp @@ -2748,51 +2799,6 @@ namespace CppSharp
}
};
public ref class InlineContentComment : CppSharp::Parser::AST::Comment
{
public:
InlineContentComment(::CppSharp::CppParser::AST::InlineContentComment* native);
static InlineContentComment^ __CreateInstance(::System::IntPtr native);
InlineContentComment();
InlineContentComment(CppSharp::Parser::AST::CommentKind Kind);
InlineContentComment(CppSharp::Parser::AST::InlineContentComment^ _0);
~InlineContentComment();
};
public ref class ParagraphComment : CppSharp::Parser::AST::BlockContentComment
{
public:
ParagraphComment(::CppSharp::CppParser::AST::ParagraphComment* native);
static ParagraphComment^ __CreateInstance(::System::IntPtr native);
ParagraphComment();
ParagraphComment(CppSharp::Parser::AST::ParagraphComment^ _0);
~ParagraphComment();
property unsigned int ContentCount
{
unsigned int get();
}
property bool IsWhitespace
{
bool get();
void set(bool);
}
CppSharp::Parser::AST::InlineContentComment^ getContent(unsigned int i);
void addContent(CppSharp::Parser::AST::InlineContentComment^ s);
void clearContent();
};
public ref class InlineCommandComment : CppSharp::Parser::AST::InlineContentComment
{
public:

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

File diff suppressed because it is too large Load Diff

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

@ -10543,7 +10543,93 @@ namespace CppSharp @@ -10543,7 +10543,93 @@ namespace CppSharp
}
}
public unsafe partial class BlockCommandComment : CppSharp.Parser.AST.BlockContentComment, IDisposable
public unsafe partial class InlineContentComment : CppSharp.Parser.AST.Comment, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 4)]
public new partial struct Internal
{
[FieldOffset(0)]
public CppSharp.Parser.AST.CommentKind Kind;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??0InlineContentComment@AST@CppParser@CppSharp@@QAE@XZ")]
internal static extern global::System.IntPtr ctor_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??0InlineContentComment@AST@CppParser@CppSharp@@QAE@W4CommentKind@123@@Z")]
internal static extern global::System.IntPtr ctor_1(global::System.IntPtr instance, CppSharp.Parser.AST.CommentKind Kind);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??0InlineContentComment@AST@CppParser@CppSharp@@QAE@ABV0123@@Z")]
internal static extern global::System.IntPtr cctor_2(global::System.IntPtr instance, global::System.IntPtr _0);
}
public static new InlineContentComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new InlineContentComment(native.ToPointer(), skipVTables);
}
public static InlineContentComment __CreateInstance(InlineContentComment.Internal native, bool skipVTables = false)
{
return new InlineContentComment(native, skipVTables);
}
private static void* __CopyValue(InlineContentComment.Internal native)
{
var ret = Marshal.AllocHGlobal(4);
*(InlineContentComment.Internal*) ret = native;
return ret.ToPointer();
}
private InlineContentComment(InlineContentComment.Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected InlineContentComment(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public InlineContentComment()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(4);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
}
public InlineContentComment(CppSharp.Parser.AST.CommentKind Kind)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(4);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
var arg0 = Kind;
Internal.ctor_1((__Instance + __PointerAdjustment), arg0);
}
public InlineContentComment(CppSharp.Parser.AST.InlineContentComment _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(4);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
*((InlineContentComment.Internal*) __Instance) = *((InlineContentComment.Internal*) _0.__Instance);
}
}
public unsafe partial class ParagraphComment : CppSharp.Parser.AST.BlockContentComment, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 20)]
public new partial struct Internal
@ -10551,9 +10637,169 @@ namespace CppSharp @@ -10551,9 +10637,169 @@ namespace CppSharp
[FieldOffset(0)]
public CppSharp.Parser.AST.CommentKind Kind;
[FieldOffset(4)]
public byte IsWhitespace;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??0ParagraphComment@AST@CppParser@CppSharp@@QAE@XZ")]
internal static extern global::System.IntPtr ctor_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??0ParagraphComment@AST@CppParser@CppSharp@@QAE@ABV0123@@Z")]
internal static extern global::System.IntPtr cctor_1(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??1ParagraphComment@AST@CppParser@CppSharp@@QAE@XZ")]
internal static extern void dtor_0(global::System.IntPtr instance, int delete);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="?getContent@ParagraphComment@AST@CppParser@CppSharp@@QAEPAVInlineContentComment@234@I@Z")]
internal static extern global::System.IntPtr getContent_0(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="?addContent@ParagraphComment@AST@CppParser@CppSharp@@QAEXAAPAVInlineContentComment@234@@Z")]
internal static extern void addContent_0(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="?clearContent@ParagraphComment@AST@CppParser@CppSharp@@QAEXXZ")]
internal static extern void clearContent_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="?getContentCount@ParagraphComment@AST@CppParser@CppSharp@@QAEIXZ")]
internal static extern uint getContentCount_0(global::System.IntPtr instance);
}
public static new ParagraphComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new ParagraphComment(native.ToPointer(), skipVTables);
}
public static ParagraphComment __CreateInstance(ParagraphComment.Internal native, bool skipVTables = false)
{
return new ParagraphComment(native, skipVTables);
}
private static void* __CopyValue(ParagraphComment.Internal native)
{
var ret = Marshal.AllocHGlobal(20);
CppSharp.Parser.AST.ParagraphComment.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private ParagraphComment(ParagraphComment.Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected ParagraphComment(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public ParagraphComment()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(20);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
}
public ParagraphComment(CppSharp.Parser.AST.ParagraphComment _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(20);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var arg0 = _0.__Instance;
Internal.cctor_1((__Instance + __PointerAdjustment), arg0);
}
protected override void Dispose(bool disposing)
{
CppSharp.Parser.AST.Comment __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
Internal.dtor_0((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
}
public CppSharp.Parser.AST.InlineContentComment getContent(uint i)
{
var __ret = Internal.getContent_0((__Instance + __PointerAdjustment), i);
CppSharp.Parser.AST.InlineContentComment __result0;
if (__ret == IntPtr.Zero) __result0 = null;
else if (CppSharp.Parser.AST.InlineContentComment.NativeToManagedMap.ContainsKey(__ret))
__result0 = (CppSharp.Parser.AST.InlineContentComment) CppSharp.Parser.AST.InlineContentComment.NativeToManagedMap[__ret];
else __result0 = CppSharp.Parser.AST.InlineContentComment.__CreateInstance(__ret);
return __result0;
}
public void addContent(CppSharp.Parser.AST.InlineContentComment s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var arg0 = s.__Instance;
Internal.addContent_0((__Instance + __PointerAdjustment), arg0);
}
public void clearContent()
{
Internal.clearContent_0((__Instance + __PointerAdjustment));
}
public uint ContentCount
{
get
{
var __ret = Internal.getContentCount_0((__Instance + __PointerAdjustment));
return __ret;
}
}
public bool IsWhitespace
{
get
{
return ((Internal*) __Instance)->IsWhitespace != 0;
}
set
{
((Internal*) __Instance)->IsWhitespace = (byte) (value ? 1 : 0);
}
}
}
public unsafe partial class BlockCommandComment : CppSharp.Parser.AST.BlockContentComment, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 24)]
public new partial struct Internal
{
[FieldOffset(0)]
public CppSharp.Parser.AST.CommentKind Kind;
[FieldOffset(4)]
public uint CommandId;
[FieldOffset(8)]
public global::System.IntPtr ParagraphComment;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??0BlockCommandComment@AST@CppParser@CppSharp@@QAE@XZ")]
@ -10567,7 +10813,7 @@ namespace CppSharp @@ -10567,7 +10813,7 @@ namespace CppSharp
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??0BlockCommandComment@AST@CppParser@CppSharp@@QAE@ABV0123@@Z")]
internal static extern global::System.IntPtr cctor_3(global::System.IntPtr instance, global::System.IntPtr _0);
internal static extern global::System.IntPtr cctor_2(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
@ -10727,8 +10973,8 @@ namespace CppSharp @@ -10727,8 +10973,8 @@ namespace CppSharp
private static void* __CopyValue(BlockCommandComment.Internal native)
{
var ret = Marshal.AllocHGlobal(20);
CppSharp.Parser.AST.BlockCommandComment.Internal.cctor_3(ret, new global::System.IntPtr(&native));
var ret = Marshal.AllocHGlobal(24);
CppSharp.Parser.AST.BlockCommandComment.Internal.cctor_2(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
@ -10751,7 +10997,7 @@ namespace CppSharp @@ -10751,7 +10997,7 @@ namespace CppSharp
public BlockCommandComment()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(20);
__Instance = Marshal.AllocHGlobal(24);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@ -10760,7 +11006,7 @@ namespace CppSharp @@ -10760,7 +11006,7 @@ namespace CppSharp
public BlockCommandComment(CppSharp.Parser.AST.CommentKind Kind)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(20);
__Instance = Marshal.AllocHGlobal(24);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
var arg0 = Kind;
@ -10770,13 +11016,13 @@ namespace CppSharp @@ -10770,13 +11016,13 @@ namespace CppSharp
public BlockCommandComment(CppSharp.Parser.AST.BlockCommandComment _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(20);
__Instance = Marshal.AllocHGlobal(24);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var arg0 = _0.__Instance;
Internal.cctor_3((__Instance + __PointerAdjustment), arg0);
Internal.cctor_2((__Instance + __PointerAdjustment), arg0);
}
protected override void Dispose(bool disposing)
@ -10829,11 +11075,29 @@ namespace CppSharp @@ -10829,11 +11075,29 @@ namespace CppSharp
((Internal*) __Instance)->CommandId = value;
}
}
public CppSharp.Parser.AST.ParagraphComment ParagraphComment
{
get
{
CppSharp.Parser.AST.ParagraphComment __result0;
if (((Internal*) __Instance)->ParagraphComment == IntPtr.Zero) __result0 = null;
else if (CppSharp.Parser.AST.ParagraphComment.NativeToManagedMap.ContainsKey(((Internal*) __Instance)->ParagraphComment))
__result0 = (CppSharp.Parser.AST.ParagraphComment) CppSharp.Parser.AST.ParagraphComment.NativeToManagedMap[((Internal*) __Instance)->ParagraphComment];
else __result0 = CppSharp.Parser.AST.ParagraphComment.__CreateInstance(((Internal*) __Instance)->ParagraphComment);
return __result0;
}
set
{
((Internal*) __Instance)->ParagraphComment = ReferenceEquals(value, null) ? global::System.IntPtr.Zero : value.__Instance;
}
}
}
public unsafe partial class ParamCommandComment : CppSharp.Parser.AST.BlockCommandComment, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 28)]
[StructLayout(LayoutKind.Explicit, Size = 32)]
public new partial struct Internal
{
[FieldOffset(0)]
@ -10842,10 +11106,13 @@ namespace CppSharp @@ -10842,10 +11106,13 @@ namespace CppSharp
[FieldOffset(4)]
public uint CommandId;
[FieldOffset(20)]
public CppSharp.Parser.AST.ParamCommandComment.PassDirection Direction;
[FieldOffset(8)]
public global::System.IntPtr ParagraphComment;
[FieldOffset(24)]
public CppSharp.Parser.AST.ParamCommandComment.PassDirection Direction;
[FieldOffset(28)]
public uint ParamIndex;
[SuppressUnmanagedCodeSecurity]
@ -10856,7 +11123,7 @@ namespace CppSharp @@ -10856,7 +11123,7 @@ namespace CppSharp
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??0ParamCommandComment@AST@CppParser@CppSharp@@QAE@ABV0123@@Z")]
internal static extern global::System.IntPtr cctor_1(global::System.IntPtr instance, global::System.IntPtr _0);
internal static extern global::System.IntPtr cctor_2(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
@ -10883,8 +11150,8 @@ namespace CppSharp @@ -10883,8 +11150,8 @@ namespace CppSharp
private static void* __CopyValue(ParamCommandComment.Internal native)
{
var ret = Marshal.AllocHGlobal(28);
CppSharp.Parser.AST.ParamCommandComment.Internal.cctor_1(ret, new global::System.IntPtr(&native));
var ret = Marshal.AllocHGlobal(32);
CppSharp.Parser.AST.ParamCommandComment.Internal.cctor_2(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
@ -10907,7 +11174,7 @@ namespace CppSharp @@ -10907,7 +11174,7 @@ namespace CppSharp
public ParamCommandComment()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(28);
__Instance = Marshal.AllocHGlobal(32);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@ -10916,13 +11183,13 @@ namespace CppSharp @@ -10916,13 +11183,13 @@ namespace CppSharp
public ParamCommandComment(CppSharp.Parser.AST.ParamCommandComment _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(28);
__Instance = Marshal.AllocHGlobal(32);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var arg0 = _0.__Instance;
Internal.cctor_1((__Instance + __PointerAdjustment), arg0);
Internal.cctor_2((__Instance + __PointerAdjustment), arg0);
}
protected override void Dispose(bool disposing)
@ -10963,7 +11230,7 @@ namespace CppSharp @@ -10963,7 +11230,7 @@ namespace CppSharp
public unsafe partial class TParamCommandComment : CppSharp.Parser.AST.BlockCommandComment, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 32)]
[StructLayout(LayoutKind.Explicit, Size = 36)]
public new partial struct Internal
{
[FieldOffset(0)]
@ -10972,6 +11239,9 @@ namespace CppSharp @@ -10972,6 +11239,9 @@ namespace CppSharp
[FieldOffset(4)]
public uint CommandId;
[FieldOffset(8)]
public global::System.IntPtr ParagraphComment;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??0TParamCommandComment@AST@CppParser@CppSharp@@QAE@XZ")]
@ -11020,7 +11290,7 @@ namespace CppSharp @@ -11020,7 +11290,7 @@ namespace CppSharp
private static void* __CopyValue(TParamCommandComment.Internal native)
{
var ret = Marshal.AllocHGlobal(32);
var ret = Marshal.AllocHGlobal(36);
CppSharp.Parser.AST.TParamCommandComment.Internal.cctor_2(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
@ -11044,7 +11314,7 @@ namespace CppSharp @@ -11044,7 +11314,7 @@ namespace CppSharp
public TParamCommandComment()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(32);
__Instance = Marshal.AllocHGlobal(36);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@ -11053,7 +11323,7 @@ namespace CppSharp @@ -11053,7 +11323,7 @@ namespace CppSharp
public TParamCommandComment(CppSharp.Parser.AST.TParamCommandComment _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(32);
__Instance = Marshal.AllocHGlobal(36);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
@ -11217,7 +11487,7 @@ namespace CppSharp @@ -11217,7 +11487,7 @@ namespace CppSharp
public unsafe partial class VerbatimBlockComment : CppSharp.Parser.AST.BlockCommandComment, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 32)]
[StructLayout(LayoutKind.Explicit, Size = 36)]
public new partial struct Internal
{
[FieldOffset(0)]
@ -11226,6 +11496,9 @@ namespace CppSharp @@ -11226,6 +11496,9 @@ namespace CppSharp
[FieldOffset(4)]
public uint CommandId;
[FieldOffset(8)]
public global::System.IntPtr ParagraphComment;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??0VerbatimBlockComment@AST@CppParser@CppSharp@@QAE@XZ")]
@ -11274,7 +11547,7 @@ namespace CppSharp @@ -11274,7 +11547,7 @@ namespace CppSharp
private static void* __CopyValue(VerbatimBlockComment.Internal native)
{
var ret = Marshal.AllocHGlobal(32);
var ret = Marshal.AllocHGlobal(36);
CppSharp.Parser.AST.VerbatimBlockComment.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
@ -11298,7 +11571,7 @@ namespace CppSharp @@ -11298,7 +11571,7 @@ namespace CppSharp
public VerbatimBlockComment()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(32);
__Instance = Marshal.AllocHGlobal(36);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@ -11307,7 +11580,7 @@ namespace CppSharp @@ -11307,7 +11580,7 @@ namespace CppSharp
public VerbatimBlockComment(CppSharp.Parser.AST.VerbatimBlockComment _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(32);
__Instance = Marshal.AllocHGlobal(36);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
@ -11361,7 +11634,7 @@ namespace CppSharp @@ -11361,7 +11634,7 @@ namespace CppSharp
public unsafe partial class VerbatimLineComment : CppSharp.Parser.AST.BlockCommandComment, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 44)]
[StructLayout(LayoutKind.Explicit, Size = 48)]
public new partial struct Internal
{
[FieldOffset(0)]
@ -11370,6 +11643,9 @@ namespace CppSharp @@ -11370,6 +11643,9 @@ namespace CppSharp
[FieldOffset(4)]
public uint CommandId;
[FieldOffset(8)]
public global::System.IntPtr ParagraphComment;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??0VerbatimLineComment@AST@CppParser@CppSharp@@QAE@XZ")]
@ -11408,7 +11684,7 @@ namespace CppSharp @@ -11408,7 +11684,7 @@ namespace CppSharp
private static void* __CopyValue(VerbatimLineComment.Internal native)
{
var ret = Marshal.AllocHGlobal(44);
var ret = Marshal.AllocHGlobal(48);
CppSharp.Parser.AST.VerbatimLineComment.Internal.cctor_2(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
@ -11432,7 +11708,7 @@ namespace CppSharp @@ -11432,7 +11708,7 @@ namespace CppSharp
public VerbatimLineComment()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(44);
__Instance = Marshal.AllocHGlobal(48);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
@ -11441,7 +11717,7 @@ namespace CppSharp @@ -11441,7 +11717,7 @@ namespace CppSharp
public VerbatimLineComment(CppSharp.Parser.AST.VerbatimLineComment _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(44);
__Instance = Marshal.AllocHGlobal(48);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
@ -11476,249 +11752,6 @@ namespace CppSharp @@ -11476,249 +11752,6 @@ namespace CppSharp
}
}
public unsafe partial class InlineContentComment : CppSharp.Parser.AST.Comment, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 4)]
public new partial struct Internal
{
[FieldOffset(0)]
public CppSharp.Parser.AST.CommentKind Kind;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??0InlineContentComment@AST@CppParser@CppSharp@@QAE@XZ")]
internal static extern global::System.IntPtr ctor_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??0InlineContentComment@AST@CppParser@CppSharp@@QAE@W4CommentKind@123@@Z")]
internal static extern global::System.IntPtr ctor_1(global::System.IntPtr instance, CppSharp.Parser.AST.CommentKind Kind);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??0InlineContentComment@AST@CppParser@CppSharp@@QAE@ABV0123@@Z")]
internal static extern global::System.IntPtr cctor_2(global::System.IntPtr instance, global::System.IntPtr _0);
}
public static new InlineContentComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new InlineContentComment(native.ToPointer(), skipVTables);
}
public static InlineContentComment __CreateInstance(InlineContentComment.Internal native, bool skipVTables = false)
{
return new InlineContentComment(native, skipVTables);
}
private static void* __CopyValue(InlineContentComment.Internal native)
{
var ret = Marshal.AllocHGlobal(4);
*(InlineContentComment.Internal*) ret = native;
return ret.ToPointer();
}
private InlineContentComment(InlineContentComment.Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected InlineContentComment(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public InlineContentComment()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(4);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
}
public InlineContentComment(CppSharp.Parser.AST.CommentKind Kind)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(4);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
var arg0 = Kind;
Internal.ctor_1((__Instance + __PointerAdjustment), arg0);
}
public InlineContentComment(CppSharp.Parser.AST.InlineContentComment _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(4);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
*((InlineContentComment.Internal*) __Instance) = *((InlineContentComment.Internal*) _0.__Instance);
}
}
public unsafe partial class ParagraphComment : CppSharp.Parser.AST.BlockContentComment, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 20)]
public new partial struct Internal
{
[FieldOffset(0)]
public CppSharp.Parser.AST.CommentKind Kind;
[FieldOffset(4)]
public byte IsWhitespace;
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??0ParagraphComment@AST@CppParser@CppSharp@@QAE@XZ")]
internal static extern global::System.IntPtr ctor_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??0ParagraphComment@AST@CppParser@CppSharp@@QAE@ABV0123@@Z")]
internal static extern global::System.IntPtr cctor_1(global::System.IntPtr instance, global::System.IntPtr _0);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??1ParagraphComment@AST@CppParser@CppSharp@@QAE@XZ")]
internal static extern void dtor_0(global::System.IntPtr instance, int delete);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="?getContent@ParagraphComment@AST@CppParser@CppSharp@@QAEPAVInlineContentComment@234@I@Z")]
internal static extern global::System.IntPtr getContent_0(global::System.IntPtr instance, uint i);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="?addContent@ParagraphComment@AST@CppParser@CppSharp@@QAEXAAPAVInlineContentComment@234@@Z")]
internal static extern void addContent_0(global::System.IntPtr instance, global::System.IntPtr s);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="?clearContent@ParagraphComment@AST@CppParser@CppSharp@@QAEXXZ")]
internal static extern void clearContent_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("CppSharp.CppParser.dll", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="?getContentCount@ParagraphComment@AST@CppParser@CppSharp@@QAEIXZ")]
internal static extern uint getContentCount_0(global::System.IntPtr instance);
}
public static new ParagraphComment __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new ParagraphComment(native.ToPointer(), skipVTables);
}
public static ParagraphComment __CreateInstance(ParagraphComment.Internal native, bool skipVTables = false)
{
return new ParagraphComment(native, skipVTables);
}
private static void* __CopyValue(ParagraphComment.Internal native)
{
var ret = Marshal.AllocHGlobal(20);
CppSharp.Parser.AST.ParagraphComment.Internal.cctor_1(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
private ParagraphComment(ParagraphComment.Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected ParagraphComment(void* native, bool skipVTables = false)
: base((void*) null)
{
__PointerAdjustment = 0;
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public ParagraphComment()
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(20);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
Internal.ctor_0((__Instance + __PointerAdjustment));
}
public ParagraphComment(CppSharp.Parser.AST.ParagraphComment _0)
: this((void*) null)
{
__Instance = Marshal.AllocHGlobal(20);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
if (ReferenceEquals(_0, null))
throw new global::System.ArgumentNullException("_0", "Cannot be null because it is a C++ reference (&).");
var arg0 = _0.__Instance;
Internal.cctor_1((__Instance + __PointerAdjustment), arg0);
}
protected override void Dispose(bool disposing)
{
CppSharp.Parser.AST.Comment __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
Internal.dtor_0((__Instance + __PointerAdjustment), 0);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
}
public CppSharp.Parser.AST.InlineContentComment getContent(uint i)
{
var __ret = Internal.getContent_0((__Instance + __PointerAdjustment), i);
CppSharp.Parser.AST.InlineContentComment __result0;
if (__ret == IntPtr.Zero) __result0 = null;
else if (CppSharp.Parser.AST.InlineContentComment.NativeToManagedMap.ContainsKey(__ret))
__result0 = (CppSharp.Parser.AST.InlineContentComment) CppSharp.Parser.AST.InlineContentComment.NativeToManagedMap[__ret];
else __result0 = CppSharp.Parser.AST.InlineContentComment.__CreateInstance(__ret);
return __result0;
}
public void addContent(CppSharp.Parser.AST.InlineContentComment s)
{
if (ReferenceEquals(s, null))
throw new global::System.ArgumentNullException("s", "Cannot be null because it is a C++ reference (&).");
var arg0 = s.__Instance;
Internal.addContent_0((__Instance + __PointerAdjustment), arg0);
}
public void clearContent()
{
Internal.clearContent_0((__Instance + __PointerAdjustment));
}
public uint ContentCount
{
get
{
var __ret = Internal.getContentCount_0((__Instance + __PointerAdjustment));
return __ret;
}
}
public bool IsWhitespace
{
get
{
return ((Internal*) __Instance)->IsWhitespace != 0;
}
set
{
((Internal*) __Instance)->IsWhitespace = (byte) (value ? 1 : 0);
}
}
}
public unsafe partial class InlineCommandComment : CppSharp.Parser.AST.InlineContentComment, IDisposable
{
[StructLayout(LayoutKind.Explicit, Size = 20)]

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

File diff suppressed because it is too large Load Diff

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

File diff suppressed because it is too large Load Diff

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

File diff suppressed because it is too large Load Diff

3
src/CppParser/Comments.cpp

@ -121,6 +121,7 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C) @@ -121,6 +121,7 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C)
auto BC = new BlockCommandComment();
_Comment = BC;
HandleBlockCommand(CK, BC);
BC->ParagraphComment = static_cast<ParagraphComment*>(ConvertCommentBlock(CK->getParagraph()));
break;
}
case Comment::ParamCommandCommentKind:
@ -132,6 +133,7 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C) @@ -132,6 +133,7 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C)
PC->Direction = ConvertParamPassDirection(CK->getDirection());
if (CK->isParamIndexValid() && !CK->isVarArgParam())
PC->ParamIndex = CK->getParamIndex();
PC->ParagraphComment = static_cast<ParagraphComment*>(ConvertCommentBlock(CK->getParagraph()));
break;
}
case Comment::TParamCommandCommentKind:
@ -144,6 +146,7 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C) @@ -144,6 +146,7 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C)
if (CK->isPositionValid())
for (unsigned I = 0, E = CK->getDepth(); I != E; ++I)
TC->Position.push_back(CK->getIndex(I));
TC->ParagraphComment = static_cast<ParagraphComment*>(ConvertCommentBlock(CK->getParagraph()));
break;
}
case Comment::VerbatimBlockCommentKind:

Loading…
Cancel
Save