/JMRMappingList.h

http://rtm2cocoa.googlecode.com/ · C Header · 41 lines · 19 code · 10 blank · 12 comment · 0 complexity · c553c2bed315ad74005b843e2cfd0432 MD5 · raw file

  1. //
  2. // JMRMappingList.h
  3. // Excelsior
  4. /*
  5. This work is licensed under the Creative Commons Attribution License. To view a copy of this license, visit http://creativecommons.org/licenses/by/1.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
  6. */
  7. #import <Foundation/Foundation.h>
  8. #import "JMRMappingFactory.h"
  9. @interface JMRMappingList : NSObject {
  10. NSMutableDictionary *_namedMappings;
  11. NSMutableDictionary *_rootNamedMappings;
  12. // need to store mutable arrays indexed by typeRef here until referenced type is added to list
  13. NSMutableDictionary *_waitingList;
  14. }
  15. // constructor
  16. +(JMRMappingList *)mappingListWithDataFromURL:(NSURL *)url;
  17. // accessors
  18. -(NSMutableDictionary *)namedMappings;
  19. -(NSMutableDictionary *)rootNamedMappings;
  20. -(NSMutableDictionary *)waitingList;
  21. // public interface
  22. -(void)addToWaitingList:(JMRMapping *)mapping withRef:(NSString *)ref;
  23. -(void)updateMappingsWaitingForRef:(NSString *)ref withType:(JMRMappingType *)type;
  24. -(void)addMappingType:(JMRMappingType *)value forName:(NSString *)name;
  25. -(JMRMappingType *)mappingTypeWithName:(NSString *)name;
  26. -(void)addMapping:(JMRObjectMapping *)value forRootName:(NSString *)rootName;
  27. -(JMRObjectMapping *)mappingWithRootName:(NSString *)rootName;
  28. -(JMRMapping *)mappingWithMappingFactory:(JMRMappingFactory *)factory;
  29. @end