本文整理汇总了C++中FX_BSTR::IsEmpty方法的典型用法代码示例。如果您正苦于以下问题:C++ FX_BSTR::IsEmpty方法的具体用法?C++ FX_BSTR::IsEmpty怎么用?C++ FX_BSTR::IsEmpty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FX_BSTR
的用法示例。
在下文中一共展示了FX_BSTR::IsEmpty方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RemoveAt
void CXML_AttrMap::RemoveAt(FX_BSTR space, FX_BSTR 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: CountElements
FX_DWORD CXML_Element::CountElements(FX_BSTR space, FX_BSTR tag) const
{
int count = 0;
for (int i = 0; i < m_Children.GetSize(); i += 2) {
ChildType type = (ChildType)(FX_UINTPTR)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;
}
示例3: GetNamespaceURI
CFX_ByteString CXML_Element::GetNamespaceURI(FX_BSTR 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();
}
示例4: GetFontFace
FXFT_Face CFPF_SkiaFontMgr::GetFontFace(FX_BSTR bsFile, FX_INT32 iFaceIndex )
{
if (bsFile.IsEmpty()) {
return NULL;
}
if (iFaceIndex < 0) {
return NULL;
}
FXFT_Open_Args args;
args.flags = FT_OPEN_PATHNAME;
args.pathname = (FT_String*)bsFile.GetCStr();
FXFT_Face face;
if (FXFT_Open_Face(m_FTLibrary, &args, iFaceIndex, &face)) {
return FALSE;
}
FXFT_Set_Pixel_Sizes(face, 0, 64);
return face;
}
示例5: SetAt
void CXML_AttrMap::SetAt(FX_BSTR space, FX_BSTR name, FX_WSTR 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 = FX_NEW CFX_ObjectArray < CXML_AttrItem > ;
}
if (!m_pMap) {
return;
}
CXML_AttrItem* pItem = (CXML_AttrItem*)m_pMap->AddSpace();
if (!pItem) {
return;
}
pItem->m_QSpaceName = space;
pItem->m_AttrName = name;
pItem->m_Value = value;
}