/JMRConstantMappingType.m

http://rtm2cocoa.googlecode.com/ · Objective C · 32 lines · 16 code · 7 blank · 9 comment · 1 complexity · 03fb7617bcd2d7c9c5087423225969b0 MD5 · raw file

  1. //
  2. // JMRConstantMappingType.m
  3. // Excelsior
  4. //
  5. /*
  6. 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.
  7. */
  8. #import "JMRConstantMappingType.h"
  9. @implementation JMRConstantMappingType
  10. -(BOOL)isConstant {
  11. return YES;
  12. }
  13. -(id)initWithDefaultString:(NSString *)value {
  14. if (self = [super init]) {
  15. [self setDefaultString:value];
  16. return self;
  17. }
  18. return nil;
  19. }
  20. +(JMRConstantMappingType *)constantMappingWithDefaultString:(NSString *)value {
  21. return [[[JMRConstantMappingType alloc] initWithDefaultString:value] autorelease];
  22. }
  23. @end