def AddObject(self, name, sources, objtype, **kwargs): add_props = {'sources': sources} table = ParsePropertyTable(kwargs) for k, v in table.iteritems(): add_props[k] = add_props.get(k, []) + v # For all GN property:value pairs in the environment for k, v in self.add_attributes.iteritems(): add_props[k] = add_props.get(k, []) + v self.tracker.AddObject(name, objtype, add_props, self.del_attributes)
def AddObject(self, name, sources, objtype, **kwargs): add_props = { 'sources': sources } table = ParsePropertyTable(kwargs) for k,v in table.iteritems(): add_props[k] = add_props.get(k, []) + v # For all GN property:value pairs in the environment for k,v in self.add_attributes.iteritems(): add_props[k] = add_props.get(k, []) + v self.tracker.AddObject(name, objtype, add_props, self.del_attributes)
def FilterOut(self, **kwargs): table = ParsePropertyTable(kwargs) for k, v in table.iteritems(): self.del_attributes[k] = self.del_attributes.get(k, []) + v
def Append(self, **kwargs): table = ParsePropertyTable(kwargs) for k, v in table.iteritems(): self.add_attributes[k] = self.add_attributes.get(k, []) + v
def FilterOut(self, **kwargs): table = ParsePropertyTable(kwargs) for k,v in table.iteritems(): self.del_attributes[k] = self.del_attributes.get(k,[]) + v
def Append(self, **kwargs): table = ParsePropertyTable(kwargs) for k,v in table.iteritems(): self.add_attributes[k] = self.add_attributes.get(k,[]) + v