Freeciv-3.2
|
Static Public Attributes | |
COMMENT_START_PATTERN = re.compile(, re.VERBOSE) | |
COMMENT_END_PATTERN = re.compile(, re.VERBOSE) | |
TYPE_PATTERN = re.compile(r"^\s*type\s+(\w+)\s*=\s*(.+?)\s*$") | |
PACKET_HEADER_PATTERN = re.compile(r"^\s*(PACKET_\w+)\s*=\s*(\d+)\s*;\s*(.*?)\s*$") | |
PACKET_END_PATTERN = re.compile(r"^\s*end\s*$") | |
Static Public Attributes inherited from generate_packets.Packet | |
CANCEL_PATTERN = re.compile(r"^cancel\((.*)\)$") | |
str | is_info = "no" |
bool | want_dsend = False |
bool | want_lsend = False |
bool | want_force = False |
bool | want_pre_send = False |
bool | want_post_send = False |
bool | want_post_recv = False |
bool | delta = True |
bool | no_handle = False |
bool | handle_via_packet = True |
bool | handle_per_conn = False |
Protected Member Functions | |
typing.Iterator[str] | _clean_lines (cls, typing.Iterable[str] lines) |
Represents an entire packets definition file
Definition at line 2914 of file generate_packets.py.
generate_packets.PacketsDefinition.__init__ | ( | self, | |
ScriptConfig | cfg, | ||
"TypeRegistry | None" | type_registry = None |
||
) |
Reimplemented from generate_packets.Packet.
Definition at line 3084 of file generate_packets.py.
typing.Iterator[Packet] generate_packets.PacketsDefinition.__iter__ | ( | self | ) |
Definition at line 3121 of file generate_packets.py.
|
protected |
Strip comments and leading/trailing whitespace from the given lines. If a block comment starts in one line and ends in another, the remaining parts are joined together and yielded as one line.
Definition at line 2981 of file generate_packets.py.
"set[str]" generate_packets.PacketsDefinition.all_caps | ( | self | ) |
Set of all capabilities affecting the defined packets
Reimplemented from generate_packets.Packet.
Definition at line 3139 of file generate_packets.py.
str generate_packets.PacketsDefinition.code_delta_stats_report | ( | self | ) |
Code fragment implementing the delta_stats_report() function
Definition at line 3152 of file generate_packets.py.
str generate_packets.PacketsDefinition.code_delta_stats_reset | ( | self | ) |
Code fragment implementing the delta_stats_reset() function
Definition at line 3174 of file generate_packets.py.
str generate_packets.PacketsDefinition.code_enum_packet | ( | self | ) |
Code fragment declaring the packet_type enum
Definition at line 3413 of file generate_packets.py.
str generate_packets.PacketsDefinition.code_packet_functional_capability | ( | self | ) |
Code fragment defining the packet_functional_capability string
Definition at line 3144 of file generate_packets.py.
str generate_packets.PacketsDefinition.code_packet_handlers_fill_capability | ( | self | ) |
Code fragment implementing the packet_handlers_fill_capability() function
Definition at line 3310 of file generate_packets.py.
str generate_packets.PacketsDefinition.code_packet_handlers_fill_initial | ( | self | ) |
Code fragment implementing the packet_handlers_fill_initial() function
Definition at line 3254 of file generate_packets.py.
str generate_packets.PacketsDefinition.code_packet_has_game_info_flag | ( | self | ) |
Code fragment implementing the packet_has_game_info_flag() function
Definition at line 3222 of file generate_packets.py.
str generate_packets.PacketsDefinition.code_packet_name | ( | self | ) |
Code fragment implementing the packet_name() function
Definition at line 3195 of file generate_packets.py.
Define a type alias
Definition at line 3072 of file generate_packets.py.
"typing.Generator[tuple[int, Packet, int], None, int]" generate_packets.PacketsDefinition.iter_by_number | ( | self | ) |
Yield (number, packet, skipped) tuples in order of packet number. skipped is how many numbers were skipped since the last packet Return the maximum packet number (or -1 if there are no packets) when used with `yield from`.
Definition at line 3124 of file generate_packets.py.
generate_packets.PacketsDefinition.parse_clean_lines | ( | self, | |
typing.Iterable[str] | lines | ||
) |
Parse the given lines as type and packet definitions. Comments and blank lines must already be removed beforehand.
Definition at line 3021 of file generate_packets.py.
generate_packets.PacketsDefinition.parse_lines | ( | self, | |
typing.Iterable[str] | lines | ||
) |
Parse the given lines as type and packet definitions.
Definition at line 3017 of file generate_packets.py.
RawFieldType generate_packets.PacketsDefinition.resolve_type | ( | self, | |
str | type_text | ||
) |
Resolve the given type
Definition at line 3066 of file generate_packets.py.
generate_packets.PacketsDefinition.all_caps |
Definition at line 3149 of file generate_packets.py.
generate_packets.PacketsDefinition.cfg |
Definition at line 3050 of file generate_packets.py.
|
static |
Definition at line 2944 of file generate_packets.py.
|
static |
Definition at line 2917 of file generate_packets.py.
|
static |
Definition at line 2977 of file generate_packets.py.
|
static |
Definition at line 2969 of file generate_packets.py.
generate_packets.PacketsDefinition.packets |
Definition at line 3096 of file generate_packets.py.
generate_packets.PacketsDefinition.packets_by_dirs |
Definition at line 3111 of file generate_packets.py.
generate_packets.PacketsDefinition.packets_by_number |
Definition at line 3106 of file generate_packets.py.
generate_packets.PacketsDefinition.packets_by_type |
Definition at line 3101 of file generate_packets.py.
generate_packets.PacketsDefinition.resolve_type |
Definition at line 3055 of file generate_packets.py.
|
static |
Definition at line 2962 of file generate_packets.py.
generate_packets.PacketsDefinition.type_registry |
Definition at line 3087 of file generate_packets.py.
generate_packets.PacketsDefinition.types |
Definition at line 3091 of file generate_packets.py.