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

attributeInterface.py (1854B)


      1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\packages\dogma\attributes\attributeInterface.py
      2 from dogma.dogmaLogging import LogWarn, LogTraceback
      3 
      4 class AttributeInterface(object):
      5     __slots__ = ['__weakref__']
      6 
      7     def __str__(self):
      8         return self.__class__.__name__
      9 
     10     def __repr__(self):
     11         return '<' + self.__str__() + ' at ' + '0x%x' % id(self) + '>'
     12 
     13     def friendlyStr(self):
     14         return str(self)
     15 
     16     def performantStr(self):
     17         return str(self)
     18 
     19     def AddModifierTo(self, operation, toAttrib):
     20         self.AddOutgoingModifier(operation, toAttrib)
     21         toAttrib.AddIncomingModifier(operation, self)
     22 
     23     def RemoveModifierTo(self, operation, toAttrib):
     24         self.RemoveOutgoingModifier(operation, toAttrib)
     25         toAttrib.RemoveIncomingModifier(operation, self)
     26 
     27     def GetIncomingModifiers(self):
     28         return []
     29 
     30     def GetOutgoingModifiers(self):
     31         return []
     32 
     33     def RemoveAllModifiers(self):
     34         pass
     35 
     36     def IsAnOrphan(self):
     37         return False
     38 
     39     def CheckIntegrity(self):
     40         if self.IsAnOrphan():
     41             LogWarn("CheckIntegrity: 'Orphan' Attribute detected (its dogmaItem has gone!):", self)
     42             LogWarn('TraceReferrers is BEING SUPPRESSED in case it overloads the node! (Sorry)')
     43             LogTraceback('Orphan Attribute!')
     44             return False
     45         else:
     46             return True
     47 
     48     def GetBaseValue(self):
     49         return '<no base value reported>'
     50 
     51     def GetValue(self):
     52         return '<no value reported>'
     53 
     54     def AddOutgoingModifier(self, operation, toAttrib):
     55         raise NotImplementedError('AttributeInterface does not implement AddOutgoingModifier')
     56 
     57     def RemoveOutgoingModifier(self, operation, toAttrib):
     58         raise NotImplementedError('AttributeInterface does not implement RemoveOutgoingModifier')