OLD | NEW |
(Empty) | |
| 1 <?php |
| 2 # Generated by the protocol buffer compiler. DO NOT EDIT! |
| 3 # source: google/protobuf/descriptor.proto |
| 4 |
| 5 namespace Google\Protobuf\Internal; |
| 6 |
| 7 use Google\Protobuf\Internal\GPBType; |
| 8 use Google\Protobuf\Internal\GPBWire; |
| 9 use Google\Protobuf\Internal\RepeatedField; |
| 10 use Google\Protobuf\Internal\InputStream; |
| 11 |
| 12 use Google\Protobuf\Internal\GPBUtil; |
| 13 |
| 14 /** |
| 15 * Protobuf type <code>google.protobuf.SourceCodeInfo.Location</code> |
| 16 */ |
| 17 class SourceCodeInfo_Location extends \Google\Protobuf\Internal\Message |
| 18 { |
| 19 /** |
| 20 * <pre> |
| 21 * Identifies which part of the FileDescriptorProto was defined at this |
| 22 * location. |
| 23 * Each element is a field number or an index. They form a path from |
| 24 * the root FileDescriptorProto to the place where the definition. For |
| 25 * example, this path: |
| 26 * [ 4, 3, 2, 7, 1 ] |
| 27 * refers to: |
| 28 * file.message_type(3) // 4, 3 |
| 29 * .field(7) // 2, 7 |
| 30 * .name() // 1 |
| 31 * This is because FileDescriptorProto.message_type has field number 4: |
| 32 * repeated DescriptorProto message_type = 4; |
| 33 * and DescriptorProto.field has field number 2: |
| 34 * repeated FieldDescriptorProto field = 2; |
| 35 * and FieldDescriptorProto.name has field number 1: |
| 36 * optional string name = 1; |
| 37 * Thus, the above path gives the location of a field name. If we removed |
| 38 * the last element: |
| 39 * [ 4, 3, 2, 7 ] |
| 40 * this path refers to the whole field declaration (from the beginning |
| 41 * of the label to the terminating semicolon). |
| 42 * </pre> |
| 43 * |
| 44 * <code>repeated int32 path = 1 [packed = true];</code> |
| 45 */ |
| 46 private $path; |
| 47 private $has_path = false; |
| 48 /** |
| 49 * <pre> |
| 50 * Always has exactly three or four elements: start line, start column, |
| 51 * end line (optional, otherwise assumed same as start line), end column. |
| 52 * These are packed into a single field for efficiency. Note that line |
| 53 * and column numbers are zero-based -- typically you will want to add |
| 54 * 1 to each before displaying to a user. |
| 55 * </pre> |
| 56 * |
| 57 * <code>repeated int32 span = 2 [packed = true];</code> |
| 58 */ |
| 59 private $span; |
| 60 private $has_span = false; |
| 61 /** |
| 62 * <pre> |
| 63 * If this SourceCodeInfo represents a complete declaration, these are any |
| 64 * comments appearing before and after the declaration which appear to be |
| 65 * attached to the declaration. |
| 66 * A series of line comments appearing on consecutive lines, with no other |
| 67 * tokens appearing on those lines, will be treated as a single comment. |
| 68 * leading_detached_comments will keep paragraphs of comments that appear |
| 69 * before (but not connected to) the current element. Each paragraph, |
| 70 * separated by empty lines, will be one comment element in the repeated |
| 71 * field. |
| 72 * Only the comment content is provided; comment markers (e.g. //) are |
| 73 * stripped out. For block comments, leading whitespace and an asterisk |
| 74 * will be stripped from the beginning of each line other than the first. |
| 75 * Newlines are included in the output. |
| 76 * Examples: |
| 77 * optional int32 foo = 1; // Comment attached to foo. |
| 78 * // Comment attached to bar. |
| 79 * optional int32 bar = 2; |
| 80 * optional string baz = 3; |
| 81 * // Comment attached to baz. |
| 82 * // Another line attached to baz. |
| 83 * // Comment attached to qux. |
| 84 * // |
| 85 * // Another line attached to qux. |
| 86 * optional double qux = 4; |
| 87 * // Detached comment for corge. This is not leading or trailing comments |
| 88 * // to qux or corge because there are blank lines separating it from |
| 89 * // both. |
| 90 * // Detached comment for corge paragraph 2. |
| 91 * optional string corge = 5; |
| 92 * /* Block comment attached |
| 93 * * to corge. Leading asterisks |
| 94 * * will be removed. */ |
| 95 * /* Block comment attached to |
| 96 * * grault. */ |
| 97 * optional int32 grault = 6; |
| 98 * // ignored detached comments. |
| 99 * </pre> |
| 100 * |
| 101 * <code>optional string leading_comments = 3;</code> |
| 102 */ |
| 103 private $leading_comments = ''; |
| 104 private $has_leading_comments = false; |
| 105 /** |
| 106 * <code>optional string trailing_comments = 4;</code> |
| 107 */ |
| 108 private $trailing_comments = ''; |
| 109 private $has_trailing_comments = false; |
| 110 /** |
| 111 * <code>repeated string leading_detached_comments = 6;</code> |
| 112 */ |
| 113 private $leading_detached_comments; |
| 114 private $has_leading_detached_comments = false; |
| 115 |
| 116 public function __construct() { |
| 117 \GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce(); |
| 118 parent::__construct(); |
| 119 } |
| 120 |
| 121 /** |
| 122 * <pre> |
| 123 * Identifies which part of the FileDescriptorProto was defined at this |
| 124 * location. |
| 125 * Each element is a field number or an index. They form a path from |
| 126 * the root FileDescriptorProto to the place where the definition. For |
| 127 * example, this path: |
| 128 * [ 4, 3, 2, 7, 1 ] |
| 129 * refers to: |
| 130 * file.message_type(3) // 4, 3 |
| 131 * .field(7) // 2, 7 |
| 132 * .name() // 1 |
| 133 * This is because FileDescriptorProto.message_type has field number 4: |
| 134 * repeated DescriptorProto message_type = 4; |
| 135 * and DescriptorProto.field has field number 2: |
| 136 * repeated FieldDescriptorProto field = 2; |
| 137 * and FieldDescriptorProto.name has field number 1: |
| 138 * optional string name = 1; |
| 139 * Thus, the above path gives the location of a field name. If we removed |
| 140 * the last element: |
| 141 * [ 4, 3, 2, 7 ] |
| 142 * this path refers to the whole field declaration (from the beginning |
| 143 * of the label to the terminating semicolon). |
| 144 * </pre> |
| 145 * |
| 146 * <code>repeated int32 path = 1 [packed = true];</code> |
| 147 */ |
| 148 public function getPath() |
| 149 { |
| 150 return $this->path; |
| 151 } |
| 152 |
| 153 /** |
| 154 * <pre> |
| 155 * Identifies which part of the FileDescriptorProto was defined at this |
| 156 * location. |
| 157 * Each element is a field number or an index. They form a path from |
| 158 * the root FileDescriptorProto to the place where the definition. For |
| 159 * example, this path: |
| 160 * [ 4, 3, 2, 7, 1 ] |
| 161 * refers to: |
| 162 * file.message_type(3) // 4, 3 |
| 163 * .field(7) // 2, 7 |
| 164 * .name() // 1 |
| 165 * This is because FileDescriptorProto.message_type has field number 4: |
| 166 * repeated DescriptorProto message_type = 4; |
| 167 * and DescriptorProto.field has field number 2: |
| 168 * repeated FieldDescriptorProto field = 2; |
| 169 * and FieldDescriptorProto.name has field number 1: |
| 170 * optional string name = 1; |
| 171 * Thus, the above path gives the location of a field name. If we removed |
| 172 * the last element: |
| 173 * [ 4, 3, 2, 7 ] |
| 174 * this path refers to the whole field declaration (from the beginning |
| 175 * of the label to the terminating semicolon). |
| 176 * </pre> |
| 177 * |
| 178 * <code>repeated int32 path = 1 [packed = true];</code> |
| 179 */ |
| 180 public function setPath(&$var) |
| 181 { |
| 182 GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT
32); |
| 183 $this->path = $var; |
| 184 $this->has_path = true; |
| 185 } |
| 186 |
| 187 public function hasPath() |
| 188 { |
| 189 return $this->has_path; |
| 190 } |
| 191 |
| 192 /** |
| 193 * <pre> |
| 194 * Always has exactly three or four elements: start line, start column, |
| 195 * end line (optional, otherwise assumed same as start line), end column. |
| 196 * These are packed into a single field for efficiency. Note that line |
| 197 * and column numbers are zero-based -- typically you will want to add |
| 198 * 1 to each before displaying to a user. |
| 199 * </pre> |
| 200 * |
| 201 * <code>repeated int32 span = 2 [packed = true];</code> |
| 202 */ |
| 203 public function getSpan() |
| 204 { |
| 205 return $this->span; |
| 206 } |
| 207 |
| 208 /** |
| 209 * <pre> |
| 210 * Always has exactly three or four elements: start line, start column, |
| 211 * end line (optional, otherwise assumed same as start line), end column. |
| 212 * These are packed into a single field for efficiency. Note that line |
| 213 * and column numbers are zero-based -- typically you will want to add |
| 214 * 1 to each before displaying to a user. |
| 215 * </pre> |
| 216 * |
| 217 * <code>repeated int32 span = 2 [packed = true];</code> |
| 218 */ |
| 219 public function setSpan(&$var) |
| 220 { |
| 221 GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT
32); |
| 222 $this->span = $var; |
| 223 $this->has_span = true; |
| 224 } |
| 225 |
| 226 public function hasSpan() |
| 227 { |
| 228 return $this->has_span; |
| 229 } |
| 230 |
| 231 /** |
| 232 * <pre> |
| 233 * If this SourceCodeInfo represents a complete declaration, these are any |
| 234 * comments appearing before and after the declaration which appear to be |
| 235 * attached to the declaration. |
| 236 * A series of line comments appearing on consecutive lines, with no other |
| 237 * tokens appearing on those lines, will be treated as a single comment. |
| 238 * leading_detached_comments will keep paragraphs of comments that appear |
| 239 * before (but not connected to) the current element. Each paragraph, |
| 240 * separated by empty lines, will be one comment element in the repeated |
| 241 * field. |
| 242 * Only the comment content is provided; comment markers (e.g. //) are |
| 243 * stripped out. For block comments, leading whitespace and an asterisk |
| 244 * will be stripped from the beginning of each line other than the first. |
| 245 * Newlines are included in the output. |
| 246 * Examples: |
| 247 * optional int32 foo = 1; // Comment attached to foo. |
| 248 * // Comment attached to bar. |
| 249 * optional int32 bar = 2; |
| 250 * optional string baz = 3; |
| 251 * // Comment attached to baz. |
| 252 * // Another line attached to baz. |
| 253 * // Comment attached to qux. |
| 254 * // |
| 255 * // Another line attached to qux. |
| 256 * optional double qux = 4; |
| 257 * // Detached comment for corge. This is not leading or trailing comments |
| 258 * // to qux or corge because there are blank lines separating it from |
| 259 * // both. |
| 260 * // Detached comment for corge paragraph 2. |
| 261 * optional string corge = 5; |
| 262 * /* Block comment attached |
| 263 * * to corge. Leading asterisks |
| 264 * * will be removed. */ |
| 265 * /* Block comment attached to |
| 266 * * grault. */ |
| 267 * optional int32 grault = 6; |
| 268 * // ignored detached comments. |
| 269 * </pre> |
| 270 * |
| 271 * <code>optional string leading_comments = 3;</code> |
| 272 */ |
| 273 public function getLeadingComments() |
| 274 { |
| 275 return $this->leading_comments; |
| 276 } |
| 277 |
| 278 /** |
| 279 * <pre> |
| 280 * If this SourceCodeInfo represents a complete declaration, these are any |
| 281 * comments appearing before and after the declaration which appear to be |
| 282 * attached to the declaration. |
| 283 * A series of line comments appearing on consecutive lines, with no other |
| 284 * tokens appearing on those lines, will be treated as a single comment. |
| 285 * leading_detached_comments will keep paragraphs of comments that appear |
| 286 * before (but not connected to) the current element. Each paragraph, |
| 287 * separated by empty lines, will be one comment element in the repeated |
| 288 * field. |
| 289 * Only the comment content is provided; comment markers (e.g. //) are |
| 290 * stripped out. For block comments, leading whitespace and an asterisk |
| 291 * will be stripped from the beginning of each line other than the first. |
| 292 * Newlines are included in the output. |
| 293 * Examples: |
| 294 * optional int32 foo = 1; // Comment attached to foo. |
| 295 * // Comment attached to bar. |
| 296 * optional int32 bar = 2; |
| 297 * optional string baz = 3; |
| 298 * // Comment attached to baz. |
| 299 * // Another line attached to baz. |
| 300 * // Comment attached to qux. |
| 301 * // |
| 302 * // Another line attached to qux. |
| 303 * optional double qux = 4; |
| 304 * // Detached comment for corge. This is not leading or trailing comments |
| 305 * // to qux or corge because there are blank lines separating it from |
| 306 * // both. |
| 307 * // Detached comment for corge paragraph 2. |
| 308 * optional string corge = 5; |
| 309 * /* Block comment attached |
| 310 * * to corge. Leading asterisks |
| 311 * * will be removed. */ |
| 312 * /* Block comment attached to |
| 313 * * grault. */ |
| 314 * optional int32 grault = 6; |
| 315 * // ignored detached comments. |
| 316 * </pre> |
| 317 * |
| 318 * <code>optional string leading_comments = 3;</code> |
| 319 */ |
| 320 public function setLeadingComments($var) |
| 321 { |
| 322 GPBUtil::checkString($var, True); |
| 323 $this->leading_comments = $var; |
| 324 $this->has_leading_comments = true; |
| 325 } |
| 326 |
| 327 public function hasLeadingComments() |
| 328 { |
| 329 return $this->has_leading_comments; |
| 330 } |
| 331 |
| 332 /** |
| 333 * <code>optional string trailing_comments = 4;</code> |
| 334 */ |
| 335 public function getTrailingComments() |
| 336 { |
| 337 return $this->trailing_comments; |
| 338 } |
| 339 |
| 340 /** |
| 341 * <code>optional string trailing_comments = 4;</code> |
| 342 */ |
| 343 public function setTrailingComments($var) |
| 344 { |
| 345 GPBUtil::checkString($var, True); |
| 346 $this->trailing_comments = $var; |
| 347 $this->has_trailing_comments = true; |
| 348 } |
| 349 |
| 350 public function hasTrailingComments() |
| 351 { |
| 352 return $this->has_trailing_comments; |
| 353 } |
| 354 |
| 355 /** |
| 356 * <code>repeated string leading_detached_comments = 6;</code> |
| 357 */ |
| 358 public function getLeadingDetachedComments() |
| 359 { |
| 360 return $this->leading_detached_comments; |
| 361 } |
| 362 |
| 363 /** |
| 364 * <code>repeated string leading_detached_comments = 6;</code> |
| 365 */ |
| 366 public function setLeadingDetachedComments(&$var) |
| 367 { |
| 368 GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STR
ING); |
| 369 $this->leading_detached_comments = $var; |
| 370 $this->has_leading_detached_comments = true; |
| 371 } |
| 372 |
| 373 public function hasLeadingDetachedComments() |
| 374 { |
| 375 return $this->has_leading_detached_comments; |
| 376 } |
| 377 |
| 378 } |
| 379 |
OLD | NEW |