def fields(self): h = self.F("header", RecordHeader()) if h.data["tagcode"] == 39: self.F("content", DefineSprite()) elif h.data["tagcode"] == 26: self.F("content", PlaceObject2()) elif h.data["tagcode"] == 82: self.F("content", DoABC()) else: self.F("content", Blob(h.data["length"]))
def fields(self, const): self.F("method", U30()) self.F("max_stack", U30()) self.F("local_count", U30()) self.F("init_scope_depth", U30()) self.F("max_scope_depth", U30()) c = self.F("code_length", U30()) self.F("code", Blob(c.data)) c = self.F("exception_count", U30()) self.F("exception", Array(c.data, lambda: Exception(const))) c = self.F("trait_count", U30()) self.F("trait", Array(c.data, lambda: Trait(const)))
def __init__(self): Blob.__init__(self, 16)
def pack_data(self, s, data): Blob.pack_data(self, s, UUID(data).bytes)
def unpack_data(self, s): data = Blob.unpack_data(self, s) return UUID(bytes=data).urn