Browse Source

CppType: value types and IEnumerable<CppModifiers>

pull/1/head
Alexander Corrado 15 years ago
parent
commit
ade252db80
  1. 7
      src/Mono.Cxxi/CppType.cs

7
src/Mono.Cxxi/CppType.cs

@ -130,6 +130,9 @@ namespace Mono.Cxxi { @@ -130,6 +130,9 @@ namespace Mono.Cxxi {
// we can apply to managed wrappers to indicate if the underlying C++ type is actually declared struct
(t) => typeof (ICppObject).IsAssignableFrom (t)? new CppType (CppTypes.Class, Regex.Replace (t.Name, "`\\d\\d?$", ""), CppModifiers.Pointer) : CppTypes.Unknown,
// value types that don't fit the above categories...
(t) => t.IsValueType? new CppType (CppTypes.Class, Regex.Replace (t.Name, "`\\d\\d?$", "")) : CppTypes.Unknown,
// convert managed type modifiers to C++ type modifiers like so:
// ref types to C++ references
// pointer types to C++ pointers
@ -192,8 +195,8 @@ namespace Mono.Cxxi { @@ -192,8 +195,8 @@ namespace Mono.Cxxi {
continue;
}
if (part is CppModifiers []) {
Modifiers.AddRange ((CppModifiers [])part);
if (part is CppModifiers [] || part is IEnumerable<CppModifiers>) {
Modifiers.AddRange ((IEnumerable<CppModifiers>)part);
continue;
}

Loading…
Cancel
Save