Source

lqpl / GUI / src / panels / quantum_stack / descriptor / descriptor_painter_factory.rb

Full commit

class DescriptorPainterFactory
  def self.make_painter(model)
    case model
    when ClassicalDescriptorModel  then ClassicalDescriptorPainter.new(model)
    when DataDescriptorModel       then DataDescriptorPainter.new(model)
    when QubitDescriptorModel      then QubitDescriptorPainter.new(model)
    when ValueDescriptorModel      then ValueDescriptorPainter.new(model)
    when ZeroDescriptorModel       then ZeroDescriptorPainter.new(model)
    end
  end
end