NovaBryan/EVE_Dump
Log | Files | 📦 下载最新源码 (.zip) | Refs | README

attributes.py (1111B)


      1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\packages\imagecaching\client\model\definitions\image\attributes.py
      2 from imagecaching.client.compat import to_text
      3 from imagecaching.client.model.flatbuffer.image_cache_generated import ImageInformation
      4 
      5 class ImageAttributes(object):
      6 
      7     def __init__(self, res_path, e_tag):
      8         self._res_path = res_path
      9         self._e_tag = e_tag
     10 
     11     @property
     12     def res_path(self):
     13         return self._res_path
     14 
     15     @property
     16     def e_tag(self):
     17         return self._e_tag
     18 
     19     @classmethod
     20     def from_flatbuffer(cls, fb_data):
     21         return ImageAttributes(res_path=to_text(fb_data.ResPath()), e_tag=to_text(fb_data.ETag()))
     22 
     23     def __eq__(self, other):
     24         if other is None or not isinstance(other, ImageAttributes):
     25             return False
     26         return self.res_path == other.res_path and self.e_tag == other.e_tag
     27 
     28     def __ne__(self, other):
     29         return not self.__eq__(other)
     30 
     31     def __str__(self):
     32         return 'res_path: %s\n' % self.res_path + 'class: %s\n' % self.__class__.__name__ + 'e_tag: %s' % self.e_tag