+// ============================================================================
+// wxPointerObject
+// ============================================================================
+
+@implementation wxPointerObject
+
+-(id) init
+{
+ self = [super init];
+ if (self != nil)
+ self->pointer = NULL;
+ return self;
+}
+
+-(id) initWithPointer:(void*) initPointer
+{
+ self = [super init];
+ if (self != nil)
+ self->pointer = initPointer;
+ return self;
+}
+
+//
+// inherited methods from NSObject
+//
+-(BOOL) isEqual:(id)object
+{
+ return (object != nil) &&
+ ([object isKindOfClass:[wxPointerObject class]]) &&
+ (pointer == [((wxPointerObject*) object) pointer]);
+}
+
+-(NSUInteger) hash
+{
+ return (NSUInteger) pointer;
+}
+
+-(void*) pointer
+{
+ return pointer;
+}
+
+-(void) setPointer:(void*) newPointer
+{
+ pointer = newPointer;
+}
+
+@end
+
+namespace
+{
+
+inline wxDataViewItem wxDataViewItemFromItem(id item)
+{
+ return wxDataViewItem([static_cast<wxPointerObject *>(item) pointer]);
+}
+
+inline wxDataViewItem wxDataViewItemFromMaybeNilItem(id item)
+{
+ return item == nil ? wxDataViewItem() : wxDataViewItemFromItem(item);
+}
+
+} // anonymous namespace
+