Advertisement
Guest User

Untitled

a guest
Sep 26th, 2010
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //This is the Wrapper .h
  2. #import <Foundation/Foundation.h>
  3.  
  4. #ifdef __cplusplus
  5. class RTree; //here I get 'Forward declaration of struct RTree'
  6. //class RTree<void *, double, 2, double>; // With this it says ' RTree is not a template'
  7. #endif
  8.  
  9. @interface NextScenesController : NSObject {
  10.     #ifdef __cplusplus
  11.     RTree<void *, double, 2, double> * rTree; // 'RTree is not a template'
  12.     #endif
  13. }
  14.  
  15. //@property (nonatomic, assign) RTree<void *, double, 2, double> * rTree;
  16. @end
  17.  
  18. //Here is the Wrapper .mm
  19. #import "NextScenesController.h"
  20. #include "RTree.h"
  21.  
  22. @implementation NextScenesController
  23.  
  24. //@synthesize rTree;
  25. @synthesize count;
  26. @synthesize validScenes;
  27.  
  28. - (id)init{
  29.     self = [super init];
  30.     if (self)
  31.     {
  32.         rTree = new RTree<void *, double, 2, double>(); // 'Expected type specifier' of course : D
  33.         count = 0;
  34.     }
  35.     return self;
  36. }
  37. - (void)dealloc{
  38.  
  39.     //rTree->RemoveAll();
  40.     delete(rTree);
  41.     self.validScenes = nil;
  42.     [super dealloc];
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement