3#include "DefinitionGUISNAP.h"
9 typedef std::function<
const CResult(Base::CFLImage& fli)> CGetAcquiredImageProcedure;
10 #define MakeGetAcquiredImageProcedure [=](Base::CFLImage& fli) -> const CResult
13 #define MakeGetImageFormatProcedure [=]() -> Base::EPixelFormat
15 class CInternalSNAPUtils;
18 class CGUIViewSNAPObjectNode;
19 class CGUIViewSNAPObjectLink;
20 class CGUIViewSNAPObjectNodeFunction;
21 class CGUIViewSNAPObjectNodeBlock;
22 class CSNAPObjectManager;
23 class CSNAPFileConverterBase;
24 class CGUIPropertyMenuBase;
26 class FL_EXPORT CSNAPUtils :
public Base::CFLBase
29 typedef struct sCopyNodeInfo
31 CGUIViewSNAPObjectNode* pNode;
32 CGUIViewSNAPObjectNodeBlock* pParentNode;
33 std::vector<std::pair<Base::CFLString<wchar_t>, Base::CFLString<wchar_t>> > vctPropertyItems;
37 typedef struct sCopyLinkInfo
39 CGUIViewSNAPObjectLink* pLink;
40 std::vector<std::pair<Base::CFLString<wchar_t>, Base::CFLString<wchar_t>> > vctPropertyItems;
44 typedef struct sCopyBlockInfo
46 CGUIViewSNAPObjectNodeBlock* pBlock;
47 CGUIViewSNAPObjectNodeBlock* pParentNode;
48 std::vector<std::pair<Base::CFLString<wchar_t>, Base::CFLString<wchar_t>> > vctPropertyItems;
52 typedef struct sCopyFunctionInfo
54 CGUIViewSNAPObjectNodeFunction* pFunction;
55 CGUIViewSNAPObjectNodeBlock* pParentNode;
56 std::vector<std::pair<Base::CFLString<wchar_t>, Base::CFLString<wchar_t>> > vctPropertyItems;
60 typedef struct sCopySNAPObjectData
62 CGUIViewSNAP* pSNAPView;
64 std::vector<SCopyNodeInfo> vctCopyNodeInfos;
65 std::vector<SCopyBlockInfo> vctCopyBlockInfos;
66 std::vector<SCopyFunctionInfo> vctCopyFuncInfos;
67 std::vector<SCopyLinkInfo> vctCopyLinkInfos;
75 virtual ~CSNAPUtils();
77 static const CResult RegisterSNAPPropertyMenu();
78 static const CResult RegisterSNAPPropertyMenu(
const CGUIPropertyMenuBase& pmb,
const Base::CFLString<wchar_t>& flsName,
const Base::CFLString<wchar_t>& flsPath);
79 static CGUIPropertyMenuBase* GetSNAPPropertyMenu(Base::CFLString<wchar_t> flsType);
80 static CGUIPropertyMenuBase* GetSNAPPropertyMenu(Base::CFLString<wchar_t> flsType, Base::CFLString<wchar_t> flsPath);
82 static CGUIPropertyMenuBase* FindSNAPPropertyMenu(uint32_t u32PropertyHash);
83 static CGUIPropertyMenuBase* FindSNAPPropertyMenuByInstanceHash(uint32_t u32InstanceHash);
85 static Base::CFLString<wchar_t> ConvertType(EDefinedParameterType eType);
86 static EDefinedParameterType ConvertType(Base::CFLString<wchar_t> flsType);
88 static bool IsFigureType(EDefinedParameterType eType);
90 static void AddCompatibleParameterType(Base::CFLString<wchar_t> flsType1, Base::CFLString<wchar_t> flsType2);
91 static bool IsCompatibleParameterType(Base::CFLString<wchar_t> flsType1, Base::CFLString<wchar_t> flsType2);
93 static Base::CFLString<wchar_t> ConvertCompatibleStringValue(EDefinedParameterType eType,
const Base::CFLString<wchar_t>& flsInput);
94 static Base::CFLString<wchar_t> ConvertCompatibleStringValue(
const Base::CFLString<wchar_t>& flsType,
const Base::CFLString<wchar_t>& flsInput);
96 static Base::CFLArray<Base::CFLString<wchar_t>> ConvertCompatibleStringArray(EDefinedParameterType eType,
const Base::CFLString<wchar_t>& flsInput);
97 static Base::CFLArray<Base::CFLString<wchar_t>> ConvertCompatibleStringArray(
const Base::CFLString<wchar_t>& flsType,
const Base::CFLString<wchar_t>& flsInput);
99 static Base::CFLString<wchar_t> ConvertMatrixStringValue(
const Foundation::CMatrix<double>* pMatSource);
100 static Base::CFLString<wchar_t> ConvertMatrixStringValue(
const Foundation::CMatrix<float>* pMatSource);
102 static const CResult RegisterCameraProcedure(Base::CFLBase* pCamera, CGetAcquiredImageProcedure* pAcquiredImageProcedure, CGetImageFormatProcedure* pImageFormatProcedure);
103 static const CResult UnRegisterCameraProcedure(Base::CFLBase* pCamera);
105 static int64_t GetRegisteredCameraProcedureCount();
107 static CGetAcquiredImageProcedure* GetCameraAcquiredImageProcedure(int32_t i32Index);
108 static CGetImageFormatProcedure* GetCameraImageFormatProcedure(int32_t i32Index);
110 static void SetCopySNAPObjectData(SCopySNAPObjectData& sData);
111 static const SCopySNAPObjectData& GetCopySNAPObjectData();
113 static const CResult RegisterSNAPObjectManager(CSNAPObjectManager* pObjectManager);
114 static const CResult UnregisterSNAPObjectManager(CSNAPObjectManager* pObjectManager);
115 static std::vector<CSNAPObjectManager*> GetRegisterSNAPObjectManagers();
117 static uint64_t GetHash(
const Base::CFLString<wchar_t>& strValue);
119 static const CResult Terminate();
121 static const CResult AllStepStopWait();
123 static EDefinedParameterType GetDefinedParameterPrimitiveType(EDefinedParameterType eType);
124 static EDefinedParameterType GetDefinedParameterArrayType(EDefinedParameterType eType);
125 static EDefinedParameterType GetDefinedParameterPointType(EDefinedParameterType eType);
126 static EDefinedParameterType GetDefinedParameterFLPointType(EDefinedParameterType eType);
128 static bool IsParameterPrimitiveNumberType(EDefinedParameterType eType);
129 static bool IsParameterMultiVarType(EDefinedParameterType eType);
130 static bool IsParameterArrayNumberType(EDefinedParameterType eType);
132 static bool IsParameterPointType(EDefinedParameterType eType);
133 static bool IsParameterPoint3Type(EDefinedParameterType eType);
134 static bool IsParameterPoint4Type(EDefinedParameterType eType);
135 static bool IsParameterFigurePointType(EDefinedParameterType eType);
136 static bool IsParameterFigurePoint3Type(EDefinedParameterType eType);
137 static bool IsParameterFigurePoint4Type(EDefinedParameterType eType);
139 static bool IsParameterArrayPointType(EDefinedParameterType eType);
140 static bool IsParameterArrayPoint3Type(EDefinedParameterType eType);
141 static bool IsParameterArrayPoint4Type(EDefinedParameterType eType);
143 static bool IsAbsolutePath(
const Base::CFLString<wchar_t>& flsPath);
144 static const CResult ConvertRelativePathToAbsolutePath(Base::CFLString<wchar_t>& flsFileNameWithPath,
const Base::CFLString<wchar_t>& flsBasePath);
146 DeclareGetClassType();
149 static CSNAPUtils* GetInstance();
152 CInternalSNAPUtils* m_pInternal;
EPixelFormat
Pixel format.
Definition DefinitionsBase.h:88