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


C++ CFX_WideStringC::GetAt方法代码示例

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


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

示例1: FILESPEC_DecodeFileName

static CFX_WideString FILESPEC_DecodeFileName(const CFX_WideStringC& filepath) {
  if (filepath.GetLength() <= 1) {
    return CFX_WideString();
  }
#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
  if (filepath.Left(sizeof("/Mac") - 1) == CFX_WideStringC(L"/Mac")) {
    return ChangeSlashToPlatform(filepath.GetPtr() + 1);
  }
  return ChangeSlashToPlatform(filepath.GetPtr());
#elif _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
  if (filepath.GetAt(0) != '/') {
    return ChangeSlashToPlatform(filepath.GetPtr());
  }
  if (filepath.GetAt(1) == '/') {
    return ChangeSlashToPlatform(filepath.GetPtr() + 1);
  }
  if (filepath.GetAt(2) == '/') {
    CFX_WideString result;
    result += filepath.GetAt(1);
    result += ':';
    result += ChangeSlashToPlatform(filepath.GetPtr() + 2);
    return result;
  }
  CFX_WideString result;
  result += '\\';
  result += ChangeSlashToPlatform(filepath.GetPtr());
  return result;
#else
  return filepath;
#endif
}
开发者ID:andoma,项目名称:pdfium,代码行数:31,代码来源:doc_basic.cpp

示例2: DecodeFileName

CFX_WideString CPDF_FileSpec::DecodeFileName(const CFX_WideStringC& filepath) {
  if (filepath.GetLength() <= 1)
    return CFX_WideString();

#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
  if (filepath.Left(sizeof("/Mac") - 1) == CFX_WideStringC(L"/Mac"))
    return ChangeSlashToPlatform(filepath.c_str() + 1);
  return ChangeSlashToPlatform(filepath.c_str());
#elif _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
  if (filepath.GetAt(0) != '/')
    return ChangeSlashToPlatform(filepath.c_str());
  if (filepath.GetAt(1) == '/')
    return ChangeSlashToPlatform(filepath.c_str() + 1);
  if (filepath.GetAt(2) == '/') {
    CFX_WideString result;
    result += filepath.GetAt(1);
    result += ':';
    result += ChangeSlashToPlatform(filepath.c_str() + 2);
    return result;
  }
  CFX_WideString result;
  result += '\\';
  result += ChangeSlashToPlatform(filepath.c_str());
  return result;
#else
  return CFX_WideString(filepath);
#endif
}
开发者ID:endlessm,项目名称:chromium-browser,代码行数:28,代码来源:doc_basic.cpp

示例3: CheckContentValidity

FX_BOOL CBC_OnedUPCAWriter::CheckContentValidity(
    const CFX_WideStringC& contents) {
  for (FX_STRSIZE i = 0; i < contents.GetLength(); ++i) {
    if (contents.GetAt(i) < '0' || contents.GetAt(i) > '9')
      return FALSE;
  }
  return TRUE;
}
开发者ID:endlessm,项目名称:chromium-browser,代码行数:8,代码来源:BC_OnedUPCAWriter.cpp

示例4:

FX_BOOL CBC_OnedEAN8Writer::CheckContentValidity(
    const CFX_WideStringC& contents) {
  for (int32_t i = 0; i < contents.GetLength(); i++) {
    if (contents.GetAt(i) >= '0' && contents.GetAt(i) <= '9') {
      continue;
    } else {
      return FALSE;
    }
  }
  return TRUE;
}
开发者ID:hfiguiere,项目名称:pdfium,代码行数:11,代码来源:BC_OnedEAN8Writer.cpp

示例5: RenderDeviceResult

void CBC_OneDimWriter::RenderDeviceResult(CFX_RenderDevice* device,
                                          const CFX_Matrix* matrix,
                                          const CFX_WideStringC& contents,
                                          int32_t& e) {
  if (!m_output)
    BC_EXCEPTION_CHECK_ReturnVoid(e);

  CFX_GraphStateData stateData;
  CFX_PathData path;
  path.AppendRect(0, 0, (FX_FLOAT)m_Width, (FX_FLOAT)m_Height);
  device->DrawPath(&path, matrix, &stateData, m_backgroundColor,
                   m_backgroundColor, FXFILL_ALTERNATE);
  CFX_Matrix matri(m_outputHScale, 0.0, 0.0, (FX_FLOAT)m_Height, 0.0, 0.0);
  matri.Concat(*matrix);
  for (int32_t x = 0; x < m_output->GetWidth(); x++) {
    for (int32_t y = 0; y < m_output->GetHeight(); y++) {
      CFX_PathData rect;
      rect.AppendRect((FX_FLOAT)x, (FX_FLOAT)y, (FX_FLOAT)(x + 1),
                      (FX_FLOAT)(y + 1));
      if (m_output->Get(x, y)) {
        CFX_GraphStateData data;
        device->DrawPath(&rect, &matri, &data, m_barColor, 0, FXFILL_WINDING);
      }
    }
  }
  int32_t i = 0;
  for (; i < contents.GetLength(); i++)
    if (contents.GetAt(i) != ' ') {
      break;
    }
  if (m_locTextLoc != BC_TEXT_LOC_NONE && i < contents.GetLength()) {
    ShowChars(contents, nullptr, device, matrix, m_barWidth, m_multiple, e);
    BC_EXCEPTION_CHECK_ReturnVoid(e);
  }
}
开发者ID:documentcloud,项目名称:pdfium,代码行数:35,代码来源:BC_OneDimWriter.cpp

示例6: RenderBitmapResult

void CBC_OneDimWriter::RenderBitmapResult(CFX_DIBitmap*& pOutBitmap,
                                          const CFX_WideStringC& contents,
                                          int32_t& e) {
  if (!m_output)
    BC_EXCEPTION_CHECK_ReturnVoid(e);

  pOutBitmap = CreateDIBitmap(m_output->GetWidth(), m_output->GetHeight());
  pOutBitmap->Clear(m_backgroundColor);
  if (!pOutBitmap) {
    e = BCExceptionFailToCreateBitmap;
    return;
  }
  for (int32_t x = 0; x < m_output->GetWidth(); x++) {
    for (int32_t y = 0; y < m_output->GetHeight(); y++) {
      if (m_output->Get(x, y)) {
        pOutBitmap->SetPixel(x, y, m_barColor);
      }
    }
  }
  int32_t i = 0;
  for (; i < contents.GetLength(); i++)
    if (contents.GetAt(i) != ' ') {
      break;
    }
  if (m_locTextLoc != BC_TEXT_LOC_NONE && i < contents.GetLength()) {
    ShowChars(contents, pOutBitmap, nullptr, nullptr, m_barWidth, m_multiple,
              e);
    BC_EXCEPTION_CHECK_ReturnVoid(e);
  }
  CFX_DIBitmap* pStretchBitmap = pOutBitmap->StretchTo(m_Width, m_Height);
  delete pOutBitmap;
  pOutBitmap = pStretchBitmap;
}
开发者ID:documentcloud,项目名称:pdfium,代码行数:33,代码来源:BC_OneDimWriter.cpp

示例7: FX_WideString_GetNormalization

FX_STRSIZE FX_WideString_GetNormalization(const CFX_WideStringC& wsSrc,
                                          FX_WCHAR* pDst) {
  FX_STRSIZE nCount = 0;
  for (FX_STRSIZE len = 0; len < wsSrc.GetLength(); len++) {
    FX_WCHAR wch = wsSrc.GetAt(len);
    if (pDst) {
      nCount += FX_Unicode_GetNormalization(wch, pDst + nCount);
    } else {
      nCount += FX_Unicode_GetNormalization(wch, pDst);
    }
  }
  return nCount;
}
开发者ID:azunite,项目名称:libpdfium,代码行数:13,代码来源:unicodenormalization.cpp

示例8: FilterContents

CFX_WideString CBC_OnedUPCAWriter::FilterContents(
    const CFX_WideStringC& contents) {
  CFX_WideString filtercontents;
  FX_WCHAR ch;
  for (int32_t i = 0; i < contents.GetLength(); i++) {
    ch = contents.GetAt(i);
    if (ch > 175) {
      i++;
      continue;
    }
    if (ch >= '0' && ch <= '9') {
      filtercontents += ch;
    }
  }
  return filtercontents;
}
开发者ID:endlessm,项目名称:chromium-browser,代码行数:16,代码来源:BC_OnedUPCAWriter.cpp

示例9: while

FX_BOOL CBC_OnedCode128Writer::CheckContentValidity(
    const CFX_WideStringC& contents) {
  FX_BOOL ret = TRUE;
  int32_t position = 0;
  int32_t patternIndex = -1;
  if (m_codeFormat == BC_CODE128_B || m_codeFormat == BC_CODE128_C) {
    while (position < contents.GetLength()) {
      patternIndex = (int32_t)contents.GetAt(position);
      if (patternIndex >= 32 && patternIndex <= 126 && patternIndex != 34) {
        position++;
        continue;
      } else {
        ret = FALSE;
        break;
      }
      position++;
    }
  } else {
    ret = FALSE;
  }
  return ret;
}
开发者ID:andoma,项目名称:pdfium,代码行数:22,代码来源:BC_OnedCode128Writer.cpp

示例10: if

CFX_WideString CBC_OnedCode128Writer::FilterContents(
    const CFX_WideStringC& contents) {
  CFX_WideString filterChineseChar;
  FX_WCHAR ch;
  for (int32_t i = 0; i < contents.GetLength(); i++) {
    ch = contents.GetAt(i);
    if (ch > 175) {
      i++;
      continue;
    }
    filterChineseChar += ch;
  }
  CFX_WideString filtercontents;
  if (m_codeFormat == BC_CODE128_B) {
    for (int32_t i = 0; i < filterChineseChar.GetLength(); i++) {
      ch = filterChineseChar.GetAt(i);
      if (ch >= 32 && ch <= 126) {
        filtercontents += ch;
      } else {
        continue;
      }
    }
  } else if (m_codeFormat == BC_CODE128_C) {
    for (int32_t i = 0; i < filterChineseChar.GetLength(); i++) {
      ch = filterChineseChar.GetAt(i);
      if (ch >= 32 && ch <= 106) {
        filtercontents += ch;
      } else {
        continue;
      }
    }
  } else {
    filtercontents = contents;
  }
  return filtercontents;
}
开发者ID:andoma,项目名称:pdfium,代码行数:36,代码来源:BC_OnedCode128Writer.cpp

示例11: FILESPEC_EncodeFileName

CFX_WideString FILESPEC_EncodeFileName(const CFX_WideStringC& filepath) {
  if (filepath.GetLength() <= 1) {
    return CFX_WideString();
  }
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
  if (filepath.GetAt(1) == ':') {
    CFX_WideString result;
    result = '/';
    result += filepath.GetAt(0);
    if (filepath.GetAt(2) != '\\') {
      result += '/';
    }
    result += ChangeSlashToPDF(filepath.GetPtr() + 2);
    return result;
  }
  if (filepath.GetAt(0) == '\\' && filepath.GetAt(1) == '\\') {
    return ChangeSlashToPDF(filepath.GetPtr() + 1);
  }
  if (filepath.GetAt(0) == '\\') {
    CFX_WideString result;
    result = '/';
    result += ChangeSlashToPDF(filepath.GetPtr());
    return result;
  }
  return ChangeSlashToPDF(filepath.GetPtr());
#elif _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
  if (filepath.Left(sizeof("Mac") - 1) == FX_WSTRC(L"Mac")) {
    CFX_WideString result;
    result = '/';
    result += ChangeSlashToPDF(filepath.GetPtr());
    return result;
  }
  return ChangeSlashToPDF(filepath.GetPtr());
#else
  return filepath;
#endif
}
开发者ID:andoma,项目名称:pdfium,代码行数:37,代码来源:doc_basic.cpp

示例12: ToJavaScript

void CXFA_FMFunctionDefinition::ToJavaScript(CFX_WideTextBuf& javascript) {
  if (m_isGlobal && (!m_pExpressions || m_pExpressions->GetSize() == 0)) {
    javascript << FX_WSTRC(L"// comments only");
    return;
  }
  if (m_isGlobal) {
    javascript << FX_WSTRC(L"(\n");
  }
  javascript << FX_WSTRC(L"function ");
  if (m_wsName.GetAt(0) == L'!') {
    CFX_WideString tempName = EXCLAMATION_IN_IDENTIFIER + m_wsName.Mid(1);
    javascript << tempName;
  } else {
    javascript << m_wsName;
  }
  javascript << FX_WSTRC(L"(");
  if (m_pArguments != 0) {
    int32_t argc = m_pArguments->GetSize();
    int32_t index = 0;
    CFX_WideStringC identifier = 0;
    while (index < argc) {
      identifier = m_pArguments->GetAt(index);
      if (identifier.GetAt(0) == L'!') {
        CFX_WideString tempIdentifier =
            EXCLAMATION_IN_IDENTIFIER + identifier.Mid(1);
        javascript << tempIdentifier;
      } else {
        javascript << identifier;
      }
      if (index + 1 < argc) {
        javascript << FX_WSTRC(L", ");
      }
      index++;
    }
  }
  javascript << FX_WSTRC(L")\n{\n");
  javascript << FX_WSTRC(L"var ");
  javascript << RUNTIMEFUNCTIONRETURNVALUE;
  javascript << FX_WSTRC(L" = null;\n");
  if (m_pExpressions) {
    int32_t expc = m_pExpressions->GetSize();
    int32_t index = 0;
    CXFA_FMExpression* e = 0;
    while (index < expc) {
      e = (CXFA_FMExpression*)m_pExpressions->GetAt(index);
      if (index + 1 < expc) {
        e->ToJavaScript(javascript);
      } else {
        e->ToImpliedReturnJS(javascript);
      }
      index++;
    }
  }
  javascript << FX_WSTRC(L"return ");
  if (m_isGlobal) {
    javascript << XFA_FM_EXPTypeToString(GETFMVALUE);
    javascript << FX_WSTRC(L"(");
    javascript << RUNTIMEFUNCTIONRETURNVALUE;
    javascript << FX_WSTRC(L")");
  } else {
    javascript << RUNTIMEFUNCTIONRETURNVALUE;
  }
  javascript << FX_WSTRC(L";\n}\n");
  if (m_isGlobal) {
    javascript << FX_WSTRC(L").call(this);\n");
  }
}
开发者ID:andoma,项目名称:pdfium,代码行数:67,代码来源:xfa_expression.cpp


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