//This is the Wrapper .h
#import <Foundation/Foundation.h>
#ifdef __cplusplus
class RTree; //here I get 'Forward declaration of struct RTree'
//class RTree<void *, double, 2, double>; // With this it says ' RTree is not a template'
#endif
@interface NextScenesController : NSObject {
#ifdef __cplusplus
RTree<void *, double, 2, double> * rTree; // 'RTree is not a template'
#endif
}
//@property (nonatomic, assign) RTree<void *, double, 2, double> * rTree;
@end
//Here is the Wrapper .mm
#import "NextScenesController.h"
#include "RTree.h"
@implementation NextScenesController
//@synthesize rTree;
@synthesize count;
@synthesize validScenes;
- (id)init{
self = [super init];
if (self)
{
rTree = new RTree<void *, double, 2, double>(); // 'Expected type specifier' of course : D
count = 0;
}
return self;
}
- (void)dealloc{
//rTree->RemoveAll();
delete(rTree);
self.validScenes = nil;
[super dealloc];
}