From 6c9105be2f85a603ae2ee9f1d712bae68e07e460 Mon Sep 17 00:00:00 2001 From: triton Date: Fri, 18 Jan 2013 16:33:54 +0000 Subject: [PATCH] Added helper methods to check if a type is a pointer. --- src/Bridge/Type.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Bridge/Type.cs b/src/Bridge/Type.cs index 6f87f94d..bd899b7e 100644 --- a/src/Bridge/Type.cs +++ b/src/Bridge/Type.cs @@ -31,6 +31,14 @@ namespace Cxxi return tag.Declaration is Enumeration; } + public bool IsPointer() + { + var pointer = this as PointerType; + if (pointer == null) + return false; + return pointer.Modifier == PointerType.TypeModifier.Pointer; + } + public bool IsPointerToPrimitiveType(PrimitiveType primitive) { var ptr = this as PointerType;