MTLReflection.h 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. //
  2. // MTLReflection.h
  3. // Mantle
  4. //
  5. // Created by Justin Spahr-Summers on 2013-03-12.
  6. // Copyright (c) 2013 GitHub. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. /// Creates a selector from a key and a constant string.
  10. ///
  11. /// key - The key to insert into the generated selector. This key should be in
  12. /// its natural case.
  13. /// suffix - A string to append to the key as part of the selector.
  14. ///
  15. /// Returns a selector, or NULL if the input strings cannot form a valid
  16. /// selector.
  17. SEL MTLSelectorWithKeyPattern(NSString *key, const char *suffix) __attribute__((pure, nonnull(1, 2)));
  18. /// Creates a selector from a key and a constant prefix and suffix.
  19. ///
  20. /// prefix - A string to prepend to the key as part of the selector.
  21. /// key - The key to insert into the generated selector. This key should be in
  22. /// its natural case, and will have its first letter capitalized when
  23. /// inserted.
  24. /// suffix - A string to append to the key as part of the selector.
  25. ///
  26. /// Returns a selector, or NULL if the input strings cannot form a valid
  27. /// selector.
  28. SEL MTLSelectorWithCapitalizedKeyPattern(const char *prefix, NSString *key, const char *suffix) __attribute__((pure, nonnull(1, 2, 3)));