You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
591 B
Matlab
45 lines
591 B
Matlab
5 years ago
|
//
|
||
5 years ago
|
// PEPAutoPointer.m
|
||
5 years ago
|
// pEpObjCAdapter
|
||
|
//
|
||
|
// Created by Dirk Zimmermann on 11.04.18.
|
||
|
// Copyright © 2018 p≡p. All rights reserved.
|
||
|
//
|
||
|
|
||
5 years ago
|
#import "PEPAutoPointer.h"
|
||
5 years ago
|
|
||
5 years ago
|
@interface PEPAutoPointer ()
|
||
5 years ago
|
|
||
|
@property (nonatomic) void *thePointer;
|
||
|
|
||
|
@end
|
||
|
|
||
5 years ago
|
@implementation PEPAutoPointer
|
||
5 years ago
|
|
||
5 years ago
|
- (void **)voidPointerPointer
|
||
5 years ago
|
{
|
||
|
return &_thePointer;
|
||
|
}
|
||
|
|
||
5 years ago
|
- (char **)charPointerPointer
|
||
|
{
|
||
|
return (char **) self.voidPointerPointer;
|
||
|
}
|
||
|
|
||
|
- (void *)voidPointer
|
||
|
{
|
||
|
return self.thePointer;
|
||
|
}
|
||
|
|
||
|
- (char *)charPointer
|
||
|
{
|
||
|
return (char *) self.voidPointer;
|
||
|
}
|
||
|
|
||
5 years ago
|
- (void)dealloc
|
||
|
{
|
||
|
free(_thePointer);
|
||
|
}
|
||
|
|
||
|
@end
|