9
9
// / MIT
10
10
// / </license>
11
11
12
- // Type definitions
13
- #include " Bindings.h"
14
-
15
12
// Game type definitions
16
13
#include " Game.h"
17
14
15
+ // Type definitions
16
+ #include " Bindings.h"
17
+
18
18
// For assert()
19
19
#include < assert.h>
20
20
21
- // For int32_t, etc.
22
- #include < stdint.h>
23
-
24
- // For malloc(), etc.
25
- #include < stdlib.h>
26
-
27
21
// For memset(), etc.
28
22
#include < string.h>
29
23
30
- // Support placement new
31
- void * operator new (size_t , void * p)
32
- {
33
- return p;
34
- }
35
-
36
24
// Macro to put before functions that need to be exposed to C#
37
25
#ifdef _WIN32
38
26
#define DLLEXPORT extern " C" __declspec(dllexport)
@@ -3624,6 +3612,93 @@ namespace System
3624
3612
}
3625
3613
}
3626
3614
3615
+ namespace System
3616
+ {
3617
+ namespace Runtime
3618
+ {
3619
+ namespace Serialization
3620
+ {
3621
+ IDeserializationCallback::IDeserializationCallback (decltype(nullptr ))
3622
+ {
3623
+ }
3624
+
3625
+ IDeserializationCallback::IDeserializationCallback (Plugin::InternalUse, int32_t handle)
3626
+ {
3627
+ Handle = handle;
3628
+ if (handle)
3629
+ {
3630
+ Plugin::ReferenceManagedClass (handle);
3631
+ }
3632
+ }
3633
+
3634
+ IDeserializationCallback::IDeserializationCallback (const IDeserializationCallback& other)
3635
+ : IDeserializationCallback(Plugin::InternalUse::Only, other.Handle )
3636
+ {
3637
+ }
3638
+
3639
+ IDeserializationCallback::IDeserializationCallback (IDeserializationCallback&& other)
3640
+ : IDeserializationCallback(Plugin::InternalUse::Only, other.Handle )
3641
+ {
3642
+ other.Handle = 0 ;
3643
+ }
3644
+
3645
+ IDeserializationCallback::~IDeserializationCallback ()
3646
+ {
3647
+ if (Handle )
3648
+ {
3649
+ Plugin::DereferenceManagedClass (Handle );
3650
+ Handle = 0 ;
3651
+ }
3652
+ }
3653
+
3654
+ IDeserializationCallback& IDeserializationCallback::operator =(const IDeserializationCallback& other)
3655
+ {
3656
+ if (this ->Handle )
3657
+ {
3658
+ Plugin::DereferenceManagedClass (this ->Handle );
3659
+ }
3660
+ this ->Handle = other.Handle ;
3661
+ if (this ->Handle )
3662
+ {
3663
+ Plugin::ReferenceManagedClass (this ->Handle );
3664
+ }
3665
+ return *this ;
3666
+ }
3667
+
3668
+ IDeserializationCallback& IDeserializationCallback::operator =(decltype(nullptr ))
3669
+ {
3670
+ if (Handle )
3671
+ {
3672
+ Plugin::DereferenceManagedClass (Handle );
3673
+ Handle = 0 ;
3674
+ }
3675
+ return *this ;
3676
+ }
3677
+
3678
+ IDeserializationCallback& IDeserializationCallback::operator =(IDeserializationCallback&& other)
3679
+ {
3680
+ if (Handle )
3681
+ {
3682
+ Plugin::DereferenceManagedClass (Handle );
3683
+ }
3684
+ Handle = other.Handle ;
3685
+ other.Handle = 0 ;
3686
+ return *this ;
3687
+ }
3688
+
3689
+ bool IDeserializationCallback::operator ==(const IDeserializationCallback& other) const
3690
+ {
3691
+ return Handle == other.Handle ;
3692
+ }
3693
+
3694
+ bool IDeserializationCallback::operator !=(const IDeserializationCallback& other) const
3695
+ {
3696
+ return Handle != other.Handle ;
3697
+ }
3698
+ }
3699
+ }
3700
+ }
3701
+
3627
3702
namespace System
3628
3703
{
3629
3704
Decimal::Decimal (decltype(nullptr ))
@@ -3774,7 +3849,7 @@ namespace System
3774
3849
return nullptr ;
3775
3850
}
3776
3851
3777
- System::Decimal::operator System::IFormattable ()
3852
+ System::Decimal::operator System::IComparable ()
3778
3853
{
3779
3854
int32_t handle = Plugin::BoxDecimal (Handle );
3780
3855
if (Plugin::unhandledCsharpException)
@@ -3787,7 +3862,25 @@ namespace System
3787
3862
if (handle)
3788
3863
{
3789
3864
Plugin::ReferenceManagedClass (handle);
3790
- return System::IFormattable (Plugin::InternalUse::Only, handle);
3865
+ return System::IComparable (Plugin::InternalUse::Only, handle);
3866
+ }
3867
+ return nullptr ;
3868
+ }
3869
+
3870
+ System::Decimal::operator System::IComparable_1<System::Decimal>()
3871
+ {
3872
+ int32_t handle = Plugin::BoxDecimal (Handle );
3873
+ if (Plugin::unhandledCsharpException)
3874
+ {
3875
+ System::Exception* ex = Plugin::unhandledCsharpException;
3876
+ Plugin::unhandledCsharpException = nullptr ;
3877
+ ex->ThrowReferenceToThis ();
3878
+ delete ex;
3879
+ }
3880
+ if (handle)
3881
+ {
3882
+ Plugin::ReferenceManagedClass (handle);
3883
+ return System::IComparable_1<System::Decimal>(Plugin::InternalUse::Only, handle);
3791
3884
}
3792
3885
return nullptr ;
3793
3886
}
@@ -3810,7 +3903,7 @@ namespace System
3810
3903
return nullptr ;
3811
3904
}
3812
3905
3813
- System::Decimal::operator System::IComparable ()
3906
+ System::Decimal::operator System::IEquatable_1<System::Decimal> ()
3814
3907
{
3815
3908
int32_t handle = Plugin::BoxDecimal (Handle );
3816
3909
if (Plugin::unhandledCsharpException)
@@ -3823,12 +3916,12 @@ namespace System
3823
3916
if (handle)
3824
3917
{
3825
3918
Plugin::ReferenceManagedClass (handle);
3826
- return System::IComparable (Plugin::InternalUse::Only, handle);
3919
+ return System::IEquatable_1<System::Decimal> (Plugin::InternalUse::Only, handle);
3827
3920
}
3828
3921
return nullptr ;
3829
3922
}
3830
3923
3831
- System::Decimal::operator System::IComparable_1<System::Decimal> ()
3924
+ System::Decimal::operator System::Runtime::Serialization::IDeserializationCallback ()
3832
3925
{
3833
3926
int32_t handle = Plugin::BoxDecimal (Handle );
3834
3927
if (Plugin::unhandledCsharpException)
@@ -3841,12 +3934,12 @@ namespace System
3841
3934
if (handle)
3842
3935
{
3843
3936
Plugin::ReferenceManagedClass (handle);
3844
- return System::IComparable_1<System::Decimal> (Plugin::InternalUse::Only, handle);
3937
+ return System::Runtime::Serialization::IDeserializationCallback (Plugin::InternalUse::Only, handle);
3845
3938
}
3846
3939
return nullptr ;
3847
3940
}
3848
3941
3849
- System::Decimal::operator System::IEquatable_1<System::Decimal> ()
3942
+ System::Decimal::operator System::IFormattable ()
3850
3943
{
3851
3944
int32_t handle = Plugin::BoxDecimal (Handle );
3852
3945
if (Plugin::unhandledCsharpException)
@@ -3859,7 +3952,7 @@ namespace System
3859
3952
if (handle)
3860
3953
{
3861
3954
Plugin::ReferenceManagedClass (handle);
3862
- return System::IEquatable_1<System::Decimal> (Plugin::InternalUse::Only, handle);
3955
+ return System::IFormattable (Plugin::InternalUse::Only, handle);
3863
3956
}
3864
3957
return nullptr ;
3865
3958
}
@@ -5325,7 +5418,7 @@ namespace UnityEngine
5325
5418
return nullptr ;
5326
5419
}
5327
5420
5328
- UnityEngine::PrimitiveType::operator System::IFormattable ()
5421
+ UnityEngine::PrimitiveType::operator System::IComparable ()
5329
5422
{
5330
5423
int32_t handle = Plugin::BoxPrimitiveType (*this );
5331
5424
if (Plugin::unhandledCsharpException)
@@ -5338,7 +5431,7 @@ namespace UnityEngine
5338
5431
if (handle)
5339
5432
{
5340
5433
Plugin::ReferenceManagedClass (handle);
5341
- return System::IFormattable (Plugin::InternalUse::Only, handle);
5434
+ return System::IComparable (Plugin::InternalUse::Only, handle);
5342
5435
}
5343
5436
return nullptr ;
5344
5437
}
@@ -5361,7 +5454,7 @@ namespace UnityEngine
5361
5454
return nullptr ;
5362
5455
}
5363
5456
5364
- UnityEngine::PrimitiveType::operator System::IComparable ()
5457
+ UnityEngine::PrimitiveType::operator System::IFormattable ()
5365
5458
{
5366
5459
int32_t handle = Plugin::BoxPrimitiveType (*this );
5367
5460
if (Plugin::unhandledCsharpException)
@@ -5374,7 +5467,7 @@ namespace UnityEngine
5374
5467
if (handle)
5375
5468
{
5376
5469
Plugin::ReferenceManagedClass (handle);
5377
- return System::IComparable (Plugin::InternalUse::Only, handle);
5470
+ return System::IFormattable (Plugin::InternalUse::Only, handle);
5378
5471
}
5379
5472
return nullptr ;
5380
5473
}
0 commit comments