You've already forked nodeeditor
mirror of
https://github.com/AxioDL/nodeeditor.git
synced 2026-03-30 11:48:31 -07:00
ddfdaa947d
* Update CMakeLists.txt to modern practices * Add CMake installs() restructure include/ src/ to accomodate it
34 lines
551 B
C++
34 lines
551 B
C++
#pragma once
|
|
|
|
#include <QtCore/QString>
|
|
|
|
#include "Export.hpp"
|
|
|
|
namespace QtNodes
|
|
{
|
|
|
|
struct NodeDataType
|
|
{
|
|
QString id;
|
|
QString name;
|
|
};
|
|
|
|
/// Class represents data transferred between nodes.
|
|
/// @param type is used for comparing the types
|
|
/// The actual data is stored in subtypes
|
|
class NODE_EDITOR_PUBLIC NodeData
|
|
{
|
|
public:
|
|
|
|
virtual ~NodeData() = default;
|
|
|
|
virtual bool sameType(NodeData const &nodeData) const
|
|
{
|
|
return (this->type().id == nodeData.type().id);
|
|
}
|
|
|
|
/// Type for inner use
|
|
virtual NodeDataType type() const = 0;
|
|
};
|
|
}
|