Example #1
0
BOOL CippsRun::PickSetID(CMyString& vectorName, UINT& pickID, UINT& grabID)
{
   if (m_PickVecPos == VEC_SRC3) {
      vectorName = m_Func.VecName(VEC_SRC3,m_UsedVectors);
      if (m_Func.Inplace()) {
         vectorName = "SrcDst";
         pickID = IDC_CURSOR_PSD;
         grabID = IDC_CURSOR_SD;
      } else {
         vectorName = "Src3";
         pickID = IDC_CURSOR_PS3;
         grabID = IDC_CURSOR_S3;
      }
   } else if (m_PickVecPos == VEC_SRC2) {
      vectorName = m_Func.VecName(VEC_SRC2,m_UsedVectors);
      if (vectorName.Found("Im")) {
         pickID = IDC_CURSOR_PIM;
         grabID = IDC_CURSOR_IM;
      } else if (vectorName.Found("Phase")) {
         pickID = IDC_CURSOR_PPH;
         grabID = IDC_CURSOR_PH;
      } else if (vectorName.Found("High")) {
         pickID = IDC_CURSOR_PHI;
         grabID = IDC_CURSOR_HI;
      } else if (vectorName.Found("Ref")) {
         pickID = IDC_CURSOR_PR;
         grabID = IDC_CURSOR_R;
      } else if (!(m_UsedVectors & VEC_SRC3) && m_Func.Inplace()) {
         vectorName = "SrcDst";
         pickID = IDC_CURSOR_PSD;
         grabID = IDC_CURSOR_SD;
      } else {
         vectorName = "Src2";
         pickID = IDC_CURSOR_PS2;
         grabID = IDC_CURSOR_S2;
      }
   } else {
      return FALSE;
   }
   return TRUE;
}
Example #2
0
void CFunc::GetPlanes(BOOL& src, BOOL& dst) const
{
   src = dst = FALSE;
   CMyString sDescr = DescrName();
   CMyString srcStr = firstChanStr(sDescr);
   CMyString dstStr = firstChanStr(sDescr);
   src = planeChannel(srcStr);
   if (dstStr.IsEmpty())
      dst = src;
   else
      dst = planeChannel(dstStr);
   if (!src && !dst && sDescr.Found(_T("P")))
      src = dst = TRUE;
   UpdatePlanes(src,dst);
}
Example #3
0
ppType CFunc::BaseType() const
{
   CMyString base = BaseName();
   if (base.Found(_T("64fc"))) return pp64fc;
   if (base.Found(_T("64sc"))) return pp64sc;
   if (base.Found(_T("64s" ))) return pp64s;
   if (base.Found(_T("64f" ))) return pp64f;
   if (base.Found(_T("32fc"))) return pp32fc;
   if (base.Found(_T("32sc"))) return pp32sc;
   if (base.Found(_T("32u" ))) return pp32u;
   if (base.Found(_T("32s" ))) return pp32s;
   if (base.Found(_T("32f" ))) return pp32f;
   if (base.Found(_T("24u" ))) return pp24u;
   if (base.Found(_T("24s" ))) return pp24s;
   if (base.Found(_T("16sc"))) return pp16sc;
   if (base.Found(_T("16f" ))) return pp16f;
   if (base.Found(_T("16u" ))) return pp16u;
   if (base.Found(_T("16s" ))) return pp16s;
   if (base.Found(_T("8sc" ))) return pp8sc;
   if (base.Found(_T("8u"  ))) return pp8u;
   if (base.Found(_T("8s"  ))) return pp8s;
   if (base.Found(_T("1u"  ))) return pp8u;
   return ppNONE;
}
Example #4
0
void CFunc::ParseFunction(CMyString& base, CMyString& type1, CMyString& type2,
                          CMyString& type3, CMyString& descr) const
{
   CMyString type;
   ParseFunction(base,type,descr);
   int len = type.GetLength();
   type1 = firstType(type);
   int len1 = type1.GetLength();
   if (len1 == len) {
      type2 = type3 = type1;
   } else {
      type2 = firstType(type.Mid(len1));
      int len2 = type2.GetLength();
      if (len1 + len2 == len) {
         type3 = type2;
         if (!descr.Found(_T("I")))
            type2 = type1;
      } else {
         type3 = firstType(type.Mid(len1+len2));
      }
   }
} 
Example #5
0
static CMyString firstChanStr(CMyString& descr)
{
   CMyString numStr = _T("1234");
   int index = descr.Find(_T("C"));
   int iP = descr.Find(_T("P"));
   int len = 0;
   CMyString chanStr = _T("");
   if ((iP >= 0) && (index < 0 || (iP < index))) index = iP;
   if ((index < 0) ||
       (descr.GetLength() == index + 1) ||
       (!numStr.Found(descr[index + 1]))) {
      len = 0;
   } else {
      len = 2;
      if ((index > 0) && (descr[index - 1] == 'A')) {
         index--;
         len++;
      }
   }
   CMyString str = descr.Mid(index,len);
   descr = descr.Mid(index + len);
   return str;
}