当前位置: 首页>>代码示例>>C++>>正文


C++ KKStr::EqualIgnoreCase方法代码示例

本文整理汇总了C++中KKStr::EqualIgnoreCase方法的典型用法代码示例。如果您正苦于以下问题:C++ KKStr::EqualIgnoreCase方法的具体用法?C++ KKStr::EqualIgnoreCase怎么用?C++ KKStr::EqualIgnoreCase使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在KKStr的用法示例。


在下文中一共展示了KKStr::EqualIgnoreCase方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ProcessCmdLineParameter

bool  ImportFullSizeFromSqlBackUp::ProcessCmdLineParameter (
                                                            char    parmSwitchCode, 
                                                            KKStr   parmSwitch, 
                                                            KKStr   parmValue
                                                           )
{
  KKStr  parmValueUpper (parmValue);
  parmValueUpper.Upper ();

  parmSwitch.Upper ();

  if  ((parmSwitch == "-S")    ||  
       (parmSwitch == "-SRC")  ||  
       (parmSwitch == "-SOURCE")  ||
       (parmSwitch.EqualIgnoreCase ("-SrcFile"))
       )
  {
    srcFileName = parmValue;
    if  (!osFileExists (srcFileName))
    {
      log.Level (-1) << "ProcessCmdLineParameter   ***ERROR***    Invalid '-SrcFile' [" << srcFileName << "] file." << endl;
      Abort (true);
    }
  }

	return  !Abort ();
}  /* ProcessCmdLineParameter */
开发者ID:jizhihang,项目名称:Pices-XXX-,代码行数:27,代码来源:ImportFullSizeFromSqlBackUp.cpp

示例2: StartStopTypeFromStr

StartStopPoint::StartStopType  StartStopPoint::StartStopTypeFromStr (const KKStr&   s)
{
  for  (int x = (int)StartStopType::Null;  x < (int)StartStopType::Invalid;  ++x)
    if  (s.EqualIgnoreCase (startStopPointStrs[x]))
      return  (StartStopType)x;
  return  StartStopType::Null;
}
开发者ID:KurtKramer,项目名称:KSquareLibraries,代码行数:7,代码来源:StartStopPoint.cpp

示例3: ParseToString

void  FeatureNumList::ParseToString (const KKStr&  _str,
                                     bool&         _valid
                                    )  
{
  _valid = true;
  delete  featureNums;

  featureNumsAllocatedSize = 0;
  maxFeatureNum            = 0;
  numOfFeatures            = 0;
  featureNums              = NULL;

  if  (_str.EqualIgnoreCase ("NONE"))
  {
    maxFeatureNum = 1;
    AllocateArraySize ((IntType)(maxFeatureNum + 1));
    return;
  }

  VectorIntType*  list = StrToUInt16Vetor (_str);
  if  (list)
  {
    sort(list->begin (), list->end ());
    maxFeatureNum = list->back ();
    AllocateArraySize ((IntType)list->size ());
    for  (auto idx: *list)
      AddFeature (idx);
  }
  else
  {
    _valid = false;
  }
  delete  list;
  list = NULL;
}  /* ParseToString */
开发者ID:KurtKramer,项目名称:KSquareLibraries,代码行数:35,代码来源:FeatureNumList.cpp

示例4: ProcessStatusField

void  JobValidation::ProcessStatusField (const KKStr&  fieldName,
                                         const KKStr&  fieldValue
                                        )
{
  // 'JobValidation' does not have any fields.
  if  (fieldName.EqualIgnoreCase ("configFileName"))
    configFileName = fieldValue;
}  /* ProcessStatusField */
开发者ID:KurtKramer,项目名称:Pices,代码行数:8,代码来源:JobValidation.cpp

示例5: ProcessCmdLineParameter

bool  ImageDimensionComputations::ProcessCmdLineParameter (const KKStr&  parmSwitch, 
                                                           const KKStr&  parmValue
                                                          )
{
  bool  validParm = true;

  if (parmSwitch.EqualIgnoreCase ("-R")  || parmSwitch.EqualIgnoreCase ("-Report"))
  {
    reportFileName = parmValue;
  }
  else
  {
    validParm = PicesApplication::ProcessCmdLineParameter (parmSwitch, parmValue);
  }

  return  validParm;
}  /* ProcessCmdLineParameter */
开发者ID:KurtKramer,项目名称:Pices,代码行数:17,代码来源:ImageDimensionComputations.cpp

示例6: ProcessCmdLineParameter

bool  ImportFullSizeFromSqlBackUp::ProcessCmdLineParameter (const KKStr&  parmSwitch, 
                                                            const KKStr&  parmValue
                                                           )
{
  if  (parmSwitch.EqualIgnoreCase ("-S")        ||  
       parmSwitch.EqualIgnoreCase ("-SRC")      ||  
       parmSwitch.EqualIgnoreCase ("-SOURCE")   ||
       parmSwitch.EqualIgnoreCase ("-SrcFile")
      )
  {
    srcFileName = parmValue;
    if  (!osFileExists (srcFileName))
    {
      log.Level (-1) << "ImportFullSizeFromSqlBackUp::ProcessCmdLineParameter   ***ERROR***   Invalid '-SrcFile' [" << srcFileName << "] file." << endl;
      Abort (true);
    }
  }

	return  !Abort ();
}  /* ProcessCmdLineParameter */
开发者ID:KurtKramer,项目名称:Pices,代码行数:20,代码来源:ImportFullSizeFromSqlBackUp.cpp

示例7: LookUp

 SettingConstPtr  LookUp (const KKStr&  name)  const
 {
   kkuint32  qSize = QueueSize ();
   for  (kkuint32 idx = 0;  idx < qSize;  idx++)
   {
     SettingConstPtr setting = IdxToPtr (idx);
     if  (name.EqualIgnoreCase (setting->Name ()))
       return setting;
   }
   return  NULL;
 }  /* LookUp */
开发者ID:KurtKramer,项目名称:KSquareLibraries,代码行数:11,代码来源:Configuration.cpp

示例8: ExtractHeaderField

void  ScannerFile::ExtractHeaderField (const KKStr&  fieldName,
                                       const KKStr&  fieldValue
                                      )
{
  if  (fieldName.EqualIgnoreCase ("FrameHeight"))
  {
    kkuint32 fieldValueUint = fieldValue.ToInt32 ();
    if  ((fieldValueUint > 0)  &&  (fieldValueUint < (1024 * 1024)))
      frameHeight = fieldValue.ToInt32 ();
  }

  else if  (fieldName.EqualIgnoreCase ("PixelsPerScanLine"))
    pixelsPerScanLine = fieldValue.ToInt ();
  
  else if  (fieldName.EqualIgnoreCase ("ScanRate"))
    scanRate = fieldValue.ToFloat ();

  else if  (fieldName.EqualIgnoreCase ("FlatFieldCorrectionEnabled"))
    flatFieldEnabled = fieldValue.ToBool ();

}  /* ExtractHeaderField */
开发者ID:,项目名称:,代码行数:21,代码来源:

示例9: ScannerFileFormatFromStr

ScannerFile::Format  ScannerFile::ScannerFileFormatFromStr (const KKStr&  fileFormatStr)
{
  kkint32  x = 0;
  while  (x < (kkint32)Format::sfUnKnown)
  {
    if  (fileFormatStr.EqualIgnoreCase (fileFormatOptions[x]))
      return (Format)x;
    ++x;
  }

  return  Format::sfUnKnown;
}  /* ScannerFileFormatFromStr */
开发者ID:,项目名称:,代码行数:12,代码来源:

示例10: ProcessCmdLineParameter

bool  AbundanceCorrectionStatsBuilder::ProcessCmdLineParameter (char   parmSwitchCode, 
                                                                KKStr  parmSwitch, 
                                                                KKStr  parmValue
                                                               )
{
  KKStr  parmValueUpper (parmValue);
  parmValueUpper.Upper ();

  if  (parmSwitch.EqualIgnoreCase ("-c")  ||  parmSwitch.EqualIgnoreCase ("-config"))
  {
    configFileName = parmValue;
    configFileFullPath = TrainingConfiguration2::GetEffectiveConfigFileName (configFileName);
    if  (!osFileExists (configFileFullPath))
    {
      log.Level (-1) << "ProcessCmdLineParameter   ***ERROR***    Invalid '-config' [" << configFileName << "] file." << endl;
      Abort (true);
    }
  }

  else if  (parmSwitch.EqualIgnoreCase ("-folds")  ||  parmSwitch.EqualIgnoreCase ("-numFolds")  ||  parmSwitch.EqualIgnoreCase ("-numOfFolds"))
  {
    numOfFolds = parmValue.ToInt ();
    if  ((numOfFolds < 2)  ||  (numOfFolds > 1000))
    {
      log.Level (-1) << "ProcessCmdLineParameter   ***ERROR***    Invalid '-NumFolds' [" << numOfFolds << "] Invlaid;  valid values (2 - 1000)." << endl;
      Abort (true);
    }
  }

  else if  (parmSwitch.EqualIgnoreCase ("-r")  ||  parmSwitch.EqualIgnoreCase ("-report")  ||  parmSwitch.EqualIgnoreCase ("-ReportFileName"))
    reportFileName = parmValue;

	return  !Abort ();
}  /* ProcessCmdLineParameter */
开发者ID:jizhihang,项目名称:Pices-XXX-,代码行数:34,代码来源:AbundanceCorrectionStatsBuilder.cpp

示例11: LookUp

    ConfSectionPtr  LookUp (const KKStr& _name)
    {
      ConfSectionPtr   tempSection = NULL;
      ConfSectionPtr   section = NULL;
      ConfSectionList::const_iterator  idx;
      for  (idx = begin ();  idx != end ();  ++idx)
      {
        tempSection = *idx;
        if  (_name.EqualIgnoreCase (tempSection->Name ()))
        {
          section = tempSection;
          break;
        }
      }

      return  section;
    }  /* LookUp */
开发者ID:,项目名称:,代码行数:17,代码来源:

示例12: ProcessCmdLineParameter

bool  DeleteDuplicateImages::ProcessCmdLineParameter (const KKStr&  parmSwitch, 
                                                      const KKStr&  parmValue
                                                     )
{
  bool  parmValid = true;

  if  ((parmSwitch.EqualIgnoreCase ("-ROOTDIR"))    ||  
       (parmSwitch.EqualIgnoreCase ("-ROOT"))       ||
       (parmSwitch.EqualIgnoreCase ("-SOURCEDIR"))  ||
       (parmSwitch.EqualIgnoreCase ("-RD"))
      )
  {
    rootDir = parmValue;
    if  (!osValidDirectory (rootDir))
    {
      cerr << endl
           << endl
           << "*** ERROR ***  Invalid Root Dir[" << rootDir << "]." << endl;
      DisplayCmdLine ();
      parmValid = false;
    }

  }

  else if  ((parmSwitch.EqualIgnoreCase ("-R"))          ||  
            (parmSwitch.EqualIgnoreCase ("-REPORT"))     ||
            (parmSwitch.EqualIgnoreCase ("-ReportFile"))
           )
  {
    reportFileName = parmValue;
  }

  else
  {
    parmValid = PicesApplication::ProcessCmdLineParameter (parmSwitch, parmValue);
  }

  if  (!parmValid)
    Abort (true);

  return  parmValid;
}  /* ProcessCmdLineParameter */
开发者ID:KurtKramer,项目名称:Pices,代码行数:42,代码来源:DeleteDuplicateImages.cpp

示例13: GuessFormatOfFile

ScannerFile::Format  ScannerFile::GuessFormatOfFile (const KKStr&  _fileName,
                                                     RunLog&       _log
                                                    )
{
  // Will guess what file format by trying to open each one until one is considered valid.

  FILE*  f = osFOPEN (_fileName.Str (), "rb");
  if  (!f)
    return Format::sfUnKnown;

  bool  endOfText = false;
  KKStr ln (100);
  ReadHeaderOneLine (f, endOfText, ln);
  fclose (f);

  KKStr fieldName = ln.ExtractToken2 ("\t");
  if  (!fieldName.EqualIgnoreCase ("ScannerFile"))
    return Format::sfUnKnown;

  KKStr  scannerFileFormatStr = ln.ExtractToken2 ("\t");
  return  ScannerFileFormatFromStr (scannerFileFormatStr);
}  /*  GuessFormatOfFile */
开发者ID:,项目名称:,代码行数:22,代码来源:

示例14: ProcessCmdLineParameter

bool  MergeFeatureFiles::ProcessCmdLineParameter (const KKStr&  parmSwitch, 
                                                  const KKStr&  parmValue
                                                 )
{
  bool  validParm = true;

  if  (parmSwitch.EqualIgnoreCase ("-S")    ||  
       parmSwitch.EqualIgnoreCase ("-SRC")  ||  
       parmSwitch.EqualIgnoreCase ("-SOURCE")
      )
  {
    KKStr  srcFileName = parmValue;
    if  (!osFileExists (srcFileName))
    {
      log.Level (-1) << "ProcessCmdLineParameter   ***ERROR***    Invalid '-src' [" << srcFileName << "] file." << endl;
      Abort (true);
      validParm = false;
    }

    srcFileNames.push_back (srcFileName);
    srcFormats.push_back   (currentDefaultFormat);
    if  (!currentDefaultFormat->CanRead ())
    {
      log.Level (-1) << "ProcessCmdLineParameter   ***ERROR***    Format[" << currentDefaultFormat->DriverName () << "] does not support read." << endl;
      Abort (true);
      validParm = false;
    }
  }

  else if  
    (parmSwitch.EqualIgnoreCase ("-DEST")        ||  
     parmSwitch.EqualIgnoreCase ("-D")           ||  
     parmSwitch.EqualIgnoreCase ("-DESTINATION")
    )
  {
    if  (!destFileName.Empty ())
    {
      log.Level (-1) << "ProcessCmdLineParameter   ***ERROR***    More than one destination file was specified." << endl;
      Abort (true);
      validParm= false;
    }
    
    destFileName = parmValue;
    if  (osFileExists (destFileName))
    {
      log.Level (-1) << "ProcessCmdLineParameter   ***ERROR***    Destination File[" << destFileName << "] already exists." << endl;
      Abort (true);
      validParm = false;
    }

    if  (!currentDefaultFormat->CanWrite ())
    {
      log.Level (-1) << "ProcessCmdLineParameter   ***ERROR***    Format[" << currentDefaultFormat->DriverName () << "] does not support write." << endl;
      Abort (true);
      validParm = false;
    }

    destFormat = currentDefaultFormat;
  }

  else if  
    (parmSwitch.EqualIgnoreCase ("-F")  ||  
     parmSwitch.EqualIgnoreCase ("-FORMAT")
    )
  {
    FeatureFileIOPtr  newFormat = FeatureFileIO::FileFormatFromStr (parmValue);
    if  (!newFormat)
    {
      log.Level (-1) << "ProcessCmdLineParameter   ***ERROR***    No such format as[" << parmValue<< "]." << endl;
      Abort (true);
      validParm = false;
    }
    else
    {
      currentDefaultFormat = newFormat;
    }
  }

  else if 
    (parmSwitch.EqualIgnoreCase ("-STRAT")  ||  
     parmSwitch.EqualIgnoreCase ("-STRATIFY")
    )
  {
    stratify = true;
    if  (!parmValue.Empty ())
    {
      numOfFolds = parmValue.ToInt ();
      if  ((numOfFolds < 1)  ||  (numOfFolds > 1000))
      {
        log.Level (-1) << "ProcessCmdLineParameter   ***ERROR***    -Folds[" << numOfFolds << "]  must be 1 or greater and less than 10000." << endl;
        Abort (true);
        validParm = false;
      }
    }
  }


  else if  
    (parmSwitch.EqualIgnoreCase ("-RAND")    ||
     parmSwitch.EqualIgnoreCase ("-RANDOM")  ||
//.........这里部分代码省略.........
开发者ID:KurtKramer,项目名称:Pices,代码行数:101,代码来源:MergeFeatureFiles.cpp

示例15: ProcessCmdLineParameter

/******************************************************************************
 * ProcessCmdLineParamters
 * DESC: Extracts parameters from the command line
 ******************************************************************************/
bool  OurNeighbors::ProcessCmdLineParameter (const KKStr&  parmSwitch, 
                                             const KKStr&  parmValue
                                            )
{
  bool  validParm = true;
  if  (parmSwitch.EqualIgnoreCase ("-BUCKETCOUNT")  ||  parmSwitch.EqualIgnoreCase ("-BC"))
  {
    numOfBuckets = atoi (parmValue.Str ());
    if  (numOfBuckets < 2)
    {
      log.Level (-1) << "ProcessCmdLineParameter   *** Invalid Buckets[" << numOfBuckets << "] parameter" << endl;
      validParm = false;
    }
  }

  else if  (parmSwitch.EqualIgnoreCase ("-BUCKETSIZE")  ||  parmSwitch.EqualIgnoreCase ("-BS"))
  {
    bucketSize = atoi (parmValue.Str ());
    if  (bucketSize < 1)
    {
      log.Level (-1) << "ProcessCmdLineParameter   *** Invalid BucketSize[" << bucketSize << "] parameter" << endl;
      Abort (true);
    }
  }

  else if  (parmSwitch.EqualIgnoreCase ("-EXCLUDECLASS")  ||  parmSwitch.EqualIgnoreCase ("-EC"))
  {
    if  (parmValue.Empty ())
    {
      log.Level (-1) << endl << endl
                     << "ProcessCmdLineParameter   '-ExcludeClass'  missing class name to exclude." << endl
                     << endl;
      Abort (true);
    }

    else 
    {
      if  (!excludedClasses)
        excludedClasses = new MLClassList ();

      if  (excludedClasses->LookUpByName (parmValue) != NULL)
      {
        log.Level (-1) << "ProcessCmdLineParameter  '-ExcludeClass[" << parmValue << "]'  Specified more than once." << endl;
      }
      else
      {
        excludedClasses->PushOnBack (MLClass::CreateNewMLClass (parmValue));
      }
    }
  }


  else if  (parmSwitch.EqualIgnoreCase ("-FROMPLANKTON")  ||  parmSwitch.EqualIgnoreCase ("-FP"))
  {
    fromPlanktonName = parmValue;
  }

  else if  (parmSwitch.EqualIgnoreCase ("-H")  ||  parmSwitch.EqualIgnoreCase ("-HTML"))
		htmlFileName = parmValue;

  else if  (parmSwitch.EqualIgnoreCase ("-ITERATIONS")  ||  parmSwitch.EqualIgnoreCase ("-I"))
  {
    numOfIterations = atoi (parmValue.Str ());
    if  (numOfIterations < 1)
    {
      log.Level (-1) << "ProcessCmdLineParameter   *** Invalid Iterations[" << numOfIterations << "] parameter" << endl;
      Abort (true);
    }
  }


  else if  (parmSwitch.EqualIgnoreCase ("-LLOYDSBINSIZE")      ||  
            parmSwitch.EqualIgnoreCase ("-LBS")                ||  
            parmSwitch.EqualIgnoreCase ("-BASELLOYDSBINSIZE")  ||  
            parmSwitch.EqualIgnoreCase ("-BLBS")
           )
  {
    baseLLoydsBinSize = atoi (parmValue.Str ());
    if  (baseLLoydsBinSize < 10)
    {
      log.Level (-1) << endl << endl 
                     << "ProcessCmdLineParameter   *** Invalid BaseLLoydsBinSize[" << baseLLoydsBinSize << "] parameter  ***" << endl
                     << endl;
      Abort (true);
    }
  }


  else if  (parmSwitch.EqualIgnoreCase ("-NEARESTNEIGHBORTYPE")  ||  parmSwitch.EqualIgnoreCase ("-NNT"))
  {
    if  (parmValue.EqualIgnoreCase ("0")  ||  parmValue.EqualIgnoreCase ("ANY"))
      neighborType = NeighborType::AnyPlankton;

    else if  (parmValue.EqualIgnoreCase ("1")  ||  parmValue.EqualIgnoreCase ("SAME"))
      neighborType = NeighborType::SamePlankton;
  }
//.........这里部分代码省略.........
开发者ID:KurtKramer,项目名称:Pices,代码行数:101,代码来源:OurNeighbors.cpp


注:本文中的KKStr::EqualIgnoreCase方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。