Ejemplo n.º 1
0
 def declareAsset(self, obj):
     isNew = (obj.type not in self.assetsByType) or (
         obj not in self.assetsByType[obj.type])
     Environment.declareAsset(self, obj)
     if isNew:
         self.observers.notifyObservers(
             Notification(self, Notification.ntNEWASSET, obj))
Ejemplo n.º 2
0
 def undeclareAsset(self, obj):
     isDead = (obj.type
               in self.assetsByType) and (obj
                                          in self.assetsByType[obj.type])
     Environment.undeclareAsset(self, obj)
     if isDead:
         self.observers.notifyObservers(
             Notification(self, Notification.ntDEADASSET, obj))
Ejemplo n.º 3
0
 def __init__(self):
     Environment.__init__(self)
     self.observers = Observable()
Ejemplo n.º 4
0
	def undeclareAsset(self, obj):
		isDead = (obj.type in self.assetsByType) and (obj in self.assetsByType[obj.type])
		Environment.undeclareAsset(self, obj)
		if isDead:
			self.observers.notifyObservers(Notification(self, Notification.ntDEADASSET, obj))
Ejemplo n.º 5
0
	def declareAsset(self, obj):
		isNew = (obj.type not in self.assetsByType) or (obj not in self.assetsByType[obj.type])
		Environment.declareAsset(self, obj)
		if isNew:
			self.observers.notifyObservers(Notification(self, Notification.ntNEWASSET, obj))
Ejemplo n.º 6
0
	def __init__(self):
		Environment.__init__(self)
		self.observers = Observable()