Files
ResInsight/ApplicationLibCode/ProjectDataModel/Workflow/RimWorkflowVec3Binding.h
T
Magne Sjaastad 9bfd91df90 Workflows: Add RimWorkflowVec3Binding for Vec3-typed config fields
Recognizes Vec3-shaped object schemas ({x, y, z} number properties)
structurally in RimWorkflowDescribeTools and dispatches them to a new
RimWorkflowVec3Binding in RimWorkflowTaskInput::createBinding(). Stores
the value as a cvf::Vec3d field, parses JSON object defaults, and emits
a YAML flow-mapping ({x: .., y: .., z: ..}) matching the taskmaestro
Vec3 pydantic model shape.
2026-10-05 19:56:36 +02:00

42 lines
1.2 KiB
C++

/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2026 Equinor ASA
//
// ResInsight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#pragma once
#include "RimWorkflowFieldBinding.h"
#include "cafPdmFieldCvfVec3d.h"
#include "cvfVector3.h"
class RimWorkflowVec3Binding : public RimWorkflowFieldBinding
{
CAF_PDM_HEADER_INIT;
public:
RimWorkflowVec3Binding();
void applySchema( const QJsonObject& fieldSchema ) override;
QString toYamlValue() const override;
caf::PdmFieldHandle* valueField() override { return &m_value; }
private:
caf::PdmField<cvf::Vec3d> m_value;
};