ToolInterface.cpp 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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 = ("Blob");
  12. m_Description.strAliasName = "Blob";
  13. m_Description.strVersion = ("1.1");
  14. m_Description.strInfo = ("斑点工具");
  15. return m_Description;
  16. }
  17. /////////////////////////////////////////////////
  18. // 生成默认的接口描述
  19. void ToolImpl::InitDefaultInterfaces(bool withValue)
  20. {
  21. // 接口
  22. DLL_INF inf;
  23. inf.strName = ("Image");
  24. inf.Direction = INF_DIRECTION::INF_DIR_IN;
  25. inf.Type = INF_TYPE::INF_TYPE_STANDARD;
  26. inf.value.passMode = VALUE_PASS_MODE::PASS_BY_VALUE;
  27. inf.value.type = VALUE_TYPE::Type_HImage;
  28. if (withValue)
  29. {
  30. inf.value.Ptr = (void**)&((ToolDialogImpl*)m_pDlgTool)->m_Image;
  31. }
  32. m_Interfaces.push_back(inf);
  33. inf.reset();//////////////////////////////////////////////////////////////////////////
  34. }