MutableField.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. // Protocol Buffers for Objective C
  2. //
  3. // Copyright 2010 Booyah Inc.
  4. // Copyright 2008 Cyrus Najmabadi
  5. //
  6. // Licensed under the Apache License, Version 2.0 (the "License");
  7. // you may not use this file except in compliance with the License.
  8. // You may obtain a copy 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,
  14. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. // See the License for the specific language governing permissions and
  16. // limitations under the License.
  17. #import "Field.h"
  18. @class PBUnknownFieldSet;
  19. @interface PBMutableField : PBField
  20. /**
  21. * @brief 空参数实例化
  22. *
  23. * @param
  24. *
  25. * @return 实例
  26. */
  27. + (PBMutableField *)field;
  28. /**
  29. * @brief PBField实例化
  30. *
  31. * @param other
  32. *
  33. * @return 实例
  34. */
  35. - (PBMutableField *)mergeFromField:(PBField *)other;
  36. /**
  37. * @brief 释放成员变量
  38. *
  39. * @param
  40. *
  41. * @return 实例
  42. */
  43. - (PBMutableField *)clear;
  44. /**
  45. * @brief 添加可变64位整数
  46. *
  47. * @param value
  48. *
  49. * @return 实例
  50. */
  51. - (PBMutableField *)addVarint:(SInt64)value;
  52. /**
  53. * @brief 添加可变32位整数
  54. *
  55. * @param value
  56. *
  57. * @return 实例
  58. */
  59. - (PBMutableField *)addFixed32:(SInt32)value;
  60. /**
  61. * @brief 添加不可变64位整数
  62. *
  63. * @param value
  64. *
  65. * @return 实例
  66. */
  67. - (PBMutableField *)addFixed64:(SInt64)value;
  68. /**
  69. * @brief add NSData
  70. *
  71. * @param value
  72. *
  73. * @return 实例
  74. */
  75. - (PBMutableField *)addLengthDelimited:(NSData *)value;
  76. /**
  77. * @brief 添加未知set
  78. *
  79. * @param value
  80. *
  81. * @return 实例
  82. */
  83. - (PBMutableField *)addGroup:(PBUnknownFieldSet *)value;
  84. @end