MCPcopy Create free account
hub / github.com/chronoxor/FastBinaryEncoding / get_fields

Method get_fields

projects/Python/proto/proto.py:1344–1357  ·  view source on GitHub ↗
(self, fbe_value, fbe_struct_size)

Source from the content-addressed store, hash-verified

1342
1343 # Get the struct fields values
1344 def get_fields(self, fbe_value, fbe_struct_size):
1345 fbe_current_size = 4 + 4
1346
1347 if (fbe_current_size + self.currency.fbe_size) <= fbe_struct_size:
1348 fbe_value.currency = self.currency.get()
1349 else:
1350 fbe_value.currency = ""
1351 fbe_current_size += self.currency.fbe_size
1352
1353 if (fbe_current_size + self.amount.fbe_size) <= fbe_struct_size:
1354 fbe_value.amount = self.amount.get(float(0.0))
1355 else:
1356 fbe_value.amount = float(0.0)
1357 fbe_current_size += self.amount.fbe_size
1358
1359 # Set the struct value (begin phase)
1360 def set_begin(self):

Callers 1

getMethod · 0.95

Calls 1

getMethod · 0.45

Tested by

no test coverage detected