def write(self, output_stream): keys = self.config.get_keys() et.write_int32(len(keys), output_stream) for key in keys: value = self.config.get_value(key) et.write_str(key, output_stream) et.write_str(value, output_stream)
def write(self, out): count = 0 for p in self.properties: if p.is_defined(): count += 1 et.write_int32(count, out) for p in self.properties: if p.is_defined(): et.write_property(p, out)
def send_msg(self, msg): tmp_output_stream = OutputStream() write_msg(msg, tmp_output_stream) write_int32(0, tmp_output_stream) msg_data = tmp_output_stream.getvalue() output_stream = OutputStream() # first write the size of the message write_int32(len(msg_data), output_stream) output_stream.write(msg_data) self.send_bytes(output_stream.getvalue())
def write(self, output_stream): et.write_int32(len(self.changed), output_stream) for entity_id in self.changed: et.write_int32(entity_id.get_value(), output_stream) et.write_str(self.get_entity_urn(entity_id), output_stream) properties = self.changed[entity_id].values() et.write_int32(len(properties), output_stream) for property in properties: et.write_property(property, output_stream) et.write_int32(len(self.deleted), output_stream) for entity_id in self.deleted: et.write_int32(entity_id.get_value(), output_stream)
def write(self, output_stream): et.write_int32(len(self.byte_data), output_stream) output_stream.write(self.byte_data)
def write(self, output_stream): et.write_int32(len(self.data), output_stream) for f in self.data: et.write_float32(f, output_stream) return
def write(self, output_stream): et.write_int32(len(self.commands), output_stream) for command in self.commands: et.write_msg(command, output_stream)
def write(self, output_stream): et.write_int32(len(self.ints), output_stream) for nt in self.ints: et.write_int32(nt, output_stream) return
def write(self, output_stream): et.write_int32(len(self.ents), output_stream) for ent in self.ents: et.write_entity(ent, output_stream)
def write(self, output_stream): et.write_int32(self.value, output_stream)
def write(self, output_stream): et.write_int32(self.value.get_value(), output_stream)
def write(self, output_stream): et.write_int32(len(self.value), output_stream) for id in self.value: et.write_int32(id.get_value(), output_stream)
def write(self, output_stream): et.write_int32(len(self.value), output_stream) for edge in self.value: et.write_int32(edge.get_start_x(), output_stream) et.write_int32(edge.get_start_y(), output_stream) et.write_int32(edge.get_end_x(), output_stream) et.write_int32(edge.get_end_y(), output_stream) if edge.get_neighbor() is None: et.write_int32(0, output_stream) else: et.write_int32(edge.get_neighbor().get_value(), output_stream)
def write(self, output_stream): et.write_int32(len(self.value), output_stream) for int_val in self.value: et.write_int32(int_val, output_stream)
def write(self, output_stream): if self.value: et.write_int32(1, output_stream) else: et.write_int32(0, output_stream)
def write(self, output_stream): et.write_int32(len(self.value_list), output_stream) for value in self.value_list: et.write_str(value, output_stream)
def write(self, output_stream): et.write_int32(len(self.ids), output_stream) for eid in self.ids: et.write_int32(eid.get_value(), output_stream) return