|
Freeciv-3.2
|
Public Member Functions | |
| "SizeInfo" | parse (cls, size_text) |
| __init__ (self, str declared, "str | None" actual) | |
| bool | constant (self) |
| str | actual_for (self, str packet) |
| str | real (self) |
| str | old (self) |
| str | size_check_get (self, str field_name) |
| str | size_check_index (self, str field_name) |
| str | index_put (self, str index) |
| str | index_get (self, Location location) |
| str | __str__ (self) |
| bool | __eq__ (self, other) |
| int | __hash__ (self) |
Data Fields | |
| declared | |
Static Public Attributes | |
| ARRAY_SIZE_PATTERN = re.compile(r"^([^:]+)(?:\:([^:]+))?$") | |
Protected Attributes | |
| _actual | |
Information about size along one dimension of an array or other sized field type. Contains both the declared / maximum size, and the actual used size (if different).
Definition at line 454 of file generate_packets.py.
Definition at line 475 of file generate_packets.py.
| bool generate_packets.SizeInfo.__eq__ | ( | self, | |
| other | |||
| ) |
Definition at line 576 of file generate_packets.py.
| int generate_packets.SizeInfo.__hash__ | ( | self | ) |
Definition at line 582 of file generate_packets.py.
| str generate_packets.SizeInfo.__str__ | ( | self | ) |
Definition at line 571 of file generate_packets.py.
Return a code expression representing the actual size for the given packet
Definition at line 487 of file generate_packets.py.
| bool generate_packets.SizeInfo.constant | ( | self | ) |
Whether the actual size doesn't change
Definition at line 483 of file generate_packets.py.
Generate a code snippet reading the next index from the network input decoded as the correct type
Definition at line 549 of file generate_packets.py.
Generate a code snippet writing the given value to the network output, encoded as the appropriate index type
Definition at line 529 of file generate_packets.py.
| str generate_packets.SizeInfo.old | ( | self | ) |
The number of elements transmitted last time. Either the same as the declared size, or a field of `*old`.
Definition at line 501 of file generate_packets.py.
| "SizeInfo" generate_packets.SizeInfo.parse | ( | cls, | |
| size_text | |||
| ) |
Parse the given array size text (without brackets)
Definition at line 468 of file generate_packets.py.
| str generate_packets.SizeInfo.real | ( | self | ) |
The number of elements to transmit. Either the same as the declared size, or a field of `*real_packet`.
Definition at line 495 of file generate_packets.py.
Generate a code snippet checking whether the received size is in range when receiving a packet.
Definition at line 506 of file generate_packets.py.
Generate a code snippet asserting that indices can be correctly transmitted for array-diff.
Definition at line 517 of file generate_packets.py.
|
protected |
Definition at line 478 of file generate_packets.py.
|
static |
Definition at line 459 of file generate_packets.py.
| generate_packets.SizeInfo.declared |
Definition at line 476 of file generate_packets.py.