Freeciv-3.3
Loading...
Searching...
No Matches
Data Structures | Functions | Variables
generate_packets Namespace Reference

Data Structures

class  ArrayType
 
class  BasicType
 
class  BitvectorType
 
class  BoolType
 
class  CmParameterType
 
class  Directions
 
class  Field
 
class  FieldFlags
 
class  FieldType
 
class  FloatType
 
class  IntType
 
class  Location
 
class  MemoryType
 
class  NeedSizeType
 
class  Packet
 
class  PacketsDefinition
 
class  RawFieldType
 
class  ScriptConfig
 
class  SequenceType
 
class  SizedType
 
class  SizeInfo
 
class  SpecvecType
 
class  StringType
 
class  StructType
 
class  StrvecType
 
class  TypeRegistry
 
class  Variant
 
class  WorklistType
 

Functions

Path file_path ("str | Path" s)
 Parsing Command Line Arguments ######################.
 
bool files_equal ("str | Path" path_a, "str | Path" path_b)
 
"typing.Iterator[tuple[T_co, ...]]" powerset (typing.Iterable[T_co] iterable)
 
str prefix (str prefix, str text)
 
RawFieldType string_type_ctor (str dataio_type, str public_type)
 
 write_common_header ("str | Path | None" path, PacketsDefinition packets)
 
 write_common_impl ("str | Path | None" path, PacketsDefinition packets)
 
 write_server_header ("str | Path | None" path, PacketsDefinition packets)
 
 write_client_header ("str | Path | None" path, PacketsDefinition packets)
 
 write_server_impl ("str | Path | None" path, PacketsDefinition packets)
 
 write_client_impl ("str | Path | None" path, PacketsDefinition packets)
 
 main ("typing.Sequence[str] | None" raw_args=None)
 

Variables

 cache = lru_cache(None)
 
 T_co = typing.TypeVar("T_co", covariant = True)
 
str INSERT_PREFIX_PATTERN = re.compile(r"^(?!#|$)", re.MULTILINE)
 

Function Documentation

◆ file_path()

Path generate_packets.file_path ( "str | Path"  s)

Parsing Command Line Arguments ######################.

Parse the given path and check basic validity.

Definition at line 42 of file generate_packets.py.

◆ files_equal()

bool generate_packets.files_equal ( "str | Path"  path_a,
"str | Path"  path_b 
)
Return whether the contents of two text files are identical

Definition at line 324 of file generate_packets.py.

◆ main()

generate_packets.main ( "typing.Sequence[str] | None"   raw_args = None)
Main function. Read the given arguments, or the command line
arguments if raw_args is not given, and run the packet code generation
script accordingly.

Definition at line 4516 of file generate_packets.py.

◆ powerset()

"typing.Iterator[tuple[T_co, ...]]" generate_packets.powerset ( typing.Iterable[T_co iterable)

Definition at line 330 of file generate_packets.py.

◆ prefix()

str generate_packets.prefix ( str  prefix,
str  text 
)
Prepend prefix to every line of text, except blank lines and those
starting with #

Definition at line 339 of file generate_packets.py.

◆ string_type_ctor()

RawFieldType generate_packets.string_type_ctor ( str  dataio_type,
str  public_type 
)
Field type constructor for both strings and string vectors

Definition at line 2075 of file generate_packets.py.

◆ write_client_header()

generate_packets.write_client_header ( "str | Path | None"  path,
PacketsDefinition  packets 
)
Write contents for client/packhand_gen.h to the given path

Definition at line 4385 of file generate_packets.py.

◆ write_client_impl()

generate_packets.write_client_impl ( "str | Path | None"  path,
PacketsDefinition  packets 
)
Write contents for client/packhand_gen.c to the given path

Definition at line 4469 of file generate_packets.py.

◆ write_common_header()

generate_packets.write_common_header ( "str | Path | None"  path,
PacketsDefinition  packets 
)
Write contents for common/packets_gen.h to the given path

Definition at line 4234 of file generate_packets.py.

◆ write_common_impl()

generate_packets.write_common_impl ( "str | Path | None"  path,
PacketsDefinition  packets 
)
Write contents for common/packets_gen.c to the given path

Definition at line 4269 of file generate_packets.py.

◆ write_server_header()

generate_packets.write_server_header ( "str | Path | None"  path,
PacketsDefinition  packets 
)
Write contents for server/hand_gen.h to the given path

Definition at line 4343 of file generate_packets.py.

◆ write_server_impl()

generate_packets.write_server_impl ( "str | Path | None"  path,
PacketsDefinition  packets 
)
Write contents for server/hand_gen.c to the given path

Definition at line 4417 of file generate_packets.py.

Variable Documentation

◆ cache

generate_packets.cache = lru_cache(None)

Definition at line 33 of file generate_packets.py.

◆ INSERT_PREFIX_PATTERN

str generate_packets.INSERT_PREFIX_PATTERN = re.compile(r"^(?!#|$)", re.MULTILINE)

Definition at line 335 of file generate_packets.py.

◆ T_co

generate_packets.T_co = typing.TypeVar("T_co", covariant = True)

Definition at line 37 of file generate_packets.py.