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


C++ CFX_ByteStringC::GetCStr方法代码示例

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


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

示例1: FXJSE_ThrowMessage

void FXJSE_ThrowMessage(const CFX_ByteStringC& utf8Name,
                        const CFX_ByteStringC& utf8Message) {
  v8::Isolate* pIsolate = v8::Isolate::GetCurrent();
  ASSERT(pIsolate);
  CFXJSE_ScopeUtil_IsolateHandleRootContext scope(pIsolate);
  v8::Local<v8::String> hMessage = v8::String::NewFromUtf8(
      pIsolate, utf8Message.GetCStr(), v8::String::kNormalString,
      utf8Message.GetLength());
  v8::Local<v8::Value> hError;
  if (utf8Name == "RangeError") {
    hError = v8::Exception::RangeError(hMessage);
  } else if (utf8Name == "ReferenceError") {
    hError = v8::Exception::ReferenceError(hMessage);
  } else if (utf8Name == "SyntaxError") {
    hError = v8::Exception::SyntaxError(hMessage);
  } else if (utf8Name == "TypeError") {
    hError = v8::Exception::TypeError(hMessage);
  } else {
    hError = v8::Exception::Error(hMessage);
    if (utf8Name != "Error" && !utf8Name.IsEmpty()) {
      hError.As<v8::Object>()->Set(
          v8::String::NewFromUtf8(pIsolate, "name"),
          v8::String::NewFromUtf8(pIsolate, utf8Name.GetCStr(),
                                  v8::String::kNormalString,
                                  utf8Name.GetLength()));
    }
  }
  pIsolate->ThrowException(hError);
}
开发者ID:primiano,项目名称:pdfium-merge,代码行数:29,代码来源:value.cpp

示例2: FX_File_Exist

FX_BOOL FX_File_Exist(const CFX_ByteStringC& fileName) {
  FX_DWORD dwAttri = ::GetFileAttributesA(fileName.GetCStr());
  if (dwAttri == -1) {
    return FALSE;
  }
  return (dwAttri & FILE_ATTRIBUTE_DIRECTORY) == 0;
}
开发者ID:hoanganhx86,项目名称:pdfium,代码行数:7,代码来源:fxcrt_windows.cpp

示例3: Open

FX_BOOL CFXCRT_FileAccess_Posix::Open(const CFX_ByteStringC& fileName,
                                      FX_DWORD dwMode) {
  if (m_nFD > -1) {
    return FALSE;
  }
  int32_t nFlags, nMasks;
  FXCRT_Posix_GetFileMode(dwMode, nFlags, nMasks);
  m_nFD = open(fileName.GetCStr(), nFlags, nMasks);
  return m_nFD > -1;
}
开发者ID:primiano,项目名称:pdfium-merge,代码行数:10,代码来源:fxcrt_posix.cpp

示例4: DeleteObjectProperty

FX_BOOL CFXJSE_Value::DeleteObjectProperty(const CFX_ByteStringC& szPropName) {
  CFXJSE_ScopeUtil_IsolateHandleRootContext scope(m_pIsolate);
  v8::Local<v8::Value> hObject =
      v8::Local<v8::Value>::New(m_pIsolate, m_hValue);
  if (!hObject->IsObject()) {
    return FALSE;
  }
  hObject.As<v8::Object>()->Delete(v8::String::NewFromUtf8(
      m_pIsolate, szPropName.GetCStr(), v8::String::kNormalString,
      szPropName.GetLength()));
  return TRUE;
}
开发者ID:primiano,项目名称:pdfium-merge,代码行数:12,代码来源:value.cpp

示例5: FX_XML_SplitQualifiedName

void FX_XML_SplitQualifiedName(const CFX_ByteStringC& bsFullName,
                               CFX_ByteStringC& bsSpace,
                               CFX_ByteStringC& bsName) {
  if (bsFullName.IsEmpty()) {
    return;
  }
  int32_t iStart = 0;
  for (; iStart < bsFullName.GetLength(); iStart++) {
    if (bsFullName.GetAt(iStart) == ':') {
      break;
    }
  }
  if (iStart >= bsFullName.GetLength()) {
    bsName = bsFullName;
  } else {
    bsSpace = CFX_ByteStringC(bsFullName.GetCStr(), iStart);
    iStart++;
    bsName = CFX_ByteStringC(bsFullName.GetCStr() + iStart,
                             bsFullName.GetLength() - iStart);
  }
}
开发者ID:primiano,项目名称:pdfium-merge,代码行数:21,代码来源:fx_xml_composer.cpp

示例6:

FX_BOOL CFXCRT_FileAccess_Win64::Open(const CFX_ByteStringC& fileName,
                                      FX_DWORD dwMode) {
  if (m_hFile) {
    return FALSE;
  }
  FX_DWORD dwAccess, dwShare, dwCreation;
  FXCRT_Windows_GetFileMode(dwMode, dwAccess, dwShare, dwCreation);
  m_hFile = ::CreateFileA(fileName.GetCStr(), dwAccess, dwShare, NULL,
                          dwCreation, FILE_ATTRIBUTE_NORMAL, NULL);
  if (m_hFile == INVALID_HANDLE_VALUE) {
    m_hFile = NULL;
  }
  return m_hFile != NULL;
}
开发者ID:hoanganhx86,项目名称:pdfium,代码行数:14,代码来源:fxcrt_windows.cpp

示例7: HasObjectOwnProperty

FX_BOOL CFXJSE_Value::HasObjectOwnProperty(const CFX_ByteStringC& szPropName,
                                           FX_BOOL bUseTypeGetter) {
  CFXJSE_ScopeUtil_IsolateHandleRootContext scope(m_pIsolate);
  v8::Local<v8::Value> hObject =
      v8::Local<v8::Value>::New(m_pIsolate, m_hValue);
  if (!hObject->IsObject()) {
    return FALSE;
  }
  v8::Local<v8::String> hKey = v8::String::NewFromUtf8(
      m_pIsolate, szPropName.GetCStr(), v8::String::kNormalString,
      szPropName.GetLength());
  return hObject.As<v8::Object>()->HasRealNamedProperty(hKey) ||
         (bUseTypeGetter && hObject.As<v8::Object>()->HasOwnProperty(hKey));
}
开发者ID:primiano,项目名称:pdfium-merge,代码行数:14,代码来源:value.cpp

示例8: SetObjectOwnProperty

FX_BOOL CFXJSE_Value::SetObjectOwnProperty(const CFX_ByteStringC& szPropName,
                                           CFXJSE_Value* lpPropValue) {
  CFXJSE_ScopeUtil_IsolateHandleRootContext scope(m_pIsolate);
  v8::Local<v8::Value> hObject =
      v8::Local<v8::Value>::New(m_pIsolate, m_hValue);
  if (!hObject->IsObject()) {
    return FALSE;
  }
  v8::Local<v8::Value> hValue =
      v8::Local<v8::Value>::New(m_pIsolate, lpPropValue->m_hValue);
  return hObject.As<v8::Object>()->ForceSet(
      v8::String::NewFromUtf8(m_pIsolate, szPropName.GetCStr(),
                              v8::String::kNormalString,
                              szPropName.GetLength()),
      hValue);
}
开发者ID:primiano,项目名称:pdfium-merge,代码行数:16,代码来源:value.cpp

示例9: FX_File_Move

FX_BOOL FX_File_Move(const CFX_ByteStringC& fileNameSrc,
                     const CFX_ByteStringC& fileNameDst) {
  return ::MoveFileA(fileNameSrc.GetCStr(), fileNameDst.GetCStr());
}
开发者ID:hoanganhx86,项目名称:pdfium,代码行数:4,代码来源:fxcrt_windows.cpp

示例10: FX_File_Copy

FX_BOOL FX_File_Copy(const CFX_ByteStringC& fileNameSrc,
                     const CFX_ByteStringC& fileNameDst) {
  return ::CopyFileA(fileNameSrc.GetCStr(), fileNameDst.GetCStr(), FALSE);
}
开发者ID:hoanganhx86,项目名称:pdfium,代码行数:4,代码来源:fxcrt_windows.cpp

示例11: FX_File_Delete

FX_BOOL FX_File_Delete(const CFX_ByteStringC& fileName) {
  return ::DeleteFileA(fileName.GetCStr());
}
开发者ID:hoanganhx86,项目名称:pdfium,代码行数:3,代码来源:fxcrt_windows.cpp

示例12: XFA_ByteStringToDouble

FX_DOUBLE XFA_ByteStringToDouble(const CFX_ByteStringC& szStringVal) {
  CFX_WideString wsValue =
      CFX_WideString::FromUTF8(szStringVal.GetCStr(), szStringVal.GetLength());
  return XFA_WideStringToDouble(wsValue);
}
开发者ID:andoma,项目名称:pdfium,代码行数:5,代码来源:xfa_utils_imp.cpp


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