Tools and libraries to glue C/C++ APIs to high-level languages
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

20 lines
516 B

using CppSharp.AST.Extensions;
namespace CppSharp.AST
{
public static class PropertyExtensions
{
public static bool IsInRefTypeAndBackedByValueClassField(this Property p)
{
if (p.Field == null || ((Class) p.Namespace).IsRefType)
return false;
Type type;
p.Field.Type.IsPointerTo(out type);
type = type ?? p.Field.Type;
Class decl;
return type.IsTagDecl(out decl) && decl.IsValueType;
}
}
}