本文整理汇总了C++中CFX_ByteStringC类的典型用法代码示例。如果您正苦于以下问题:C++ CFX_ByteStringC类的具体用法?C++ CFX_ByteStringC怎么用?C++ CFX_ByteStringC使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CFX_ByteStringC类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RemoveAt
void CXML_AttrMap::RemoveAt(const CFX_ByteStringC& space, const CFX_ByteStringC& name)
{
if (m_pMap == NULL) {
return;
}
for (int i = 0; i < m_pMap->GetSize(); i ++) {
CXML_AttrItem& item = GetAt(i);
if ((space.IsEmpty() || item.m_QSpaceName == space) && item.m_AttrName == name) {
m_pMap->RemoveAt(i);
return;
}
}
}
示例2:
FX_BOOL CFXCRT_FileAccess_Win64::Open(const CFX_ByteStringC& fileName,
uint32_t dwMode) {
if (m_hFile) {
return FALSE;
}
uint32_t dwAccess, dwShare, dwCreation;
FXCRT_Windows_GetFileMode(dwMode, dwAccess, dwShare, dwCreation);
m_hFile = ::CreateFileA(fileName.c_str(), dwAccess, dwShare, nullptr,
dwCreation, FILE_ATTRIBUTE_NORMAL, nullptr);
if (m_hFile == INVALID_HANDLE_VALUE)
m_hFile = nullptr;
return !!m_hFile;
}
示例3:
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;
}
示例4: CountElements
uint32_t CXML_Element::CountElements(const CFX_ByteStringC& space,
const CFX_ByteStringC& tag) const {
int count = 0;
for (const ChildRecord& record : m_Children) {
if (record.type != Element)
continue;
CXML_Element* pKid = static_cast<CXML_Element*>(record.child);
if ((space.IsEmpty() || pKid->m_QSpaceName == space) &&
pKid->m_TagName == tag) {
count++;
}
}
return count;
}
示例5: CountElements
FX_DWORD CXML_Element::CountElements(const CFX_ByteStringC& space, const CFX_ByteStringC& tag) const
{
int count = 0;
for (int i = 0; i < m_Children.GetSize(); i += 2) {
ChildType type = (ChildType)(uintptr_t)m_Children.GetAt(i);
if (type != Element) {
continue;
}
CXML_Element* pKid = (CXML_Element*)m_Children.GetAt(i + 1);
if ((space.IsEmpty() || pKid->m_QSpaceName == space) && pKid->m_TagName == tag) {
count ++;
}
}
return count;
}
示例6: GetNamespaceURI
CFX_ByteString CXML_Element::GetNamespaceURI(const CFX_ByteStringC& qName) const
{
const CFX_WideString* pwsSpace;
const CXML_Element *pElement = this;
do {
if (qName.IsEmpty()) {
pwsSpace = pElement->m_AttrMap.Lookup(FX_BSTRC(""), FX_BSTRC("xmlns"));
} else {
pwsSpace = pElement->m_AttrMap.Lookup(FX_BSTRC("xmlns"), qName);
}
if (pwsSpace) {
break;
}
pElement = pElement->GetParent();
} while(pElement);
return pwsSpace ? FX_UTF8Encode(*pwsSpace) : CFX_ByteString();
}
示例7: SetAt
void CXML_AttrMap::SetAt(const CFX_ByteStringC& space, const CFX_ByteStringC& name, const CFX_WideStringC& value)
{
for (int i = 0; i < GetSize(); i++) {
CXML_AttrItem& item = GetAt(i);
if ((space.IsEmpty() || item.m_QSpaceName == space) && item.m_AttrName == name) {
item.m_Value = value;
return;
}
}
if (!m_pMap) {
m_pMap = new CFX_ObjectArray<CXML_AttrItem>;
}
CXML_AttrItem* pItem = (CXML_AttrItem*)m_pMap->AddSpace();
if (!pItem) {
return;
}
pItem->m_QSpaceName = space;
pItem->m_AttrName = name;
pItem->m_Value = value;
}
示例8: 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);
}
}
示例9: FX_File_Move
FX_BOOL FX_File_Move(const CFX_ByteStringC& fileNameSrc,
const CFX_ByteStringC& fileNameDst) {
return ::MoveFileA(fileNameSrc.GetCStr(), fileNameDst.GetCStr());
}
示例10: FX_File_Copy
FX_BOOL FX_File_Copy(const CFX_ByteStringC& fileNameSrc,
const CFX_ByteStringC& fileNameDst) {
return ::CopyFileA(fileNameSrc.GetCStr(), fileNameDst.GetCStr(), FALSE);
}
示例11: FX_File_Delete
FX_BOOL FX_File_Delete(const CFX_ByteStringC& fileName) {
return ::DeleteFileA(fileName.GetCStr());
}
示例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);
}
示例13: CheckWord
bool CXFA_FFTextEdit::CheckWord(const CFX_ByteStringC& sWord) {
if (sWord.IsEmpty() || m_pDataAcc->GetUIType() != XFA_Element::TextEdit)
return true;
return false;
}
示例14: CheckWord
FX_BOOL CXFA_FFTextEdit::CheckWord(const CFX_ByteStringC& sWord) {
if (sWord.IsEmpty() || m_pDataAcc->GetUIType() != XFA_ELEMENT_TextEdit) {
return TRUE;
}
return GetDoc()->GetDocProvider()->CheckWord(GetDoc(), sWord);
}
示例15: CopyData
void CFX_ByteTextBuf::operator =(const CFX_ByteStringC& str)
{
CopyData((FX_LPCBYTE)str, str.GetLength());
}