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


C++ Utf8Str::equals方法代码示例

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


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

示例1: COMGETTER

STDMETHODIMP VRDEServer::COMGETTER(VRDEExtPack) (BSTR *aExtPack)
{
    CheckComArgOutPointerValid(aExtPack);

    AutoCaller autoCaller(this);
    HRESULT hrc = autoCaller.rc();
    if (SUCCEEDED(hrc))
    {
        AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
        Utf8Str strExtPack = mData->mVrdeExtPack;
        alock.release();

        if (strExtPack.isNotEmpty())
        {
            if (strExtPack.equals(VBOXVRDP_KLUDGE_EXTPACK_NAME))
                hrc = S_OK;
            else
            {
#ifdef VBOX_WITH_EXTPACK
                ExtPackManager *pExtPackMgr = mParent->getVirtualBox()->getExtPackManager();
                hrc = pExtPackMgr->checkVrdeExtPack(&strExtPack);
#else
                hrc = setError(E_FAIL, tr("Extension pack '%s' does not exist"), strExtPack.c_str());
#endif
            }
            if (SUCCEEDED(hrc))
                strExtPack.cloneTo(aExtPack);
        }
        else
        {
            /* Get the global setting. */
            ComPtr<ISystemProperties> systemProperties;
            hrc = mParent->getVirtualBox()->COMGETTER(SystemProperties)(systemProperties.asOutParam());
            if (SUCCEEDED(hrc))
                hrc = systemProperties->COMGETTER(DefaultVRDEExtPack)(aExtPack);
        }
    }

    return hrc;
}
开发者ID:gvsurenderreddy,项目名称:VirtualBox-OSE,代码行数:40,代码来源:VRDEServerImpl.cpp

示例2: getVRDEExtPack

HRESULT VRDEServer::getVRDEExtPack(com::Utf8Str &aExtPack)
{
    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    Utf8Str strExtPack = mData->mVrdeExtPack;
    alock.release();
    HRESULT hrc = S_OK;

    if (strExtPack.isNotEmpty())
    {
        if (strExtPack.equals(VBOXVRDP_KLUDGE_EXTPACK_NAME))
            hrc = S_OK;
        else
        {
#ifdef VBOX_WITH_EXTPACK
            ExtPackManager *pExtPackMgr = mParent->i_getVirtualBox()->i_getExtPackManager();
            hrc = pExtPackMgr->i_checkVrdeExtPack(&strExtPack);
#else
            hrc = setError(E_FAIL, tr("Extension pack '%s' does not exist"), strExtPack.c_str());
#endif
        }
        if (SUCCEEDED(hrc))
            aExtPack = strExtPack;
    }
    else
    {
        /* Get the global setting. */
        ComPtr<ISystemProperties> systemProperties;
        hrc = mParent->i_getVirtualBox()->COMGETTER(SystemProperties)(systemProperties.asOutParam());
        if (SUCCEEDED(hrc))
        {
            BSTR bstr;
            hrc = systemProperties->COMGETTER(DefaultVRDEExtPack)(&bstr);
            if (SUCCEEDED(hrc))
                aExtPack = Utf8Str(bstr);
        }
    }
    return hrc;
}
开发者ID:sobomax,项目名称:virtualbox_64bit_edd,代码行数:38,代码来源:VRDEServerImpl.cpp


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