本文整理汇总了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));
}
示例2: getItemTypeDTV
DatatypeValidator* ListDatatypeValidator::getItemTypeDTV() const
{
DatatypeValidator* bdv = this->getBaseValidator();
while (bdv->getType() == DatatypeValidator::List)
bdv = bdv->getBaseValidator();
return bdv;
}
示例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;
}
示例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;
}
示例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;
}