Skip to content

Commit fe5e72b

Browse files
ddobrevtritao
authored andcommitted
Regenerate the parser bindings for Windows.
Signed-off-by: Dimitar Dobrev <[email protected]>
1 parent 5971598 commit fe5e72b

File tree

20 files changed

+3536
-2544
lines changed

20 files changed

+3536
-2544
lines changed

src/CppParser/Bindings/CLI/AST.cpp

Lines changed: 101 additions & 11 deletions
Large diffs are not rendered by default.

src/CppParser/Bindings/CLI/AST.h

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ namespace CppSharp
1515
{
1616
namespace AST
1717
{
18-
enum struct ArchType;
19-
enum struct CommentKind;
20-
enum struct RawCommentKind;
18+
enum class ArchType;
19+
enum class CommentKind;
20+
enum class RawCommentKind;
2121
ref class BlockCommandComment;
2222
ref class BlockContentComment;
2323
ref class Comment;
@@ -46,7 +46,7 @@ namespace CppSharp
4646
{
4747
namespace AST
4848
{
49-
public enum struct RawCommentKind
49+
public enum class RawCommentKind
5050
{
5151
Invalid = 0,
5252
OrdinaryBCPL = 1,
@@ -58,7 +58,7 @@ namespace CppSharp
5858
Merged = 7
5959
};
6060

61-
public enum struct CommentKind
61+
public enum class CommentKind
6262
{
6363
FullComment = 0,
6464
BlockContentComment = 1,
@@ -77,7 +77,7 @@ namespace CppSharp
7777
VerbatimBlockLineComment = 14
7878
};
7979

80-
public enum struct ArchType
80+
public enum class ArchType
8181
{
8282
UnknownArch = 0,
8383
X86 = 1,
@@ -96,6 +96,7 @@ namespace CppSharp
9696
}
9797

9898
NativeLibrary(::CppSharp::CppParser::AST::NativeLibrary* native);
99+
NativeLibrary(::CppSharp::CppParser::AST::NativeLibrary* native, bool ownNativeInstance);
99100
static NativeLibrary^ __CreateInstance(::System::IntPtr native);
100101
NativeLibrary();
101102

@@ -165,6 +166,7 @@ namespace CppSharp
165166
}
166167

167168
Comment(::CppSharp::CppParser::AST::Comment* native);
169+
Comment(::CppSharp::CppParser::AST::Comment* native, bool ownNativeInstance);
168170
static Comment^ __CreateInstance(::System::IntPtr native);
169171
Comment(CppSharp::Parser::AST::CommentKind kind);
170172

@@ -189,6 +191,7 @@ namespace CppSharp
189191
public:
190192

191193
BlockContentComment(::CppSharp::CppParser::AST::BlockContentComment* native);
194+
BlockContentComment(::CppSharp::CppParser::AST::BlockContentComment* native, bool ownNativeInstance);
192195
static BlockContentComment^ __CreateInstance(::System::IntPtr native);
193196
BlockContentComment();
194197

@@ -206,6 +209,7 @@ namespace CppSharp
206209
public:
207210

208211
FullComment(::CppSharp::CppParser::AST::FullComment* native);
212+
FullComment(::CppSharp::CppParser::AST::FullComment* native, bool ownNativeInstance);
209213
static FullComment^ __CreateInstance(::System::IntPtr native);
210214
FullComment();
211215

@@ -236,6 +240,7 @@ namespace CppSharp
236240
public:
237241

238242
InlineContentComment(::CppSharp::CppParser::AST::InlineContentComment* native);
243+
InlineContentComment(::CppSharp::CppParser::AST::InlineContentComment* native, bool ownNativeInstance);
239244
static InlineContentComment^ __CreateInstance(::System::IntPtr native);
240245
InlineContentComment();
241246

@@ -259,6 +264,7 @@ namespace CppSharp
259264
public:
260265

261266
ParagraphComment(::CppSharp::CppParser::AST::ParagraphComment* native);
267+
ParagraphComment(::CppSharp::CppParser::AST::ParagraphComment* native, bool ownNativeInstance);
262268
static ParagraphComment^ __CreateInstance(::System::IntPtr native);
263269
ParagraphComment();
264270

@@ -306,6 +312,7 @@ namespace CppSharp
306312
}
307313

308314
Argument(::CppSharp::CppParser::AST::BlockCommandComment::Argument* native);
315+
Argument(::CppSharp::CppParser::AST::BlockCommandComment::Argument* native, bool ownNativeInstance);
309316
static Argument^ __CreateInstance(::System::IntPtr native);
310317
Argument();
311318

@@ -324,6 +331,7 @@ namespace CppSharp
324331
};
325332

326333
BlockCommandComment(::CppSharp::CppParser::AST::BlockCommandComment* native);
334+
BlockCommandComment(::CppSharp::CppParser::AST::BlockCommandComment* native, bool ownNativeInstance);
327335
static BlockCommandComment^ __CreateInstance(::System::IntPtr native);
328336
BlockCommandComment();
329337

@@ -369,14 +377,15 @@ namespace CppSharp
369377
{
370378
public:
371379

372-
enum struct PassDirection
380+
enum class PassDirection
373381
{
374382
In = 0,
375383
Out = 1,
376384
InOut = 2
377385
};
378386

379387
ParamCommandComment(::CppSharp::CppParser::AST::ParamCommandComment* native);
388+
ParamCommandComment(::CppSharp::CppParser::AST::ParamCommandComment* native, bool ownNativeInstance);
380389
static ParamCommandComment^ __CreateInstance(::System::IntPtr native);
381390
ParamCommandComment();
382391

@@ -402,6 +411,7 @@ namespace CppSharp
402411
public:
403412

404413
TParamCommandComment(::CppSharp::CppParser::AST::TParamCommandComment* native);
414+
TParamCommandComment(::CppSharp::CppParser::AST::TParamCommandComment* native, bool ownNativeInstance);
405415
static TParamCommandComment^ __CreateInstance(::System::IntPtr native);
406416
TParamCommandComment();
407417

@@ -432,6 +442,7 @@ namespace CppSharp
432442
public:
433443

434444
VerbatimBlockLineComment(::CppSharp::CppParser::AST::VerbatimBlockLineComment* native);
445+
VerbatimBlockLineComment(::CppSharp::CppParser::AST::VerbatimBlockLineComment* native, bool ownNativeInstance);
435446
static VerbatimBlockLineComment^ __CreateInstance(::System::IntPtr native);
436447
VerbatimBlockLineComment();
437448

@@ -451,6 +462,7 @@ namespace CppSharp
451462
public:
452463

453464
VerbatimBlockComment(::CppSharp::CppParser::AST::VerbatimBlockComment* native);
465+
VerbatimBlockComment(::CppSharp::CppParser::AST::VerbatimBlockComment* native, bool ownNativeInstance);
454466
static VerbatimBlockComment^ __CreateInstance(::System::IntPtr native);
455467
VerbatimBlockComment();
456468

@@ -481,6 +493,7 @@ namespace CppSharp
481493
public:
482494

483495
VerbatimLineComment(::CppSharp::CppParser::AST::VerbatimLineComment* native);
496+
VerbatimLineComment(::CppSharp::CppParser::AST::VerbatimLineComment* native, bool ownNativeInstance);
484497
static VerbatimLineComment^ __CreateInstance(::System::IntPtr native);
485498
VerbatimLineComment();
486499

@@ -499,7 +512,7 @@ namespace CppSharp
499512
{
500513
public:
501514

502-
enum struct RenderKind
515+
enum class RenderKind
503516
{
504517
RenderNormal = 0,
505518
RenderBold = 1,
@@ -519,6 +532,7 @@ namespace CppSharp
519532
}
520533

521534
Argument(::CppSharp::CppParser::AST::InlineCommandComment::Argument* native);
535+
Argument(::CppSharp::CppParser::AST::InlineCommandComment::Argument* native, bool ownNativeInstance);
522536
static Argument^ __CreateInstance(::System::IntPtr native);
523537
Argument();
524538

@@ -537,6 +551,7 @@ namespace CppSharp
537551
};
538552

539553
InlineCommandComment(::CppSharp::CppParser::AST::InlineCommandComment* native);
554+
InlineCommandComment(::CppSharp::CppParser::AST::InlineCommandComment* native, bool ownNativeInstance);
540555
static InlineCommandComment^ __CreateInstance(::System::IntPtr native);
541556
InlineCommandComment();
542557

@@ -579,6 +594,7 @@ namespace CppSharp
579594
public:
580595

581596
HTMLTagComment(::CppSharp::CppParser::AST::HTMLTagComment* native);
597+
HTMLTagComment(::CppSharp::CppParser::AST::HTMLTagComment* native, bool ownNativeInstance);
582598
static HTMLTagComment^ __CreateInstance(::System::IntPtr native);
583599
HTMLTagComment();
584600

@@ -607,6 +623,7 @@ namespace CppSharp
607623
}
608624

609625
Attribute(::CppSharp::CppParser::AST::HTMLStartTagComment::Attribute* native);
626+
Attribute(::CppSharp::CppParser::AST::HTMLStartTagComment::Attribute* native, bool ownNativeInstance);
610627
static Attribute^ __CreateInstance(::System::IntPtr native);
611628
Attribute();
612629

@@ -631,6 +648,7 @@ namespace CppSharp
631648
};
632649

633650
HTMLStartTagComment(::CppSharp::CppParser::AST::HTMLStartTagComment* native);
651+
HTMLStartTagComment(::CppSharp::CppParser::AST::HTMLStartTagComment* native, bool ownNativeInstance);
634652
static HTMLStartTagComment^ __CreateInstance(::System::IntPtr native);
635653
HTMLStartTagComment();
636654

@@ -667,6 +685,7 @@ namespace CppSharp
667685
public:
668686

669687
HTMLEndTagComment(::CppSharp::CppParser::AST::HTMLEndTagComment* native);
688+
HTMLEndTagComment(::CppSharp::CppParser::AST::HTMLEndTagComment* native, bool ownNativeInstance);
670689
static HTMLEndTagComment^ __CreateInstance(::System::IntPtr native);
671690
HTMLEndTagComment();
672691

@@ -686,6 +705,7 @@ namespace CppSharp
686705
public:
687706

688707
TextComment(::CppSharp::CppParser::AST::TextComment* native);
708+
TextComment(::CppSharp::CppParser::AST::TextComment* native, bool ownNativeInstance);
689709
static TextComment^ __CreateInstance(::System::IntPtr native);
690710
TextComment();
691711

@@ -712,6 +732,7 @@ namespace CppSharp
712732
}
713733

714734
RawComment(::CppSharp::CppParser::AST::RawComment* native);
735+
RawComment(::CppSharp::CppParser::AST::RawComment* native, bool ownNativeInstance);
715736
static RawComment^ __CreateInstance(::System::IntPtr native);
716737
RawComment();
717738

src/CppParser/Bindings/CLI/CppParser.cpp

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ CppSharp::Parser::CppParserOptions^ CppSharp::Parser::CppParserOptions::__Create
2323
return gcnew ::CppSharp::Parser::CppParserOptions((::CppSharp::CppParser::CppParserOptions*) native.ToPointer());
2424
}
2525

26+
CppSharp::Parser::CppParserOptions::CppParserOptions(::CppSharp::CppParser::CppParserOptions* native, const bool ownNativeInstance)
27+
: __ownsNativeInstance(ownNativeInstance)
28+
{
29+
NativePtr = native;
30+
}
2631
CppSharp::Parser::CppParserOptions::~CppParserOptions()
2732
{
2833
delete NativePtr;
@@ -566,6 +571,11 @@ CppSharp::Parser::ParserDiagnostic^ CppSharp::Parser::ParserDiagnostic::__Create
566571
return gcnew ::CppSharp::Parser::ParserDiagnostic((::CppSharp::CppParser::ParserDiagnostic*) native.ToPointer());
567572
}
568573

574+
CppSharp::Parser::ParserDiagnostic::ParserDiagnostic(::CppSharp::CppParser::ParserDiagnostic* native, const bool ownNativeInstance)
575+
: __ownsNativeInstance(ownNativeInstance)
576+
{
577+
NativePtr = native;
578+
}
569579
CppSharp::Parser::ParserDiagnostic::~ParserDiagnostic()
570580
{
571581
delete NativePtr;
@@ -657,6 +667,11 @@ CppSharp::Parser::ParserResult^ CppSharp::Parser::ParserResult::__CreateInstance
657667
return gcnew ::CppSharp::Parser::ParserResult((::CppSharp::CppParser::ParserResult*) native.ToPointer());
658668
}
659669

670+
CppSharp::Parser::ParserResult::ParserResult(::CppSharp::CppParser::ParserResult* native, const bool ownNativeInstance)
671+
: __ownsNativeInstance(ownNativeInstance)
672+
{
673+
NativePtr = native;
674+
}
660675
CppSharp::Parser::ParserResult::~ParserResult()
661676
{
662677
delete NativePtr;
@@ -681,7 +696,7 @@ CppSharp::Parser::ParserDiagnostic^ CppSharp::Parser::ParserResult::GetDiagnosti
681696
{
682697
auto __ret = ((::CppSharp::CppParser::ParserResult*)NativePtr)->getDiagnostics(i);
683698
auto ____ret = new ::CppSharp::CppParser::ParserDiagnostic(__ret);
684-
return (____ret == nullptr) ? nullptr : gcnew CppSharp::Parser::ParserDiagnostic((::CppSharp::CppParser::ParserDiagnostic*)____ret);
699+
return (____ret == nullptr) ? nullptr : gcnew CppSharp::Parser::ParserDiagnostic((::CppSharp::CppParser::ParserDiagnostic*)____ret, true);
685700
}
686701

687702
void CppSharp::Parser::ParserResult::AddDiagnostics(CppSharp::Parser::ParserDiagnostic^ s)
@@ -723,7 +738,7 @@ System::Collections::Generic::List<CppSharp::Parser::ParserDiagnostic^>^ CppShar
723738
for(auto _element : ((::CppSharp::CppParser::ParserResult*)NativePtr)->Diagnostics)
724739
{
725740
auto ___element = new ::CppSharp::CppParser::ParserDiagnostic(_element);
726-
auto _marshalElement = (___element == nullptr) ? nullptr : gcnew CppSharp::Parser::ParserDiagnostic((::CppSharp::CppParser::ParserDiagnostic*)___element);
741+
auto _marshalElement = (___element == nullptr) ? nullptr : gcnew CppSharp::Parser::ParserDiagnostic((::CppSharp::CppParser::ParserDiagnostic*)___element, true);
727742
_tmp__Diagnostics->Add(_marshalElement);
728743
}
729744
return _tmp__Diagnostics;
@@ -779,6 +794,11 @@ CppSharp::Parser::ClangParser^ CppSharp::Parser::ClangParser::__CreateInstance(:
779794
return gcnew ::CppSharp::Parser::ClangParser((::CppSharp::CppParser::ClangParser*) native.ToPointer());
780795
}
781796

797+
CppSharp::Parser::ClangParser::ClangParser(::CppSharp::CppParser::ClangParser* native, const bool ownNativeInstance)
798+
: __ownsNativeInstance(ownNativeInstance)
799+
{
800+
NativePtr = native;
801+
}
782802
CppSharp::Parser::ClangParser::~ClangParser()
783803
{
784804
delete NativePtr;

src/CppParser/Bindings/CLI/CppParser.h

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ namespace CppSharp
1313
{
1414
namespace Parser
1515
{
16-
enum struct ParserDiagnosticLevel;
17-
enum struct ParserResultKind;
18-
enum struct SourceLocationKind;
16+
enum class ParserDiagnosticLevel;
17+
enum class ParserResultKind;
18+
enum class SourceLocationKind;
1919
ref class ClangParser;
2020
ref class CppParserOptions;
2121
ref class Parser;
@@ -34,7 +34,7 @@ namespace CppSharp
3434
{
3535
namespace Parser
3636
{
37-
public enum struct ParserDiagnosticLevel
37+
public enum class ParserDiagnosticLevel
3838
{
3939
Ignored = 0,
4040
Note = 1,
@@ -43,14 +43,14 @@ namespace CppSharp
4343
Fatal = 4
4444
};
4545

46-
public enum struct ParserResultKind
46+
public enum class ParserResultKind
4747
{
4848
Success = 0,
4949
Error = 1,
5050
FileNotFound = 2
5151
};
5252

53-
public enum struct SourceLocationKind
53+
public enum class SourceLocationKind
5454
{
5555
Invalid = 0,
5656
Builtin = 1,
@@ -71,6 +71,7 @@ namespace CppSharp
7171
}
7272

7373
CppParserOptions(::CppSharp::CppParser::CppParserOptions* native);
74+
CppParserOptions(::CppSharp::CppParser::CppParserOptions* native, bool ownNativeInstance);
7475
static CppParserOptions^ __CreateInstance(::System::IntPtr native);
7576
CppParserOptions();
7677

@@ -307,6 +308,7 @@ namespace CppSharp
307308
}
308309

309310
ParserDiagnostic(::CppSharp::CppParser::ParserDiagnostic* native);
311+
ParserDiagnostic(::CppSharp::CppParser::ParserDiagnostic* native, bool ownNativeInstance);
310312
static ParserDiagnostic^ __CreateInstance(::System::IntPtr native);
311313
ParserDiagnostic();
312314

@@ -360,6 +362,7 @@ namespace CppSharp
360362
}
361363

362364
ParserResult(::CppSharp::CppParser::ParserResult* native);
365+
ParserResult(::CppSharp::CppParser::ParserResult* native, bool ownNativeInstance);
363366
static ParserResult^ __CreateInstance(::System::IntPtr native);
364367
ParserResult();
365368

@@ -418,6 +421,7 @@ namespace CppSharp
418421
}
419422

420423
ClangParser(::CppSharp::CppParser::ClangParser* native);
424+
ClangParser(::CppSharp::CppParser::ClangParser* native, bool ownNativeInstance);
421425
static ClangParser^ __CreateInstance(::System::IntPtr native);
422426
ClangParser();
423427

0 commit comments

Comments
 (0)