Browse Source

Removed the macro we used in our C++ AST for std::string because we can marshal it.

pull/1136/head
Dimitar Dobrev 9 years ago
parent
commit
ea6d2e06be
  1. 88
      src/CppParser/AST.cpp
  2. 56
      src/CppParser/AST.h
  3. 1490
      src/CppParser/Bindings/CLI/AST.cpp
  4. 438
      src/CppParser/Bindings/CLI/AST.h
  5. 273
      src/CppParser/Bindings/CLI/CppParser.cpp
  6. 96
      src/CppParser/Bindings/CLI/CppParser.h
  7. 24
      src/CppParser/Bindings/CLI/Target.cpp
  8. 12
      src/CppParser/Bindings/CLI/Target.h
  9. 3671
      src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/CppSharp.CppParser.cs
  10. 4
      src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/Std-templates.cpp
  11. 75
      src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/Std.cs
  12. 3671
      src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/CppSharp.CppParser.cs
  13. 71
      src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/Std.cs
  14. 31
      src/CppParser/Bindings/CSharp/premake5.lua
  15. 3671
      src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/CppSharp.CppParser.cs
  16. 4
      src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/Std-templates.cpp
  17. 75
      src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/Std.cs
  18. 3671
      src/CppParser/Bindings/CSharp/x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs
  19. 4
      src/CppParser/Bindings/CSharp/x86_64-linux-gnu-cxx11abi/Std-templates.cpp
  20. 74
      src/CppParser/Bindings/CSharp/x86_64-linux-gnu-cxx11abi/Std.cs
  21. 3671
      src/CppParser/Bindings/CSharp/x86_64-linux-gnu/CppSharp.CppParser.cs
  22. 4
      src/CppParser/Bindings/CSharp/x86_64-linux-gnu/Std-templates.cpp
  23. 74
      src/CppParser/Bindings/CSharp/x86_64-linux-gnu/Std.cs
  24. 3671
      src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/CppSharp.CppParser.cs
  25. 71
      src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/Std.cs
  26. 22
      src/CppParser/Comments.cpp
  27. 10
      src/CppParser/CppParser.cpp
  28. 8
      src/CppParser/CppParser.h
  29. 9
      src/CppParser/Helpers.h
  30. 76
      src/CppParser/Parser.cpp
  31. 56
      src/CppParser/ParserGen/ParserGen.cs
  32. 2
      src/CppParser/Target.h
  33. 3
      src/Generator/Generators/CSharp/CSharpSources.cs
  34. 4
      src/Generator/Passes/GenerateTemplatesCodePass.cs
  35. 2
      src/Generator/Passes/IgnoreSystemDeclarationsPass.cs
  36. 2
      src/Generator/Passes/MarkSupportedClassTemplateSpecializationsPass.cs
  37. 3
      src/Generator/Passes/StripUnusedSystemTypesPass.cs
  38. 1
      src/Generator/Types/Std/Stdlib.cs
  39. 2
      tests/CSharp/AnotherUnit.cpp
  40. 4
      tests/CSharp/AnotherUnit.h
  41. 6
      tests/CSharp/CSharp.Tests.cs
  42. 2
      tests/Common/Common.Tests.cs
  43. 8
      tests/Common/Common.cpp
  44. 2
      tests/Common/Common.h

88
src/CppParser/AST.cpp

@ -206,7 +206,7 @@ LayoutField::LayoutField() : offset(0), fieldPtr(0) {} @@ -206,7 +206,7 @@ LayoutField::LayoutField() : offset(0), fieldPtr(0) {}
LayoutField::LayoutField(const LayoutField & other)
: offset(other.offset)
, Name(other.Name)
, name(other.name)
, qualifiedType(other.qualifiedType)
, fieldPtr(other.fieldPtr)
{
@ -214,8 +214,6 @@ LayoutField::LayoutField(const LayoutField & other) @@ -214,8 +214,6 @@ LayoutField::LayoutField(const LayoutField & other)
LayoutField::~LayoutField() {}
DEF_STRING(LayoutField, Name)
LayoutBase::LayoutBase() : offset(0), _class(0) {}
LayoutBase::LayoutBase(const LayoutBase& other) : offset(other.offset), _class(other._class) {}
@ -255,9 +253,9 @@ Declaration::Declaration(const Declaration& rhs) @@ -255,9 +253,9 @@ Declaration::Declaration(const Declaration& rhs)
, location(rhs.location.ID)
, lineNumberStart(rhs.lineNumberStart)
, lineNumberEnd(rhs.lineNumberEnd)
, Name(rhs.Name)
, name(rhs.name)
, comment(rhs.comment)
, DebugText(rhs.DebugText)
, debugText(rhs.debugText)
, isIncomplete(rhs.isIncomplete)
, isDependent(rhs.isDependent)
, isImplicit(rhs.isImplicit)
@ -272,9 +270,6 @@ Declaration::~Declaration() @@ -272,9 +270,6 @@ Declaration::~Declaration()
{
}
DEF_STRING(Declaration, Name)
DEF_STRING(Declaration, USR)
DEF_STRING(Declaration, DebugText)
DEF_VECTOR(Declaration, PreprocessedEntity*, PreprocessedEntities)
DeclarationContext::DeclarationContext(DeclarationKind kind)
@ -315,7 +310,7 @@ DeclarationContext::FindNamespace(const std::vector<std::string>& Namespaces) @@ -315,7 +310,7 @@ DeclarationContext::FindNamespace(const std::vector<std::string>& Namespaces)
auto childNamespace = std::find_if(currentNamespace->Namespaces.begin(),
currentNamespace->Namespaces.end(),
[&](CppSharp::CppParser::AST::Namespace* ns) {
return ns->Name == _namespace;
return ns->name == _namespace;
});
if (childNamespace == currentNamespace->Namespaces.end())
@ -334,7 +329,7 @@ Namespace* DeclarationContext::FindCreateNamespace(const std::string& Name) @@ -334,7 +329,7 @@ Namespace* DeclarationContext::FindCreateNamespace(const std::string& Name)
if (!_namespace)
{
_namespace = new Namespace();
_namespace->Name = Name;
_namespace->name = Name;
_namespace->_namespace = this;
Namespaces.push_back(_namespace);
@ -352,7 +347,7 @@ Class* DeclarationContext::FindClass(const std::string& Name, bool IsComplete) @@ -352,7 +347,7 @@ Class* DeclarationContext::FindClass(const std::string& Name, bool IsComplete)
if (entries.size() == 1)
{
auto _class = std::find_if(Classes.begin(), Classes.end(),
[&](Class* klass) { return klass->Name == Name &&
[&](Class* klass) { return klass->name == Name &&
(!klass->isIncomplete || !IsComplete); });
return _class != Classes.end() ? *_class : nullptr;
@ -373,7 +368,7 @@ Class* DeclarationContext::FindClass(const std::string& Name, bool IsComplete) @@ -373,7 +368,7 @@ Class* DeclarationContext::FindClass(const std::string& Name, bool IsComplete)
Class* DeclarationContext::CreateClass(std::string Name, bool IsComplete)
{
auto _class = new Class();
_class->Name = Name;
_class->name = Name;
_class->_namespace = this;
_class->isIncomplete = !IsComplete;
@ -417,7 +412,7 @@ Enumeration* DeclarationContext::FindEnum(const std::string& Name, bool Create) @@ -417,7 +412,7 @@ Enumeration* DeclarationContext::FindEnum(const std::string& Name, bool Create)
if (entries.size() == 1)
{
auto foundEnum = std::find_if(Enums.begin(), Enums.end(),
[&](Enumeration* _enum) { return _enum->Name == Name; });
[&](Enumeration* _enum) { return _enum->name == Name; });
if (foundEnum != Enums.end())
return *foundEnum;
@ -426,7 +421,7 @@ Enumeration* DeclarationContext::FindEnum(const std::string& Name, bool Create) @@ -426,7 +421,7 @@ Enumeration* DeclarationContext::FindEnum(const std::string& Name, bool Create)
return nullptr;
auto _enum = new Enumeration();
_enum->Name = Name;
_enum->name = Name;
_enum->_namespace = this;
Enums.push_back(_enum);
return _enum;
@ -485,7 +480,7 @@ Function* DeclarationContext::FindFunction(const std::string& USR) @@ -485,7 +480,7 @@ Function* DeclarationContext::FindFunction(const std::string& USR)
TypedefDecl* DeclarationContext::FindTypedef(const std::string& Name, bool Create)
{
auto foundTypedef = std::find_if(Typedefs.begin(), Typedefs.end(),
[&](TypedefDecl* tdef) { return tdef->Name == Name; });
[&](TypedefDecl* tdef) { return tdef->name == Name; });
if (foundTypedef != Typedefs.end())
return *foundTypedef;
@ -494,7 +489,7 @@ TypedefDecl* DeclarationContext::FindTypedef(const std::string& Name, bool Creat @@ -494,7 +489,7 @@ TypedefDecl* DeclarationContext::FindTypedef(const std::string& Name, bool Creat
return nullptr;
auto tdef = new TypedefDecl();
tdef->Name = Name;
tdef->name = Name;
tdef->_namespace = this;
return tdef;
@ -503,7 +498,7 @@ TypedefDecl* DeclarationContext::FindTypedef(const std::string& Name, bool Creat @@ -503,7 +498,7 @@ TypedefDecl* DeclarationContext::FindTypedef(const std::string& Name, bool Creat
TypeAlias* DeclarationContext::FindTypeAlias(const std::string& Name, bool Create)
{
auto foundTypeAlias = std::find_if(TypeAliases.begin(), TypeAliases.end(),
[&](TypeAlias* talias) { return talias->Name == Name; });
[&](TypeAlias* talias) { return talias->name == Name; });
if (foundTypeAlias != TypeAliases.end())
return *foundTypeAlias;
@ -512,7 +507,7 @@ TypeAlias* DeclarationContext::FindTypeAlias(const std::string& Name, bool Creat @@ -512,7 +507,7 @@ TypeAlias* DeclarationContext::FindTypeAlias(const std::string& Name, bool Creat
return nullptr;
auto talias = new TypeAlias();
talias->Name = Name;
talias->name = Name;
talias->_namespace = this;
return talias;
@ -556,15 +551,13 @@ Friend::Friend() : CppSharp::CppParser::AST::Declaration(DeclarationKind::Friend @@ -556,15 +551,13 @@ Friend::Friend() : CppSharp::CppParser::AST::Declaration(DeclarationKind::Friend
Friend::~Friend() {}
DEF_STRING(Statement, String)
Statement::Statement(const std::string& str, StatementClass stmtClass, Declaration* decl) : String(str), _class(stmtClass), decl(decl) {}
Statement::Statement(const std::string& str, StatementClass stmtClass, Declaration* decl) : string(str), _class(stmtClass), decl(decl) {}
Expression::Expression(const std::string& str, StatementClass stmtClass, Declaration* decl)
: Statement(str, stmtClass, decl) {}
BinaryOperator::BinaryOperator(const std::string& str, Expression* lhs, Expression* rhs, const std::string& opcodeStr)
: Expression(str, StatementClass::BinaryOperator), LHS(lhs), RHS(rhs), OpcodeStr(opcodeStr) {}
: Expression(str, StatementClass::BinaryOperator), LHS(lhs), RHS(rhs), opcodeStr(opcodeStr) {}
BinaryOperator::~BinaryOperator()
{
@ -572,8 +565,6 @@ BinaryOperator::~BinaryOperator() @@ -572,8 +565,6 @@ BinaryOperator::~BinaryOperator()
delete RHS;
}
DEF_STRING(BinaryOperator, OpcodeStr)
CallExpr::CallExpr(const std::string& str, Declaration* decl)
: Expression(str, StatementClass::CallExprClass, decl) {}
@ -632,8 +623,6 @@ Function::Function() @@ -632,8 +623,6 @@ Function::Function()
Function::~Function() {}
DEF_STRING(Function, Mangled)
DEF_STRING(Function, Signature)
DEF_VECTOR(Function, Parameter*, Parameters)
Method::Method()
@ -665,16 +654,14 @@ DEF_VECTOR(Enumeration, Enumeration::Item*, Items) @@ -665,16 +654,14 @@ DEF_VECTOR(Enumeration, Enumeration::Item*, Items)
Enumeration::Item::Item() : Declaration(DeclarationKind::EnumerationItem) {}
Enumeration::Item::Item(const Item& rhs) : Declaration(rhs),
Expression(rhs.Expression), value(rhs.value) {}
expression(rhs.expression), value(rhs.value) {}
Enumeration::Item::~Item() {}
DEF_STRING(Enumeration::Item, Expression)
Enumeration::Item* Enumeration::FindItemByName(const std::string& Name)
{
auto foundEnumItem = std::find_if(Items.begin(), Items.end(),
[&](Item* _item) { return _item->Name == Name; });
[&](Item* _item) { return _item->name == Name; });
if (foundEnumItem != Items.end())
return *foundEnumItem;
return nullptr;
@ -684,8 +671,6 @@ Variable::Variable() : Declaration(DeclarationKind::Variable) {} @@ -684,8 +671,6 @@ Variable::Variable() : Declaration(DeclarationKind::Variable) {}
Variable::~Variable() {}
DEF_STRING(Variable, Mangled)
BaseClassSpecifier::BaseClassSpecifier() : type(0), offset(0) {}
Field::Field() : Declaration(DeclarationKind::Field), _class(0),
@ -852,21 +837,14 @@ MacroDefinition::MacroDefinition() @@ -852,21 +837,14 @@ MacroDefinition::MacroDefinition()
MacroDefinition::~MacroDefinition() {}
DEF_STRING(MacroDefinition, Name)
DEF_STRING(MacroDefinition, Expression)
MacroExpansion::MacroExpansion() : definition(0) { kind = DeclarationKind::MacroExpansion; }
MacroExpansion::~MacroExpansion() {}
DEF_STRING(MacroExpansion, Name)
DEF_STRING(MacroExpansion, Text)
TranslationUnit::TranslationUnit() { kind = DeclarationKind::TranslationUnit; }
TranslationUnit::~TranslationUnit() {}
DEF_STRING(TranslationUnit, FileName)
DEF_VECTOR(TranslationUnit, MacroDefinition*, Macros)
NativeLibrary::NativeLibrary()
@ -879,7 +857,6 @@ NativeLibrary::~NativeLibrary() @@ -879,7 +857,6 @@ NativeLibrary::~NativeLibrary()
}
// NativeLibrary
DEF_STRING(NativeLibrary, FileName)
DEF_VECTOR_STRING(NativeLibrary, Symbols)
DEF_VECTOR_STRING(NativeLibrary, Dependencies)
@ -915,14 +892,14 @@ TranslationUnit* ASTContext::FindOrCreateModule(std::string File) @@ -915,14 +892,14 @@ TranslationUnit* ASTContext::FindOrCreateModule(std::string File)
auto existingUnit = std::find_if(TranslationUnits.begin(),
TranslationUnits.end(), [&](TranslationUnit* unit) {
return unit && unit->FileName == normalizedFile;
return unit && unit->fileName == normalizedFile;
});
if (existingUnit != TranslationUnits.end())
return *existingUnit;
auto unit = new TranslationUnit();
unit->FileName = normalizedFile;
unit->fileName = normalizedFile;
TranslationUnits.push_back(unit);
return unit;
@ -931,9 +908,6 @@ TranslationUnit* ASTContext::FindOrCreateModule(std::string File) @@ -931,9 +908,6 @@ TranslationUnit* ASTContext::FindOrCreateModule(std::string File)
// Comments
Comment::Comment(CommentKind kind) : kind(kind) {}
DEF_STRING(RawComment, Text)
DEF_STRING(RawComment, BriefText)
RawComment::RawComment() : fullCommentBlock(0) {}
RawComment::~RawComment()
@ -984,9 +958,7 @@ BlockContentComment::BlockContentComment(CommentKind Kind) : Comment(Kind) {} @@ -984,9 +958,7 @@ BlockContentComment::BlockContentComment(CommentKind Kind) : Comment(Kind) {}
BlockCommandComment::Argument::Argument() {}
BlockCommandComment::Argument::Argument(const Argument& rhs) : Text(rhs.Text) {}
DEF_STRING(BlockCommandComment::Argument, Text)
BlockCommandComment::Argument::Argument(const Argument& rhs) : text(rhs.text) {}
BlockCommandComment::BlockCommandComment() : BlockContentComment(CommentKind::BlockCommandComment), commandId(0), paragraphComment(0) {}
@ -1017,8 +989,6 @@ DEF_VECTOR(VerbatimBlockComment, VerbatimBlockLineComment*, Lines) @@ -1017,8 +989,6 @@ DEF_VECTOR(VerbatimBlockComment, VerbatimBlockLineComment*, Lines)
VerbatimLineComment::VerbatimLineComment() : BlockCommandComment(CommentKind::VerbatimLineComment) {}
DEF_STRING(VerbatimLineComment, Text)
ParagraphComment::ParagraphComment() : BlockContentComment(CommentKind::ParagraphComment), isWhitespace(false) {}
ParagraphComment::~ParagraphComment()
@ -1058,35 +1028,23 @@ HTMLTagComment::HTMLTagComment(CommentKind Kind) : InlineContentComment(Kind) {} @@ -1058,35 +1028,23 @@ HTMLTagComment::HTMLTagComment(CommentKind Kind) : InlineContentComment(Kind) {}
HTMLStartTagComment::Attribute::Attribute() {}
HTMLStartTagComment::Attribute::Attribute(const Attribute& rhs) : Name(rhs.Name), Value(rhs.Value) {}
DEF_STRING(HTMLStartTagComment::Attribute, Name)
DEF_STRING(HTMLStartTagComment::Attribute, Value)
HTMLStartTagComment::Attribute::Attribute(const Attribute& rhs) : name(rhs.name), value(rhs.value) {}
HTMLStartTagComment::HTMLStartTagComment() : HTMLTagComment(CommentKind::HTMLStartTagComment) {}
DEF_VECTOR(HTMLStartTagComment, HTMLStartTagComment::Attribute, Attributes)
DEF_STRING(HTMLStartTagComment, TagName)
HTMLEndTagComment::HTMLEndTagComment() : HTMLTagComment(CommentKind::HTMLEndTagComment) {}
DEF_STRING(HTMLEndTagComment, TagName)
InlineContentComment::InlineContentComment() : Comment(CommentKind::InlineContentComment), hasTrailingNewline(false) {}
InlineContentComment::InlineContentComment(CommentKind Kind) : Comment(Kind), hasTrailingNewline(false) {}
TextComment::TextComment() : InlineContentComment(CommentKind::TextComment) {}
DEF_STRING(TextComment, Text)
InlineCommandComment::Argument::Argument() {}
InlineCommandComment::Argument::Argument(const Argument& rhs) : Text(rhs.Text) {}
DEF_STRING(InlineCommandComment::Argument, Text)
InlineCommandComment::Argument::Argument(const Argument& rhs) : text(rhs.text) {}
InlineCommandComment::InlineCommandComment()
: InlineContentComment(CommentKind::InlineCommandComment), commandId(0), commentRenderKind(RenderNormal) {}
@ -1095,6 +1053,4 @@ DEF_VECTOR(InlineCommandComment, InlineCommandComment::Argument, Arguments) @@ -1095,6 +1053,4 @@ DEF_VECTOR(InlineCommandComment, InlineCommandComment::Argument, Arguments)
VerbatimBlockLineComment::VerbatimBlockLineComment() : Comment(CommentKind::VerbatimBlockLineComment) {}
DEF_STRING(VerbatimBlockLineComment, Text)
} } }

56
src/CppParser/AST.h

@ -362,7 +362,7 @@ public: @@ -362,7 +362,7 @@ public:
LayoutField(const LayoutField& other);
~LayoutField();
unsigned offset;
STRING(Name)
std::string name;
QualifiedType qualifiedType;
void* fieldPtr;
};
@ -459,9 +459,9 @@ public: @@ -459,9 +459,9 @@ public:
SourceLocation location;
int lineNumberStart;
int lineNumberEnd;
STRING(Name)
STRING(USR)
STRING(DebugText)
std::string name;
std::string USR;
std::string debugText;
bool isIncomplete;
bool isDependent;
bool isImplicit;
@ -581,7 +581,7 @@ public: @@ -581,7 +581,7 @@ public:
Statement(const std::string& str, StatementClass Class = StatementClass::Any, Declaration* decl = 0);
StatementClass _class;
Declaration* decl;
STRING(String)
std::string string;
};
class CS_API Expression : public Statement
@ -597,7 +597,7 @@ public: @@ -597,7 +597,7 @@ public:
~BinaryOperator();
Expression* LHS;
Expression* RHS;
STRING(OpcodeStr)
std::string opcodeStr;
};
class CS_API CallExpr : public Expression
@ -704,9 +704,9 @@ public: @@ -704,9 +704,9 @@ public:
bool isInline;
bool isPure;
bool isDeleted;
CXXOperatorKind OperatorKind;
STRING(Mangled)
STRING(Signature)
CXXOperatorKind operatorKind;
std::string mangled;
std::string signature;
CallingConvention callingConvention;
VECTOR(Parameter*, Parameters)
FunctionTemplateSpecialization* specializationInfo;
@ -757,7 +757,7 @@ public: @@ -757,7 +757,7 @@ public:
Item(const Item&);
~Item();
STRING(Expression)
std::string expression;
uint64_t value;
};
@ -781,7 +781,7 @@ class CS_API Variable : public Declaration @@ -781,7 +781,7 @@ class CS_API Variable : public Declaration
public:
DECLARE_DECL_KIND(Variable, Variable)
~Variable();
STRING(Mangled)
std::string mangled;
QualifiedType qualifiedType;
};
@ -1033,8 +1033,8 @@ class CS_API MacroDefinition : public PreprocessedEntity @@ -1033,8 +1033,8 @@ class CS_API MacroDefinition : public PreprocessedEntity
public:
MacroDefinition();
~MacroDefinition();
STRING(Name)
STRING(Expression)
std::string name;
std::string expression;
int lineNumberStart;
int lineNumberEnd;
};
@ -1044,8 +1044,8 @@ class CS_API MacroExpansion : public PreprocessedEntity @@ -1044,8 +1044,8 @@ class CS_API MacroExpansion : public PreprocessedEntity
public:
MacroExpansion();
~MacroExpansion();
STRING(Name)
STRING(Text)
std::string name;
std::string text;
MacroDefinition* definition;
};
@ -1054,7 +1054,7 @@ class CS_API TranslationUnit : public Namespace @@ -1054,7 +1054,7 @@ class CS_API TranslationUnit : public Namespace
public:
TranslationUnit();
~TranslationUnit();
STRING(FileName)
std::string fileName;
bool isSystemHeader;
VECTOR(MacroDefinition*, Macros)
};
@ -1071,7 +1071,7 @@ class CS_API NativeLibrary @@ -1071,7 +1071,7 @@ class CS_API NativeLibrary
public:
NativeLibrary();
~NativeLibrary();
STRING(FileName)
std::string fileName;
ArchType archType;
VECTOR_STRING(Symbols)
VECTOR_STRING(Dependencies)
@ -1156,7 +1156,7 @@ public: @@ -1156,7 +1156,7 @@ public:
public:
Argument();
Argument(const Argument&);
STRING(Text)
std::string text;
};
BlockCommandComment();
BlockCommandComment(CommentKind Kind);
@ -1191,7 +1191,7 @@ class CS_API VerbatimBlockLineComment : public Comment @@ -1191,7 +1191,7 @@ class CS_API VerbatimBlockLineComment : public Comment
{
public:
VerbatimBlockLineComment();
STRING(Text)
std::string text;
};
class CS_API VerbatimBlockComment : public BlockCommandComment
@ -1206,7 +1206,7 @@ class CS_API VerbatimLineComment : public BlockCommandComment @@ -1206,7 +1206,7 @@ class CS_API VerbatimLineComment : public BlockCommandComment
{
public:
VerbatimLineComment();
STRING(Text)
std::string text;
};
class CS_API InlineCommandComment : public InlineContentComment
@ -1224,7 +1224,7 @@ public: @@ -1224,7 +1224,7 @@ public:
public:
Argument();
Argument(const Argument&);
STRING(Text)
std::string text;
};
InlineCommandComment();
unsigned commandId;
@ -1247,11 +1247,11 @@ public: @@ -1247,11 +1247,11 @@ public:
public:
Attribute();
Attribute(const Attribute&);
STRING(Name)
STRING(Value)
std::string name;
std::string value;
};
HTMLStartTagComment();
STRING(TagName)
std::string tagName;
VECTOR(Attribute, Attributes)
};
@ -1259,14 +1259,14 @@ class CS_API HTMLEndTagComment : public HTMLTagComment @@ -1259,14 +1259,14 @@ class CS_API HTMLEndTagComment : public HTMLTagComment
{
public:
HTMLEndTagComment();
STRING(TagName)
std::string tagName;
};
class CS_API TextComment : public InlineContentComment
{
public:
TextComment();
STRING(Text)
std::string text;
};
enum class RawCommentKind
@ -1287,8 +1287,8 @@ public: @@ -1287,8 +1287,8 @@ public:
RawComment();
~RawComment();
RawCommentKind kind;
STRING(Text)
STRING(BriefText)
std::string text;
std::string briefText;
FullComment* fullCommentBlock;
};

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

File diff suppressed because it is too large Load Diff

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

@ -580,6 +580,12 @@ namespace CppSharp @@ -580,6 +580,12 @@ namespace CppSharp
void set(CppSharp::Parser::AST::CallingConvention);
}
property System::Collections::Generic::List<CppSharp::Parser::AST::Parameter^>^ Parameters
{
System::Collections::Generic::List<CppSharp::Parser::AST::Parameter^>^ get();
void set(System::Collections::Generic::List<CppSharp::Parser::AST::Parameter^>^);
}
property unsigned int ParametersCount
{
unsigned int get();
@ -790,6 +796,12 @@ namespace CppSharp @@ -790,6 +796,12 @@ namespace CppSharp
~TemplateSpecializationType();
property System::Collections::Generic::List<CppSharp::Parser::AST::TemplateArgument^>^ Arguments
{
System::Collections::Generic::List<CppSharp::Parser::AST::TemplateArgument^>^ get();
void set(System::Collections::Generic::List<CppSharp::Parser::AST::TemplateArgument^>^);
}
property CppSharp::Parser::AST::Template^ Template
{
CppSharp::Parser::AST::Template^ get();
@ -826,6 +838,12 @@ namespace CppSharp @@ -826,6 +838,12 @@ namespace CppSharp
~DependentTemplateSpecializationType();
property System::Collections::Generic::List<CppSharp::Parser::AST::TemplateArgument^>^ Arguments
{
System::Collections::Generic::List<CppSharp::Parser::AST::TemplateArgument^>^ get();
void set(System::Collections::Generic::List<CppSharp::Parser::AST::TemplateArgument^>^);
}
property CppSharp::Parser::AST::QualifiedType^ Desugared
{
CppSharp::Parser::AST::QualifiedType^ get();
@ -1092,6 +1110,12 @@ namespace CppSharp @@ -1092,6 +1110,12 @@ namespace CppSharp
~VTableLayout();
property System::Collections::Generic::List<CppSharp::Parser::AST::VTableComponent^>^ Components
{
System::Collections::Generic::List<CppSharp::Parser::AST::VTableComponent^>^ get();
void set(System::Collections::Generic::List<CppSharp::Parser::AST::VTableComponent^>^);
}
property unsigned int ComponentsCount
{
unsigned int get();
@ -1179,6 +1203,12 @@ namespace CppSharp @@ -1179,6 +1203,12 @@ namespace CppSharp
void set(unsigned int);
}
property System::String^ Name
{
System::String^ get();
void set(System::String^);
}
property CppSharp::Parser::AST::QualifiedType^ QualifiedType
{
CppSharp::Parser::AST::QualifiedType^ get();
@ -1191,12 +1221,6 @@ namespace CppSharp @@ -1191,12 +1221,6 @@ namespace CppSharp
void set(::System::IntPtr);
}
property System::String^ Name
{
System::String^ get();
void set(System::String^);
}
protected:
bool __ownsNativeInstance;
};
@ -1261,6 +1285,12 @@ namespace CppSharp @@ -1261,6 +1285,12 @@ namespace CppSharp
void set(CppSharp::Parser::AST::CppAbi);
}
property System::Collections::Generic::List<CppSharp::Parser::AST::VFTableInfo^>^ VFTables
{
System::Collections::Generic::List<CppSharp::Parser::AST::VFTableInfo^>^ get();
void set(System::Collections::Generic::List<CppSharp::Parser::AST::VFTableInfo^>^);
}
property CppSharp::Parser::AST::VTableLayout^ Layout
{
CppSharp::Parser::AST::VTableLayout^ get();
@ -1297,6 +1327,18 @@ namespace CppSharp @@ -1297,6 +1327,18 @@ namespace CppSharp
void set(int);
}
property System::Collections::Generic::List<CppSharp::Parser::AST::LayoutField^>^ Fields
{
System::Collections::Generic::List<CppSharp::Parser::AST::LayoutField^>^ get();
void set(System::Collections::Generic::List<CppSharp::Parser::AST::LayoutField^>^);
}
property System::Collections::Generic::List<CppSharp::Parser::AST::LayoutBase^>^ Bases
{
System::Collections::Generic::List<CppSharp::Parser::AST::LayoutBase^>^ get();
void set(System::Collections::Generic::List<CppSharp::Parser::AST::LayoutBase^>^);
}
property unsigned int VFTablesCount
{
unsigned int get();
@ -1389,6 +1431,24 @@ namespace CppSharp @@ -1389,6 +1431,24 @@ namespace CppSharp
void set(int);
}
property System::String^ Name
{
System::String^ get();
void set(System::String^);
}
property System::String^ USR
{
System::String^ get();
void set(System::String^);
}
property System::String^ DebugText
{
System::String^ get();
void set(System::String^);
}
property bool IsIncomplete
{
bool get();
@ -1419,6 +1479,12 @@ namespace CppSharp @@ -1419,6 +1479,12 @@ namespace CppSharp
void set(unsigned int);
}
property System::Collections::Generic::List<CppSharp::Parser::AST::PreprocessedEntity^>^ PreprocessedEntities
{
System::Collections::Generic::List<CppSharp::Parser::AST::PreprocessedEntity^>^ get();
void set(System::Collections::Generic::List<CppSharp::Parser::AST::PreprocessedEntity^>^);
}
property ::System::IntPtr OriginalPtr
{
::System::IntPtr get();
@ -1431,24 +1497,6 @@ namespace CppSharp @@ -1431,24 +1497,6 @@ namespace CppSharp
void set(CppSharp::Parser::AST::RawComment^);
}
property System::String^ Name
{
System::String^ get();
void set(System::String^);
}
property System::String^ USR
{
System::String^ get();
void set(System::String^);
}
property System::String^ DebugText
{
System::String^ get();
void set(System::String^);
}
property unsigned int PreprocessedEntitiesCount
{
unsigned int get();
@ -1478,6 +1526,60 @@ namespace CppSharp @@ -1478,6 +1526,60 @@ namespace CppSharp
~DeclarationContext();
property System::Collections::Generic::List<CppSharp::Parser::AST::Namespace^>^ Namespaces
{
System::Collections::Generic::List<CppSharp::Parser::AST::Namespace^>^ get();
void set(System::Collections::Generic::List<CppSharp::Parser::AST::Namespace^>^);
}
property System::Collections::Generic::List<CppSharp::Parser::AST::Enumeration^>^ Enums
{
System::Collections::Generic::List<CppSharp::Parser::AST::Enumeration^>^ get();
void set(System::Collections::Generic::List<CppSharp::Parser::AST::Enumeration^>^);
}
property System::Collections::Generic::List<CppSharp::Parser::AST::Function^>^ Functions
{
System::Collections::Generic::List<CppSharp::Parser::AST::Function^>^ get();
void set(System::Collections::Generic::List<CppSharp::Parser::AST::Function^>^);
}
property System::Collections::Generic::List<CppSharp::Parser::AST::Class^>^ Classes
{
System::Collections::Generic::List<CppSharp::Parser::AST::Class^>^ get();
void set(System::Collections::Generic::List<CppSharp::Parser::AST::Class^>^);
}
property System::Collections::Generic::List<CppSharp::Parser::AST::Template^>^ Templates
{
System::Collections::Generic::List<CppSharp::Parser::AST::Template^>^ get();
void set(System::Collections::Generic::List<CppSharp::Parser::AST::Template^>^);
}
property System::Collections::Generic::List<CppSharp::Parser::AST::TypedefDecl^>^ Typedefs
{
System::Collections::Generic::List<CppSharp::Parser::AST::TypedefDecl^>^ get();
void set(System::Collections::Generic::List<CppSharp::Parser::AST::TypedefDecl^>^);
}
property System::Collections::Generic::List<CppSharp::Parser::AST::TypeAlias^>^ TypeAliases
{
System::Collections::Generic::List<CppSharp::Parser::AST::TypeAlias^>^ get();
void set(System::Collections::Generic::List<CppSharp::Parser::AST::TypeAlias^>^);
}
property System::Collections::Generic::List<CppSharp::Parser::AST::Variable^>^ Variables
{
System::Collections::Generic::List<CppSharp::Parser::AST::Variable^>^ get();
void set(System::Collections::Generic::List<CppSharp::Parser::AST::Variable^>^);
}
property System::Collections::Generic::List<CppSharp::Parser::AST::Friend^>^ Friends
{
System::Collections::Generic::List<CppSharp::Parser::AST::Friend^>^ get();
void set(System::Collections::Generic::List<CppSharp::Parser::AST::Friend^>^);
}
property bool IsAnonymous
{
bool get();
@ -1671,6 +1773,8 @@ namespace CppSharp @@ -1671,6 +1773,8 @@ namespace CppSharp
Statement(::CppSharp::CppParser::AST::Statement* native);
static Statement^ __CreateInstance(::System::IntPtr native);
Statement(System::String^ str, CppSharp::Parser::AST::StatementClass Class, CppSharp::Parser::AST::Declaration^ decl);
Statement(CppSharp::Parser::AST::Statement^ _0);
~Statement();
@ -1703,6 +1807,8 @@ namespace CppSharp @@ -1703,6 +1807,8 @@ namespace CppSharp
Expression(::CppSharp::CppParser::AST::Expression* native);
static Expression^ __CreateInstance(::System::IntPtr native);
Expression(System::String^ str, CppSharp::Parser::AST::StatementClass Class, CppSharp::Parser::AST::Declaration^ decl);
Expression(CppSharp::Parser::AST::Expression^ _0);
~Expression();
@ -1714,6 +1820,8 @@ namespace CppSharp @@ -1714,6 +1820,8 @@ namespace CppSharp
BinaryOperator(::CppSharp::CppParser::AST::BinaryOperator* native);
static BinaryOperator^ __CreateInstance(::System::IntPtr native);
BinaryOperator(System::String^ str, CppSharp::Parser::AST::Expression^ lhs, CppSharp::Parser::AST::Expression^ rhs, System::String^ opcodeStr);
BinaryOperator(CppSharp::Parser::AST::BinaryOperator^ _0);
~BinaryOperator();
@ -1743,10 +1851,18 @@ namespace CppSharp @@ -1743,10 +1851,18 @@ namespace CppSharp
CallExpr(::CppSharp::CppParser::AST::CallExpr* native);
static CallExpr^ __CreateInstance(::System::IntPtr native);
CallExpr(System::String^ str, CppSharp::Parser::AST::Declaration^ decl);
CallExpr(CppSharp::Parser::AST::CallExpr^ _0);
~CallExpr();
property System::Collections::Generic::List<CppSharp::Parser::AST::Expression^>^ Arguments
{
System::Collections::Generic::List<CppSharp::Parser::AST::Expression^>^ get();
void set(System::Collections::Generic::List<CppSharp::Parser::AST::Expression^>^);
}
property unsigned int ArgumentsCount
{
unsigned int get();
@ -1765,10 +1881,18 @@ namespace CppSharp @@ -1765,10 +1881,18 @@ namespace CppSharp
CXXConstructExpr(::CppSharp::CppParser::AST::CXXConstructExpr* native);
static CXXConstructExpr^ __CreateInstance(::System::IntPtr native);
CXXConstructExpr(System::String^ str, CppSharp::Parser::AST::Declaration^ decl);
CXXConstructExpr(CppSharp::Parser::AST::CXXConstructExpr^ _0);
~CXXConstructExpr();
property System::Collections::Generic::List<CppSharp::Parser::AST::Expression^>^ Arguments
{
System::Collections::Generic::List<CppSharp::Parser::AST::Expression^>^ get();
void set(System::Collections::Generic::List<CppSharp::Parser::AST::Expression^>^);
}
property unsigned int ArgumentsCount
{
unsigned int get();
@ -1884,12 +2008,30 @@ namespace CppSharp @@ -1884,12 +2008,30 @@ namespace CppSharp
void set(CppSharp::Parser::AST::CXXOperatorKind);
}
property System::String^ Mangled
{
System::String^ get();
void set(System::String^);
}
property System::String^ Signature
{
System::String^ get();
void set(System::String^);
}
property CppSharp::Parser::AST::CallingConvention CallingConvention
{
CppSharp::Parser::AST::CallingConvention get();
void set(CppSharp::Parser::AST::CallingConvention);
}
property System::Collections::Generic::List<CppSharp::Parser::AST::Parameter^>^ Parameters
{
System::Collections::Generic::List<CppSharp::Parser::AST::Parameter^>^ get();
void set(System::Collections::Generic::List<CppSharp::Parser::AST::Parameter^>^);
}
property CppSharp::Parser::AST::FunctionTemplateSpecialization^ SpecializationInfo
{
CppSharp::Parser::AST::FunctionTemplateSpecialization^ get();
@ -1902,18 +2044,6 @@ namespace CppSharp @@ -1902,18 +2044,6 @@ namespace CppSharp
void set(CppSharp::Parser::AST::Function^);
}
property System::String^ Mangled
{
System::String^ get();
void set(System::String^);
}
property System::String^ Signature
{
System::String^ get();
void set(System::String^);
}
property unsigned int ParametersCount
{
unsigned int get();
@ -2029,17 +2159,17 @@ namespace CppSharp @@ -2029,17 +2159,17 @@ namespace CppSharp
~Item();
property unsigned long long Value
{
unsigned long long get();
void set(unsigned long long);
}
property System::String^ Expression
{
System::String^ get();
void set(System::String^);
}
property unsigned long long Value
{
unsigned long long get();
void set(unsigned long long);
}
};
Enumeration(::CppSharp::CppParser::AST::Enumeration* native);
@ -2068,6 +2198,12 @@ namespace CppSharp @@ -2068,6 +2198,12 @@ namespace CppSharp
void set(CppSharp::Parser::AST::BuiltinType^);
}
property System::Collections::Generic::List<CppSharp::Parser::AST::Enumeration::Item^>^ Items
{
System::Collections::Generic::List<CppSharp::Parser::AST::Enumeration::Item^>^ get();
void set(System::Collections::Generic::List<CppSharp::Parser::AST::Enumeration::Item^>^);
}
property unsigned int ItemsCount
{
unsigned int get();
@ -2078,6 +2214,8 @@ namespace CppSharp @@ -2078,6 +2214,8 @@ namespace CppSharp
void AddItems(CppSharp::Parser::AST::Enumeration::Item^ s);
void ClearItems();
CppSharp::Parser::AST::Enumeration::Item^ FindItemByName(System::String^ Name);
};
public ref class Variable : CppSharp::Parser::AST::Declaration
@ -2092,17 +2230,17 @@ namespace CppSharp @@ -2092,17 +2230,17 @@ namespace CppSharp
~Variable();
property CppSharp::Parser::AST::QualifiedType^ QualifiedType
{
CppSharp::Parser::AST::QualifiedType^ get();
void set(CppSharp::Parser::AST::QualifiedType^);
}
property System::String^ Mangled
{
System::String^ get();
void set(System::String^);
}
property CppSharp::Parser::AST::QualifiedType^ QualifiedType
{
CppSharp::Parser::AST::QualifiedType^ get();
void set(CppSharp::Parser::AST::QualifiedType^);
}
};
public ref class BaseClassSpecifier : ICppInstance
@ -2214,6 +2352,30 @@ namespace CppSharp @@ -2214,6 +2352,30 @@ namespace CppSharp
~Class();
property System::Collections::Generic::List<CppSharp::Parser::AST::BaseClassSpecifier^>^ Bases
{
System::Collections::Generic::List<CppSharp::Parser::AST::BaseClassSpecifier^>^ get();
void set(System::Collections::Generic::List<CppSharp::Parser::AST::BaseClassSpecifier^>^);
}
property System::Collections::Generic::List<CppSharp::Parser::AST::Field^>^ Fields
{
System::Collections::Generic::List<CppSharp::Parser::AST::Field^>^ get();
void set(System::Collections::Generic::List<CppSharp::Parser::AST::Field^>^);
}
property System::Collections::Generic::List<CppSharp::Parser::AST::Method^>^ Methods
{
System::Collections::Generic::List<CppSharp::Parser::AST::Method^>^ get();
void set(System::Collections::Generic::List<CppSharp::Parser::AST::Method^>^);
}
property System::Collections::Generic::List<CppSharp::Parser::AST::AccessSpecifierDecl^>^ Specifiers
{
System::Collections::Generic::List<CppSharp::Parser::AST::AccessSpecifierDecl^>^ get();
void set(System::Collections::Generic::List<CppSharp::Parser::AST::AccessSpecifierDecl^>^);
}
property bool IsPOD
{
bool get();
@ -2339,6 +2501,12 @@ namespace CppSharp @@ -2339,6 +2501,12 @@ namespace CppSharp
void set(CppSharp::Parser::AST::Declaration^);
}
property System::Collections::Generic::List<CppSharp::Parser::AST::Declaration^>^ Parameters
{
System::Collections::Generic::List<CppSharp::Parser::AST::Declaration^>^ get();
void set(System::Collections::Generic::List<CppSharp::Parser::AST::Declaration^>^);
}
property unsigned int ParametersCount
{
unsigned int get();
@ -2498,6 +2666,12 @@ namespace CppSharp @@ -2498,6 +2666,12 @@ namespace CppSharp
~ClassTemplate();
property System::Collections::Generic::List<CppSharp::Parser::AST::ClassTemplateSpecialization^>^ Specializations
{
System::Collections::Generic::List<CppSharp::Parser::AST::ClassTemplateSpecialization^>^ get();
void set(System::Collections::Generic::List<CppSharp::Parser::AST::ClassTemplateSpecialization^>^);
}
property unsigned int SpecializationsCount
{
unsigned int get();
@ -2508,6 +2682,10 @@ namespace CppSharp @@ -2508,6 +2682,10 @@ namespace CppSharp
void AddSpecializations(CppSharp::Parser::AST::ClassTemplateSpecialization^ s);
void ClearSpecializations();
CppSharp::Parser::AST::ClassTemplateSpecialization^ FindSpecialization(System::String^ usr);
CppSharp::Parser::AST::ClassTemplatePartialSpecialization^ FindPartialSpecialization(System::String^ usr);
};
public ref class ClassTemplateSpecialization : CppSharp::Parser::AST::Class
@ -2528,6 +2706,12 @@ namespace CppSharp @@ -2528,6 +2706,12 @@ namespace CppSharp
void set(CppSharp::Parser::AST::ClassTemplate^);
}
property System::Collections::Generic::List<CppSharp::Parser::AST::TemplateArgument^>^ Arguments
{
System::Collections::Generic::List<CppSharp::Parser::AST::TemplateArgument^>^ get();
void set(System::Collections::Generic::List<CppSharp::Parser::AST::TemplateArgument^>^);
}
property CppSharp::Parser::AST::TemplateSpecializationKind SpecializationKind
{
CppSharp::Parser::AST::TemplateSpecializationKind get();
@ -2571,6 +2755,12 @@ namespace CppSharp @@ -2571,6 +2755,12 @@ namespace CppSharp
~FunctionTemplate();
property System::Collections::Generic::List<CppSharp::Parser::AST::FunctionTemplateSpecialization^>^ Specializations
{
System::Collections::Generic::List<CppSharp::Parser::AST::FunctionTemplateSpecialization^>^ get();
void set(System::Collections::Generic::List<CppSharp::Parser::AST::FunctionTemplateSpecialization^>^);
}
property unsigned int SpecializationsCount
{
unsigned int get();
@ -2581,6 +2771,8 @@ namespace CppSharp @@ -2581,6 +2771,8 @@ namespace CppSharp
void AddSpecializations(CppSharp::Parser::AST::FunctionTemplateSpecialization^ s);
void ClearSpecializations();
CppSharp::Parser::AST::FunctionTemplateSpecialization^ FindSpecialization(System::String^ usr);
};
public ref class FunctionTemplateSpecialization : ICppInstance
@ -2608,6 +2800,12 @@ namespace CppSharp @@ -2608,6 +2800,12 @@ namespace CppSharp
void set(CppSharp::Parser::AST::FunctionTemplate^);
}
property System::Collections::Generic::List<CppSharp::Parser::AST::TemplateArgument^>^ Arguments
{
System::Collections::Generic::List<CppSharp::Parser::AST::TemplateArgument^>^ get();
void set(System::Collections::Generic::List<CppSharp::Parser::AST::TemplateArgument^>^);
}
property CppSharp::Parser::AST::Function^ SpecializedFunction
{
CppSharp::Parser::AST::Function^ get();
@ -2647,6 +2845,12 @@ namespace CppSharp @@ -2647,6 +2845,12 @@ namespace CppSharp
~VarTemplate();
property System::Collections::Generic::List<CppSharp::Parser::AST::VarTemplateSpecialization^>^ Specializations
{
System::Collections::Generic::List<CppSharp::Parser::AST::VarTemplateSpecialization^>^ get();
void set(System::Collections::Generic::List<CppSharp::Parser::AST::VarTemplateSpecialization^>^);
}
property unsigned int SpecializationsCount
{
unsigned int get();
@ -2657,6 +2861,10 @@ namespace CppSharp @@ -2657,6 +2861,10 @@ namespace CppSharp
void AddSpecializations(CppSharp::Parser::AST::VarTemplateSpecialization^ s);
void ClearSpecializations();
CppSharp::Parser::AST::VarTemplateSpecialization^ FindSpecialization(System::String^ usr);
CppSharp::Parser::AST::VarTemplatePartialSpecialization^ FindPartialSpecialization(System::String^ usr);
};
public ref class VarTemplateSpecialization : CppSharp::Parser::AST::Variable
@ -2677,6 +2885,12 @@ namespace CppSharp @@ -2677,6 +2885,12 @@ namespace CppSharp
void set(CppSharp::Parser::AST::VarTemplate^);
}
property System::Collections::Generic::List<CppSharp::Parser::AST::TemplateArgument^>^ Arguments
{
System::Collections::Generic::List<CppSharp::Parser::AST::TemplateArgument^>^ get();
void set(System::Collections::Generic::List<CppSharp::Parser::AST::TemplateArgument^>^);
}
property CppSharp::Parser::AST::TemplateSpecializationKind SpecializationKind
{
CppSharp::Parser::AST::TemplateSpecializationKind get();
@ -2780,18 +2994,6 @@ namespace CppSharp @@ -2780,18 +2994,6 @@ namespace CppSharp
~MacroDefinition();
property int LineNumberStart
{
int get();
void set(int);
}
property int LineNumberEnd
{
int get();
void set(int);
}
property System::String^ Name
{
System::String^ get();
@ -2803,6 +3005,18 @@ namespace CppSharp @@ -2803,6 +3005,18 @@ namespace CppSharp
System::String^ get();
void set(System::String^);
}
property int LineNumberStart
{
int get();
void set(int);
}
property int LineNumberEnd
{
int get();
void set(int);
}
};
public ref class MacroExpansion : CppSharp::Parser::AST::PreprocessedEntity
@ -2817,12 +3031,6 @@ namespace CppSharp @@ -2817,12 +3031,6 @@ namespace CppSharp
~MacroExpansion();
property CppSharp::Parser::AST::MacroDefinition^ Definition
{
CppSharp::Parser::AST::MacroDefinition^ get();
void set(CppSharp::Parser::AST::MacroDefinition^);
}
property System::String^ Name
{
System::String^ get();
@ -2834,6 +3042,12 @@ namespace CppSharp @@ -2834,6 +3042,12 @@ namespace CppSharp
System::String^ get();
void set(System::String^);
}
property CppSharp::Parser::AST::MacroDefinition^ Definition
{
CppSharp::Parser::AST::MacroDefinition^ get();
void set(CppSharp::Parser::AST::MacroDefinition^);
}
};
public ref class TranslationUnit : CppSharp::Parser::AST::Namespace
@ -2848,16 +3062,22 @@ namespace CppSharp @@ -2848,16 +3062,22 @@ namespace CppSharp
~TranslationUnit();
property System::String^ FileName
{
System::String^ get();
void set(System::String^);
}
property bool IsSystemHeader
{
bool get();
void set(bool);
}
property System::String^ FileName
property System::Collections::Generic::List<CppSharp::Parser::AST::MacroDefinition^>^ Macros
{
System::String^ get();
void set(System::String^);
System::Collections::Generic::List<CppSharp::Parser::AST::MacroDefinition^>^ get();
void set(System::Collections::Generic::List<CppSharp::Parser::AST::MacroDefinition^>^);
}
property unsigned int MacrosCount
@ -2891,16 +3111,28 @@ namespace CppSharp @@ -2891,16 +3111,28 @@ namespace CppSharp
~NativeLibrary();
property System::String^ FileName
{
System::String^ get();
void set(System::String^);
}
property CppSharp::Parser::AST::ArchType ArchType
{
CppSharp::Parser::AST::ArchType get();
void set(CppSharp::Parser::AST::ArchType);
}
property System::String^ FileName
property System::Collections::Generic::List<System::String^>^ Symbols
{
System::String^ get();
void set(System::String^);
System::Collections::Generic::List<System::String^>^ get();
void set(System::Collections::Generic::List<System::String^>^);
}
property System::Collections::Generic::List<System::String^>^ Dependencies
{
System::Collections::Generic::List<System::String^>^ get();
void set(System::Collections::Generic::List<System::String^>^);
}
property unsigned int SymbolsCount
@ -2948,11 +3180,19 @@ namespace CppSharp @@ -2948,11 +3180,19 @@ namespace CppSharp
~ASTContext();
property System::Collections::Generic::List<CppSharp::Parser::AST::TranslationUnit^>^ TranslationUnits
{
System::Collections::Generic::List<CppSharp::Parser::AST::TranslationUnit^>^ get();
void set(System::Collections::Generic::List<CppSharp::Parser::AST::TranslationUnit^>^);
}
property unsigned int TranslationUnitsCount
{
unsigned int get();
}
CppSharp::Parser::AST::TranslationUnit^ FindOrCreateModule(System::String^ File);
CppSharp::Parser::AST::TranslationUnit^ GetTranslationUnits(unsigned int i);
void AddTranslationUnits(CppSharp::Parser::AST::TranslationUnit^ s);
@ -3023,6 +3263,12 @@ namespace CppSharp @@ -3023,6 +3263,12 @@ namespace CppSharp
~FullComment();
property System::Collections::Generic::List<CppSharp::Parser::AST::BlockContentComment^>^ Blocks
{
System::Collections::Generic::List<CppSharp::Parser::AST::BlockContentComment^>^ get();
void set(System::Collections::Generic::List<CppSharp::Parser::AST::BlockContentComment^>^);
}
property unsigned int BlocksCount
{
unsigned int get();
@ -3076,6 +3322,12 @@ namespace CppSharp @@ -3076,6 +3322,12 @@ namespace CppSharp
void set(bool);
}
property System::Collections::Generic::List<CppSharp::Parser::AST::InlineContentComment^>^ Content
{
System::Collections::Generic::List<CppSharp::Parser::AST::InlineContentComment^>^ get();
void set(System::Collections::Generic::List<CppSharp::Parser::AST::InlineContentComment^>^);
}
property unsigned int ContentCount
{
unsigned int get();
@ -3143,6 +3395,12 @@ namespace CppSharp @@ -3143,6 +3395,12 @@ namespace CppSharp
void set(CppSharp::Parser::AST::ParagraphComment^);
}
property System::Collections::Generic::List<CppSharp::Parser::AST::BlockCommandComment::Argument^>^ Arguments
{
System::Collections::Generic::List<CppSharp::Parser::AST::BlockCommandComment::Argument^>^ get();
void set(System::Collections::Generic::List<CppSharp::Parser::AST::BlockCommandComment::Argument^>^);
}
property unsigned int ArgumentsCount
{
unsigned int get();
@ -3201,6 +3459,12 @@ namespace CppSharp @@ -3201,6 +3459,12 @@ namespace CppSharp
~TParamCommandComment();
property System::Collections::Generic::List<unsigned int>^ Position
{
System::Collections::Generic::List<unsigned int>^ get();
void set(System::Collections::Generic::List<unsigned int>^);
}
property unsigned int PositionCount
{
unsigned int get();
@ -3244,6 +3508,12 @@ namespace CppSharp @@ -3244,6 +3508,12 @@ namespace CppSharp
~VerbatimBlockComment();
property System::Collections::Generic::List<CppSharp::Parser::AST::VerbatimBlockLineComment^>^ Lines
{
System::Collections::Generic::List<CppSharp::Parser::AST::VerbatimBlockLineComment^>^ get();
void set(System::Collections::Generic::List<CppSharp::Parser::AST::VerbatimBlockLineComment^>^);
}
property unsigned int LinesCount
{
unsigned int get();
@ -3336,6 +3606,12 @@ namespace CppSharp @@ -3336,6 +3606,12 @@ namespace CppSharp
void set(CppSharp::Parser::AST::InlineCommandComment::RenderKind);
}
property System::Collections::Generic::List<CppSharp::Parser::AST::InlineCommandComment::Argument^>^ Arguments
{
System::Collections::Generic::List<CppSharp::Parser::AST::InlineCommandComment::Argument^>^ get();
void set(System::Collections::Generic::List<CppSharp::Parser::AST::InlineCommandComment::Argument^>^);
}
property unsigned int ArgumentsCount
{
unsigned int get();
@ -3418,6 +3694,12 @@ namespace CppSharp @@ -3418,6 +3694,12 @@ namespace CppSharp
void set(System::String^);
}
property System::Collections::Generic::List<CppSharp::Parser::AST::HTMLStartTagComment::Attribute^>^ Attributes
{
System::Collections::Generic::List<CppSharp::Parser::AST::HTMLStartTagComment::Attribute^>^ get();
void set(System::Collections::Generic::List<CppSharp::Parser::AST::HTMLStartTagComment::Attribute^>^);
}
property unsigned int AttributesCount
{
unsigned int get();
@ -3493,12 +3775,6 @@ namespace CppSharp @@ -3493,12 +3775,6 @@ namespace CppSharp
void set(CppSharp::Parser::AST::RawCommentKind);
}
property CppSharp::Parser::AST::FullComment^ FullCommentBlock
{
CppSharp::Parser::AST::FullComment^ get();
void set(CppSharp::Parser::AST::FullComment^);
}
property System::String^ Text
{
System::String^ get();
@ -3511,6 +3787,12 @@ namespace CppSharp @@ -3511,6 +3787,12 @@ namespace CppSharp
void set(System::String^);
}
property CppSharp::Parser::AST::FullComment^ FullCommentBlock
{
CppSharp::Parser::AST::FullComment^ get();
void set(CppSharp::Parser::AST::FullComment^);
}
protected:
bool __ownsNativeInstance;
};

273
src/CppParser/Bindings/CLI/CppParser.cpp

@ -179,6 +179,170 @@ void CppSharp::Parser::CppParserOptions::__Instance::set(System::IntPtr object) @@ -179,6 +179,170 @@ void CppSharp::Parser::CppParserOptions::__Instance::set(System::IntPtr object)
NativePtr = (::CppSharp::CppParser::CppParserOptions*)object.ToPointer();
}
System::Collections::Generic::List<System::String^>^ CppSharp::Parser::CppParserOptions::Arguments::get()
{
auto _tmp__Arguments = gcnew System::Collections::Generic::List<System::String^>();
for(auto _element : ((::CppSharp::CppParser::CppParserOptions*)NativePtr)->Arguments)
{
auto _marshalElement = clix::marshalString<clix::E_UTF8>(_element);
_tmp__Arguments->Add(_marshalElement);
}
return _tmp__Arguments;
}
void CppSharp::Parser::CppParserOptions::Arguments::set(System::Collections::Generic::List<System::String^>^ value)
{
auto _tmpvalue = std::vector<::std::string>();
for each(System::String^ _element in value)
{
auto _marshalElement = clix::marshalString<clix::E_UTF8>(_element);
_tmpvalue.push_back(_marshalElement);
}
((::CppSharp::CppParser::CppParserOptions*)NativePtr)->Arguments = _tmpvalue;
}
System::String^ CppSharp::Parser::CppParserOptions::LibraryFile::get()
{
return clix::marshalString<clix::E_UTF8>(((::CppSharp::CppParser::CppParserOptions*)NativePtr)->libraryFile);
}
void CppSharp::Parser::CppParserOptions::LibraryFile::set(System::String^ value)
{
((::CppSharp::CppParser::CppParserOptions*)NativePtr)->libraryFile = clix::marshalString<clix::E_UTF8>(value);
}
System::Collections::Generic::List<System::String^>^ CppSharp::Parser::CppParserOptions::SourceFiles::get()
{
auto _tmp__SourceFiles = gcnew System::Collections::Generic::List<System::String^>();
for(auto _element : ((::CppSharp::CppParser::CppParserOptions*)NativePtr)->SourceFiles)
{
auto _marshalElement = clix::marshalString<clix::E_UTF8>(_element);
_tmp__SourceFiles->Add(_marshalElement);
}
return _tmp__SourceFiles;
}
void CppSharp::Parser::CppParserOptions::SourceFiles::set(System::Collections::Generic::List<System::String^>^ value)
{
auto _tmpvalue = std::vector<::std::string>();
for each(System::String^ _element in value)
{
auto _marshalElement = clix::marshalString<clix::E_UTF8>(_element);
_tmpvalue.push_back(_marshalElement);
}
((::CppSharp::CppParser::CppParserOptions*)NativePtr)->SourceFiles = _tmpvalue;
}
System::Collections::Generic::List<System::String^>^ CppSharp::Parser::CppParserOptions::IncludeDirs::get()
{
auto _tmp__IncludeDirs = gcnew System::Collections::Generic::List<System::String^>();
for(auto _element : ((::CppSharp::CppParser::CppParserOptions*)NativePtr)->IncludeDirs)
{
auto _marshalElement = clix::marshalString<clix::E_UTF8>(_element);
_tmp__IncludeDirs->Add(_marshalElement);
}
return _tmp__IncludeDirs;
}
void CppSharp::Parser::CppParserOptions::IncludeDirs::set(System::Collections::Generic::List<System::String^>^ value)
{
auto _tmpvalue = std::vector<::std::string>();
for each(System::String^ _element in value)
{
auto _marshalElement = clix::marshalString<clix::E_UTF8>(_element);
_tmpvalue.push_back(_marshalElement);
}
((::CppSharp::CppParser::CppParserOptions*)NativePtr)->IncludeDirs = _tmpvalue;
}
System::Collections::Generic::List<System::String^>^ CppSharp::Parser::CppParserOptions::SystemIncludeDirs::get()
{
auto _tmp__SystemIncludeDirs = gcnew System::Collections::Generic::List<System::String^>();
for(auto _element : ((::CppSharp::CppParser::CppParserOptions*)NativePtr)->SystemIncludeDirs)
{
auto _marshalElement = clix::marshalString<clix::E_UTF8>(_element);
_tmp__SystemIncludeDirs->Add(_marshalElement);
}
return _tmp__SystemIncludeDirs;
}
void CppSharp::Parser::CppParserOptions::SystemIncludeDirs::set(System::Collections::Generic::List<System::String^>^ value)
{
auto _tmpvalue = std::vector<::std::string>();
for each(System::String^ _element in value)
{
auto _marshalElement = clix::marshalString<clix::E_UTF8>(_element);
_tmpvalue.push_back(_marshalElement);
}
((::CppSharp::CppParser::CppParserOptions*)NativePtr)->SystemIncludeDirs = _tmpvalue;
}
System::Collections::Generic::List<System::String^>^ CppSharp::Parser::CppParserOptions::Defines::get()
{
auto _tmp__Defines = gcnew System::Collections::Generic::List<System::String^>();
for(auto _element : ((::CppSharp::CppParser::CppParserOptions*)NativePtr)->Defines)
{
auto _marshalElement = clix::marshalString<clix::E_UTF8>(_element);
_tmp__Defines->Add(_marshalElement);
}
return _tmp__Defines;
}
void CppSharp::Parser::CppParserOptions::Defines::set(System::Collections::Generic::List<System::String^>^ value)
{
auto _tmpvalue = std::vector<::std::string>();
for each(System::String^ _element in value)
{
auto _marshalElement = clix::marshalString<clix::E_UTF8>(_element);
_tmpvalue.push_back(_marshalElement);
}
((::CppSharp::CppParser::CppParserOptions*)NativePtr)->Defines = _tmpvalue;
}
System::Collections::Generic::List<System::String^>^ CppSharp::Parser::CppParserOptions::Undefines::get()
{
auto _tmp__Undefines = gcnew System::Collections::Generic::List<System::String^>();
for(auto _element : ((::CppSharp::CppParser::CppParserOptions*)NativePtr)->Undefines)
{
auto _marshalElement = clix::marshalString<clix::E_UTF8>(_element);
_tmp__Undefines->Add(_marshalElement);
}
return _tmp__Undefines;
}
void CppSharp::Parser::CppParserOptions::Undefines::set(System::Collections::Generic::List<System::String^>^ value)
{
auto _tmpvalue = std::vector<::std::string>();
for each(System::String^ _element in value)
{
auto _marshalElement = clix::marshalString<clix::E_UTF8>(_element);
_tmpvalue.push_back(_marshalElement);
}
((::CppSharp::CppParser::CppParserOptions*)NativePtr)->Undefines = _tmpvalue;
}
System::Collections::Generic::List<System::String^>^ CppSharp::Parser::CppParserOptions::LibraryDirs::get()
{
auto _tmp__LibraryDirs = gcnew System::Collections::Generic::List<System::String^>();
for(auto _element : ((::CppSharp::CppParser::CppParserOptions*)NativePtr)->LibraryDirs)
{
auto _marshalElement = clix::marshalString<clix::E_UTF8>(_element);
_tmp__LibraryDirs->Add(_marshalElement);
}
return _tmp__LibraryDirs;
}
void CppSharp::Parser::CppParserOptions::LibraryDirs::set(System::Collections::Generic::List<System::String^>^ value)
{
auto _tmpvalue = std::vector<::std::string>();
for each(System::String^ _element in value)
{
auto _marshalElement = clix::marshalString<clix::E_UTF8>(_element);
_tmpvalue.push_back(_marshalElement);
}
((::CppSharp::CppParser::CppParserOptions*)NativePtr)->LibraryDirs = _tmpvalue;
}
CppSharp::Parser::AST::ASTContext^ CppSharp::Parser::CppParserOptions::ASTContext::get()
{
return (((::CppSharp::CppParser::CppParserOptions*)NativePtr)->ASTContext == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::ASTContext((::CppSharp::CppParser::AST::ASTContext*)((::CppSharp::CppParser::CppParserOptions*)NativePtr)->ASTContext);
@ -199,6 +363,16 @@ void CppSharp::Parser::CppParserOptions::ToolSetToUse::set(int value) @@ -199,6 +363,16 @@ void CppSharp::Parser::CppParserOptions::ToolSetToUse::set(int value)
((::CppSharp::CppParser::CppParserOptions*)NativePtr)->toolSetToUse = value;
}
System::String^ CppSharp::Parser::CppParserOptions::TargetTriple::get()
{
return clix::marshalString<clix::E_UTF8>(((::CppSharp::CppParser::CppParserOptions*)NativePtr)->targetTriple);
}
void CppSharp::Parser::CppParserOptions::TargetTriple::set(System::String^ value)
{
((::CppSharp::CppParser::CppParserOptions*)NativePtr)->targetTriple = clix::marshalString<clix::E_UTF8>(value);
}
CppSharp::Parser::AST::CppAbi CppSharp::Parser::CppParserOptions::Abi::get()
{
return (CppSharp::Parser::AST::CppAbi)((::CppSharp::CppParser::CppParserOptions*)NativePtr)->abi;
@ -269,34 +443,6 @@ void CppSharp::Parser::CppParserOptions::TargetInfo::set(CppSharp::Parser::Parse @@ -269,34 +443,6 @@ void CppSharp::Parser::CppParserOptions::TargetInfo::set(CppSharp::Parser::Parse
((::CppSharp::CppParser::CppParserOptions*)NativePtr)->targetInfo = (::CppSharp::CppParser::ParserTargetInfo*)value->NativePtr;
}
System::String^ CppSharp::Parser::CppParserOptions::LibraryFile::get()
{
auto __ret = ((::CppSharp::CppParser::CppParserOptions*)NativePtr)->getLibraryFile();
if (__ret == nullptr) return nullptr;
return (__ret == 0 ? nullptr : clix::marshalString<clix::E_UTF8>(__ret));
}
void CppSharp::Parser::CppParserOptions::LibraryFile::set(System::String^ s)
{
auto ___arg0 = clix::marshalString<clix::E_UTF8>(s);
auto __arg0 = ___arg0.c_str();
((::CppSharp::CppParser::CppParserOptions*)NativePtr)->setLibraryFile(__arg0);
}
System::String^ CppSharp::Parser::CppParserOptions::TargetTriple::get()
{
auto __ret = ((::CppSharp::CppParser::CppParserOptions*)NativePtr)->getTargetTriple();
if (__ret == nullptr) return nullptr;
return (__ret == 0 ? nullptr : clix::marshalString<clix::E_UTF8>(__ret));
}
void CppSharp::Parser::CppParserOptions::TargetTriple::set(System::String^ s)
{
auto ___arg0 = clix::marshalString<clix::E_UTF8>(s);
auto __arg0 = ___arg0.c_str();
((::CppSharp::CppParser::CppParserOptions*)NativePtr)->setTargetTriple(__arg0);
}
unsigned int CppSharp::Parser::CppParserOptions::ArgumentsCount::get()
{
auto __ret = ((::CppSharp::CppParser::CppParserOptions*)NativePtr)->getArgumentsCount();
@ -380,62 +526,54 @@ void CppSharp::Parser::ParserDiagnostic::__Instance::set(System::IntPtr object) @@ -380,62 +526,54 @@ void CppSharp::Parser::ParserDiagnostic::__Instance::set(System::IntPtr object)
NativePtr = (::CppSharp::CppParser::ParserDiagnostic*)object.ToPointer();
}
CppSharp::Parser::ParserDiagnosticLevel CppSharp::Parser::ParserDiagnostic::Level::get()
System::String^ CppSharp::Parser::ParserDiagnostic::FileName::get()
{
return (CppSharp::Parser::ParserDiagnosticLevel)((::CppSharp::CppParser::ParserDiagnostic*)NativePtr)->level;
return clix::marshalString<clix::E_UTF8>(((::CppSharp::CppParser::ParserDiagnostic*)NativePtr)->fileName);
}
void CppSharp::Parser::ParserDiagnostic::Level::set(CppSharp::Parser::ParserDiagnosticLevel value)
void CppSharp::Parser::ParserDiagnostic::FileName::set(System::String^ value)
{
((::CppSharp::CppParser::ParserDiagnostic*)NativePtr)->level = (::CppSharp::CppParser::ParserDiagnosticLevel)value;
((::CppSharp::CppParser::ParserDiagnostic*)NativePtr)->fileName = clix::marshalString<clix::E_UTF8>(value);
}
int CppSharp::Parser::ParserDiagnostic::LineNumber::get()
System::String^ CppSharp::Parser::ParserDiagnostic::Message::get()
{
return ((::CppSharp::CppParser::ParserDiagnostic*)NativePtr)->lineNumber;
return clix::marshalString<clix::E_UTF8>(((::CppSharp::CppParser::ParserDiagnostic*)NativePtr)->message);
}
void CppSharp::Parser::ParserDiagnostic::LineNumber::set(int value)
void CppSharp::Parser::ParserDiagnostic::Message::set(System::String^ value)
{
((::CppSharp::CppParser::ParserDiagnostic*)NativePtr)->lineNumber = value;
((::CppSharp::CppParser::ParserDiagnostic*)NativePtr)->message = clix::marshalString<clix::E_UTF8>(value);
}
int CppSharp::Parser::ParserDiagnostic::ColumnNumber::get()
CppSharp::Parser::ParserDiagnosticLevel CppSharp::Parser::ParserDiagnostic::Level::get()
{
return ((::CppSharp::CppParser::ParserDiagnostic*)NativePtr)->columnNumber;
return (CppSharp::Parser::ParserDiagnosticLevel)((::CppSharp::CppParser::ParserDiagnostic*)NativePtr)->level;
}
void CppSharp::Parser::ParserDiagnostic::ColumnNumber::set(int value)
void CppSharp::Parser::ParserDiagnostic::Level::set(CppSharp::Parser::ParserDiagnosticLevel value)
{
((::CppSharp::CppParser::ParserDiagnostic*)NativePtr)->columnNumber = value;
((::CppSharp::CppParser::ParserDiagnostic*)NativePtr)->level = (::CppSharp::CppParser::ParserDiagnosticLevel)value;
}
System::String^ CppSharp::Parser::ParserDiagnostic::FileName::get()
int CppSharp::Parser::ParserDiagnostic::LineNumber::get()
{
auto __ret = ((::CppSharp::CppParser::ParserDiagnostic*)NativePtr)->getFileName();
if (__ret == nullptr) return nullptr;
return (__ret == 0 ? nullptr : clix::marshalString<clix::E_UTF8>(__ret));
return ((::CppSharp::CppParser::ParserDiagnostic*)NativePtr)->lineNumber;
}
void CppSharp::Parser::ParserDiagnostic::FileName::set(System::String^ s)
void CppSharp::Parser::ParserDiagnostic::LineNumber::set(int value)
{
auto ___arg0 = clix::marshalString<clix::E_UTF8>(s);
auto __arg0 = ___arg0.c_str();
((::CppSharp::CppParser::ParserDiagnostic*)NativePtr)->setFileName(__arg0);
((::CppSharp::CppParser::ParserDiagnostic*)NativePtr)->lineNumber = value;
}
System::String^ CppSharp::Parser::ParserDiagnostic::Message::get()
int CppSharp::Parser::ParserDiagnostic::ColumnNumber::get()
{
auto __ret = ((::CppSharp::CppParser::ParserDiagnostic*)NativePtr)->getMessage();
if (__ret == nullptr) return nullptr;
return (__ret == 0 ? nullptr : clix::marshalString<clix::E_UTF8>(__ret));
return ((::CppSharp::CppParser::ParserDiagnostic*)NativePtr)->columnNumber;
}
void CppSharp::Parser::ParserDiagnostic::Message::set(System::String^ s)
void CppSharp::Parser::ParserDiagnostic::ColumnNumber::set(int value)
{
auto ___arg0 = clix::marshalString<clix::E_UTF8>(s);
auto __arg0 = ___arg0.c_str();
((::CppSharp::CppParser::ParserDiagnostic*)NativePtr)->setMessage(__arg0);
((::CppSharp::CppParser::ParserDiagnostic*)NativePtr)->columnNumber = value;
}
CppSharp::Parser::ParserResult::ParserResult(::CppSharp::CppParser::ParserResult* native)
@ -509,6 +647,29 @@ void CppSharp::Parser::ParserResult::Kind::set(CppSharp::Parser::ParserResultKin @@ -509,6 +647,29 @@ void CppSharp::Parser::ParserResult::Kind::set(CppSharp::Parser::ParserResultKin
((::CppSharp::CppParser::ParserResult*)NativePtr)->kind = (::CppSharp::CppParser::ParserResultKind)value;
}
System::Collections::Generic::List<CppSharp::Parser::ParserDiagnostic^>^ CppSharp::Parser::ParserResult::Diagnostics::get()
{
auto _tmp__Diagnostics = gcnew System::Collections::Generic::List<CppSharp::Parser::ParserDiagnostic^>();
for(auto _element : ((::CppSharp::CppParser::ParserResult*)NativePtr)->Diagnostics)
{
auto ___element = new ::CppSharp::CppParser::ParserDiagnostic(_element);
auto _marshalElement = (___element == nullptr) ? nullptr : gcnew CppSharp::Parser::ParserDiagnostic((::CppSharp::CppParser::ParserDiagnostic*)___element);
_tmp__Diagnostics->Add(_marshalElement);
}
return _tmp__Diagnostics;
}
void CppSharp::Parser::ParserResult::Diagnostics::set(System::Collections::Generic::List<CppSharp::Parser::ParserDiagnostic^>^ value)
{
auto _tmpvalue = std::vector<::CppSharp::CppParser::ParserDiagnostic>();
for each(CppSharp::Parser::ParserDiagnostic^ _element in value)
{
auto _marshalElement = *(::CppSharp::CppParser::ParserDiagnostic*)_element->NativePtr;
_tmpvalue.push_back(_marshalElement);
}
((::CppSharp::CppParser::ParserResult*)NativePtr)->Diagnostics = _tmpvalue;
}
CppSharp::Parser::AST::ASTContext^ CppSharp::Parser::ParserResult::ASTContext::get()
{
return (((::CppSharp::CppParser::ParserResult*)NativePtr)->ASTContext == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::ASTContext((::CppSharp::CppParser::AST::ASTContext*)((::CppSharp::CppParser::ParserResult*)NativePtr)->ASTContext);

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

@ -90,6 +90,54 @@ namespace CppSharp @@ -90,6 +90,54 @@ namespace CppSharp
~CppParserOptions();
property System::Collections::Generic::List<System::String^>^ Arguments
{
System::Collections::Generic::List<System::String^>^ get();
void set(System::Collections::Generic::List<System::String^>^);
}
property System::String^ LibraryFile
{
System::String^ get();
void set(System::String^);
}
property System::Collections::Generic::List<System::String^>^ SourceFiles
{
System::Collections::Generic::List<System::String^>^ get();
void set(System::Collections::Generic::List<System::String^>^);
}
property System::Collections::Generic::List<System::String^>^ IncludeDirs
{
System::Collections::Generic::List<System::String^>^ get();
void set(System::Collections::Generic::List<System::String^>^);
}
property System::Collections::Generic::List<System::String^>^ SystemIncludeDirs
{
System::Collections::Generic::List<System::String^>^ get();
void set(System::Collections::Generic::List<System::String^>^);
}
property System::Collections::Generic::List<System::String^>^ Defines
{
System::Collections::Generic::List<System::String^>^ get();
void set(System::Collections::Generic::List<System::String^>^);
}
property System::Collections::Generic::List<System::String^>^ Undefines
{
System::Collections::Generic::List<System::String^>^ get();
void set(System::Collections::Generic::List<System::String^>^);
}
property System::Collections::Generic::List<System::String^>^ LibraryDirs
{
System::Collections::Generic::List<System::String^>^ get();
void set(System::Collections::Generic::List<System::String^>^);
}
property CppSharp::Parser::AST::ASTContext^ ASTContext
{
CppSharp::Parser::AST::ASTContext^ get();
@ -102,6 +150,12 @@ namespace CppSharp @@ -102,6 +150,12 @@ namespace CppSharp
void set(int);
}
property System::String^ TargetTriple
{
System::String^ get();
void set(System::String^);
}
property CppSharp::Parser::AST::CppAbi Abi
{
CppSharp::Parser::AST::CppAbi get();
@ -144,18 +198,6 @@ namespace CppSharp @@ -144,18 +198,6 @@ namespace CppSharp
void set(CppSharp::Parser::ParserTargetInfo^);
}
property System::String^ LibraryFile
{
System::String^ get();
void set(System::String^);
}
property System::String^ TargetTriple
{
System::String^ get();
void set(System::String^);
}
property unsigned int ArgumentsCount
{
unsigned int get();
@ -256,6 +298,18 @@ namespace CppSharp @@ -256,6 +298,18 @@ namespace CppSharp
~ParserDiagnostic();
property System::String^ FileName
{
System::String^ get();
void set(System::String^);
}
property System::String^ Message
{
System::String^ get();
void set(System::String^);
}
property CppSharp::Parser::ParserDiagnosticLevel Level
{
CppSharp::Parser::ParserDiagnosticLevel get();
@ -274,18 +328,6 @@ namespace CppSharp @@ -274,18 +328,6 @@ namespace CppSharp
void set(int);
}
property System::String^ FileName
{
System::String^ get();
void set(System::String^);
}
property System::String^ Message
{
System::String^ get();
void set(System::String^);
}
protected:
bool __ownsNativeInstance;
};
@ -315,6 +357,12 @@ namespace CppSharp @@ -315,6 +357,12 @@ namespace CppSharp
void set(CppSharp::Parser::ParserResultKind);
}
property System::Collections::Generic::List<CppSharp::Parser::ParserDiagnostic^>^ Diagnostics
{
System::Collections::Generic::List<CppSharp::Parser::ParserDiagnostic^>^ get();
void set(System::Collections::Generic::List<CppSharp::Parser::ParserDiagnostic^>^);
}
property CppSharp::Parser::AST::ASTContext^ ASTContext
{
CppSharp::Parser::AST::ASTContext^ get();

24
src/CppParser/Bindings/CLI/Target.cpp

@ -44,6 +44,16 @@ void CppSharp::Parser::ParserTargetInfo::__Instance::set(System::IntPtr object) @@ -44,6 +44,16 @@ void CppSharp::Parser::ParserTargetInfo::__Instance::set(System::IntPtr object)
NativePtr = (::CppSharp::CppParser::ParserTargetInfo*)object.ToPointer();
}
System::String^ CppSharp::Parser::ParserTargetInfo::ABI::get()
{
return clix::marshalString<clix::E_UTF8>(((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->ABI);
}
void CppSharp::Parser::ParserTargetInfo::ABI::set(System::String^ value)
{
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->ABI = clix::marshalString<clix::E_UTF8>(value);
}
CppSharp::Parser::ParserIntType CppSharp::Parser::ParserTargetInfo::Char16Type::get()
{
return (CppSharp::Parser::ParserIntType)((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->char16Type;
@ -424,17 +434,3 @@ void CppSharp::Parser::ParserTargetInfo::WCharWidth::set(unsigned int value) @@ -424,17 +434,3 @@ void CppSharp::Parser::ParserTargetInfo::WCharWidth::set(unsigned int value)
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->wCharWidth = value;
}
System::String^ CppSharp::Parser::ParserTargetInfo::ABI::get()
{
auto __ret = ((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->getABI();
if (__ret == nullptr) return nullptr;
return (__ret == 0 ? nullptr : clix::marshalString<clix::E_UTF8>(__ret));
}
void CppSharp::Parser::ParserTargetInfo::ABI::set(System::String^ s)
{
auto ___arg0 = clix::marshalString<clix::E_UTF8>(s);
auto __arg0 = ___arg0.c_str();
((::CppSharp::CppParser::ParserTargetInfo*)NativePtr)->setABI(__arg0);
}

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

@ -50,6 +50,12 @@ namespace CppSharp @@ -50,6 +50,12 @@ namespace CppSharp
~ParserTargetInfo();
property System::String^ ABI
{
System::String^ get();
void set(System::String^);
}
property CppSharp::Parser::ParserIntType Char16Type
{
CppSharp::Parser::ParserIntType get();
@ -278,12 +284,6 @@ namespace CppSharp @@ -278,12 +284,6 @@ namespace CppSharp
void set(unsigned int);
}
property System::String^ ABI
{
System::String^ get();
void set(System::String^);
}
protected:
bool __ownsNativeInstance;
};

3671
src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/CppSharp.CppParser.cs

File diff suppressed because it is too large Load Diff

4
src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/Std-templates.cpp

@ -3,5 +3,5 @@ @@ -3,5 +3,5 @@
#include <map>
#include <unordered_map>
template class __declspec(dllexport) std::allocator<char>;
template class __declspec(dllexport) std::basic_string<char, std::char_traits<char>, std::allocator<char>>;
template class std::allocator<char>;
template class std::basic_string<char, std::char_traits<char>, std::allocator<char>>;

75
src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/Std.cs

@ -11,6 +11,8 @@ using System.Runtime.CompilerServices; @@ -11,6 +11,8 @@ using System.Runtime.CompilerServices;
[assembly:InternalsVisibleTo("CppSharp.Parser.CSharp")]
[assembly:InternalsVisibleTo("CppSharp.CppParser")]
namespace Std
{
}
@ -142,24 +144,15 @@ namespace Std @@ -142,24 +144,15 @@ namespace Std
{
namespace __1
{
public unsafe partial class Allocator : IDisposable
public unsafe partial struct Allocator
{
[StructLayout(LayoutKind.Explicit, Size = 0)]
public unsafe partial struct __Internal
{
[SuppressUnmanagedCodeSecurity]
[DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZNSt3__19allocatorIcEC2Ev")]
internal static extern void ctor_0(global::System.IntPtr instance);
}
public global::System.IntPtr __Instance { get; protected set; }
protected int __PointerAdjustment;
internal static readonly System.Collections.Concurrent.ConcurrentDictionary<IntPtr, Allocator> NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary<IntPtr, Allocator>();
protected void*[] __OriginalVTables;
protected bool __ownsNativeInstance;
private Allocator.__Internal __instance;
internal Allocator.__Internal __Instance { get { return __instance; } }
internal static Allocator __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
@ -171,46 +164,15 @@ namespace Std @@ -171,46 +164,15 @@ namespace Std
return new Allocator(native, skipVTables);
}
private static void* __CopyValue(Allocator.__Internal native)
{
var ret = Marshal.AllocHGlobal(0);
*(Allocator.__Internal*) ret = native;
return ret.ToPointer();
}
private Allocator(Allocator.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected Allocator(void* native, bool skipVTables = false)
{
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public Allocator()
: this()
{
__Instance = Marshal.AllocHGlobal(0);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor_0((__Instance + __PointerAdjustment));
__instance = native;
}
public void Dispose()
private Allocator(void* native, bool skipVTables = false) : this()
{
Dispose(disposing: true);
}
public virtual void Dispose(bool disposing)
{
global::Std.__1.Allocator __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__instance = *(__Internal*) native;
}
}
@ -1264,12 +1226,17 @@ namespace Std @@ -1264,12 +1226,17 @@ namespace Std
internal global::Std.__1.CompressedPair.__Internal __r_;
[SuppressUnmanagedCodeSecurity]
[DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
[DllImport("libc++", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2EPKcRKS4_")]
internal static extern void ctor_7(global::System.IntPtr instance, [MarshalAs(UnmanagedType.LPStr)] string __s, global::System.IntPtr __a);
[SuppressUnmanagedCodeSecurity]
[DllImport("libc++", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev")]
internal static extern void dtor_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
[DllImport("libc++", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5c_strEv")]
internal static extern global::System.IntPtr CStr_0(global::System.IntPtr instance);
}
@ -1430,6 +1397,16 @@ namespace Std @@ -1430,6 +1397,16 @@ namespace Std
__Instance = new global::System.IntPtr(native);
}
public BasicString(string __s, global::Std.__1.Allocator __a)
{
__Instance = Marshal.AllocHGlobal(12);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
var ____arg1 = __a.__Instance;
var __arg1 = new global::System.IntPtr(&____arg1);
__Internal.ctor_7((__Instance + __PointerAdjustment), __s, __arg1);
}
public void Dispose()
{
Dispose(disposing: true);

3671
src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/CppSharp.CppParser.cs

File diff suppressed because it is too large Load Diff

71
src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/Std.cs

@ -11,6 +11,8 @@ using System.Runtime.CompilerServices; @@ -11,6 +11,8 @@ using System.Runtime.CompilerServices;
[assembly:InternalsVisibleTo("CppSharp.Parser.CSharp")]
[assembly:InternalsVisibleTo("CppSharp.CppParser")]
namespace Std
{
public unsafe partial class Lockit
@ -389,24 +391,15 @@ namespace Std @@ -389,24 +391,15 @@ namespace Std
namespace Std
{
public unsafe partial class Allocator : IDisposable
public unsafe partial struct Allocator
{
[StructLayout(LayoutKind.Explicit, Size = 0)]
public unsafe partial struct __Internal
{
[SuppressUnmanagedCodeSecurity]
[DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??0?$allocator@D@std@@QAE@XZ")]
internal static extern global::System.IntPtr ctor_0(global::System.IntPtr instance);
}
public global::System.IntPtr __Instance { get; protected set; }
protected int __PointerAdjustment;
internal static readonly System.Collections.Concurrent.ConcurrentDictionary<IntPtr, Allocator> NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary<IntPtr, Allocator>();
protected void*[] __OriginalVTables;
protected bool __ownsNativeInstance;
private Allocator.__Internal __instance;
internal Allocator.__Internal __Instance { get { return __instance; } }
internal static Allocator __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
@ -418,46 +411,15 @@ namespace Std @@ -418,46 +411,15 @@ namespace Std
return new Allocator(native, skipVTables);
}
private static void* __CopyValue(Allocator.__Internal native)
{
var ret = Marshal.AllocHGlobal(0);
*(Allocator.__Internal*) ret = native;
return ret.ToPointer();
}
private Allocator(Allocator.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected Allocator(void* native, bool skipVTables = false)
{
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public Allocator()
: this()
{
__Instance = Marshal.AllocHGlobal(0);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor_0((__Instance + __PointerAdjustment));
__instance = native;
}
public void Dispose()
{
Dispose(disposing: true);
}
public virtual void Dispose(bool disposing)
private Allocator(void* native, bool skipVTables = false) : this()
{
global::Std.Allocator __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__instance = *(__Internal*) native;
}
}
@ -485,6 +447,11 @@ namespace Std @@ -485,6 +447,11 @@ namespace Std
[FieldOffset(0)]
internal global::Std.CompressedPair.__Internalc__N_std_S__Compressed_pair____N_std_S__Wrap_alloc____N_std_S_allocator__C___N_std_S__String_val____N_std_S__Simple_types__C_Vb1 _Mypair;
[SuppressUnmanagedCodeSecurity]
[DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBDABV?$allocator@D@1@@Z")]
internal static extern global::System.IntPtr ctor_9(global::System.IntPtr instance, [MarshalAs(UnmanagedType.LPStr)] string _Ptr, global::System.IntPtr _Al);
[SuppressUnmanagedCodeSecurity]
[DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.ThisCall,
EntryPoint="??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ")]
@ -535,6 +502,16 @@ namespace Std @@ -535,6 +502,16 @@ namespace Std
__Instance = new global::System.IntPtr(native);
}
public BasicString(string _Ptr, global::Std.Allocator _Al)
{
__Instance = Marshal.AllocHGlobal(24);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
var ____arg1 = _Al.__Instance;
var __arg1 = new global::System.IntPtr(&____arg1);
__Internal.ctor_9((__Instance + __PointerAdjustment), _Ptr, __arg1);
}
public void Dispose()
{
Dispose(disposing: true);

31
src/CppParser/Bindings/CSharp/premake5.lua

@ -34,6 +34,37 @@ project "CppSharp.Parser.CSharp" @@ -34,6 +34,37 @@ project "CppSharp.Parser.CSharp"
configuration ""
project "Std-templates"
kind "SharedLib"
language "C++"
SetupNativeProject()
rtti "Off"
configuration "vs*"
buildoptions { clang_msvc_flags }
configuration "*"
if os.is("windows") then
files { "i686-pc-win32-msvc/Std-templates.cpp" }
elseif os.is("macosx") then
local file = io.popen("lipo -info `which mono`")
local output = file:read('*all')
if string.find(output, "x86_64") then
files { "x86_64-apple-darwin12.4.0/Std-templates.cpp" }
else
files { "i686-apple-darwin12.4.0/Std-templates.cpp" }
end
elseif os.is("linux") then
files { "x86_64-linux-gnu/Std-templates.cpp" }
else
print "Unknown architecture"
end
configuration "*"
function SetupParser()
links
{

3671
src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/CppSharp.CppParser.cs

File diff suppressed because it is too large Load Diff

4
src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/Std-templates.cpp

@ -3,5 +3,5 @@ @@ -3,5 +3,5 @@
#include <map>
#include <unordered_map>
template class __declspec(dllexport) std::allocator<char>;
template class __declspec(dllexport) std::basic_string<char, std::char_traits<char>, std::allocator<char>>;
template class std::allocator<char>;
template class std::basic_string<char, std::char_traits<char>, std::allocator<char>>;

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

@ -11,6 +11,8 @@ using System.Runtime.CompilerServices; @@ -11,6 +11,8 @@ using System.Runtime.CompilerServices;
[assembly:InternalsVisibleTo("CppSharp.Parser.CSharp")]
[assembly:InternalsVisibleTo("CppSharp.CppParser")]
namespace Std
{
}
@ -142,24 +144,15 @@ namespace Std @@ -142,24 +144,15 @@ namespace Std
{
namespace __1
{
public unsafe partial class Allocator : IDisposable
public unsafe partial struct Allocator
{
[StructLayout(LayoutKind.Explicit, Size = 0)]
public unsafe partial struct __Internal
{
[SuppressUnmanagedCodeSecurity]
[DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZNSt3__19allocatorIcEC2Ev")]
internal static extern void ctor_0(global::System.IntPtr instance);
}
public global::System.IntPtr __Instance { get; protected set; }
protected int __PointerAdjustment;
internal static readonly System.Collections.Concurrent.ConcurrentDictionary<IntPtr, Allocator> NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary<IntPtr, Allocator>();
protected void*[] __OriginalVTables;
protected bool __ownsNativeInstance;
private Allocator.__Internal __instance;
internal Allocator.__Internal __Instance { get { return __instance; } }
internal static Allocator __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
@ -171,46 +164,15 @@ namespace Std @@ -171,46 +164,15 @@ namespace Std
return new Allocator(native, skipVTables);
}
private static void* __CopyValue(Allocator.__Internal native)
{
var ret = Marshal.AllocHGlobal(0);
*(Allocator.__Internal*) ret = native;
return ret.ToPointer();
}
private Allocator(Allocator.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected Allocator(void* native, bool skipVTables = false)
{
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public Allocator()
: this()
{
__Instance = Marshal.AllocHGlobal(0);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor_0((__Instance + __PointerAdjustment));
__instance = native;
}
public void Dispose()
private Allocator(void* native, bool skipVTables = false) : this()
{
Dispose(disposing: true);
}
public virtual void Dispose(bool disposing)
{
global::Std.__1.Allocator __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__instance = *(__Internal*) native;
}
}
@ -1264,12 +1226,17 @@ namespace Std @@ -1264,12 +1226,17 @@ namespace Std
internal global::Std.__1.CompressedPair.__Internal __r_;
[SuppressUnmanagedCodeSecurity]
[DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
[DllImport("libc++", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2EPKcRKS4_")]
internal static extern void ctor_7(global::System.IntPtr instance, [MarshalAs(UnmanagedType.LPStr)] string __s, global::System.IntPtr __a);
[SuppressUnmanagedCodeSecurity]
[DllImport("libc++", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev")]
internal static extern void dtor_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
[DllImport("libc++", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5c_strEv")]
internal static extern global::System.IntPtr CStr_0(global::System.IntPtr instance);
}
@ -1430,6 +1397,16 @@ namespace Std @@ -1430,6 +1397,16 @@ namespace Std
__Instance = new global::System.IntPtr(native);
}
public BasicString(string __s, global::Std.__1.Allocator __a)
{
__Instance = Marshal.AllocHGlobal(24);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
var ____arg1 = __a.__Instance;
var __arg1 = new global::System.IntPtr(&____arg1);
__Internal.ctor_7((__Instance + __PointerAdjustment), __s, __arg1);
}
public void Dispose()
{
Dispose(disposing: true);

3671
src/CppParser/Bindings/CSharp/x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs

File diff suppressed because it is too large Load Diff

4
src/CppParser/Bindings/CSharp/x86_64-linux-gnu-cxx11abi/Std-templates.cpp

@ -3,5 +3,5 @@ @@ -3,5 +3,5 @@
#include <map>
#include <unordered_map>
template class __declspec(dllexport) std::allocator<char>;
template class __declspec(dllexport) std::basic_string<char, std::char_traits<char>, std::allocator<char>>;
template class std::allocator<char>;
template class std::basic_string<char, std::char_traits<char>, std::allocator<char>>;

74
src/CppParser/Bindings/CSharp/x86_64-linux-gnu-cxx11abi/Std.cs

@ -11,6 +11,8 @@ using System.Runtime.CompilerServices; @@ -11,6 +11,8 @@ using System.Runtime.CompilerServices;
[assembly:InternalsVisibleTo("CppSharp.Parser.CSharp")]
[assembly:InternalsVisibleTo("CppSharp.CppParser")]
namespace Std
{
}
@ -37,29 +39,19 @@ namespace Std @@ -37,29 +39,19 @@ namespace Std
namespace Std
{
public unsafe partial class Allocator : IDisposable
public unsafe partial struct Allocator
{
[StructLayout(LayoutKind.Explicit, Size = 0)]
public unsafe partial struct __Internal
{
[SuppressUnmanagedCodeSecurity]
[DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZNSaIcEC2Ev")]
internal static extern void ctor_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZNSaIcED2Ev")]
internal static extern void dtor_0(global::System.IntPtr instance);
}
public global::System.IntPtr __Instance { get; protected set; }
protected int __PointerAdjustment;
internal static readonly System.Collections.Concurrent.ConcurrentDictionary<IntPtr, Allocator> NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary<IntPtr, Allocator>();
protected void*[] __OriginalVTables;
protected bool __ownsNativeInstance;
private Allocator.__Internal __instance;
internal Allocator.__Internal __Instance { get { return __instance; } }
internal static Allocator __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
@ -71,48 +63,15 @@ namespace Std @@ -71,48 +63,15 @@ namespace Std
return new Allocator(native, skipVTables);
}
private static void* __CopyValue(Allocator.__Internal native)
{
var ret = Marshal.AllocHGlobal(0);
*(Allocator.__Internal*) ret = native;
return ret.ToPointer();
}
private Allocator(Allocator.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected Allocator(void* native, bool skipVTables = false)
{
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public Allocator()
: this()
{
__Instance = Marshal.AllocHGlobal(0);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor_0((__Instance + __PointerAdjustment));
__instance = native;
}
public void Dispose()
private Allocator(void* native, bool skipVTables = false) : this()
{
Dispose(disposing: true);
}
public virtual void Dispose(bool disposing)
{
global::Std.Allocator __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor_0((__Instance + __PointerAdjustment));
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__instance = *(__Internal*) native;
}
}
@ -561,6 +520,11 @@ namespace Std @@ -561,6 +520,11 @@ namespace Std
[FieldOffset(16)]
internal global::Std.Cxx11.BasicString._.__Internal _;
[SuppressUnmanagedCodeSecurity]
[DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcRKS3_")]
internal static extern void ctor_6(global::System.IntPtr instance, [MarshalAs(UnmanagedType.LPStr)] string __s, global::System.IntPtr __a);
[SuppressUnmanagedCodeSecurity]
[DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev")]
@ -639,6 +603,16 @@ namespace Std @@ -639,6 +603,16 @@ namespace Std
__Instance = new global::System.IntPtr(native);
}
public BasicString(string __s, global::Std.Allocator __a)
{
__Instance = Marshal.AllocHGlobal(32);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
var ____arg1 = __a.__Instance;
var __arg1 = new global::System.IntPtr(&____arg1);
__Internal.ctor_6((__Instance + __PointerAdjustment), __s, __arg1);
}
public void Dispose()
{
Dispose(disposing: true);

3671
src/CppParser/Bindings/CSharp/x86_64-linux-gnu/CppSharp.CppParser.cs

File diff suppressed because it is too large Load Diff

4
src/CppParser/Bindings/CSharp/x86_64-linux-gnu/Std-templates.cpp

@ -3,5 +3,5 @@ @@ -3,5 +3,5 @@
#include <map>
#include <unordered_map>
template class __declspec(dllexport) std::allocator<char>;
template class __declspec(dllexport) std::basic_string<char, std::char_traits<char>, std::allocator<char>>;
template class std::allocator<char>;
template class std::basic_string<char, std::char_traits<char>, std::allocator<char>>;

74
src/CppParser/Bindings/CSharp/x86_64-linux-gnu/Std.cs

@ -11,6 +11,8 @@ using System.Runtime.CompilerServices; @@ -11,6 +11,8 @@ using System.Runtime.CompilerServices;
[assembly:InternalsVisibleTo("CppSharp.Parser.CSharp")]
[assembly:InternalsVisibleTo("CppSharp.CppParser")]
namespace Std
{
}
@ -37,29 +39,19 @@ namespace Std @@ -37,29 +39,19 @@ namespace Std
namespace Std
{
public unsafe partial class Allocator : IDisposable
public unsafe partial struct Allocator
{
[StructLayout(LayoutKind.Explicit, Size = 0)]
public unsafe partial struct __Internal
{
[SuppressUnmanagedCodeSecurity]
[DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZNSaIcEC2Ev")]
internal static extern void ctor_0(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZNSaIcED2Ev")]
internal static extern void dtor_0(global::System.IntPtr instance);
}
public global::System.IntPtr __Instance { get; protected set; }
protected int __PointerAdjustment;
internal static readonly System.Collections.Concurrent.ConcurrentDictionary<IntPtr, Allocator> NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary<IntPtr, Allocator>();
protected void*[] __OriginalVTables;
protected bool __ownsNativeInstance;
private Allocator.__Internal __instance;
internal Allocator.__Internal __Instance { get { return __instance; } }
internal static Allocator __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
@ -71,48 +63,15 @@ namespace Std @@ -71,48 +63,15 @@ namespace Std
return new Allocator(native, skipVTables);
}
private static void* __CopyValue(Allocator.__Internal native)
{
var ret = Marshal.AllocHGlobal(0);
*(Allocator.__Internal*) ret = native;
return ret.ToPointer();
}
private Allocator(Allocator.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
: this()
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__instance = native;
}
protected Allocator(void* native, bool skipVTables = false)
private Allocator(void* native, bool skipVTables = false) : this()
{
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public Allocator()
{
__Instance = Marshal.AllocHGlobal(0);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor_0((__Instance + __PointerAdjustment));
}
public void Dispose()
{
Dispose(disposing: true);
}
public virtual void Dispose(bool disposing)
{
global::Std.Allocator __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
__Internal.dtor_0((__Instance + __PointerAdjustment));
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__instance = *(__Internal*) native;
}
}
@ -538,6 +497,11 @@ namespace Std @@ -538,6 +497,11 @@ namespace Std
[FieldOffset(0)]
internal global::Std.BasicString.AllocHider.__Internal _M_dataplus;
[SuppressUnmanagedCodeSecurity]
[DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZNSsC2EPKcRKSaIcE")]
internal static extern void ctor_6(global::System.IntPtr instance, [MarshalAs(UnmanagedType.LPStr)] string __s, global::System.IntPtr __a);
[SuppressUnmanagedCodeSecurity]
[DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZNSsD2Ev")]
@ -630,6 +594,16 @@ namespace Std @@ -630,6 +594,16 @@ namespace Std
__Instance = new global::System.IntPtr(native);
}
public BasicString(string __s, global::Std.Allocator __a)
{
__Instance = Marshal.AllocHGlobal(8);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
var ____arg1 = __a.__Instance;
var __arg1 = new global::System.IntPtr(&____arg1);
__Internal.ctor_6((__Instance + __PointerAdjustment), __s, __arg1);
}
public void Dispose()
{
Dispose(disposing: true);

3671
src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/CppSharp.CppParser.cs

File diff suppressed because it is too large Load Diff

71
src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/Std.cs

@ -11,6 +11,8 @@ using System.Runtime.CompilerServices; @@ -11,6 +11,8 @@ using System.Runtime.CompilerServices;
[assembly:InternalsVisibleTo("CppSharp.Parser.CSharp")]
[assembly:InternalsVisibleTo("CppSharp.CppParser")]
namespace Std
{
public unsafe partial class Lockit
@ -389,24 +391,15 @@ namespace Std @@ -389,24 +391,15 @@ namespace Std
namespace Std
{
public unsafe partial class Allocator : IDisposable
public unsafe partial struct Allocator
{
[StructLayout(LayoutKind.Explicit, Size = 0)]
public unsafe partial struct __Internal
{
[SuppressUnmanagedCodeSecurity]
[DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0?$allocator@D@std@@QEAA@XZ")]
internal static extern global::System.IntPtr ctor_0(global::System.IntPtr instance);
}
public global::System.IntPtr __Instance { get; protected set; }
protected int __PointerAdjustment;
internal static readonly System.Collections.Concurrent.ConcurrentDictionary<IntPtr, Allocator> NativeToManagedMap = new System.Collections.Concurrent.ConcurrentDictionary<IntPtr, Allocator>();
protected void*[] __OriginalVTables;
protected bool __ownsNativeInstance;
private Allocator.__Internal __instance;
internal Allocator.__Internal __Instance { get { return __instance; } }
internal static Allocator __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
@ -418,46 +411,15 @@ namespace Std @@ -418,46 +411,15 @@ namespace Std
return new Allocator(native, skipVTables);
}
private static void* __CopyValue(Allocator.__Internal native)
{
var ret = Marshal.AllocHGlobal(0);
*(Allocator.__Internal*) ret = native;
return ret.ToPointer();
}
private Allocator(Allocator.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected Allocator(void* native, bool skipVTables = false)
{
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public Allocator()
: this()
{
__Instance = Marshal.AllocHGlobal(0);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
__Internal.ctor_0((__Instance + __PointerAdjustment));
__instance = native;
}
public void Dispose()
{
Dispose(disposing: true);
}
public virtual void Dispose(bool disposing)
private Allocator(void* native, bool skipVTables = false) : this()
{
global::Std.Allocator __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__instance = *(__Internal*) native;
}
}
@ -495,6 +457,11 @@ namespace Std @@ -495,6 +457,11 @@ namespace Std
[FieldOffset(0)]
internal global::Std.CompressedPair.__Internalc__N_std_S__Compressed_pair____N_std_S__Wrap_alloc____N_std_S_allocator__C___N_std_S__String_val____N_std_S__Simple_types__C_Vb1 _Mypair;
[SuppressUnmanagedCodeSecurity]
[DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@PEBDAEBV?$allocator@D@1@@Z")]
internal static extern global::System.IntPtr ctor_9(global::System.IntPtr instance, [MarshalAs(UnmanagedType.LPStr)] string _Ptr, global::System.IntPtr _Al);
[SuppressUnmanagedCodeSecurity]
[DllImport("Std-templates", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@XZ")]
@ -545,6 +512,16 @@ namespace Std @@ -545,6 +512,16 @@ namespace Std
__Instance = new global::System.IntPtr(native);
}
public BasicString(string _Ptr, global::Std.Allocator _Al)
{
__Instance = Marshal.AllocHGlobal(32);
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
var ____arg1 = _Al.__Instance;
var __arg1 = new global::System.IntPtr(&____arg1);
__Internal.ctor_9((__Instance + __PointerAdjustment), _Ptr, __arg1);
}
public void Dispose()
{
Dispose(disposing: true);

22
src/CppParser/Comments.cpp

@ -41,8 +41,8 @@ RawComment* Parser::WalkRawComment(const clang::RawComment* RC) @@ -41,8 +41,8 @@ RawComment* Parser::WalkRawComment(const clang::RawComment* RC)
auto& SM = c->getSourceManager();
auto Comment = new RawComment();
Comment->kind = ConvertRawCommentKind(RC->getKind());
Comment->Text = RC->getRawText(SM);
Comment->BriefText = RC->getBriefText(*AST);
Comment->text = RC->getRawText(SM);
Comment->briefText = RC->getBriefText(*AST);
return Comment;
}
@ -94,7 +94,7 @@ static void HandleBlockCommand(const clang::comments::BlockCommandComment *CK, @@ -94,7 +94,7 @@ static void HandleBlockCommand(const clang::comments::BlockCommandComment *CK,
for (unsigned I = 0, E = CK->getNumArgs(); I != E; ++I)
{
auto Arg = BlockCommandComment::Argument();
Arg.Text = CK->getArgText(I);
Arg.text = CK->getArgText(I);
BC->Arguments.push_back(Arg);
}
}
@ -172,7 +172,7 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C) @@ -172,7 +172,7 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C)
auto CK = cast<clang::comments::VerbatimLineComment>(C);
auto VL = new VerbatimLineComment();
_Comment = VL;
VL->Text = CK->getText();
VL->text = CK->getText();
break;
}
case Comment::ParagraphCommentKind:
@ -194,13 +194,13 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C) @@ -194,13 +194,13 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C)
auto TC = new HTMLStartTagComment();
_Comment = TC;
HandleInlineContent(CK, TC);
TC->TagName = CK->getTagName();
TC->tagName = CK->getTagName();
for (unsigned I = 0, E = CK->getNumAttrs(); I != E; ++I)
{
auto A = CK->getAttr(I);
auto Attr = HTMLStartTagComment::Attribute();
Attr.Name = A.Name;
Attr.Value = A.Value;
Attr.name = A.Name;
Attr.value = A.Value;
TC->Attributes.push_back(Attr);
}
break;
@ -211,7 +211,7 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C) @@ -211,7 +211,7 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C)
auto TC = new HTMLEndTagComment();
_Comment = TC;
HandleInlineContent(CK, TC);
TC->TagName = CK->getTagName();
TC->tagName = CK->getTagName();
break;
}
case Comment::TextCommentKind:
@ -220,7 +220,7 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C) @@ -220,7 +220,7 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C)
auto TC = new TextComment();
_Comment = TC;
HandleInlineContent(CK, TC);
TC->Text = CK->getText();
TC->text = CK->getText();
break;
}
case Comment::InlineCommandCommentKind:
@ -234,7 +234,7 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C) @@ -234,7 +234,7 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C)
for (unsigned I = 0, E = CK->getNumArgs(); I != E; ++I)
{
auto Arg = InlineCommandComment::Argument();
Arg.Text = CK->getArgText(I);
Arg.text = CK->getArgText(I);
IC->Arguments.push_back(Arg);
}
break;
@ -244,7 +244,7 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C) @@ -244,7 +244,7 @@ static Comment* ConvertCommentBlock(clang::comments::Comment* C)
auto CK = cast<clang::comments::VerbatimBlockLineComment>(C);
auto VL = new VerbatimBlockLineComment();
_Comment = VL;
VL->Text = CK->getText();
VL->text = CK->getText();
break;
}
case Comment::NoCommentKind: return nullptr;

10
src/CppParser/CppParser.cpp

@ -24,15 +24,12 @@ CppParserOptions::CppParserOptions() @@ -24,15 +24,12 @@ CppParserOptions::CppParserOptions()
}
DEF_VECTOR_STRING(CppParserOptions, Arguments)
DEF_STRING(CppParserOptions, LibraryFile)
DEF_VECTOR_STRING(CppParserOptions, SourceFiles)
DEF_VECTOR_STRING(CppParserOptions, IncludeDirs)
DEF_VECTOR_STRING(CppParserOptions, SystemIncludeDirs)
DEF_VECTOR_STRING(CppParserOptions, Defines)
DEF_VECTOR_STRING(CppParserOptions, Undefines)
DEF_VECTOR_STRING(CppParserOptions, LibraryDirs)
DEF_STRING(CppParserOptions, TargetTriple)
DEF_STRING(ParserTargetInfo, ABI)
ParserResult::ParserResult()
: ASTContext(0)
@ -57,16 +54,13 @@ ParserResult::~ParserResult() @@ -57,16 +54,13 @@ ParserResult::~ParserResult()
ParserDiagnostic::ParserDiagnostic() {}
ParserDiagnostic::ParserDiagnostic(const ParserDiagnostic& rhs)
: FileName(rhs.FileName)
, Message(rhs.Message)
: fileName(rhs.fileName)
, message(rhs.message)
, level(rhs.level)
, lineNumber(rhs.lineNumber)
, columnNumber(rhs.columnNumber)
{}
DEF_STRING(ParserDiagnostic, FileName)
DEF_STRING(ParserDiagnostic, Message)
DEF_VECTOR(ParserResult, ParserDiagnostic, Diagnostics)
} }

8
src/CppParser/CppParser.h

@ -49,7 +49,7 @@ struct CS_API CppParserOptions @@ -49,7 +49,7 @@ struct CS_API CppParserOptions
VECTOR_STRING(Arguments)
STRING(LibraryFile)
std::string libraryFile;
// C/C++ header file names.
VECTOR_STRING(SourceFiles)
@ -63,7 +63,7 @@ struct CS_API CppParserOptions @@ -63,7 +63,7 @@ struct CS_API CppParserOptions
CppSharp::CppParser::AST::ASTContext* ASTContext;
int toolSetToUse;
STRING(TargetTriple)
std::string targetTriple;
CppAbi abi;
bool noStandardIncludes;
@ -89,8 +89,8 @@ struct CS_API ParserDiagnostic @@ -89,8 +89,8 @@ struct CS_API ParserDiagnostic
ParserDiagnostic();
ParserDiagnostic(const ParserDiagnostic&);
STRING(FileName)
STRING(Message)
std::string fileName;
std::string message;
ParserDiagnosticLevel level;
int lineNumber;
int columnNumber;

9
src/CppParser/Helpers.h

@ -54,12 +54,3 @@ @@ -54,12 +54,3 @@
unsigned klass::get##name##Count () { return name.size(); } \
void klass::clear##name() { name.clear(); }
#define STRING(name) \
std::string name; \
const char* get##name(); \
void set##name(const char* s);
#define DEF_STRING(klass, name) \
const char* klass::get##name() { return name.c_str(); } \
void klass::set##name(const char* s) { name = s; }

76
src/CppParser/Parser.cpp

@ -88,7 +88,7 @@ LayoutField Parser::WalkVTablePointer(Class* Class, @@ -88,7 +88,7 @@ LayoutField Parser::WalkVTablePointer(Class* Class,
{
LayoutField LayoutField;
LayoutField.offset = Offset.getQuantity();
LayoutField.Name = prefix + "_" + Class->Name;
LayoutField.name = prefix + "_" + Class->name;
LayoutField.qualifiedType = GetQualifiedType(c->getASTContext().VoidPtrTy);
return LayoutField;
}
@ -171,7 +171,7 @@ void Parser::ReadClassLayout(Class* Class, const clang::RecordDecl* RD, @@ -171,7 +171,7 @@ void Parser::ReadClassLayout(Class* Class, const clang::RecordDecl* RD,
auto F = WalkFieldCXX(Field, Parent);
LayoutField LayoutField;
LayoutField.offset = FieldOffset.getQuantity();
LayoutField.Name = F->Name;
LayoutField.name = F->name;
LayoutField.qualifiedType = GetQualifiedType(Field->getType());
LayoutField.fieldPtr = (void*)Field;
Class->layout->Fields.push_back(LayoutField);
@ -302,8 +302,8 @@ void Parser::SetupHeader() @@ -302,8 +302,8 @@ void Parser::SetupHeader()
targetABI = ConvertToClangTargetCXXABI(opts->abi);
TO->Triple = llvm::sys::getDefaultTargetTriple();
if (!opts->TargetTriple.empty())
TO->Triple = llvm::Triple::normalize(opts->TargetTriple);
if (!opts->targetTriple.empty())
TO->Triple = llvm::Triple::normalize(opts->targetTriple);
TargetInfo* TI = TargetInfo::CreateTargetInfo(c->getDiagnostics(), TO);
if (!TI)
@ -1065,7 +1065,7 @@ Parser::WalkClassTemplateSpecialization(const clang::ClassTemplateSpecialization @@ -1065,7 +1065,7 @@ Parser::WalkClassTemplateSpecialization(const clang::ClassTemplateSpecialization
auto NS = GetNamespace(CTS);
assert(NS && "Expected a valid namespace");
TS->_namespace = NS;
TS->Name = CTS->getName();
TS->name = CTS->getName();
TS->templatedDecl = CT;
TS->specializationKind = WalkTemplateSpecializationKind(CTS->getSpecializationKind());
CT->Specializations.push_back(TS);
@ -1120,7 +1120,7 @@ Parser::WalkClassTemplatePartialSpecialization(const clang::ClassTemplatePartial @@ -1120,7 +1120,7 @@ Parser::WalkClassTemplatePartialSpecialization(const clang::ClassTemplatePartial
auto NS = GetNamespace(CTS);
assert(NS && "Expected a valid namespace");
TS->_namespace = NS;
TS->Name = CTS->getName();
TS->name = CTS->getName();
TS->templatedDecl = CT;
TS->specializationKind = WalkTemplateSpecializationKind(CTS->getSpecializationKind());
CT->Specializations.push_back(TS);
@ -1182,7 +1182,7 @@ ClassTemplate* Parser::WalkClassTemplate(const clang::ClassTemplateDecl* TD) @@ -1182,7 +1182,7 @@ ClassTemplate* Parser::WalkClassTemplate(const clang::ClassTemplateDecl* TD)
CT = new ClassTemplate();
HandleDeclaration(TD, CT);
CT->Name = GetDeclName(TD);
CT->name = GetDeclName(TD);
CT->_namespace = NS;
NS->Templates.push_back(CT);
@ -1230,7 +1230,7 @@ TypeTemplateParameter* Parser::WalkTypeTemplateParameter(const clang::TemplateTy @@ -1230,7 +1230,7 @@ TypeTemplateParameter* Parser::WalkTypeTemplateParameter(const clang::TemplateTy
return TP;
TP = new CppSharp::CppParser::TypeTemplateParameter();
TP->Name = GetDeclName(TTPD);
TP->name = GetDeclName(TTPD);
HandleDeclaration(TTPD, TP);
if (TTPD->hasDefaultArgument())
TP->defaultArgument = GetQualifiedType(TTPD->getDefaultArgument());
@ -1250,7 +1250,7 @@ NonTypeTemplateParameter* Parser::WalkNonTypeTemplateParameter(const clang::NonT @@ -1250,7 +1250,7 @@ NonTypeTemplateParameter* Parser::WalkNonTypeTemplateParameter(const clang::NonT
return NTP;
NTP = new CppSharp::CppParser::NonTypeTemplateParameter();
NTP->Name = GetDeclName(NTTPD);
NTP->name = GetDeclName(NTTPD);
HandleDeclaration(NTTPD, NTP);
if (NTTPD->hasDefaultArgument())
NTP->defaultArgument = WalkExpression(NTTPD->getDefaultArgument());
@ -1382,7 +1382,7 @@ TypeAliasTemplate* Parser::WalkTypeAliasTemplate( @@ -1382,7 +1382,7 @@ TypeAliasTemplate* Parser::WalkTypeAliasTemplate(
TA = new TypeAliasTemplate();
HandleDeclaration(TD, TA);
TA->Name = GetDeclName(TD);
TA->name = GetDeclName(TD);
TA->TemplatedDecl = WalkDeclaration(TD->getTemplatedDecl());
TA->Parameters = WalkTemplateParameterList(TD->getTemplateParameters());
@ -1417,7 +1417,7 @@ FunctionTemplate* Parser::WalkFunctionTemplate(const clang::FunctionTemplateDecl @@ -1417,7 +1417,7 @@ FunctionTemplate* Parser::WalkFunctionTemplate(const clang::FunctionTemplateDecl
FT = new FunctionTemplate();
HandleDeclaration(TD, FT);
FT->Name = GetDeclName(TD);
FT->name = GetDeclName(TD);
FT->_namespace = NS;
FT->TemplatedDecl = Function;
FT->Parameters = WalkTemplateParameterList(TD->getTemplateParameters());
@ -1462,7 +1462,7 @@ VarTemplate* Parser::WalkVarTemplate(const clang::VarTemplateDecl* TD) @@ -1462,7 +1462,7 @@ VarTemplate* Parser::WalkVarTemplate(const clang::VarTemplateDecl* TD)
VT = new VarTemplate();
HandleDeclaration(TD, VT);
VT->Name = GetDeclName(TD);
VT->name = GetDeclName(TD);
VT->_namespace = NS;
NS->Templates.push_back(VT);
@ -1490,7 +1490,7 @@ Parser::WalkVarTemplateSpecialization(const clang::VarTemplateSpecializationDecl @@ -1490,7 +1490,7 @@ Parser::WalkVarTemplateSpecialization(const clang::VarTemplateSpecializationDecl
auto NS = GetNamespace(VTS);
assert(NS && "Expected a valid namespace");
TS->_namespace = NS;
TS->Name = VTS->getName();
TS->name = VTS->getName();
TS->templatedDecl = VT;
TS->specializationKind = WalkTemplateSpecializationKind(VTS->getSpecializationKind());
VT->Specializations.push_back(TS);
@ -1530,7 +1530,7 @@ Parser::WalkVarTemplatePartialSpecialization(const clang::VarTemplatePartialSpec @@ -1530,7 +1530,7 @@ Parser::WalkVarTemplatePartialSpecialization(const clang::VarTemplatePartialSpec
auto NS = GetNamespace(VTS);
assert(NS && "Expected a valid namespace");
TS->_namespace = NS;
TS->Name = VTS->getName();
TS->name = VTS->getName();
TS->templatedDecl = VT;
TS->specializationKind = WalkTemplateSpecializationKind(VTS->getSpecializationKind());
VT->Specializations.push_back(TS);
@ -1699,7 +1699,7 @@ Field* Parser::WalkFieldCXX(const clang::FieldDecl* FD, Class* Class) @@ -1699,7 +1699,7 @@ Field* Parser::WalkFieldCXX(const clang::FieldDecl* FD, Class* Class)
HandleDeclaration(FD, F);
F->_namespace = Class;
F->Name = FD->getName();
F->name = FD->getName();
auto TL = FD->getTypeSourceInfo()->getTypeLoc();
F->qualifiedType = GetQualifiedType(FD->getType(), &TL);
F->access = ConvertToAccess(FD->getAccess());
@ -2316,13 +2316,13 @@ Type* Parser::WalkType(clang::QualType QualType, clang::TypeLoc* TL, @@ -2316,13 +2316,13 @@ Type* Parser::WalkType(clang::QualType QualType, clang::TypeLoc* TL,
auto PTL = PVD->getTypeSourceInfo()->getTypeLoc();
FA->Name = PVD->getNameAsString();
FA->name = PVD->getNameAsString();
FA->qualifiedType = GetQualifiedType(PVD->getOriginalType(), &PTL);
}
else
{
auto Arg = FP->getParamType(i);
FA->Name = "";
FA->name = "";
FA->qualifiedType = GetQualifiedType(Arg);
// In this case we have no valid value to use as a pointer so
@ -2459,7 +2459,7 @@ Type* Parser::WalkType(clang::QualType QualType, clang::TypeLoc* TL, @@ -2459,7 +2459,7 @@ Type* Parser::WalkType(clang::QualType QualType, clang::TypeLoc* TL,
auto TPT = new CppSharp::CppParser::TemplateParameterType();
if (auto Ident = TP->getIdentifier())
TPT->parameter->Name = Ident->getName();
TPT->parameter->name = Ident->getName();
TypeLoc UTL, ETL, ITL, Next;
@ -2655,7 +2655,7 @@ Enumeration* Parser::WalkEnum(const clang::EnumDecl* ED) @@ -2655,7 +2655,7 @@ Enumeration* Parser::WalkEnum(const clang::EnumDecl* ED)
else
{
E = new Enumeration();
E->Name = Name;
E->name = Name;
E->_namespace = NS;
NS->Enums.push_back(E);
}
@ -2692,7 +2692,7 @@ Enumeration::Item* Parser::WalkEnumItem(clang::EnumConstantDecl* ECD) @@ -2692,7 +2692,7 @@ Enumeration::Item* Parser::WalkEnumItem(clang::EnumConstantDecl* ECD)
auto EnumItem = new Enumeration::Item();
HandleDeclaration(ECD, EnumItem);
EnumItem->Name = ECD->getNameAsString();
EnumItem->name = ECD->getNameAsString();
auto Value = ECD->getInitVal();
EnumItem->value = Value.isSigned() ? Value.getSExtValue()
: Value.getZExtValue();
@ -2700,7 +2700,7 @@ Enumeration::Item* Parser::WalkEnumItem(clang::EnumConstantDecl* ECD) @@ -2700,7 +2700,7 @@ Enumeration::Item* Parser::WalkEnumItem(clang::EnumConstantDecl* ECD)
std::string Text;
if (GetDeclText(ECD->getSourceRange(), Text))
EnumItem->Expression = Text;
EnumItem->expression = Text;
return EnumItem;
}
@ -2777,7 +2777,7 @@ void Parser::WalkFunction(const clang::FunctionDecl* FD, Function* F, @@ -2777,7 +2777,7 @@ void Parser::WalkFunction(const clang::FunctionDecl* FD, Function* F,
auto NS = GetNamespace(FD);
assert(NS && "Expected a valid namespace");
F->Name = FD->getNameAsString();
F->name = FD->getNameAsString();
F->_namespace = NS;
F->isVariadic = FD->isVariadic();
F->isInline = FD->isInlined();
@ -2790,7 +2790,7 @@ void Parser::WalkFunction(const clang::FunctionDecl* FD, Function* F, @@ -2790,7 +2790,7 @@ void Parser::WalkFunction(const clang::FunctionDecl* FD, Function* F,
auto CC = FT->getCallConv();
F->callingConvention = ConvertCallConv(CC);
F->OperatorKind = GetOperatorKindFromDecl(FD->getDeclName());
F->operatorKind = GetOperatorKindFromDecl(FD->getDeclName());
TypeLoc RTL;
if (auto TSI = FD->getTypeSourceInfo())
@ -2814,7 +2814,7 @@ void Parser::WalkFunction(const clang::FunctionDecl* FD, Function* F, @@ -2814,7 +2814,7 @@ void Parser::WalkFunction(const clang::FunctionDecl* FD, Function* F,
F->returnType = GetQualifiedType(FD->getReturnType(), &RTL);
const auto& Mangled = GetDeclMangledName(FD);
F->Mangled = Mangled;
F->mangled = Mangled;
clang::SourceLocation ParamStartLoc = FD->getLocStart();
clang::SourceLocation ResultLoc;
@ -2844,12 +2844,12 @@ void Parser::WalkFunction(const clang::FunctionDecl* FD, Function* F, @@ -2844,12 +2844,12 @@ void Parser::WalkFunction(const clang::FunctionDecl* FD, Function* F,
std::string Sig;
if (GetDeclText(Range, Sig))
F->Signature = Sig;
F->signature = Sig;
for (const auto& VD : FD->parameters())
{
auto P = new Parameter();
P->Name = VD->getNameAsString();
P->name = VD->getNameAsString();
TypeLoc PTL;
if (auto TSI = VD->getTypeSourceInfo())
@ -2996,14 +2996,14 @@ void Parser::WalkVariable(const clang::VarDecl* VD, Variable* Var) @@ -2996,14 +2996,14 @@ void Parser::WalkVariable(const clang::VarDecl* VD, Variable* Var)
{
HandleDeclaration(VD, Var);
Var->Name = VD->getName();
Var->name = VD->getName();
Var->access = ConvertToAccess(VD->getAccess());
auto TL = VD->getTypeSourceInfo()->getTypeLoc();
Var->qualifiedType = GetQualifiedType(VD->getType(), &TL);
auto Mangled = GetDeclMangledName(VD);
Var->Mangled = Mangled;
Var->mangled = Mangled;
}
Variable* Parser::WalkVariable(const clang::VarDecl *VD)
@ -3106,7 +3106,7 @@ PreprocessedEntity* Parser::WalkPreprocessedEntity( @@ -3106,7 +3106,7 @@ PreprocessedEntity* Parser::WalkPreprocessedEntity(
std::string Text;
GetDeclText(PPEntity->getSourceRange(), Text);
static_cast<MacroExpansion*>(Entity)->Text = Text;
static_cast<MacroExpansion*>(Entity)->text = Text;
break;
}
case clang::PreprocessedEntity::MacroDefinitionKind:
@ -3150,8 +3150,8 @@ PreprocessedEntity* Parser::WalkPreprocessedEntity( @@ -3150,8 +3150,8 @@ PreprocessedEntity* Parser::WalkPreprocessedEntity(
Definition->lineNumberEnd = SM.getExpansionLineNumber(MD->getLocation());
Entity = Definition;
Definition->Name = II->getName().trim();
Definition->Expression = Expression.trim();
Definition->name = II->getName().trim();
Definition->expression = Expression.trim();
}
case clang::PreprocessedEntity::InclusionDirectiveKind:
// nothing to be done for InclusionDirectiveKind
@ -3328,7 +3328,7 @@ void Parser::HandleOriginalText(const clang::Decl* D, Declaration* Decl) @@ -3328,7 +3328,7 @@ void Parser::HandleOriginalText(const clang::Decl* D, Declaration* Decl)
auto DeclText = clang::Lexer::getSourceText(Range, SM, LangOpts, &Invalid);
if (!Invalid)
Decl->DebugText = DeclText;
Decl->debugText = DeclText;
}
void Parser::HandleDeclaration(const clang::Decl* D, Declaration* Decl)
@ -3738,8 +3738,8 @@ void Parser::HandleDiagnostics(ParserResult* res) @@ -3738,8 +3738,8 @@ void Parser::HandleDiagnostics(ParserResult* res)
auto FileName = Source.getFilename(Source.getFileLoc(Diag.Location));
auto PDiag = ParserDiagnostic();
PDiag.FileName = FileName.str();
PDiag.Message = Diag.Message.str();
PDiag.fileName = FileName.str();
PDiag.message = Diag.Message.str();
PDiag.lineNumber = 0;
PDiag.columnNumber = 0;
@ -3889,7 +3889,7 @@ ParserResultKind Parser::ParseArchive(llvm::StringRef File, @@ -3889,7 +3889,7 @@ ParserResultKind Parser::ParseArchive(llvm::StringRef File,
{
auto LibName = File;
NativeLib = new NativeLibrary();
NativeLib->FileName = LibName;
NativeLib->fileName = LibName;
for(auto it = Archive->symbol_begin(); it != Archive->symbol_end(); ++it)
{
@ -3926,7 +3926,7 @@ ParserResultKind Parser::ParseSharedLib(llvm::StringRef File, @@ -3926,7 +3926,7 @@ ParserResultKind Parser::ParseSharedLib(llvm::StringRef File,
{
auto LibName = File;
NativeLib = new NativeLibrary();
NativeLib->FileName = LibName;
NativeLib->fileName = LibName;
NativeLib->archType = ConvertArchType(ObjectFile->getArch());
if (ObjectFile->isELF())
@ -4015,7 +4015,7 @@ ParserResultKind Parser::ReadSymbols(llvm::StringRef File, @@ -4015,7 +4015,7 @@ ParserResultKind Parser::ReadSymbols(llvm::StringRef File,
{
auto LibName = File;
NativeLib = new NativeLibrary();
NativeLib->FileName = LibName;
NativeLib->fileName = LibName;
for (auto it = Begin; it != End; ++it)
{
@ -4099,7 +4099,7 @@ ParserResult* ClangParser::ParseLibrary(CppParserOptions* Opts) @@ -4099,7 +4099,7 @@ ParserResult* ClangParser::ParseLibrary(CppParserOptions* Opts)
auto res = new ParserResult();
res->codeParser = new Parser(Opts);
return res->codeParser->ParseLibrary(Opts->LibraryFile, res);
return res->codeParser->ParseLibrary(Opts->libraryFile, res);
}
ParserTargetInfo* ClangParser::GetTargetInfo(CppParserOptions* Opts)

56
src/CppParser/ParserGen/ParserGen.cs

@ -55,8 +55,7 @@ namespace CppSharp @@ -55,8 +55,7 @@ namespace CppSharp
parserOptions.Abi = Abi;
var options = driver.Options;
options.LibraryName = "CppSharp.Parser" +
(driver.Options.IsCSharpGenerator ? ".CSharp" : ".CLI");
options.LibraryName = "CppSharp.CppParser";
options.SharedLibraryName = "CppSharp.CppParser.dll";
options.GeneratorKind = Kind;
options.Headers.AddRange(new[]
@ -159,7 +158,6 @@ namespace CppSharp @@ -159,7 +158,6 @@ namespace CppSharp
public void SetupPasses(Driver driver)
{
driver.AddTranslationUnitPass(new IgnoreStdFieldsPass());
}
public void Preprocess(Driver driver, ASTContext ctx)
@ -170,12 +168,18 @@ namespace CppSharp @@ -170,12 +168,18 @@ namespace CppSharp
{
driver.Generator.OnUnitGenerated += o =>
{
if (o.TranslationUnit.Module == driver.Options.SystemModule)
return;
Block firstBlock = o.Templates[0].RootBlock.Blocks[1];
firstBlock.WriteLine("using System.Runtime.CompilerServices;");
firstBlock.NewLine();
firstBlock.WriteLine("[assembly:InternalsVisibleTo(\"CppSharp.Parser\")]");
if (o.TranslationUnit.Module == driver.Options.SystemModule)
{
firstBlock.NewLine();
firstBlock.WriteLine("[assembly:InternalsVisibleTo(\"CppSharp.Parser.CSharp\")]");
}
else
{
firstBlock.WriteLine("using System.Runtime.CompilerServices;");
firstBlock.NewLine();
firstBlock.WriteLine("[assembly:InternalsVisibleTo(\"CppSharp.Parser\")]");
}
};
}
}
@ -233,40 +237,4 @@ namespace CppSharp @@ -233,40 +237,4 @@ namespace CppSharp
}
}
}
public class IgnoreStdFieldsPass : TranslationUnitPass
{
public override bool VisitFieldDecl(Field field)
{
if (!field.IsGenerated)
return false;
if (!IsStdType(field.QualifiedType)) return false;
field.ExplicitlyIgnore();
return true;
}
public override bool VisitFunctionDecl(Function function)
{
if (function.GenerationKind == GenerationKind.None)
return false;
if (function.Parameters.Any(param => IsStdType(param.QualifiedType)))
{
function.ExplicitlyIgnore();
return false;
}
return true;
}
private bool IsStdType(QualifiedType type)
{
var typePrinter = new CppTypePrinter();
var typeName = type.Visit(typePrinter);
return typeName.Contains("std::");
}
}
}

2
src/CppParser/Target.h

@ -31,7 +31,7 @@ struct CS_API ParserTargetInfo @@ -31,7 +31,7 @@ struct CS_API ParserTargetInfo
ParserTargetInfo();
~ParserTargetInfo();
STRING(ABI);
std::string ABI;
ParserIntType char16Type;
ParserIntType char32Type;

3
src/Generator/Generators/CSharp/CSharpSources.cs

@ -3192,7 +3192,8 @@ namespace CppSharp.Generators.CSharp @@ -3192,7 +3192,8 @@ namespace CppSharp.Generators.CSharp
private string GetLibraryOf(Declaration declaration)
{
if (declaration.TranslationUnit.IsSystemHeader)
return Context.Options.SystemModule.TemplatesLibraryName;
return Context.ParserOptions.TargetTriple.Contains("apple") ? "libc++" :
Context.Options.SystemModule.TemplatesLibraryName;
string libName = declaration.TranslationUnit.Module.SharedLibraryName;

4
src/Generator/Passes/GenerateTemplatesCodePass.cs

@ -54,7 +54,9 @@ namespace CppSharp.Passes @@ -54,7 +54,9 @@ namespace CppSharp.Passes
cppBuilder.AppendFormat("#include <{0}>\n", header);
foreach (var templateInstantiation in templateInstantiations[module])
cppBuilder.AppendFormat("\ntemplate class {0}{1};",
Platform.IsWindows ? "__declspec(dllexport) " : string.Empty, templateInstantiation);
Context.ParserOptions.TargetTriple.Contains("win32") ||
Context.ParserOptions.TargetTriple.Contains("win64") ?
"__declspec(dllexport) " : string.Empty, templateInstantiation);
var cpp = string.Format("{0}.cpp", module.TemplatesLibraryName);
Directory.CreateDirectory(Options.OutputDir);
var path = Path.Combine(Options.OutputDir, cpp);

2
src/Generator/Passes/IgnoreSystemDeclarationsPass.cs

@ -65,7 +65,7 @@ namespace CppSharp.Passes @@ -65,7 +65,7 @@ namespace CppSharp.Passes
break;
case "allocator":
foreach (var specialization in @class.Specializations.Where(s => !s.Ignore))
foreach (var method in specialization.Methods.Where(m => !m.IsConstructor || m.Parameters.Any()))
foreach (var method in specialization.Methods)
method.ExplicitlyIgnore();
break;
}

2
src/Generator/Passes/MarkSupportedClassTemplateSpecializationsPass.cs

@ -16,6 +16,8 @@ namespace CppSharp.Passes @@ -16,6 +16,8 @@ namespace CppSharp.Passes
if (IsSupportedStdSpecialization(specialization))
{
MarkForGeneration(specialization);
if (specialization.Name == "allocator")
specialization.Type = ClassType.ValueType;
@class.GenerationKind = GenerationKind.Generate;
}
}

3
src/Generator/Passes/StripUnusedSystemTypesPass.cs

@ -27,6 +27,9 @@ namespace CppSharp.Passes @@ -27,6 +27,9 @@ namespace CppSharp.Passes
foreach (var allocator in context.FindClass("allocator", false, true).Where(
a => a.TranslationUnit.IsSystemHeader))
usedStdTypes.Add(allocator);
foreach (var basicString in context.FindClass("basic_string", false, true).Where(
a => a.TranslationUnit.IsSystemHeader))
usedStdTypes.Add(basicString);
var result = base.VisitASTContext(context);

1
src/Generator/Types/Std/Stdlib.cs

@ -86,7 +86,6 @@ namespace CppSharp.Types.Std @@ -86,7 +86,6 @@ namespace CppSharp.Types.Std
ctx.Return.Write("{0}.{1}", varBasicString, Helpers.InstanceIdentifier);
ctx.Cleanup.WriteLine("{0}.Dispose({1});", varBasicString,
type.IsPointer() ? "true" : "false");
ctx.Cleanup.WriteLine("{0}.Dispose();", varAllocator);
}
}

2
tests/CSharp/AnotherUnit.cpp

@ -7,5 +7,5 @@ void functionInAnotherUnit() @@ -7,5 +7,5 @@ void functionInAnotherUnit()
namespace HasFreeConstant
{
extern const int DLL_API FREE_CONSTANT_IN_NAMESPACE = 5;
// extern const std::string DLL_API STD_STRING_CONSTANT = "test";
extern const std::string DLL_API STD_STRING_CONSTANT = "test";
}

4
tests/CSharp/AnotherUnit.h

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
#include "../Tests.h"
//#include <string>
#include <string>
void DLL_API functionInAnotherUnit();
@ -16,5 +16,5 @@ class ForwardInOtherUnitButSameModule @@ -16,5 +16,5 @@ class ForwardInOtherUnitButSameModule
namespace HasFreeConstant
{
extern const int DLL_API FREE_CONSTANT_IN_NAMESPACE;
// extern const std::string DLL_API STD_STRING_CONSTANT;
extern const std::string DLL_API STD_STRING_CONSTANT;
}

6
tests/CSharp/CSharp.Tests.cs

@ -542,12 +542,12 @@ public unsafe class CSharpTests : GeneratorTestFixture @@ -542,12 +542,12 @@ public unsafe class CSharpTests : GeneratorTestFixture
}
}
[Test, Ignore("We need symbols for std::string to invoke and auto-compilation of exported templates is not added yet.")]
[Test]
public void TestStdStringConstant()
{
//Assert.That(CSharp.HasFreeConstant.AnotherUnit.STD_STRING_CONSTANT, Is.EqualTo("test"));
Assert.That(CSharp.HasFreeConstant.AnotherUnit.STD_STRING_CONSTANT, Is.EqualTo("test"));
// check a second time to ensure it hasn't been improperly freed
//Assert.That(CSharp.HasFreeConstant.AnotherUnit.STD_STRING_CONSTANT, Is.EqualTo("test"));
Assert.That(CSharp.HasFreeConstant.AnotherUnit.STD_STRING_CONSTANT, Is.EqualTo("test"));
}
// HACK: the completion of types is temporarily suspended because of problems with QtWidgets

2
tests/Common/Common.Tests.cs

@ -660,7 +660,7 @@ public class CommonTests : GeneratorTestFixture @@ -660,7 +660,7 @@ public class CommonTests : GeneratorTestFixture
Assert.That(Foo.ReadWrite, Is.EqualTo(25));
}
[Test, Ignore("We need symbols for std::string to invoke and auto-compilation of exported templates is not added yet.")]
[Test]
public void TestStdString()
{
// when C++ memory is deleted, it's only marked as free but not immediadely freed

8
tests/Common/Common.cpp

@ -425,6 +425,14 @@ void DelegateNamespace::f2(void (*)()) @@ -425,6 +425,14 @@ void DelegateNamespace::f2(void (*)())
{
}
HasStdString::HasStdString()
{
}
HasStdString::~HasStdString()
{
}
std::string HasStdString::testStdString(std::string s)
{
return s + "_test";

2
tests/Common/Common.h

@ -759,6 +759,8 @@ class DLL_API HasStdString @@ -759,6 +759,8 @@ class DLL_API HasStdString
{
// test if these are ignored with the C# back-end
public:
HasStdString();
~HasStdString();
std::string testStdString(std::string s);
std::string s;
std::string& getStdString();

Loading…
Cancel
Save