Commit graph

6 commits

Author SHA1 Message Date
William S Fulton
c10a84c775 Cosmetic stray semi-colon removal after %typemap using quotes 2022-08-31 19:40:13 +01:00
Vadim Zeitlin
28c6140c56 Allow std::set<> C# typemaps to work for non-nullable types too
Notably make them work for primitive types, such as "int".

Doing this requires using "object" instead of the actual C# type of the
variable to store the current value in the iterator, as we don't
currently have a "csnullabletype" typemap that would expand to "T" for
nullable types and "T?" for the other ones. This is a bit ugly, but it
shouldn't matter much for the generated code and is already done in
std::vector<> typemaps.

Also add a simple unit test verifying the basic functionality for such
vectors.

Closes #1568.
2019-07-11 13:09:46 +02:00
Vadim Zeitlin
53d75dc133 Replace leftover string with the proper type in C# set typemap
This is just a mistake remaining from generalizing the old
string-specific typemap to any type.

Fix it now and update a unit test to test for sets of objects other than
strings.
2019-07-11 12:49:17 +02:00
Vadim Zeitlin
04c9a97787 Fix header comment in C# std_set typemaps
Mention that these typemaps require .NET 4 or greater.
2019-03-11 23:08:19 +01:00
Vadim Zeitlin
aaa12450c0 Implement set-theoretic methods in std::set C# typemaps
These implementations are not optimized, i.e. are done in a naive way in
C#, rather than using C++ functions more efficiently, but are better
than nothing.
2019-03-11 23:05:38 +01:00
Vadim Zeitlin
f0067b6bbf Add std::set<> typemaps for C#
Create new Lib/csharp/std_set.i based on the existing std_map.i and run
li_std_set unit test for C# as well.

Notice that the set operations defined by the base ISet<> interface are
not implemented yet.
2019-03-11 22:49:03 +01:00