本文整理汇总了C++中DatatypeValidator::getBounded方法的典型用法代码示例。如果您正苦于以下问题:C++ DatatypeValidator::getBounded方法的具体用法?C++ DatatypeValidator::getBounded怎么用?C++ DatatypeValidator::getBounded使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DatatypeValidator
的用法示例。
在下文中一共展示了DatatypeValidator::getBounded方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
//.........这里部分代码省略.........
datatypeValidator->setFinite(false);
}
}
else {
if ((baseValidator->getType() != DatatypeValidator::String) && facets) {
KVStringPair* value = facets->get(SchemaSymbols::fgELT_WHITESPACE);
if (value != 0) {
facets->removeKey(SchemaSymbols::fgELT_WHITESPACE);
}
}
datatypeValidator = baseValidator->newInstance
(
facets
, enums
, finalSet
, manager
);
// Set PSVI information for Ordered, Numeric, Bounded & Finite
datatypeValidator->setOrdered(baseValidator->getOrdered());
datatypeValidator->setNumeric(baseValidator->getNumeric());
RefHashTableOf<KVStringPair>* baseFacets = baseValidator->getFacets();
if (facets &&
((facets->get(SchemaSymbols::fgELT_MININCLUSIVE) ||
facets->get(SchemaSymbols::fgELT_MINEXCLUSIVE) ||
(baseFacets && (baseFacets->get(SchemaSymbols::fgELT_MININCLUSIVE) ||
baseFacets->get(SchemaSymbols::fgELT_MINEXCLUSIVE))))) &&
(facets->get(SchemaSymbols::fgELT_MAXINCLUSIVE) ||
facets->get(SchemaSymbols::fgELT_MAXEXCLUSIVE) ||
(baseFacets && ((baseFacets->get(SchemaSymbols::fgELT_MAXINCLUSIVE) ||
baseFacets->get(SchemaSymbols::fgELT_MAXEXCLUSIVE))))))
{
datatypeValidator->setBounded(true);
}
else
{
datatypeValidator->setBounded(false);
}
if (baseValidator->getFinite())
{
datatypeValidator->setFinite(true);
}
else if (!facets)
{
datatypeValidator->setFinite(false);
}
else if (facets->get(SchemaSymbols::fgELT_LENGTH) || facets->get(SchemaSymbols::fgELT_MAXLENGTH) ||
facets->get(SchemaSymbols::fgELT_TOTALDIGITS))
{
datatypeValidator->setFinite(true);
}
//for efficiency use this instead of rechecking...
//else if ((facets->get(SchemaSymbols::fgELT_MININCLUSIVE) || facets->get(SchemaSymbols::fgELT_MINEXCLUSIVE)) &&
// (facets->get(SchemaSymbols::fgELT_MAXINCLUSIVE) || facets->get(SchemaSymbols::fgELT_MAXEXCLUSIVE)))
else if (datatypeValidator->getBounded() ||
datatypeValidator->getType() == DatatypeValidator::Date ||
datatypeValidator->getType() == DatatypeValidator::YearMonth ||
datatypeValidator->getType() == DatatypeValidator::Year ||
datatypeValidator->getType() == DatatypeValidator::MonthDay ||
datatypeValidator->getType() == DatatypeValidator::Day ||
datatypeValidator->getType() == DatatypeValidator::Month)
{
if (facets->get(SchemaSymbols::fgELT_FRACTIONDIGITS))
{
datatypeValidator->setFinite(true);
}
else
{
datatypeValidator->setFinite(false);
}
}
else
{
datatypeValidator->setFinite(false);
}
}
if (datatypeValidator != 0) {
if (isUserDefined) {
if (!fUserDefinedRegistry) {
fUserDefinedRegistry = new (userManager) RefHashTableOf<DatatypeValidator>(29, userManager);
}
fUserDefinedRegistry->put((void *)typeName, datatypeValidator);
}
else {
fBuiltInRegistry->put((void *)typeName, datatypeValidator);
}
datatypeValidator->setTypeName(typeName);
}
return datatypeValidator;
}