Exemplo n.º 1
0
 def add_direct_out(self, mapping):
     if not mapping:
         self.remove_direct_out()
         return
     direct_out = Direct(self, mapping, is_input=False)
     if self.direct_out is not None:
         self.direct_out._free()
     self._direct_out = direct_out
     if self.is_allocated:
         self._direct_out._allocate()
Exemplo n.º 2
0
 def add_direct_in(self, mapping):
     if not mapping:
         self.remove_direct_in()
         return
     direct_in = Direct(self, mapping, is_input=True)
     if self.direct_in is not None:
         self.direct_in._free()
     self._direct_in = direct_in
     if self.is_allocated:
         self._direct_in._allocate()