Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 22nd, 2012  |  syntax: None  |  size: 2.55 KB  |  hits: 13  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Objective C serialize list of complex objects
  2. @interface AISlideItem: NSObject
  3. {
  4.     NSString*  PlaceHolderName;
  5.     NSUInteger PlaceHolderID;
  6. }
  7. @property (nonatomic, strong) NSString* PlaceHolderName;
  8. @property (nonatomic) NSUInteger PlaceHolderID;
  9.  
  10. @end
  11.  
  12. @interface AITitleSlideItem : AISlideItem
  13. {
  14.     NSString* Title;
  15. }
  16. @property (nonatomic, strong) NSString* Title;
  17. @end
  18.  
  19. @interface AIParagraphSlideItem : AISlideItem
  20. {
  21.     NSMutableArray* Paragraphs;
  22. }
  23. @property (nonatomic, strong) NSMutableArray* Paragraphs;
  24. @end
  25.  
  26. @interface AITextSlideItem : AISlideItem
  27. {
  28.     NSString* Text;
  29. }
  30. @property (nonatomic, strong) NSString* Text;
  31. @end
  32.  
  33. @interface AIPictureSlideItem : AISlideItem
  34. {
  35.     NSMutableData* Picture;
  36. }
  37. @property (nonatomic, strong) NSMutableData* Picture;
  38. @end
  39.  
  40. @interface AISlideContent : NSObject
  41. {
  42.     NSString*       LayoutName;
  43.     NSMutableArray* Items;
  44. }
  45. @property (nonatomic,strong) NSString* LayoutName;
  46. @property (nonatomic,strong) NSMutableArray* Items;
  47. @end
  48.  
  49. @interface ContentParaghraph : NSObject
  50. {
  51.     NSInteger Level;
  52.     NSString* Text;
  53. }
  54. @property (nonatomic) NSInteger Level;
  55. @property (nonatomic, strong) NSString* Text;
  56. @end
  57.        
  58. {
  59.   d: [
  60.      {
  61.           Items: [
  62.           {
  63.               placeHolderName: "1",
  64.               Title: "Title Slide"
  65.           },
  66.           {
  67.               placeHolderName: "2",
  68.               Paragraphs: [
  69.                  {
  70.                      Level: 0,
  71.                      Text: "Title content"
  72.                  }
  73.               ]
  74.           }
  75.        ],
  76.        LayoutName: "Title"
  77.      },
  78.      {
  79.          Items: [
  80.          {
  81.               placeHolderName: "1",
  82.               Title: "Slide 2"
  83.      },
  84.      {
  85.               placeHolderName: "2",
  86.               Paragraphs: [
  87.               {
  88.                  Level: 0,
  89.                  Text: "Line 1"
  90.               },
  91.               {
  92.                  Level: 0,
  93.                  Text: "Line 2"
  94.               },
  95.               {
  96.                  Level: 1,
  97.                  Text: "Line 2 indented"
  98.               },
  99.               {
  100.                  Level: 2,
  101.                  Text: "Line 3 more indented"
  102.               },
  103.               {
  104.                  Level: 0,
  105.                  Text: "Line 4"
  106.               }
  107.               ]
  108.      }
  109.       ],
  110.       LayoutName: "Title and Content"
  111.      },
  112.      {
  113.            Items: [
  114.            {
  115.                 placeHolderName: "1",
  116.                 Title: "Slide 3"
  117.            },
  118.            {
  119.                 placeHolderName: "3",
  120.                 Picture: [
  121.  
  122.                 ]
  123.            }
  124.        ],
  125.        LayoutName: "Picture above Caption"
  126.       }
  127.       ]
  128. }