#include "Tool.h" #include "../../Common/DllToolCommon.h" DLL_TOOL_DESC m_Description; /////////////////////////////////////////////////////////////////// // 获取工具描述 const DLL_TOOL_DESC& ToolImpl::Description() { // 生成dll描述 m_Description.Type = TOOL_TYPE::TOOL_TYPE_STANDARD; m_Description.strCategory = ("定位工具"); m_Description.strName = ("ROI"); m_Description.strVersion = ("1.3"); m_Description.strInfo = ("This Info"); return m_Description; } ///////////////////////////////////////////////// // 生成默认的接口描述 void ToolImpl::InitDefaultInterfaces(bool withValue) { // 接口 DLL_INF inf; inf.strName = ("Image.in"); inf.Direction = INF_DIRECTION::INF_DIR_IN; inf.value.passMode = VALUE_PASS_MODE::PASS_BY_VALUE; inf.value.type = VALUE_TYPE::Type_HImage; if (withValue) { inf.value.Ptr = (void**)&((ToolDialogImpl*)m_pDlgTool)->m_Image;// int *m_Value } m_Interfaces.push_back(inf); inf.reset();////////////////////////////////////////////////////////////////////////// inf.strName = ("Image.out"); inf.Direction = INF_DIRECTION::INF_DIR_OUT; inf.value.passMode = VALUE_PASS_MODE::PASS_BY_VALUE; inf.value.type = VALUE_TYPE::Type_HImage; if (withValue) { inf.value.Ptr = (void**)&((ToolDialogImpl*)m_pDlgTool)->m_Image; } m_Interfaces.push_back(inf); inf.reset();////////////////////////////////////////////////////////////////////////// inf.strName = ("HObject_Obj"); inf.Direction = INF_DIRECTION::INF_DIR_OUT; inf.value.passMode = VALUE_PASS_MODE::PASS_BY_VALUE; inf.value.type = VALUE_TYPE::Type_HObject; if (withValue) { inf.value.Ptr = (void**)&((ToolDialogImpl*)m_pDlgTool)->m_hoROI; } m_Interfaces.push_back(inf); inf.reset();////////////////////////////////////////////////////////////////////////// inf.strName = ("HTuple_Msg"); inf.Direction = INF_DIRECTION::INF_DIR_OUT; inf.value.passMode = VALUE_PASS_MODE::PASS_BY_VALUE; inf.value.type = VALUE_TYPE::Type_HTuple; if (withValue) { inf.value.Ptr = (void**)&((ToolDialogImpl*)m_pDlgTool)->m_hvMsg; } m_Interfaces.push_back(inf); inf.reset();////////////////////////////////////////////////////////////////////////// inf.strName = ("QString_Msg"); inf.Direction = INF_DIRECTION::INF_DIR_OUT; inf.value.passMode = VALUE_PASS_MODE::PASS_BY_VALUE; inf.value.type = VALUE_TYPE::Type_String; if (withValue) { inf.value.Ptr = (void**)&((ToolDialogImpl*)m_pDlgTool)->m_strMsg; } m_Interfaces.push_back(inf); inf.reset();////////////////////////////////////////////////////////////////////////// // 2021-12-18 增加复杂控件的索引接口供测试 inf.strName = ("Index.Int"); inf.Direction = INF_DIRECTION::INF_DIR_OUT; inf.value.passMode = VALUE_PASS_MODE::PASS_BY_VALUE; inf.value.type = VALUE_TYPE::Type_Int; if (withValue) { inf.value.Ptr = (void**)&((ToolDialogImpl*)m_pDlgTool)->m_nIndex; } m_Interfaces.push_back(inf); inf.reset(); }