NBTContainer.h 877 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. //
  2. // NBTFile.h
  3. // InsideJob
  4. //
  5. // Created by Adam Preble on 10/6/10.
  6. // Copyright 2010 Adam Preble. All rights reserved.
  7. //
  8. #import <Cocoa/Cocoa.h>
  9. typedef enum {
  10. NBTTypeEnd = 0,
  11. NBTTypeByte = 1,
  12. NBTTypeShort = 2,
  13. NBTTypeInt = 3,
  14. NBTTypeLong = 4,
  15. NBTTypeFloat = 5,
  16. NBTTypeDouble = 6,
  17. NBTTypeByteArray = 7,
  18. NBTTypeString = 8,
  19. NBTTypeList = 9,
  20. NBTTypeCompound = 10,
  21. } NBTType;
  22. @interface NBTContainer : NSObject {
  23. NSString *name;
  24. NSMutableArray *children;
  25. NBTType type;
  26. NSString *stringValue;
  27. NSNumber *numberValue;
  28. }
  29. @property (nonatomic, copy) NSString *name;
  30. @property (nonatomic, retain) NSMutableArray *children;
  31. @property (nonatomic, assign) NBTType type;
  32. @property (nonatomic, retain) NSString *stringValue;
  33. @property (nonatomic, retain) NSNumber *numberValue;
  34. + (id)nbtContainerWithData:(NSData *)data;
  35. - (void)readFromData:(NSData *)data;
  36. @end