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


C++ DatatypeValidator::getBaseValidator方法代码示例

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


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

示例1: isDuplicateOf

bool ValueStore::isDuplicateOf(DatatypeValidator* const dv1, const XMLCh* const val1,
                               DatatypeValidator* const dv2, const XMLCh* const val2) {

    // if either validator's null, fall back on string comparison
    if(!dv1 || !dv2) {
        return (XMLString::equals(val1, val2));
    }

    unsigned int val1Len = XMLString::stringLen(val1);
    unsigned int val2Len = XMLString::stringLen(val2);

    if (!val1Len && !val2Len) {

        if (dv1 == dv2) {
            return true;
        }

        return false;
    }

    if (!val1Len || !val2Len) {
        return false;
    }

    // are the validators equal?
    // As always we are obliged to compare by reference...
    if (dv1 == dv2) {
        return ((dv1->compare(val1, val2, fMemoryManager)) == 0);
    }

    // see if this.fValidator is derived from value.fValidator:
    DatatypeValidator* tempVal = dv1;
    for(; !tempVal || tempVal == dv2; tempVal = tempVal->getBaseValidator()) ;

    if (tempVal) { // was derived!
        return ((dv2->compare(val1, val2, fMemoryManager)) == 0);
    }

    // see if value.fValidator is derived from this.fValidator:
    for(tempVal = dv2; !tempVal || tempVal == dv1; tempVal = tempVal->getBaseValidator()) ;

    if(tempVal) { // was derived!
        return ((dv1->compare(val1, val2, fMemoryManager)) == 0);
    }

    // if we're here it means the types weren't related.  Must fall back to strings:
    return (XMLString::equals(val1, val2));
}
开发者ID:gitrider,项目名称:wxsj2,代码行数:48,代码来源:ValueStore.cpp

示例2: getItemTypeDTV

DatatypeValidator* ListDatatypeValidator::getItemTypeDTV() const
{
    DatatypeValidator* bdv = this->getBaseValidator();

    while (bdv->getType() == DatatypeValidator::List)
        bdv = bdv->getBaseValidator();

    return bdv;
}
开发者ID:mydw,项目名称:mydw,代码行数:9,代码来源:ListDatatypeValidator.cpp

示例3: getBuiltInBaseValidator

DatatypeValidator* DatatypeValidatorFactory::getBuiltInBaseValidator(const DatatypeValidator* const dv)
{
    DatatypeValidator *curdv = (DatatypeValidator*)dv;

    while (curdv)
    {
        if (curdv == getBuiltInRegistry()->get(curdv->getTypeLocalName()))
            return curdv;
        else
            curdv = curdv->getBaseValidator();
     }

     return 0;
}
开发者ID:jjiezheng,项目名称:pap_full,代码行数:14,代码来源:DatatypeValidatorFactory.cpp

示例4: isMultiValueFacetDefined

bool XSObjectFactory::isMultiValueFacetDefined(DatatypeValidator* const dv)
{
    DatatypeValidator* tmpDV = dv;

    while (tmpDV)
    {
        if ((tmpDV->getFacetsDefined() & DatatypeValidator::FACET_PATTERN)
        ||  (tmpDV->getFacetsDefined() & DatatypeValidator::FACET_ENUMERATION))
            return true;

        tmpDV = tmpDV->getBaseValidator();
    }

    return false;
}
开发者ID:AmesianX,项目名称:Sigil,代码行数:15,代码来源:XSObjectFactory.cpp

示例5: getCanRepGroup

/***
 *
 *   For any dv other than Decimaldv, return String only.
 *   Later on if support to dv other than Decimaldv arise, we may
 *   add them fCanRepRegistry during DatatypeValidatorFactory::initCanRepRegistory()
 *
 ***/
XMLCanRepGroup::CanRepGroup DatatypeValidatorFactory::getCanRepGroup(const DatatypeValidator* const dv)
{
    if (!dv)
        return XMLCanRepGroup::String;

    DatatypeValidator *curdv = (DatatypeValidator*) dv;

    while (curdv)
    {
        if (fCanRepRegistry->containsKey(curdv))
            return fCanRepRegistry->get(curdv)->getGroup();
        else
            curdv = curdv->getBaseValidator();
    }

    return XMLCanRepGroup::String;
}
开发者ID:jjiezheng,项目名称:pap_full,代码行数:24,代码来源:DatatypeValidatorFactory.cpp


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