Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

ZXParsedResult.h 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * Copyright 2012 ZXing authors
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #import "ZXParsedResultType.h"
  17. #import "ZXResult.h"
  18. /**
  19. * Abstract class representing the result of decoding a barcode, as more than
  20. * a String -- as some type of structured data. This might be a subclass which represents
  21. * a URL, or an e-mail address. parseResult() will turn a raw
  22. * decoded string into the most appropriate type of structured representation.
  23. *
  24. * Thanks to Jeff Griffin for proposing rewrite of these classes that relies less
  25. * on exception-based mechanisms during parsing.
  26. */
  27. @interface ZXParsedResult : NSObject
  28. @property (nonatomic, assign, readonly) ZXParsedResultType type;
  29. - (id)initWithType:(ZXParsedResultType)type;
  30. + (id)parsedResultWithType:(ZXParsedResultType)type;
  31. - (NSString *)displayResult;
  32. + (void)maybeAppend:(NSString *)value result:(NSMutableString *)result;
  33. + (void)maybeAppendArray:(NSArray *)value result:(NSMutableString *)result;
  34. @end