SapPixPro.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. #ifndef _SAPPIXPRO_H_
  2. #define _SAPPIXPRO_H_
  3. // SapPixPro.h : header file
  4. //
  5. #include "SapClassBasicDef.h"
  6. #include "design.h"
  7. //
  8. // SapPixProParams class declaration
  9. //
  10. class SAPCLASSBASIC_CLASS SapPixProParams
  11. {
  12. public:
  13. SapPixProParams()
  14. { memset(this, 0, sizeof(SapPixProParams)); m_FunctionIndex = -1; }
  15. ~SapPixProParams() {}
  16. int GetFunctionIndex() const { return m_FunctionIndex; }
  17. int GetConfigIndex() const { return m_ConfigIndex; }
  18. int GetBankId() const { return m_BankId; }
  19. BOOL GetRefImage() const { return m_bRefImage; }
  20. int GetWeightingFactor() const { return m_WeightingFactor; }
  21. int GetIntegrateCount() const { return m_IntegrateCount; }
  22. int GetIntegrateFactor() const { return m_IntegrateFactor; }
  23. void SetFunctionIndex(int index) { m_FunctionIndex = index; }
  24. void SetConfigIndex(int index) { m_ConfigIndex = index; }
  25. void SetBankId(int bankId) { m_BankId = bankId; }
  26. void SetRefImage(BOOL isRefImage) { m_bRefImage = isRefImage; }
  27. void SetWeightingFactor(int factor) { m_WeightingFactor = factor; }
  28. void SetIntegrateCount(int count) { m_IntegrateCount = count; }
  29. void SetIntegrateFactor(int factor) { m_IntegrateFactor = factor; }
  30. protected:
  31. int m_FunctionIndex;
  32. int m_ConfigIndex;
  33. int m_BankId;
  34. BOOL m_bRefImage;
  35. int m_WeightingFactor;
  36. int m_IntegrateCount;
  37. int m_IntegrateFactor;
  38. };
  39. //
  40. // SapPixPro class declaration
  41. //
  42. class SAPCLASSBASIC_CLASS SapPixPro : public SapXferNode
  43. {
  44. // Maximum length of name strings
  45. enum MaxValues
  46. {
  47. MaxFuncNameSize = 64,
  48. MaxConfigNameSize = 64
  49. };
  50. public:
  51. // Constructor/Destructor
  52. SapPixPro(SapLocation loc = SapLocation::ServerSystem, const char *fileName = "", SapXferNode *pSrcNode = NULL, SapPixProParams *pParams = NULL);
  53. SapPixPro(SapLocation loc, const char *fileName, SapXferParams xferParams, SapPixProParams *pParams = NULL);
  54. SapPixPro(const SapPixPro &pixpro);
  55. virtual ~SapPixPro();
  56. SapPixPro &operator=(const SapPixPro &pixpro);
  57. // SapXferNode type information
  58. XferNodeType GetXferNodeType() { return NodeTypePixPro; }
  59. // Access to implementation
  60. const char *GetFile() const { return m_FileName; }
  61. virtual BOOL SetFile( const char *fileName);
  62. const SapPixProParams *GetParams() const { return &m_Params; }
  63. virtual BOOL SetParams(const SapPixProParams *pParams);
  64. virtual SapXferParams GetOutputXferParams(int portIndex = 0) const;
  65. virtual BOOL SetOutputXferParams(SapXferParams params, int portIndex = 0);
  66. // Direct capability/parameter access
  67. virtual BOOL GetCapability(int cap, void *pValue);
  68. virtual BOOL GetParameter(int param, void *pValue);
  69. virtual BOOL SetParameter(int param, int value);
  70. virtual BOOL SetParameter(int param, void *pValue);
  71. BOOL ReadDesign(char *fileName);
  72. int GetNumFunctions();
  73. int GetNumConfigs();
  74. // Note: nameSize argument is now obsolete
  75. BOOL GetFunctionInfo(int index, PCORPPL_FCT_PROP pFuncProp, char *funcName, int nameSize = MaxFuncNameSize);
  76. BOOL GetConfigInfo(int index, char *configName, int nameSize = MaxConfigNameSize);
  77. // Module create/destroy
  78. virtual BOOL Create();
  79. virtual BOOL Destroy();
  80. protected:
  81. virtual BOOL ProgramConfig();
  82. virtual BOOL ProgramFunction();
  83. virtual BOOL SetAcqSnapCount(int snapCount);
  84. virtual BOOL UpdateOutputXferParams();
  85. protected:
  86. char m_FileName[MAX_PATH];
  87. SapPixProParams m_Params;
  88. SapXferParams m_OutputXferParams;
  89. static char m_LastFileName[MAX_PATH];
  90. static char * m_FunctionNames[CORPPL_FCT_LAST + 1];
  91. };
  92. #endif // _SAPPIXPRO_H_