Brak opisu

AWSMTLValueTransformer.h 1009B

1234567891011121314151617181920212223242526272829
  1. //
  2. // MTLValueTransformer.h
  3. // Mantle
  4. //
  5. // Created by Justin Spahr-Summers on 2012-09-11.
  6. // Copyright (c) 2012 GitHub. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. typedef id (^AWSMTLValueTransformerBlock)(id);
  10. //
  11. // A value transformer supporting block-based transformation.
  12. //
  13. @interface AWSMTLValueTransformer : NSValueTransformer
  14. // Returns a transformer which transforms values using the given block. Reverse
  15. // transformations will not be allowed.
  16. + (instancetype)transformerWithBlock:(AWSMTLValueTransformerBlock)transformationBlock;
  17. // Returns a transformer which transforms values using the given block, for
  18. // forward or reverse transformations.
  19. + (instancetype)reversibleTransformerWithBlock:(AWSMTLValueTransformerBlock)transformationBlock;
  20. // Returns a transformer which transforms values using the given blocks.
  21. + (instancetype)reversibleTransformerWithForwardBlock:(AWSMTLValueTransformerBlock)forwardBlock reverseBlock:(AWSMTLValueTransformerBlock)reverseBlock;
  22. @end