ToolInterface.cpp 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #include "Tool.h"
  2. #include "../../Common/DllToolCommon.h"
  3. DLL_TOOL_DESC m_Description;
  4. ///////////////////////////////////////////////////////////////////
  5. // 获取工具描述
  6. const DLL_TOOL_DESC& ToolImpl::Description()
  7. {
  8. // 生成dll描述
  9. m_Description.Type = TOOL_TYPE::TOOL_TYPE_STANDARD;
  10. m_Description.strCategory = ("预先处理");
  11. m_Description.strName = ("CroppingImage");
  12. m_Description.strVersion = ("1.3");
  13. m_Description.strInfo = ("This Info");
  14. return m_Description;
  15. }
  16. /////////////////////////////////////////////////
  17. // 生成默认的接口描述
  18. void ToolImpl::InitDefaultInterfaces(bool withValue)
  19. {
  20. // 接口
  21. DLL_INF inf;
  22. inf.strName = ("Image");
  23. inf.Direction = INF_DIRECTION::INF_DIR_IN;
  24. inf.value.passMode = VALUE_PASS_MODE::PASS_BY_VALUE;
  25. inf.value.type = VALUE_TYPE::Type_HImage;
  26. if (withValue)
  27. {
  28. inf.value.Ptr = (void**)&((ToolDialogImpl*)m_pDlgTool)->m_Image;// int *m_Value
  29. }
  30. m_Interfaces.push_back(inf);
  31. inf.reset();//////////////////////////////////////////////////////////////////////////
  32. inf.strName = ("Image1");
  33. inf.Direction = INF_DIRECTION::INF_DIR_OUT;
  34. inf.value.passMode = VALUE_PASS_MODE::PASS_BY_VALUE;
  35. inf.value.type = VALUE_TYPE::Type_HImage;
  36. if (withValue)
  37. {
  38. inf.value.Ptr = (void**)&((ToolDialogImpl*)m_pDlgTool)->m_OutImage;
  39. }
  40. m_Interfaces.push_back(inf);
  41. inf.reset();//////////////////////////////////////////////////////////////////////////
  42. inf.strName = ("CroppingImage");
  43. inf.Direction = INF_DIRECTION::INF_DIR_OUT;
  44. inf.value.passMode = VALUE_PASS_MODE::PASS_BY_VALUE;
  45. inf.value.type = VALUE_TYPE::Type_HImage;
  46. if (withValue)
  47. {
  48. inf.value.Ptr = (void**)&((ToolDialogImpl*)m_pDlgTool)->m_CroppingImage;
  49. }
  50. m_Interfaces.push_back(inf);
  51. inf.reset();//////////////////////////////////////////////////////////////////////////
  52. }