text: #pragma once
  
  #include <QtCore/QObject>
  #include <QtWidgets/QLineEdit>
  #include <nodeeditor/NodeDataModel>
  #include <iostream>
  #include "ShaderDataModel.h"
  #include "DataFloat.h"
  #include "DataAny.h"
  #include "ShaderData.h"
  
  using QtNodes::PortType;
  using QtNodes::PortIndex;
  using QtNodes::NodeData;
  using QtNodes::NodeDataType;
  using QtNodes::NodeDataModel;
  using QtNodes::NodeValidationState;
  
  namespace DataFlowProgramming
  {
  	/// The model dictates the number of inputs and outputs for the Node.
  	class CombineDataModel : public ShaderDataModel
  	{
  		Q_OBJECT
  
  	public:
  		CombineDataModel();
  		virtual ~CombineDataModel() {}
  
  		// caption
  		QString caption() const override { return QStringLiteral("Combine"); }
  
  		// is caption visible
  		bool captionVisible() const override { return true; }
  
  		// name
  		QString name() const override { return QStringLiteral("Combine"); }
  
  		// generate code
  		virtual bool generateCode(ShaderCompiler& compiler) override;
  
  	public:
  		// load|save
  		virtual QJsonObject save() const override;
  		virtual void restore(QJsonObject const& p) override;
  
  	public:
  		// number ports
  		unsigned int nPorts(PortType portType) const override;
  
  		// get port data type
  		NodeDataType dataType(PortType portType, PortIndex portIndex) const override;
  
  		// get port data
  		std::shared_ptr<NodeData> outData(PortIndex port) override;
  
  		// when input changed
  		void setInData(std::shared_ptr<NodeData> nodeData, PortIndex port) override;
  
  		// widget
  		QWidget* embeddedWidget() override { return nullptr; }
  	};
  }
  