Freeciv-3.2
|
Public Member Functions | |
__init__ (self, str name, "str | None" location=None, int depth=0) | |
"Location" | deeper (self, str new_location) |
str | index (self) |
"Location" | sub (self) |
str | __str__ (self) |
str | __repr__ (self) |
Data Fields | |
name | |
location | |
depth | |
Protected Attributes | |
_INDICES | |
Static Protected Attributes | |
str | _INDICES = "ijk" |
Roughly represents a location in memory for the generated code; outside of recursive field types like arrays, this will usually just be a field of a packet, but it serves to concisely handle the recursion.
Definition at line 350 of file generate_packets.py.
Definition at line 357 of file generate_packets.py.
str generate_packets.Location.__repr__ | ( | self | ) |
Definition at line 392 of file generate_packets.py.
str generate_packets.Location.__str__ | ( | self | ) |
Definition at line 389 of file generate_packets.py.
"Location" generate_packets.Location.deeper | ( | self, | |
str | new_location | ||
) |
Return the given string as a new Location with the same name as self and incremented depth
Definition at line 369 of file generate_packets.py.
str generate_packets.Location.index | ( | self | ) |
The index name for the current depth
Definition at line 375 of file generate_packets.py.
"Location" generate_packets.Location.sub | ( | self | ) |
A location one level deeper with the current index subscript added to the end. `field` ~> `field[i]` ~> `field[i][j]` etc.
Definition at line 382 of file generate_packets.py.
|
staticprotected |
Definition at line 355 of file generate_packets.py.
|
protected |
Definition at line 377 of file generate_packets.py.
generate_packets.Location.depth |
Definition at line 365 of file generate_packets.py.
generate_packets.Location.location |
Definition at line 361 of file generate_packets.py.
generate_packets.Location.name |
Definition at line 358 of file generate_packets.py.