コード例 #1
0
 def changeSignal(self, _host, _signal, **params):
     if not arrays_equal(self.__data_vector__.signal, _signal):
         self.__data_vector__.signal = _signal
         for host in self.__data_vector_listeners__:
             if not _host == host:  # to avoid recurrence
                 self.__data_vector_listeners__[host].changeSignal(_signal,
                                                                  **params)
コード例 #2
0
 def changeAnnotation(self, _host, _annotation, **params):
     if not arrays_equal(self.__data_vector__.annotation, _annotation):
         self.__data_vector__.annotation = _annotation
         for host in self.__data_vector_listeners__:
             if not _host == host:  # to avoid recurrence
                 self.__data_vector_listeners__[host].changeAnnotation(
                                                     _annotation, **params)
コード例 #3
0
 def restore(self, **params):
     """
     method used to be invoked to restore original state of data vector
     """
     if arrays_equal(self.__data_vector__.signal,
                     self.__data_vector0__.signal) and \
        arrays_equal(self.__data_vector__.annotation,
                      self.__data_vector0__.annotation):
         return
     self.__data_vector__ = None
     gc.collect()  # to force garbage collection
     self.__data_vector__ = self.__data_vector0__.copy()
     for host in self.__data_vector_listeners__:
         self.__data_vector_listeners__[host].changeSignal(
                                 self.__data_vector__.signal, **params)
         self.__data_vector_listeners__[host].changeAnnotation(
                                 self.__data_vector__.annotation, **params)