Freeciv-3.2
Loading...
Searching...
No Matches
Public Member Functions | Data Fields | Static Public Attributes
generate_packets.FloatType Class Reference
+ Inheritance diagram for generate_packets.FloatType:

Public Member Functions

 __init__ (self, str dataio_info, str public_type)
 
 __init__ (self, "re.Match[str]" dataio_info, str public_type)
 
 __init__ (self, "str | re.Match[str]" dataio_info, str public_type)
 
str get_code_put (self, Location location, bool deep_diff=False)
 
str get_code_get (self, Location location, bool deep_diff=False)
 
str __str__ (self)
 
- Public Member Functions inherited from generate_packets.BasicType
str get_code_declaration (self, Location location)
 
str get_code_handle_param (self, Location location)
 
str get_code_fill (self, Location location)
 
str get_code_hash (self, Location location)
 
str get_code_cmp (self, Location location)
 
- Public Member Functions inherited from generate_packets.FieldType
"FieldType" array (self, SizeInfo size)
 
str get_code_handle_arg (self, Location location)
 
- Public Member Functions inherited from generate_packets.RawFieldType
str __repr__ (self)
 

Data Fields

 float_factor
 
- Data Fields inherited from generate_packets.BasicType
 dataio_type
 
 public_type
 

Static Public Attributes

 TYPE_PATTERN = re.compile(r"^([su]float)(\d+)?$")
 
- Static Public Attributes inherited from generate_packets.FieldType
bool foldable = False
 

Detailed Description

Type information for a float field

Definition at line 840 of file generate_packets.py.

Constructor & Destructor Documentation

◆ __init__() [1/3]

generate_packets.FloatType.__init__ (   self,
str  dataio_info,
str  public_type 
)

Reimplemented from generate_packets.BasicType.

Definition at line 855 of file generate_packets.py.

◆ __init__() [2/3]

generate_packets.FloatType.__init__ (   self,
"re.Match[str]"  dataio_info,
str  public_type 
)

Reimplemented from generate_packets.BasicType.

Definition at line 857 of file generate_packets.py.

◆ __init__() [3/3]

generate_packets.FloatType.__init__ (   self,
"str | re.Match[str]"  dataio_info,
str  public_type 
)

Reimplemented from generate_packets.BasicType.

Definition at line 858 of file generate_packets.py.

Member Function Documentation

◆ __str__()

str generate_packets.FloatType.__str__ (   self)

Reimplemented from generate_packets.BasicType.

Definition at line 888 of file generate_packets.py.

◆ get_code_get()

str generate_packets.FloatType.get_code_get (   self,
Location  location,
bool   deep_diff = False 
)
Generate a code snippet reading a field of this type from the
dataio stream.

Reimplemented from generate_packets.BasicType.

Definition at line 881 of file generate_packets.py.

◆ get_code_put()

str generate_packets.FloatType.get_code_put (   self,
Location  location,
bool   deep_diff = False 
)
Generate a code snippet writing a field of this type to the
dataio stream.

Reimplemented from generate_packets.BasicType.

Definition at line 876 of file generate_packets.py.

Field Documentation

◆ float_factor

generate_packets.FloatType.float_factor

Definition at line 872 of file generate_packets.py.

◆ TYPE_PATTERN

generate_packets.FloatType.TYPE_PATTERN = re.compile(r"^([su]float)(\d+)?$")
static

Definition at line 843 of file generate_packets.py.