Dimitar Dobrev
51c0f37aa3
Fixed the generated C# for templates with optional arguments.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
db3e04cca0
Represented "void" with "object" for template arguments in the generated C#.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
1a1308ad8a
Fixed the generated C# for public fields with type a dependent function pointer.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
a96b2e2877
Set an index when marshalling the value in setters of properties.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
a1327b4402
Fixed the generated C# for indexers with dependent keys.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
1ebf418e18
Considered dependent fields when generating internals for types nested in templates.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
fceb204a98
Fixed the generated C# for members of types nested in templates.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
cdc2e73f84
Fixed the generated C# when a template is nested in another.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Rokas Kupstys
9ea1821cb3
Fix debug output not being generated when AST element had no comment.
...
Also debug text cleaning moved to CodeGenerator.cs and is done when printing bindings. New lines are not stripped out, instead each line is prepended with "// DEBUG: ". Now debug info is properly formatted, easy to read and full.
8 years ago
Rokas Kupstys
0b99682341
Consistent class/struct keywords fixed for cases where wrapper class would contain members from several different translation units.
8 years ago
Rokas Kupstys
1165b3020e
Fix debug output breaking generated binding code.
8 years ago
Rokas Kupstys
9c64e443f8
Always generate formatted code.
8 years ago
Rokas Kupstys
555c51589e
Consistently declare classes/structs. Fixes issue where compilation error is produced due to file name containing constants matching class marked as value type.
8 years ago
Dimitar Dobrev
3c55f7fb9e
Worked around a bug in the Mono C# compiler when casting generics.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
caacaa841f
Worked around duplication of types nested in templates and forwarded.
...
Since all template specialisations are incomplete by default, so are classes nested in them. When such classes are also forwarded, there are two incomplete declarations with the same name and in the same scope. Our parser searches by name and completion and it can therefore not make a difference between the two. Consequently, it always returns the first type it finds even if it isn't the right one. When clang::Sema later completes the specialisations, it completes the nested types too which leads to two identical complete types in the same scope.
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
8cc67420d5
Fixed a crash when passing null as an std::string on Unix. ( #1012 )
...
Fixed a crash when passing null as an std::string on Unix
8 years ago
Dimitar Dobrev
853e82f095
Fixed the generated C# for specialisations only used as type arguments.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
e53b25346e
Prevented C++ generation for invalid specialised functions.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Mikulas Florek
04a1591e84
Fixed the generated C# for fixed arrays of Booleans.
...
fixes #1004
* mend
Fixed the generated C# for fixed arrays of Booleans
8 years ago
Joao Matos
f334e447be
Added optional visiting of property accessors.
8 years ago
Joao Matos
09199381c9
CodeGenerator is now an IAstVisitor.
8 years ago
Dimitar Dobrev
10748cba2e
Fixed the generated C# when a type nested in a template is forwarded.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
310f1110df
Handled any level of nesting when generating internals for specialisations in C#.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
5ca93458a2
Fixed the generation of internals for template specialisations.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
b7faf33819
Fixed a regression of generating templates in C# with the option off.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
5bce2fb533
Reused parameters between functions and their types (as Clang does).
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
fd9c9520c8
Reduced the indentation at the marshalling of arrays in C#.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
efbe7cd3e4
Fixed the generated C# for a fixed array of pointers.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
ae6a37359a
Removed unused STD enumerations from generation.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Joao Matos
bea0653268
Fixed code generation for using template types.
...
Thanks to @zillemarco for coming up with the test case.
8 years ago
Joao Matos
06621d43f6
Re-use IntPtrType in CSharpTypePrinter.cs.
8 years ago
Joao Matos
eff9b073a2
Clean up formatting in CSharpTypePrinter.cs.
8 years ago
Dimitar Dobrev
764806e759
Fixed the generated C# for templates derived from regular dynamic classes.
...
Fixes https://github.com/mono/CppSharp/issues/967 .
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
cd5b57a786
Ensured all non-system template specialisations are complete.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Joao Matos
688b09f8f1
Added support for UTF8 string encoding marshaling.
8 years ago
Joao Matos
b9813ff0ef
Refactor string encoding marshaling code to use interpolated strings.
8 years ago
Joao Matos
61b0cc6d8b
Re-order usings.
8 years ago
Dimitar Dobrev
122359bf9e
Fixed the generated C# when a virtual function takes a fixed array.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
3af63fb33d
Fixed the generated C# for fixed arrays in types of parameters.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
f6033f3a5a
Fixed the generated C# for virtuals taking arrays of objects.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
6a15e51d76
Added C# marshalling of parameters of type array of const char* const.
...
Fixes https://github.com/mono/CppSharp/issues/692 .
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
65afb2628c
Simplified the method for generating a variable in C#.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
37b3339e71
Added C# marshalling of parameters of type array of const char*.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
184feac23e
Fixed null arrays in C# to be passed as such to C/C++.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
140a624f43
Added C# marshalling of parameters of type array of objects.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
ce71a3b8a8
Added C# marshalling of parameters of type array of primitives.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
3d9cc3ab70
Added marshalling of parameters of type array of pointers.
...
Fixes https://github.com/mono/CppSharp/issues/932 .
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
d4d6354621
Removed unused internals from the generated C#.
...
Fixes https://github.com/mono/CppSharp/issues/936 .
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Joao Matos
8d94a07034
[csharp] Simplify some more type printing code.
8 years ago
Joao Matos
0f0c85de24
[csharp] Refactor array type printing code to use interpolation strings.
8 years ago