Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

ZXAztecHighLevelEncoder.h 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * Copyright 2014 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. extern NSArray *ZX_AZTEC_MODE_NAMES;
  17. extern const int ZX_AZTEC_MODE_UPPER;
  18. extern const int ZX_AZTEC_MODE_LOWER;
  19. extern const int ZX_AZTEC_MODE_DIGIT;
  20. extern const int ZX_AZTEC_MODE_MIXED;
  21. extern const int ZX_AZTEC_MODE_PUNCT;
  22. extern const int ZX_AZTEC_LATCH_TABLE[][5];
  23. #define ZX_AZTEC_SHIFT_TABLE_SIZE 6
  24. extern int ZX_AZTEC_SHIFT_TABLE[ZX_AZTEC_SHIFT_TABLE_SIZE][ZX_AZTEC_SHIFT_TABLE_SIZE];
  25. @class ZXBitArray, ZXByteArray;
  26. /**
  27. * This produces nearly optimal encodings of text into the first-level of
  28. * encoding used by Aztec code.
  29. *
  30. * It uses a dynamic algorithm. For each prefix of the string, it determines
  31. * a set of encodings that could lead to this prefix. We repeatedly add a
  32. * character and generate a new set of optimal encodings until we have read
  33. * through the entire input.
  34. */
  35. @interface ZXAztecHighLevelEncoder : NSObject
  36. - (id)initWithText:(ZXByteArray *)text;
  37. /**
  38. * Convert the text represented by this High Level Encoder into a BitArray.
  39. */
  40. - (ZXBitArray *)encode;
  41. @end