parameters: (self, parent)
docstring: Make a new block from nested data.
docstring_summary: Make a new block from nested data.
docstring_tokens: Make a new block from nested data .
function: def __init__(self, parent):
          """Make a new block from nested data."""
          super(Block, self).__init__(parent)
          param_factory = self.parent_platform.make_param
          port_factory = self.parent_platform.make_port
  
          self.params = collections.OrderedDict(
              (data['id'], param_factory(parent=self, **data))
              for data in self.parameters_data
          )
          if self.key == 'options':
              self.params['id'].hide = 'part'
  
          self.sinks = [port_factory(parent=self, **params)
                        for params in self.inputs_data]
          self.sources = [port_factory(parent=self, **params)
                          for params in self.outputs_data]
  
          self.active_sources = []  # on rewrite
          self.active_sinks = []  # on rewrite
  
          self.states = {'state': True, 'bus_source': False,
                         'bus_sink': False, 'bus_structure': None}
          self.block_namespace = {}
          self.deprecated = self.is_deprecated()
  
          if Flags.HAS_CPP in self.flags and self.enabled and not (self.is_virtual_source() or self.is_virtual_sink()):
              # This is a workaround to allow embedded python blocks/modules to load as there is
              # currently 'cpp' in the flags by default caused by the other built-in blocks
              if hasattr(self, 'cpp_templates'):
                  # The original template, in case we have to edit it when transpiling to C++
                  self.orig_cpp_templates = self.cpp_templates
  
          self.current_bus_structure = {'source': None, 'sink': None}
function_tokens: def __init__ ( self , parent ) : super ( Block , self ) . __init__ ( parent ) param_factory = self . parent_platform . make_param port_factory = self . parent_platform . make_port self . params = collections . OrderedDict ( ( data [ 'id' ] , param_factory ( parent = self , * * data ) ) for data in self . parameters_data ) if self . key == 'options' : self . params [ 'id' ] . hide = 'part' self . sinks = [ port_factory ( parent = self , * * params ) for params in self . inputs_data ] self . sources = [ port_factory ( parent = self , * * params ) for params in self . outputs_data ] self . active_sources = [ ] # on rewrite self . active_sinks = [ ] # on rewrite self . states = { 'state' : True , 'bus_source' : False , 'bus_sink' : False , 'bus_structure' : None } self . block_namespace = { } self . deprecated = self . is_deprecated ( ) if Flags . HAS_CPP in self . flags and self . enabled and not ( self . is_virtual_source ( ) or self . is_virtual_sink ( ) ) : # This is a workaround to allow embedded python blocks/modules to load as there is # currently 'cpp' in the flags by default caused by the other built-in blocks if hasattr ( self , 'cpp_templates' ) : # The original template, in case we have to edit it when transpiling to C++ self . orig_cpp_templates = self . cpp_templates self . current_bus_structure = { 'source' : None , 'sink' : None }