|
|
@ -33,45 +33,40 @@ C/C++ Types |
|
|
|
These are mapped to .NET types as follows: |
|
|
|
These are mapped to .NET types as follows: |
|
|
|
|
|
|
|
|
|
|
|
1. Integral types |
|
|
|
1. Integral types |
|
|
|
|
|
|
|
``` |
|
|
|
char -> System::Byte |
|
|
|
char -> System::Byte |
|
|
|
bool -> System::Boolean |
|
|
|
bool -> System::Boolean |
|
|
|
short -> System::Int16 |
|
|
|
short -> System::Int16 |
|
|
|
int, long -> System::Int32 |
|
|
|
int, long -> System::Int32 |
|
|
|
long long -> System::Int64 |
|
|
|
long long -> System::Int64 |
|
|
|
|
|
|
|
``` |
|
|
|
Signedness is also preserved in the conversions. |
|
|
|
Signedness is also preserved in the conversions. |
|
|
|
|
|
|
|
|
|
|
|
2. Floating-point types |
|
|
|
2. Floating-point types |
|
|
|
|
|
|
|
``` |
|
|
|
float -> System::Single |
|
|
|
float -> System::Single |
|
|
|
double -> System::Double |
|
|
|
double -> System::Double |
|
|
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
3. Other types |
|
|
|
3. Other types |
|
|
|
|
|
|
|
``` |
|
|
|
wchar_t -> System::Char |
|
|
|
wchar_t -> System::Char |
|
|
|
void -> System::Void |
|
|
|
void -> System::Void |
|
|
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
### Derived types |
|
|
|
### Derived types |
|
|
|
|
|
|
|
|
|
|
|
1. Arrays |
|
|
|
1. Arrays are mapped to .NET CLR arrays. |
|
|
|
|
|
|
|
|
|
|
|
These are mapped to .NET CLR arrays. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2. Function Pointers / Pointers to Members |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
These are mapped to .NET CLR delegates. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3. Pointers |
|
|
|
2. Function Pointers / Pointers to Members are mapped to .NET CLR delegates. |
|
|
|
|
|
|
|
|
|
|
|
These are mapped to .NET CLR references unless: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3. Pointers are mapped to .NET CLR references unless: |
|
|
|
|
|
|
|
``` |
|
|
|
void* -> System::IntPtr |
|
|
|
void* -> System::IntPtr |
|
|
|
const char* -> System::String |
|
|
|
const char* -> System::String |
|
|
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
4. References |
|
|
|
4. References are mapped to .NET CLR references just like pointers. |
|
|
|
|
|
|
|
|
|
|
|
References are mapped to .NET CLR references just like pointers. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### Typedefs |
|
|
|
### Typedefs |
|
|
|
|
|
|
|
|
|
|
|