Skip to content

Add connection type validation #24

Description

@Konstantysz

Problem

Users can connect incompatible pins (e.g., int output to cv::Mat input), causing runtime errors or crashes.

Proposal

Add compile-time or runtime type checking before allowing connections.

Approach 1 (Runtime)

  • Add Slot::GetDataType() -> std::type_index
  • Check compatibility in ConnectionManager::TryConnect()
  • Show error tooltip if types mismatch

Approach 2 (Compile-time)

  • Template Slot<T> with data type
  • Type checking via concepts

Future Extension

Auto-insert conversion nodes (e.g., Int→Float adapter).

Acceptance Criteria

  • Connecting Mat→int shows error "Type mismatch: cv::Mat cannot connect to int"
  • Compatible types (Mat→Mat) connect normally

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions