João Matos
d3935ec45c
Refactor type printing placeholder and name prefix/suffix code.
7 years ago
João Matos
7555cabd1b
Fix CLITypeReferences so it generates regular C++ code in C++ generator mode.
7 years ago
João Matos
d45e4ba1e3
Add CXXOperatorArity.Zero enum item for further usage in subsequent code.
7 years ago
João Matos
cfba72ce1b
Initial C++ generator backend.
7 years ago
João Matos
7bbe6a2df4
Associate getter/setter methods with their associated property in GetterSetterToProperty pass.
7 years ago
João Matos
04247b6baf
Added optional getter/setter pair creation for fields in FieldToProperty pass.
7 years ago
João Matos
7bad042715
Refactor CLI handling of enums to be based on generic C generator.
7 years ago
João Matos
40119222c1
Default to .h file extension in C code generator.
7 years ago
João Matos
c19df0cc64
Minor refactoring fixes.
7 years ago
João Matos
5af8e9eb40
Add helper methods to ignore and generate specific translation units.
7 years ago
João Matos
76ae12b89e
Guard a few more language-specific passes in the driver.
7 years ago
João Matos
1af171dc93
Fix generation of multiple interfaces in C# for some edge cases.
7 years ago
João Matos
9df2f3c5e9
Fix templates to be abstract if any specialization is abstract.
7 years ago
João Matos
ae47fd73bc
Re-use common C++ declaration type printing code in CLITypePrinter.
7 years ago
João Matos
c89d427bf2
Minor refactorings in CppTypePrinter.cs.
7 years ago
João Matos
fd914fa282
Allow changing the default TypePrinterContextKind when creating a type printer.
7 years ago
João Matos
c88ddcc60d
Refactor CLITypePrinter.cs to use string interpolation.
7 years ago
João Matos
4ac2427afc
Refactoring fixes in ParamTypeToInterfacePass.
7 years ago
João Matos
a7824abb02
Formatting fixes on MultipleInheritancePass.
7 years ago
Dimitar Dobrev
6fe81fddcc
Remove needless pointer offsets from generated C#
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
d3a3484c35
Fix a crash for secondary bases with secondary bases
...
The test has also uncovered a bug where the call to a primary base isn't always adjusted so the fix is extended accordingly.
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
João Matos
40ca6f281a
Fix bug related to processing of potential property methods.
...
Fixes https://github.com/mono/CppSharp/issues/1291 .
7 years ago
Dimitar Dobrev
37d391bdac
Ensure generated symbols can use placement new
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
9337004bb6
Simplify and optimize the printing of pointers in C++
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
e4ac492560
Fix printing of function pointers in C++
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
ed2e45f609
Don't export symbols for explicit specializations
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Joao Matos
899e8d2caa
Improve CS_INTERNAL so it now applies to all declarations.
...
Signed-off-by: Joao Matos <joao@tritao.eu>
7 years ago
Dimitar Dobrev
24d2e4ca08
Improve the ignoring of dependent name types
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Joao Matos
c5bcb48cc2
Implement UnresolvedUsingType and UnresolvedUsingTypename.
...
Fixes https://github.com/mono/CppSharp/issues/1235 .
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
4a4c919fb3
Extend printing and reading of exception types
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
16bfc67a9a
Fix the check to ignore dependent name types
...
The bug used to break the parser bindings for macOS since std::string uses a dependent name type for its necessary methods.
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
403440dac2
Ignore unused destructors when generating symbols
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
8fd6ea1863
Fix the printing of "noexcept" in C++
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Joao Matos
b15ca8827e
Avoid generating abstract implementations for template classes.
...
Fixes https://github.com/mono/CppSharp/issues/1268 .
7 years ago
Joao Matos
3409498738
Fix template type checking in CovariantTypeComparer.
...
Fixes https://github.com/mono/CppSharp/issues/1266 .
7 years ago
Joao Matos
abf219b019
Fix compile warning for unused variable.
7 years ago
Joao Matos
fb1f637ec3
Workaround System.TypeLoad exception when running test-suite on macOS.
...
It was reproducible while running Compile.sh on macOS:
mono64 --debug "../lib/Release_x64/Encodings.Gen.exe"
Generating bindings for Encodings (CSharp)
Looking for tests in: /Users/joao/Dev/CppSharp/tests/Encodings
Parsed 'Encodings.h'
Unhandled Exception:
System.TypeLoadException: Could not load type of field 'CppSharp.MSVCToolchain:<>f__am$cache7' (8) due to: Could not load file or assembly 'Microsoft.VisualStudio.Setup.Configuration.Interop, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
7 years ago
Ghasan Al-Sakkaf
0b9b10d2f5
Fix enum with zeros for hex literals
7 years ago
Dimitar Dobrev
74eab9f6cc
Fix the moving of free functions to classes to match by module too
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
05c70ea515
Generate valid C# when an external module has an unsupported operator
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
67b3058d39
Fix a possible overflown stack when ignoring
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
07b9e4ca10
Force compilation of all functions of specializations
...
Functions of template specializations can have their symbols compiled by having their addresses taken just like regular functions. This way we take just the necessary symbols compared to exporting entire templates which both compile useless symbols and skip actually needed ones.
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
a00f34c4c9
Optimize the moving of functions to classes
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
c62f85bfa8
Delete a custom pass added as standard
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
f737ad6c00
Fix the C++ printing of function pointers in parameters
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
ba315702ea
Eliminate generated symbols for ignored functions
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
8459cabce9
Fix printing of type defs in C++
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
9aa8ad3f55
Remove the internal C# functions for virtual destructors
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
b94a89b3ec
Give unique names to exported inlined functions
...
This way a precise exception is thrown when the birdge tries calling into a wrong version of the library with exported symbols.
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
7d784d2af6
Generate symbols for methods of specializations
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago