/core/externals/update-engine/externals/google-toolbox-for-mac/Foundation/GTMNSScanner+Unsigned.h

http://macfuse.googlecode.com/ · C++ Header · 32 lines · 7 code · 5 blank · 20 comment · 0 complexity · 7eadd6a8151ba22b4c0aeb21204f0b95 MD5 · raw file

  1. //
  2. // GTMNSScanner+Unsigned.h
  3. //
  4. // Copyright 2010 Google Inc.
  5. //
  6. // Licensed under the Apache License, Version 2.0 (the "License"); you may not
  7. // use this file except in compliance with the License. You may obtain a copy
  8. // of the License at
  9. //
  10. // http://www.apache.org/licenses/LICENSE-2.0
  11. //
  12. // Unless required by applicable law or agreed to in writing, software
  13. // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  14. // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  15. // License for the specific language governing permissions and limitations under
  16. // the License.
  17. //
  18. #import <Foundation/Foundation.h>
  19. #import "GTMDefines.h"
  20. // Adds support for working with unsigned values. Unsigned values are digits
  21. // only [0-9]. There is no support for "+" or "-" signs. Overflow is handled
  22. // by returning "YES" and the maximum value allowed for the type.
  23. @interface NSScanner (GTMUnsignedAdditions)
  24. - (BOOL)gtm_scanUnsignedInt:(unsigned int *)value;
  25. - (BOOL)gtm_scanUInteger:(NSUInteger *)value;
  26. - (BOOL)gtm_scanUnsignedLongLong:(unsigned long long *)value;
  27. @end