Dimitar Dobrev
d5380fe890
Fix the generated C# for const char*&
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
6e78b4df15
Fix the generated C# when type arguments are mapped the same
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
e2a23b8987
Fixed the generated C# when returning a non-const char*.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
c688330897
Fixed the generated C# for parameters initialized with {}.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
12642f9a42
Fixed the generated C# when an unsigned enum is assigned a negative value.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
a4913509eb
Added type maps for primitive strings (pointers to char).
...
const char*, const char16_t* and const wchar_t* in particular.
This enables comparison of types when resolving ambiguity.
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
7817b52ce3
Tested indirect calls from native code of overrides in the target language.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
6 years ago
Dimitar Dobrev
3346be0084
Resolved ambiguity between char-like types in the generated C#.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
3ca1579d02
Fixed the generated C# for pure virtual functions with default arguments.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
aef1acb43f
Fixed the generated C# for default arguments of type pointer to a function.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
a1af3d3182
Fixed the generated C# for a certain case of two default parameters.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
dc27c44606
Fixed the generated C# for arguments with default values of "nullptr".
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
637018f4d6
Fixed the generated C# for setters with default parameters.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
1420bd9216
Fixed the generated C# for public fields with types mapped to primitive.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
0c87a77311
Fixed the generated C# for constant references to primitives.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
8feac37ae1
Fixed ambiguity when the type of a parameter is mapped to a type in an overload.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Dimitar Dobrev
92da301135
Fixed the generation when a secondary base is used in more than one unit.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
7 years ago
Joao Matos
2d57c787c6
Fixed generation support for pointers to enums in C#.
...
Fixes https://github.com/mono/CppSharp/issues/1093 .
7 years ago
TheLastRar
430bbdb257
Evaluate expressions for enums generated using GenerateEnumFromMacros ( #1048 )
...
* Evaluate expressions when generating enum from macros
ExpressionEvaluator taken from https://github.com/codingseb/ExpressionEvaluator
* Set namespace for enums generated from macros.
* Add Tests
7 years ago
Dimitar Dobrev
8d0db5d341
Reverted a simplification because it caused a regression.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Rokas Kupstys
4e735b5b61
Test for consistent struct/class keywords.
...
Tests for cases where class name matches translation unit name.
Tests for cases where global constants/functions from different translation units would end up in the value type.
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
Dimitar Dobrev
efbe7cd3e4
Fixed the generated C# for a fixed array of pointers.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Joao Matos
34ce466d8d
Fixed duplicate generation of forward declared class.
...
Fixes https://github.com/mono/CppSharp/issues/968 .
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
2b364d9787
Grouped all tests for arrays together.
...
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
a319f96261
Fixed the generated C# when a virtual function takes an array.
...
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
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
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
Mohit Mohta
8a2e813445
Merged Delegate Pass and pass for Anonymous Delegates and added the following improvements alongwith.
...
1. Got rid of Anonymous Names.
2. Merged the common code for Delegate Generation.
3. The delegate pass also works for C++/CLI now.
4. Fixed the calling conventions of delegates for both, C++/CLI and C#.
5. Ensures that if a delegate is used for a virtual as well as something else, it finally ends up as public.
6. Fixed the code generation when the return type of a method is a function pointer that has been used somewhere else as well.
7. Added Access and Calling convention to the delegate definition.
The only thing left is to get rid of the hack used, i.e move the code in VisitFunctionDecl to VisitParametersDecl. Somehow, it's not working right now.
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
f33b162f6f
Ignored inlined name-spaces in the C# gen only.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
e0816d9dc6
Fixed the generated C# for increment and decrement operators.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
cd548059e9
Added support for class templates which do not specialise types external to them.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Dimitar Dobrev
46b40bbe05
Fixed the generated C# for a case of a typedef of a function pointer.
...
Typedefs of function pointers can be written in two ways:
typedef void (*typedefedFuncPtr)();
int f(typedefedFuncPtr fptr);
typedef void (typedefedFuncPtr)();
int f(typedefedFuncPtr* fptr);
Up until now we only supported the former.
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Mohit Mohta
db522c0295
Fixed the C# generation for functions with typedefed function pointers as params ( #903 )
8 years ago
Mohit Mohta
48c6094f52
Fixed the code generation for indexers returning a void pointer ( #901 )
8 years ago
Dimitar Dobrev
91bcc7c8a2
Fixed the generated C# when std::string is only used as a parameter.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
Mohit Mohta
ebcbc10a04
Ignored the generated code for variable-sized array of a class/struct ( #855 )
...
Fixes #777
8 years ago
Mohit Mohta
6bd00372c0
Fixed the generated C# for const ref parameter of Indexer ( #851 )
...
Fixes #628
8 years ago
Mohit Mohta
efbc8fe90e
Fixed the generated C# when setting a field which is an array of complex objects ( #841 )
...
Fixes #717
8 years ago
Gilad Levi
35adf99165
added test for asci-macro-enum feature
8 years ago
Gilad Levi
5302f5870c
Use fixed c# statement when accessing fixed struct members
8 years ago
realvictorprm
10c86a2a10
Fixed the generated C# when an incomplete class is forwarded more than once.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago
realvictorprm
938ccf686b
Incomplete classes and structs are now generated for C#. ( #797 )
...
This feature is NOT coming for C++/CLI !
8 years ago
Dimitar Dobrev
e2a2e8df4b
Fixed the generated C# for an array of const char*.
...
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
8 years ago