Freeciv-3.3
|
Additional Inherited Members | |
![]() | |
bool | foldable = False |
bool | complex = False |
![]() | |
str | FieldTypeConstructor = typing.Callable[[str, str], RawFieldType] |
![]() | |
_compat_keys (self, Location location, str packet) | |
Abstract base class (ABC) for field types representing homogenous sequences of elements
Definition at line 1338 of file generate_packets.py.
Generate a code snippet comparing a field of this type between the given packets and setting `differ` accordingly. The `old` packet is one we know to have been initialized by our own code.
Reimplemented from generate_packets.FieldType.
Reimplemented in generate_packets.StrvecType.
Definition at line 1366 of file generate_packets.py.
str generate_packets.SequenceType.get_code_get | ( | self, | |
Location | location, | ||
str | packet, | ||
bool | deep_diff = False |
||
) |
Generate a code snippet reading a field of this type from the dataio stream.
Reimplemented from generate_packets.FieldType.
Definition at line 1758 of file generate_packets.py.
Generate array-diff get code.
Definition at line 1665 of file generate_packets.py.
Generate get code without array-diff.
Definition at line 1622 of file generate_packets.py.
str generate_packets.SequenceType.get_code_put | ( | self, | |
Location | location, | ||
str | packet, | ||
"str | None" | diff_packet = None |
||
) |
Generate a code snippet writing a field of this type to the dataio stream.
Reimplemented from generate_packets.FieldType.
Definition at line 1610 of file generate_packets.py.
str generate_packets.SequenceType.get_code_put_diff | ( | self, | |
Location | location, | ||
str | packet, | ||
str | diff_packet | ||
) |
Generate array-diff put code.
Definition at line 1477 of file generate_packets.py.
Generate put code without array-diff.
Definition at line 1405 of file generate_packets.py.
Generate the loop body for get_code_cmp() This is placed at the very beginning of a scope, so variable declarations are permitted without requiring an extra block.
Reimplemented in generate_packets.ArrayType, generate_packets.SpecvecType, and generate_packets.StrvecType.
Definition at line 1359 of file generate_packets.py.
str generate_packets.SequenceType.inner_get | ( | self, | |
Location | location, | ||
str | packet, | ||
bool | deep_diff = False , |
||
int | json_step = 1 |
||
) |
Generate the main part of the loop body for get_code_get()
Reimplemented in generate_packets.ArrayType, generate_packets.SpecvecType, and generate_packets.StrvecType.
Definition at line 1617 of file generate_packets.py.
str generate_packets.SequenceType.inner_put | ( | self, | |
Location | location, | ||
str | packet, | ||
"str | None" | diff_packet = None , |
||
int | json_step = 1 |
||
) |
Generate the main part of the loop body for get_code_put()
Reimplemented in generate_packets.ArrayType, generate_packets.SpecvecType, and generate_packets.StrvecType.
Definition at line 1400 of file generate_packets.py.
Return a code condition that if TRUE means the field cannot be used normally and should be treated as empty, or None if this never happens
Reimplemented in generate_packets.StrvecType.
Definition at line 1353 of file generate_packets.py.
Return a code snippet updating the size of a field of this type, or the empty string if this type doesn't need to individually transmit and update its size
Reimplemented in generate_packets.SpecvecType, and generate_packets.StrvecType.
Definition at line 1347 of file generate_packets.py.
Return a size info object for a field of this type
Reimplemented in generate_packets.StrvecType, generate_packets.ArrayType, and generate_packets.SpecvecType.
Definition at line 1343 of file generate_packets.py.