Example #1
0
 def read(self, input_stream):
     self.ints = []
     count = et.read_int32(input_stream)
     for i in range(count):
         e = et.read_int32(input_stream)
         self.ints.append(e)
     return
Example #2
0
 def read(self, input_stream):
     self.ids = []
     count = et.read_int32(input_stream)
     for i in range(count):
         eid = wm.EntityID(et.read_int32(input_stream))
         self.ids.append(eid)
     return
Example #3
0
 def read(self, input_stream):
     key_count = et.read_int32(input_stream)
     self.config = con.Config()
     for i in range(key_count):
         key = et.read_str(input_stream)
         value = et.read_str(input_stream)
         self.config.set_value(key, value)
Example #4
0
 def read(self, input_stream):
     self.data = []
     count = et.read_int32(input_stream)
     for i in range(count):
         f = et.read_float32(input_stream)
         self.data.append(f)
     return
Example #5
0
 def read(self, inp):
     count = et.read_int32(inp)
     for i in range(count):
         p = et.read_property(inp)
         # print('property value:' + str(p.get_value()))
         if p is not None:
             existing = self.get_property(p.get_urn())
             existing.take_value(p)
Example #6
0
    def read(self, input_stream):
        self.changed.clear()
        self.deleted.clear()
        self.entity_urns.clear()

        entity_count = et.read_int32(input_stream)
        for i in range(entity_count):
            entity_id = wm.EntityID(et.read_int32(input_stream))
            entity_urn = et.read_str(input_stream)
            property_count = et.read_int32(input_stream)
            for j in range(property_count):
                property = et.read_property(input_stream)
                if property is not None:
                    self.add_change(entity_id, entity_urn, property)

        deleted_count = et.read_int32(input_stream)
        for i in range(deleted_count):
            entity_id = wm.EntityID(et.read_int32(input_stream))
            self.entity_deleted(entity_id)
Example #7
0
 def read(self, input_stream):
     count = et.read_int32(input_stream)
     self.value = []
     for i in range(count):
         start_x = et.read_int32(input_stream)
         start_y = et.read_int32(input_stream)
         end_x = et.read_int32(input_stream)
         end_y = et.read_int32(input_stream)
         n_id = et.read_int32(input_stream)
         neighbor = None
         if n_id != 0:
             neighbor = wm.EntityID(n_id)
         self.value.append(wm.Edge(start_x, start_y, end_x, end_y, neighbor))
Example #8
0
 def read(self, input_stream):
     self.value_list = []
     list_len = et.read_int32(input_stream)
     for i in range(list_len):
         self.value_list.append(et.read_str(input_stream))
Example #9
0
 def read(self, input_stream):
     data_size = et.read_int32(input_stream)
     self.byte_data = input_stream.read(data_size)
Example #10
0
 def read(self, input_stream):
     self.commands = []
     command_count = et.read_int32(input_stream)
     for i in range(command_count):
         command = et.read_msg(input_stream)
         self.commands.append(command)
Example #11
0
 def read(self, input_stream):
     self.value = et.read_int32(input_stream)
Example #12
0
 def read(self, input_stream):
     self.value = wm.EntityID(et.read_int32(input_stream))
Example #13
0
 def read(self, input_stream):
     self.value = []
     count = et.read_int32(input_stream)
     for i in range(count):
         e_id = wm.EntityID(et.read_int32(input_stream))
         self.value.append(e_id)
Example #14
0
 def read(self, input_stream):
     self.value = []
     count = et.read_int32(input_stream)
     for i in range(count):
         int_val = et.read_int32(input_stream)
         self.value.append(int_val)
Example #15
0
 def read(self, input_stream):
     tmp_value = et.read_int32(input_stream)
     if tmp_value == 0:
         self.value = False
     elif tmp_value == 1:
         self.value = True