#pragma once #include #include "DIOS.Dev.IODevice.hpp" #include "DIOS.Dev.IODevice.Detail.hpp" #include "Collimator.BasicMoulds.hpp" #include "DriverConfigInfo.hpp" namespace nsDetail = DIOS::Dev::Detail; #ifndef DIOSDEVCollimatorDEVICEMOULD_EXPORTS #ifdef _WIN64 #ifdef _DEBUG #pragma comment(lib, "DIOS.Dev.Collimator.Mould64D.lib") #else #pragma comment(lib, "DIOS.Dev.Collimator.Mould64.lib") #endif #else #ifdef _DEBUG #pragma comment(lib, "DIOS.Dev.Collimator.MouldD.lib") #else #pragma comment(lib, "DIOS.Dev.Collimator.MouldD.lib") #endif #endif #endif #ifdef DIOSDEVCollimatorDEVICEMOULD_EXPORTS #define _DIOSDEVCOLLIMATORDEVICEMOULD_API __declspec(dllexport) #else #define _DIOSDEVCOLLIMATORDEVICEMOULD_API __declspec(dllimport) #endif #pragma warning (disable:4251) // warning C4251: class “DIOS::Dev::Detail::Generator::DoseUnit”需要有 dll 接口由 class“DIOS::Dev::Detail::Generator::ColliamtorMould”的客户端使用 namespace DIOS::Dev::Detail::Collimator { //----------------------------------------------------------------------------- // CollimatorUnit //----------------------------------------------------------------------------- class _DIOSDEVCOLLIMATORDEVICEMOULD_API CollimatorUnit : public IOLogicUnit { public: CollimatorUnit() {}; virtual ~CollimatorUnit() {}; public: std::unique_ptr m_XSize; std::unique_ptr m_YSize; std::unique_ptr m_Filter; std::unique_ptr m_SID; std::unique_ptr m_Angle; std::unique_ptr m_Mode; }; //----------------------------------------------------------------------------- // ColliamtorMould //----------------------------------------------------------------------------- namespace nDev = DIOS::Dev; class _DIOSDEVCOLLIMATORDEVICEMOULD_API ColliamtorMould { public: ColliamtorMould(); ~ColliamtorMould(); protected: virtual void Register(Dispatch* Dispatch); private: //caoxue nDev::RET_STATUS JSGetCollimatorXSize(std::string& out); nDev::RET_STATUS JSGetCollimatorYSize(std::string& out); nDev::RET_STATUS JSSetCollimatorSize(std::string in, std::string& out); nDev::RET_STATUS JSGetCollimatorSID(std::string& out); nDev::RET_STATUS JSSetCollimatorSID(std::string in, std::string& out); nDev::RET_STATUS JSGetCollimatorFilter(std::string& out); nDev::RET_STATUS JSSetCollimatorFilter(std::string in, std::string& out); nDev::RET_STATUS JSGetCollimatorAngle(std::string& out); nDev::RET_STATUS JSSetCollimatorAngle(std::string in, std::string& out); nDev::RET_STATUS JSGetCollimatorMode(std::string& out); nDev::RET_STATUS JSSetCollimatorMode(std::string in, std::string& out); nDev::RET_STATUS JSSetTechParamsInfo(std::string in, std::string& out); protected: virtual int GetXSize(); virtual int GetYSize(); virtual nDev::RET_STATUS SetCollimatorSize(unsigned short xsize, unsigned short ysize) = 0; virtual int GetSID(); virtual nDev::RET_STATUS SetCollimatorSID(unsigned short sid) = 0; virtual int GetFilter(); virtual nDev::RET_STATUS SetCollimatorFilter(unsigned short pParams) = 0; virtual int GetAngle(); virtual nDev::RET_STATUS SetCollimatorAngle(float pParams) = 0; virtual int GetMode(); virtual nDev::RET_STATUS SetCollimatorMode(unsigned short pParams) = 0; protected: CollimatorUnit m_CollimatorUnit; }; } namespace DIOS::Dev::Detail::Collimator { class _DIOSDEVCOLLIMATORDEVICEMOULD_API DriverMould : public DIOS::Dev::IODriver { public: DriverMould (); ~DriverMould (); virtual std::string GetGUID () const; protected: std::list m_ConfigInfo; }; }