void ListDatatypeValidator::inspectFacetBase(MemoryManager* const manager) { // // we are pretty sure baseValidator is not null // if (getBaseValidator()->getType() == DatatypeValidator::List) { AbstractStringValidator::inspectFacetBase(manager); } else { // the first level ListDTV // check 4.3.5.c0 must: enumeration values from the value space of base if ( ((getFacetsDefined() & DatatypeValidator::FACET_ENUMERATION) != 0) && (getEnumeration() !=0) ) { int i; int enumLength = getEnumeration()->size(); try { for ( i = 0; i < enumLength; i++) { // ask the itemType for a complete check BaseRefVectorOf<XMLCh>* tempList = XMLString::tokenizeString(getEnumeration()->elementAt(i), manager); Janitor<BaseRefVectorOf<XMLCh> > jan(tempList); int tokenNumber = tempList->size(); try { for ( int j = 0; j < tokenNumber; j++) getBaseValidator()->validate(tempList->elementAt(j), (ValidationContext*)0, manager); } catch(const OutOfMemoryException&) { jan.release(); throw; } // enum shall pass this->checkContent() as well. checkContent(getEnumeration()->elementAt(i), (ValidationContext*)0, false, manager); } } catch ( XMLException& ) { ThrowXMLwithMemMgr1(InvalidDatatypeFacetException , XMLExcepts::FACET_enum_base , getEnumeration()->elementAt(i) , manager); } } } }// End of inspectFacetBase()
void ListDatatypeValidator::validate( const XMLCh* const content , ValidationContext* const context , MemoryManager* const manager) { setContent(content); BaseRefVectorOf<XMLCh>* tokenVector = XMLString::tokenizeString(content, manager); Janitor<BaseRefVectorOf<XMLCh> > janName(tokenVector); checkContent(tokenVector, content, context, false, manager); }
void DoubleDatatypeValidator::setEnumeration(MemoryManager* const manager) { // check 4.3.5.c0 must: enumeration values from the value space of base // // 1. shall be from base value space // 2. shall be from current value space as well ( shall go through boundsCheck() ) // if (!fStrEnumeration) return; XMLSize_t i = 0; XMLSize_t enumLength = fStrEnumeration->size(); DoubleDatatypeValidator *numBase = (DoubleDatatypeValidator*) getBaseValidator(); if (numBase) { try { for ( i = 0; i < enumLength; i++) { numBase->checkContent(fStrEnumeration->elementAt(i), (ValidationContext*)0, false, manager); } } catch (XMLException&) { ThrowXMLwithMemMgr1(InvalidDatatypeFacetException , XMLExcepts::FACET_enum_base , fStrEnumeration->elementAt(i) , manager); } } #if 0 // spec says that only base has to checkContent // We put the this->checkContent in a separate loop // to not block original message with in that method. // for ( i = 0; i < enumLength; i++) { checkContent(fStrEnumeration->elementAt(i), (ValidationContext*)0, false, manager); } #endif fEnumeration = new (manager) RefVectorOf<XMLNumber>(enumLength, true, manager); fEnumerationInherited = false; for ( i = 0; i < enumLength; i++) { fEnumeration->insertElementAt(new (manager) XMLDouble(fStrEnumeration->elementAt(i), manager), i); } }
static OSStatus callbackFunction(SecKeychainEvent keychainEvent, SecKeychainCallbackInfo *info, void *context) { assert(keychainEvent == kSecAddEvent && context != NULL); assert(info != NULL); assert(info->item != NULL); checkContent(info->item); *((UInt32 *)context) = 1; ok_status(SecKeychainItemDelete(info->item), "delete item"); return 0; }
LineEdit::LineEdit(QWidget *parent): QLineEdit(parent), currentBegin(""), reply(nullptr) { currentCompleter = new QCompleter(this); networkManager = UZApplication::instance()->networkManager(); p_identifier = ++senderIdentifier; connect(this,SIGNAL(textEdited(QString)),this,SLOT(checkContent())); connect(networkManager,&NetworkManager::responseReady,this,&LineEdit::updateContent); }
void AbstractNumericValidator::validate(const XMLCh* const content , ValidationContext* const context , MemoryManager* const manager) { checkContent(content, context, false, manager); }
void DateTimeValidator::validate(const XMLCh* const content , ValidationContext* const context , MemoryManager* const manager) { checkContent(content, context, false, manager); }