Граф коммитов

26 Коммитов

Автор SHA1 Сообщение Дата
Joao Matos bbdb54218c Merge branch 'objc' of github.com:mono/embeddinator-4000 2017-04-17 15:58:25 +01:00
Sebastien Pouliot 27e5f34941 [objc] Add basic (readonly) support for fields (#129)
We cannot access them directly but we can provide (ObjC) property
wrappers around them, making them usable from ObjC code.
2017-04-17 10:03:46 -04:00
Sebastien Pouliot 943b1da124 [objc] Generated (property) indexers as methods (#125)
That's basic support. The nicer way would be to use subscripts [1]

[1] https://github.com/mono/Embeddinator-4000/issues/122
2017-04-14 15:13:20 -04:00
Sebastien Pouliot 24a1f3e543 [objc] Fix the case where bound type A creates instance of bound type B (#121)
As Alex pointed out this scenario requires the `_object` field to be
public.
2017-04-13 22:24:57 -04:00
Sebastien Pouliot 64b7df0d19 [objc] Generate better looking names for operators (#120)
Remove the `op_` prefix on operators.

Also fix a (non fatal) typo, extra `)`, when computing mono signatures.
2017-04-13 21:41:21 -04:00
Sebastien Pouliot 44b14b6e67 [objc] Add support for enums and [Flags] (#119) 2017-04-13 21:07:52 -04:00
Sebastien Pouliot 02202b7743 [objc] Add support for structs / valuetype (#118) 2017-04-13 17:59:28 -04:00
Sebastien Pouliot 4c60ece830 [objc] Add support for `ref` and `out` arguments (#115) 2017-04-12 21:20:37 -04:00
Rolf Bjarne Kvinge eb8a9970af [objc] Use msbuild instead of xbuild. (#106)
This prevents fleeting visions of red text in the terminal.
2017-04-12 08:49:38 -04:00
Sebastien Pouliot a16e5478fe [objc][generator] Produce better names for ObjC methods (#105)
* Better name for setter only properties, e.g.
	-       [query set_Secret: 1];
	+       [query setSecret: 1];

* Second method argument should be lowercased, e.g. `second`
	[Methods_Parameters concatFirst:@"first" second:@"second"]

* Reduce some code duplication, to avoid fixing things multiple times, e.g.
	* Unify the signatures generation for ObjC and Mono;
	* Unify the parameter marshaling code (the one for methods was missing a lot)

* Simplify `ImplementMethod` arguments
2017-04-12 07:48:25 +02:00
Joao Matos 0f370e3d2c Merge branch 'objc' 2017-04-11 12:52:42 +01:00
Joao Matos 47dbbc4c63 [c] Implemented marshaling for explicitly signed char types. 2017-04-10 22:46:48 +01:00
Sebastien Pouliot 7d20bde00f [objc] Fix subclassing when `init` is not available (#85)
It's similar to XI/XM NSObjectFlag - we need a different road to call
the base classes without calling managed code twice (e.g. the Super
and Base tests for exceptions).

Note: `init` is not always exposed, so we cannot trust it blindly.

This allow the same "internal" `initWithSuper` to be re-used to return
instance of types being bound (e.g. a `+create` without a `-init`).
2017-04-10 19:12:24 +02:00
Joao Matos 88077be14c [tests] Extend managed test suite project with pre-existing tests. 2017-04-07 01:47:35 +01:00
Sebastien Pouliot a13e48abc6 [objc] The same type name can exists in several namespaces (#68)
Not common, but has to work. Unit test added.
2017-04-06 10:15:51 -05:00
Sebastien Pouliot 946ed79896 [objc] Initial support for methods (#67)
This also handle the case of setter-only properties (generated as a
set* method).

Unit tests added for existing methods (previously not generated)

Replace PR https://github.com/mono/Embeddinator-4000/pull/63
2017-04-06 08:46:24 -05:00
Sebastien Pouliot 7c2384d729 [objc][generator] Fix subclassing when both types are bound (#62)
E.g. `public class SuperUnique : Unique {}`

This raise an interesting issue (to be solved later) since ObjC and .NET
semantics differs for init*/.ctor. A test case (with a FIXME) is added.

and I now recall why headers were a bad idea:

./bindings.h:75:39: error: attempting to use the forward class 'Constructors_Unique' as superclass of 'Constructors_SuperUnique'

so the ordering of forwarders had to be altered a bit.
2017-04-06 11:59:58 +02:00
Sebastien Pouliot 9db995bfe1 [objc] Add support for non-default init* methods (constructors) (#59) 2017-04-05 08:46:12 +02:00
Sebastien Pouliot ca5545cae4 [objc][tests] Add more unit tests for existing features (#56)
For
* instance properties (uncomment them);
* namespaces;
* exceptions inside `init`;
2017-04-04 09:43:01 +02:00
Rolf Bjarne Kvinge d6003c415b [objc][tests] Remove the 'libmanaged' target from the Xcode cli test project. (#55)
Remove the 'libmanaged' target from the Xcode test project, and instead link
with the libmanaged.dylib that the embeddinator compiles. This ensures we're
not compiling with different compiler flags in the Xcode project.

This also requires adding an rpath to the built library so that the test
executable can find it.

Also add makefile target to run the Xcode test project from the command line.
2017-04-03 13:25:34 -05:00
Rolf Bjarne Kvinge c0b00f4222 [objc] Add support for more primitive types. (#51) 2017-04-03 10:42:32 -05:00
Rolf Bjarne Kvinge 3553b9951d [objc][tests] Build the project file instead of having separate build logic. (#49) 2017-04-03 08:55:14 -05:00
Sebastien Pouliot d4775744bf [objc] Add support for default .ctor/init and namespaces (#38) 2017-04-03 08:23:57 -05:00
Sebastien Pouliot 514e20f437 [docs] Start a limitations document and add read me for the new directories created in the objc branch (#45) 2017-04-02 13:25:42 -05:00
Sebastien Pouliot 7d1ac85de2 [build] .gitignore had an entry for Makefile so some were not committed previously (#44) 2017-04-02 13:13:47 -05:00
Sebastien Pouliot 5cc5ea587d [objc] Simpler generator that, so far, only handle static properties (#29)
The ObjC syntax for properties match the proposal from PR #25 [1].

Unit tests added for the matching features.

[1] https://github.com/mono/Embeddinator-4000/pull/25
2017-03-31 10:21:23 -05:00