Exemple #1
0
Fichier : aaa.py Projet : vavan/eia
 def get_allowed(self, clients, providers):
     allowed_points = PointList()
     for p in providers:
         allowed_points.append( ProviderPoint(p.iface) )
     for c in clients:
         if self.is_allowed(c):
             for a in c.addresses:
                 client_point = ClientPoint(a.ip)
                 client_point.set_mac(a.mac)
                 client_point.set_channel(c.rate.channel)
                 allowed_points.append( client_point )
     return allowed_points
Exemple #2
0
class Polygon (SpatialData):
    def __init__ (self, data, source):
        SpatialData.__init__ (self, source)
        self.points = PointList ()
        self.update (data)

    def pushPoints (self, pointList):
        raise NotImplementedError ()

    def compute (self, instruction):
        if instruction.mode is enum.EXTERN:
            value = self.points.compute (instruction)
            if value != None:
                self.update ([(instruction.dst, value)])
        else:
            try:
                SpatialData.compute (self, instruction)
            except:
                self.points.compute (instruction)

    """"def __getitem__ (self, key):
Exemple #3
0
class Polygon(SpatialData):
    def __init__(self, data, source):
        SpatialData.__init__(self, source)
        self.points = PointList()
        self.update(data)

    def pushPoints(self, pointList):
        raise NotImplementedError()

    def compute(self, instruction):
        if instruction.mode is enum.EXTERN:
            value = self.points.compute(instruction)
            if value != None:
                self.update([(instruction.dst, value)])
        else:
            try:
                SpatialData.compute(self, instruction)
            except:
                self.points.compute(instruction)

    """"def __getitem__ (self, key):
Exemple #4
0
 def __init__ (self, data, source):
     SpatialData.__init__ (self, source)
     self.points = PointList ()
     self.update (data)
Exemple #5
0
 def __init__(self, data, source):
     SpatialData.__init__(self, source)
     self.points = PointList()
     self.update(data)