LLVMFuzzerTestOneInput:
   25|  7.12k|extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
   26|  7.12k|    parseInMemory(Data, Size);
   27|  7.12k|    return 0;
   28|  7.12k|}

_ZN11xercesc_3_211DOMDocumentC2Ev:
   76|      1|    DOMDocument() {};

_ZN11xercesc_3_216DOMDocumentRangeC2Ev:
   45|      1|    DOMDocumentRange() {};

_ZN11xercesc_3_220DOMDocumentTraversalC2Ev:
   55|      1|    DOMDocumentTraversal() {};

_ZN11xercesc_3_217DOMImplementationC2Ev:
   51|      1|        DOMImplementation() {};                                      // no plain constructor

_ZN11xercesc_3_219DOMImplementationLSC2Ev:
   57|      1|    DOMImplementationLS() {};

_ZN11xercesc_3_223DOMImplementationSourceC2Ev:
   50|      1|    DOMImplementationSource() {};

_ZN11xercesc_3_217DOMLSParserFilterC2Ev:
   52|      2|    DOMLSParserFilter() {};

_ZN11xercesc_3_216DOMMemoryManagerC2Ev:
   40|      1|    DOMMemoryManager() {};

_ZN11xercesc_3_27DOMNodeC2Ev:
  146|      1|    DOMNode() {}

_ZN11xercesc_3_211DOMNodeListC2Ev:
   52|      2|    DOMNodeList() {};

_ZN11xercesc_3_215DOMPSVITypeInfoC2Ev:
   42|     24|    DOMPSVITypeInfo() {};

_ZN11xercesc_3_211DOMTypeInfoC2Ev:
   43|     24|    DOMTypeInfo() {};

_ZN11xercesc_3_217DOMXPathEvaluatorC2Ev:
   56|      1|    DOMXPathEvaluator() {};

_ZN11xercesc_3_215DOMDocumentImplC2EPNS_17DOMImplementationEPNS_13MemoryManagerE:
   82|      1|    : fNode(this, this),
   83|      1|      fParent(this, this),
   84|      1|      fNodeIDMap(0),
   85|      1|      fInputEncoding(0),
   86|      1|      fXmlEncoding(0),
   87|      1|      fXmlStandalone(false),
   88|      1|      fXmlVersion(0),
   89|      1|      fDocumentURI(0),
   90|      1|      fDOMConfiguration(0),
   91|      1|      fUserDataTableKeys(17, manager),
   92|      1|      fUserDataTable(0),
   93|      1|      fCurrentBlock(0),
   94|      1|      fCurrentSingletonBlock(0),
   95|      1|      fFreePtr(0),
   96|      1|      fFreeBytesRemaining(0),
   97|      1|      fHeapAllocSize(kInitialHeapAllocSize),
   98|      1|      fRecycleNodePtr(0),
   99|      1|      fRecycleBufferPtr(0),
  100|      1|      fNodeListPool(0),
  101|      1|      fDocType(0),
  102|      1|      fDocElement(0),
  103|      1|      fNameTableSize(257),
  104|      1|      fNormalizer(0),
  105|      1|      fRanges(0),
  106|      1|      fNodeIterators(0),
  107|      1|      fMemoryManager(manager),
  108|      1|      fDOMImplementation(domImpl),
  109|      1|      fChanges(0),
  110|      1|      errorChecking(true)
  111|      1|{
  112|      1|    fNameTable = (DOMStringPoolEntry**)allocate (
  113|      1|      sizeof (DOMStringPoolEntry*) * fNameTableSize);
  114|    258|    for (XMLSize_t i = 0; i < fNameTableSize; i++)
  ------------------
  |  Branch (114:27): [True: 257, False: 1]
  ------------------
  115|    257|      fNameTable[i] = 0;
  116|      1|}
_ZN11xercesc_3_215DOMDocumentImpl8allocateEm:
  858|      1|{
  859|       |  //	Align the request size so that suballocated blocks
  860|       |  //	beyond this one will be maintained at the same alignment.
  861|      1|  amount = XMLPlatformUtils::alignPointerForNewBlockAllocation(amount);
  862|       |
  863|       |  // If the request is for a largish block, hand it off to the system
  864|       |  //   allocator.  The block still must be linked into a special list of
  865|       |  //   allocated big blocks so that it will be deleted when the time comes.
  866|      1|  if (amount > kMaxSubAllocationSize)
  ------------------
  |  Branch (866:7): [True: 1, False: 0]
  ------------------
  867|      1|  {
  868|       |    //	The size of the header we add to our raw blocks
  869|      1|    XMLSize_t sizeOfHeader = XMLPlatformUtils::alignPointerForNewBlockAllocation(sizeof(void *));
  870|       |
  871|       |    //	Try to allocate the block
  872|      1|    void* newBlock = fMemoryManager->allocate(sizeOfHeader + amount);
  873|       |
  874|       |    //	Link it into the list beyond current block, as current block
  875|       |    //	is still being subdivided. If there is no current block
  876|       |    //	then track that we have no bytes to further divide.
  877|      1|    if (fCurrentSingletonBlock)
  ------------------
  |  Branch (877:9): [True: 0, False: 1]
  ------------------
  878|      0|    {
  879|      0|      *(void **)newBlock = *(void **)fCurrentSingletonBlock;
  880|      0|      *(void **)fCurrentSingletonBlock = newBlock;
  881|      0|    }
  882|      1|    else
  883|      1|    {
  884|      1|      *(void **)newBlock = 0;
  885|      1|      fCurrentSingletonBlock = newBlock;
  886|      1|    }
  887|       |
  888|      1|    void *retPtr = (char*)newBlock + sizeOfHeader;
  889|      1|    return retPtr;
  890|      1|  }
  891|       |
  892|       |  //	It's a normal (sub-allocatable) request.
  893|       |  //	Are we out of room in our current block?
  894|      0|  if (amount > fFreeBytesRemaining)
  ------------------
  |  Branch (894:7): [True: 0, False: 0]
  ------------------
  895|      0|  {
  896|       |    // Request doesn't fit in the current block.
  897|       |    // The size of the header we add to our raw blocks
  898|      0|    XMLSize_t sizeOfHeader = XMLPlatformUtils::alignPointerForNewBlockAllocation(sizeof(void *));
  899|       |
  900|       |    // Get a new block from the system allocator.
  901|      0|    void* newBlock;
  902|      0|    newBlock = fMemoryManager->allocate(fHeapAllocSize);
  903|       |
  904|      0|    *(void **)newBlock = fCurrentBlock;
  905|      0|    fCurrentBlock = newBlock;
  906|      0|    fFreePtr = (char *)newBlock + sizeOfHeader;
  907|      0|    fFreeBytesRemaining = fHeapAllocSize - sizeOfHeader;
  908|       |
  909|      0|    if(fHeapAllocSize<kMaxHeapAllocSize)
  ------------------
  |  Branch (909:8): [True: 0, False: 0]
  ------------------
  910|      0|      fHeapAllocSize*=2;
  911|      0|  }
  912|       |
  913|       |  //	Subdivide the request off current block
  914|      0|  void *retPtr = fFreePtr;
  915|      0|  fFreePtr += amount;
  916|      0|  fFreeBytesRemaining -= amount;
  917|       |
  918|      0|  return retPtr;
  919|      1|}

_ZN11xercesc_3_214XMLInitializer29initializeDOMDocumentTypeImplEv:
   43|      1|{
   44|      1|    sDocumentMutex = new XMLMutex(XMLPlatformUtils::fgMemoryManager);
   45|       |
   46|      1|    static const XMLCh gCoreStr[] = { chLatin_C, chLatin_o, chLatin_r, chLatin_e, chNull };
   47|      1|    DOMImplementation* impl =  DOMImplementationRegistry::getDOMImplementation(gCoreStr);
   48|      1|    sDocument = impl->createDocument(); // document type object (DTD).
   49|      1|}

_ZN11xercesc_3_214XMLInitializer31initializeDOMImplementationImplEv:
   71|      1|{
   72|      1|    sMsgLoader = XMLPlatformUtils::loadMsgSet(XMLUni::fgXMLDOMMsgDomain);
   73|       |
   74|      1|    if (!sMsgLoader)
  ------------------
  |  Branch (74:9): [True: 0, False: 1]
  ------------------
   75|      0|      XMLPlatformUtils::panic(PanicHandler::Panic_CantLoadMsgDomain);
   76|       |
   77|      1|    gDomimp = new DOMImplementationImpl;
   78|      1|}
_ZN11xercesc_3_221DOMImplementationImpl24getDOMImplementationImplEv:
   97|      2|{
   98|      2|    return gDomimp;
   99|      2|}
_ZNK11xercesc_3_221DOMImplementationImpl10hasFeatureEPKDsS2_:
  105|      1|{
  106|      1|    if (!feature)
  ------------------
  |  Branch (106:9): [True: 0, False: 1]
  ------------------
  107|      0|        return false;
  108|       |
  109|       |    // ignore the + modifier
  110|      1|    if(*feature==chPlus)
  ------------------
  |  Branch (110:8): [True: 0, False: 1]
  ------------------
  111|      0|        feature++;
  112|       |
  113|      1|    bool anyVersion = (version == 0 || !*version);
  ------------------
  |  Branch (113:24): [True: 1, False: 0]
  |  Branch (113:40): [True: 0, False: 0]
  ------------------
  114|      1|    bool version1_0 = XMLString::equals(version, g1_0);
  115|      1|    bool version2_0 = XMLString::equals(version, g2_0);
  116|      1|    bool version3_0 = XMLString::equals(version, g3_0);
  117|       |
  118|       |    // Currently, we support only XML Level 1 version 1.0
  119|      1|    if (XMLString::compareIStringASCII(feature, XMLUni::fgXMLString) == 0
  ------------------
  |  Branch (119:9): [True: 0, False: 1]
  ------------------
  120|      1|        && (anyVersion || version1_0 || version2_0))
  ------------------
  |  Branch (120:13): [True: 0, False: 0]
  |  Branch (120:27): [True: 0, False: 0]
  |  Branch (120:41): [True: 0, False: 0]
  ------------------
  121|      0|        return true;
  122|       |
  123|      1|    if (XMLString::compareIStringASCII(feature, gCore) == 0
  ------------------
  |  Branch (123:9): [True: 1, False: 0]
  ------------------
  124|      1|        && (anyVersion || version1_0 || version2_0 || version3_0))
  ------------------
  |  Branch (124:13): [True: 1, False: 0]
  |  Branch (124:27): [True: 0, False: 0]
  |  Branch (124:41): [True: 0, False: 0]
  |  Branch (124:55): [True: 0, False: 0]
  ------------------
  125|      1|        return true;
  126|       |
  127|      0|    if (XMLString::compareIStringASCII(feature, gTrav) == 0
  ------------------
  |  Branch (127:9): [True: 0, False: 0]
  ------------------
  128|      0|        && (anyVersion || version2_0))
  ------------------
  |  Branch (128:13): [True: 0, False: 0]
  |  Branch (128:27): [True: 0, False: 0]
  ------------------
  129|      0|        return true;
  130|       |
  131|      0|    if (XMLString::compareIStringASCII(feature, gRange) == 0
  ------------------
  |  Branch (131:9): [True: 0, False: 0]
  ------------------
  132|      0|        && (anyVersion || version2_0))
  ------------------
  |  Branch (132:13): [True: 0, False: 0]
  |  Branch (132:27): [True: 0, False: 0]
  ------------------
  133|      0|        return true;
  134|       |
  135|      0|    if (XMLString::compareIStringASCII(feature, gLS) == 0
  ------------------
  |  Branch (135:9): [True: 0, False: 0]
  ------------------
  136|      0|        && (anyVersion || version3_0))
  ------------------
  |  Branch (136:13): [True: 0, False: 0]
  |  Branch (136:27): [True: 0, False: 0]
  ------------------
  137|      0|        return true;
  138|       |
  139|      0|    if (XMLString::compareIStringASCII(feature, gXPath) == 0
  ------------------
  |  Branch (139:9): [True: 0, False: 0]
  ------------------
  140|      0|        && (anyVersion || version3_0))
  ------------------
  |  Branch (140:13): [True: 0, False: 0]
  |  Branch (140:27): [True: 0, False: 0]
  ------------------
  141|      0|        return true;
  142|       |
  143|      0|    return false;
  144|      0|}
_ZN11xercesc_3_221DOMImplementationImpl14createDocumentEPNS_13MemoryManagerE:
  175|      1|{
  176|      1|        return new (manager) DOMDocumentImpl(this, manager);
  177|      1|}
_ZN11xercesc_3_217DOMImplementation17getImplementationEv:
  184|      1|{
  185|      1|    return (DOMImplementation*) DOMImplementationImpl::getDOMImplementationImpl();
  186|      1|}
_ZNK11xercesc_3_221DOMImplementationImpl20getDOMImplementationEPKDs:
  256|      1|{
  257|      1|    DOMImplementation* impl = DOMImplementation::getImplementation();
  258|       |
  259|      1|    XMLStringTokenizer tokenizer(features, XMLPlatformUtils::fgMemoryManager);
  260|      1|    const XMLCh* feature = 0;
  261|       |
  262|      2|    while (feature || tokenizer.hasMoreTokens()) {
  ------------------
  |  Branch (262:12): [True: 0, False: 2]
  |  Branch (262:23): [True: 1, False: 1]
  ------------------
  263|       |
  264|      1|        if (!feature)
  ------------------
  |  Branch (264:13): [True: 1, False: 0]
  ------------------
  265|      1|            feature = tokenizer.nextToken();
  266|       |
  267|      1|        const XMLCh* version = 0;
  268|      1|        const XMLCh* token = tokenizer.nextToken();
  269|       |
  270|      1|        if (token && XMLString::isDigit(token[0]))
  ------------------
  |  Branch (270:13): [True: 0, False: 1]
  |  Branch (270:22): [True: 0, False: 0]
  ------------------
  271|      0|            version = token;
  272|       |
  273|      1|        if (!impl->hasFeature(feature, version))
  ------------------
  |  Branch (273:13): [True: 0, False: 1]
  ------------------
  274|      0|            return 0;
  275|       |
  276|      1|        if (!version)
  ------------------
  |  Branch (276:13): [True: 1, False: 0]
  ------------------
  277|      1|            feature = token;
  278|      1|    }
  279|      1|    return impl;
  280|      1|}

_ZN11xercesc_3_221DOMImplementationImplC2Ev:
   52|      1|    DOMImplementationImpl() {};

_ZN11xercesc_3_214XMLInitializer35initializeDOMImplementationRegistryEv:
   43|      1|{
   44|      1|    gDOMImplSrcVectorMutex = new XMLMutex(XMLPlatformUtils::fgMemoryManager);
   45|      1|    gDOMImplSrcVector = new RefVectorOf<DOMImplementationSource>(3, false);
   46|      1|}
_ZN11xercesc_3_225DOMImplementationRegistry20getDOMImplementationEPKDs:
   60|      1|DOMImplementation *DOMImplementationRegistry::getDOMImplementation(const XMLCh* features) {
   61|       |
   62|      1|    XMLMutexLock lock(gDOMImplSrcVectorMutex);
   63|       |
   64|      1|    XMLSize_t len = gDOMImplSrcVector->size();
   65|       |
   66|       |    // Put our defined source there
   67|      1|    if (len == 0) {
  ------------------
  |  Branch (67:9): [True: 1, False: 0]
  ------------------
   68|      1|        gDOMImplSrcVector->addElement((DOMImplementationSource*)DOMImplementationImpl::getDOMImplementationImpl());
   69|       |
   70|      1|        len = gDOMImplSrcVector->size();
   71|      1|    }
   72|       |
   73|      1|    for (XMLSize_t i = len; i > 0; i--) {
  ------------------
  |  Branch (73:29): [True: 1, False: 0]
  ------------------
   74|      1|        DOMImplementationSource* source = gDOMImplSrcVector->elementAt(i-1);
   75|      1|        DOMImplementation* impl = source->getDOMImplementation(features);
   76|      1|        if (impl)
  ------------------
  |  Branch (76:13): [True: 1, False: 0]
  ------------------
   77|      1|            return impl;
   78|      1|    }
   79|       |
   80|      0|    return 0;
   81|      1|}

_ZN11xercesc_3_214HasDOMNodeImplC2Ev:
   56|      1|    HasDOMNodeImpl() {}
_ZN11xercesc_3_216HasDOMParentImplC2Ev:
  114|      1|    HasDOMParentImpl() {}

_ZN11xercesc_3_214XMLInitializer25initializeDOMNodeListImplEv:
   66|      1|{
   67|      1|    gEmptyNodeList = new DOMNodeListImpl(0);
   68|      1|}
_ZN11xercesc_3_211DOMNodeImplC2EPNS_7DOMNodeES2_:
   80|      1|:  fContainingNode(containingNode), fOwnerNode(ownerNode)
   81|      1|{
   82|      1|    if (!fContainingNode) {
  ------------------
  |  Branch (82:9): [True: 0, False: 1]
  ------------------
   83|      0|        throw DOMException(DOMException::INVALID_STATE_ERR, 0, GetDOMNodeMemoryManager);
  ------------------
  |  |  921|      0|#define GetDOMNodeMemoryManager GET_INDIRECT_MM(this)
  |  |  ------------------
  |  |  |  |  914|      0|        (!ptr ? XMLPlatformUtils::fgMemoryManager :                              \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (914:10): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  915|      0|        GET_OWNER_DOCUMENT(ptr) ? GET_OWNER_DOCUMENT(ptr)->getMemoryManager() : \
  |  |  |  |  ------------------
  |  |  |  |  |  |  908|      0|        ((DOMDocumentImpl*)(ptr->getOwnerDocument()))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (908:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                       GET_OWNER_DOCUMENT(ptr) ? GET_OWNER_DOCUMENT(ptr)->getMemoryManager() : \
  |  |  |  |  ------------------
  |  |  |  |  |  |  908|      0|        ((DOMDocumentImpl*)(ptr->getOwnerDocument()))
  |  |  |  |  ------------------
  |  |  |  |  916|      0|        XMLPlatformUtils::fgMemoryManager)
  |  |  ------------------
  ------------------
   84|      0|    }
   85|       |    
   86|      1|    this->flags = 0;
   87|       |    // as long as we do not have any owner, fOwnerNode is our ownerDocument
   88|      1|}

_ZN11xercesc_3_215DOMNodeListImplC2EPNS_13DOMParentNodeE:
   35|      2|:   fNode(node)
   36|      2|{
   37|      2|}

_ZN11xercesc_3_214XMLInitializer23initializeDOMNormalizerEv:
   46|      1|{
   47|      1|    gMsgLoader = XMLPlatformUtils::loadMsgSet(XMLUni::fgXMLErrDomain);
   48|       |
   49|      1|    if (!gMsgLoader)
  ------------------
  |  Branch (49:9): [True: 0, False: 1]
  ------------------
   50|      0|      XMLPlatformUtils::panic(PanicHandler::Panic_CantLoadMsgDomain);
   51|      1|}

_ZN11xercesc_3_213DOMParentNodeC2EPNS_7DOMNodeEPNS_11DOMDocumentE:
   35|      1|    : fContainingNode(containingNode), fOwnerDocument(ownerDoc), fFirstChild(0), fChildNodeList(this)
   36|      1|{
   37|      1|    if (!fContainingNode) {
  ------------------
  |  Branch (37:9): [True: 0, False: 1]
  ------------------
   38|      0|        throw DOMException(DOMException::INVALID_STATE_ERR, 0, GetDOMNodeMemoryManager);
  ------------------
  |  |  921|      0|#define GetDOMNodeMemoryManager GET_INDIRECT_MM(this)
  |  |  ------------------
  |  |  |  |  914|      0|        (!ptr ? XMLPlatformUtils::fgMemoryManager :                              \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (914:10): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  915|      0|        GET_OWNER_DOCUMENT(ptr) ? GET_OWNER_DOCUMENT(ptr)->getMemoryManager() : \
  |  |  |  |  ------------------
  |  |  |  |  |  |  908|      0|        ((DOMDocumentImpl*)(ptr->getOwnerDocument()))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (908:9): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                       GET_OWNER_DOCUMENT(ptr) ? GET_OWNER_DOCUMENT(ptr)->getMemoryManager() : \
  |  |  |  |  ------------------
  |  |  |  |  |  |  908|      0|        ((DOMDocumentImpl*)(ptr->getOwnerDocument()))
  |  |  |  |  ------------------
  |  |  |  |  916|      0|        XMLPlatformUtils::fgMemoryManager)
  |  |  ------------------
  ------------------
   39|      0|    }
   40|      1|}

_ZN11xercesc_3_215DOMTypeInfoImplC2EPKDsS2_:
   39|     24|: fBitFields(0),
   40|     24|  fTypeName(name),
   41|     24|  fTypeNamespace(namespaceUri),
   42|     24|  fMemberTypeName(0),
   43|     24|  fMemberTypeNamespace(0),
   44|     24|  fDefaultValue(0),
   45|     24|  fNormalizedValue(0)
   46|     24|{
   47|       |    // by setting the fBitField to 0 we are also setting:
   48|       |    //  - [validity]=VALIDITY_NOTKNOWN
   49|       |    //  - [validitation attempted]=VALIDATION_NONE
   50|       |    //  - [schema specified]=false
   51|     24|}

_ZN11xercesc_3_220LocalFileInputSourceC2EPKDsS2_PNS_13MemoryManagerE:
   86|    318|    : InputSource(manager)
   87|    318|{
   88|       |    //
   89|       |    //  If the relative part is really relative, then weave it together
   90|       |    //  with the base path. If not, just take the relative path as the
   91|       |    //  entire path.
   92|       |    //
   93|    318|    if (XMLPlatformUtils::isRelative(relativePath, manager))
  ------------------
  |  Branch (93:9): [True: 169, False: 149]
  ------------------
   94|    169|    {
   95|    169|        XMLCh* tmpBuf = XMLPlatformUtils::weavePaths(basePath, relativePath, manager);
   96|    169|        setSystemId(tmpBuf);
   97|    169|        manager->deallocate(tmpBuf); //delete [] tmpBuf;
   98|    169|    }
   99|    149|    else
  100|    149|    {
  101|    149|        XMLCh* tmpBuf = XMLString::replicate(relativePath, manager);
  102|    149|        XMLPlatformUtils::removeDotSlash(tmpBuf, manager);
  103|    149|        setSystemId(tmpBuf);
  104|    149|        manager->deallocate(tmpBuf);//delete [] tmpBuf;
  105|    149|    }
  106|       |
  107|    318|}
_ZN11xercesc_3_220LocalFileInputSourceD2Ev:
  153|    318|{
  154|    318|}
_ZNK11xercesc_3_220LocalFileInputSource10makeStreamEv:
  161|    318|{
  162|    318|    BinFileInputStream* retStrm = new (getMemoryManager()) BinFileInputStream(getSystemId(), getMemoryManager());
  163|    318|    if (!retStrm->getIsOpen())
  ------------------
  |  Branch (163:9): [True: 224, False: 94]
  ------------------
  164|    224|    {
  165|    224|        delete retStrm;
  166|    224|        return 0;
  167|    224|    }
  168|     94|    return retStrm;
  169|    318|}

_ZN11xercesc_3_217MemBufInputSourceC2EPKhmPKcbPNS_13MemoryManagerE:
   52|  7.12k|    InputSource(bufId, manager)
   53|  7.12k|    , fAdopted(adoptBuffer)
   54|  7.12k|    , fByteCount(byteCount)
   55|  7.12k|    , fCopyBufToStream(true)
   56|  7.12k|    , fSrcBytes(srcDocBytes)
   57|  7.12k|{
   58|  7.12k|}
_ZN11xercesc_3_217MemBufInputSourceD2Ev:
   61|  7.12k|{
   62|  7.12k|    if (fAdopted)
  ------------------
  |  Branch (62:9): [True: 0, False: 7.12k]
  ------------------
   63|      0|        delete [] (XMLByte*)fSrcBytes;
   64|  7.12k|}
_ZNK11xercesc_3_217MemBufInputSource10makeStreamEv:
   77|  7.12k|{
   78|       |    //
   79|       |    //  Create a memory input stream over our buffer. According to our
   80|       |    //  fCopyBufToStream flag, we either tell it to copy the buffer or to
   81|       |    //  just reference it.
   82|       |    //
   83|  7.12k|    return new (getMemoryManager()) BinMemInputStream
   84|  7.12k|    (
   85|  7.12k|        fSrcBytes
   86|  7.12k|        , fByteCount
   87|  7.12k|        , fCopyBufToStream ? BinMemInputStream::BufOpt_Copy
  ------------------
  |  Branch (87:11): [True: 7.12k, False: 0]
  ------------------
   88|  7.12k|                           : BinMemInputStream::BufOpt_Reference
   89|  7.12k|        , getMemoryManager()
   90|  7.12k|    );
   91|  7.12k|}

_ZN11xercesc_3_213MemoryManagerC2Ev:
  109|      1|    {
  110|      1|    }

_ZN11xercesc_3_214URLInputSourceC2ERKNS_6XMLURLEPNS_13MemoryManagerE:
   40|    345|    InputSource(manager)
   41|    345|    , fURL(urlId)
   42|    345|{
   43|    345|    setSystemId(fURL.getURLText());
   44|    345|}
_ZN11xercesc_3_214URLInputSourceD2Ev:
   86|    345|{
   87|    345|}
_ZNK11xercesc_3_214URLInputSource10makeStreamEv:
   94|    345|{
   95|       |    // Ask the URL to create us an appropriate input stream
   96|    345|    return fURL.makeNewStream();
   97|    345|}

_ZN11xercesc_3_217ValidationContextD2Ev:
   51|  7.12k|    virtual ~ValidationContext(){};
_ZN11xercesc_3_217ValidationContextC2EPNS_13MemoryManagerE:
  112|  7.12k|    :fMemoryManager(memMgr)
  113|  7.12k|    {
  114|  7.12k|    };

_ZN11xercesc_3_29XMLAttDefD2Ev:
  110|  14.4k|{
  111|  14.4k|    cleanUp();
  112|  14.4k|}
_ZN11xercesc_3_29XMLAttDefC2ENS0_8AttTypesENS0_11DefAttTypesEPNS_13MemoryManagerE:
  122|  14.4k|    fDefaultType(defType)
  123|  14.4k|    , fType(type)
  124|  14.4k|    , fCreateReason(XMLAttDef::NoReason)
  125|  14.4k|    , fExternalAttribute(false)
  126|  14.4k|    , fId(XMLAttDef::fgInvalidAttrId)
  127|  14.4k|    , fValue(0)
  128|  14.4k|    , fEnumeration(0)
  129|  14.4k|    , fMemoryManager(manager)
  130|  14.4k|{
  131|  14.4k|}
_ZN11xercesc_3_29XMLAttDef7cleanUpEv:
  172|  14.4k|{
  173|  14.4k|    if (fEnumeration)
  ------------------
  |  Branch (173:9): [True: 10.4k, False: 3.93k]
  ------------------
  174|  10.4k|        fMemoryManager->deallocate(fEnumeration);
  175|       |
  176|  14.4k|    if (fValue)
  ------------------
  |  Branch (176:9): [True: 13.2k, False: 1.17k]
  ------------------
  177|  13.2k|        fMemoryManager->deallocate(fValue);
  178|  14.4k|}

_ZNK11xercesc_3_29XMLAttDef14getDefaultTypeEv:
  453|  11.0M|{
  454|  11.0M|    return fDefaultType;
  455|  11.0M|}
_ZNK11xercesc_3_29XMLAttDef14getEnumerationEv:
  458|  5.53M|{
  459|  5.53M|    return fEnumeration;
  460|  5.53M|}
_ZNK11xercesc_3_29XMLAttDef7getTypeEv:
  468|  15.3M|{
  469|  15.3M|    return fType;
  470|  15.3M|}
_ZNK11xercesc_3_29XMLAttDef8getValueEv:
  473|  8.11M|{
  474|  8.11M|    return fValue;
  475|  8.11M|}
_ZNK11xercesc_3_29XMLAttDef10isExternalEv:
  483|  9.77M|{
  484|  9.77M|    return fExternalAttribute;
  485|  9.77M|}
_ZNK11xercesc_3_29XMLAttDef16getMemoryManagerEv:
  488|  45.1k|{
  489|  45.1k|    return fMemoryManager;
  490|  45.1k|}
_ZN11xercesc_3_29XMLAttDef14setDefaultTypeENS0_11DefAttTypesE:
  496|  22.3k|{
  497|  22.3k|    fDefaultType = newValue;
  498|  22.3k|}
_ZN11xercesc_3_29XMLAttDef14setEnumerationEPKDs:
  501|  12.1k|{
  502|  12.1k|    if (fEnumeration)
  ------------------
  |  Branch (502:9): [True: 1.67k, False: 10.4k]
  ------------------
  503|  1.67k|        fMemoryManager->deallocate(fEnumeration);
  504|       |
  505|  12.1k|    fEnumeration = XMLString::replicate(newValue, fMemoryManager);
  506|  12.1k|}
_ZN11xercesc_3_29XMLAttDef5setIdEm:
  509|  14.4k|{
  510|  14.4k|    fId = newId;
  511|  14.4k|}
_ZN11xercesc_3_29XMLAttDef7setTypeENS0_8AttTypesE:
  514|  22.3k|{
  515|  22.3k|    fType = newValue;
  516|  22.3k|}
_ZN11xercesc_3_29XMLAttDef8setValueEPKDs:
  519|  20.9k|{
  520|  20.9k|    if (fValue)
  ------------------
  |  Branch (520:9): [True: 7.69k, False: 13.2k]
  ------------------
  521|  7.69k|       fMemoryManager->deallocate(fValue);
  522|       |
  523|  20.9k|    fValue = XMLString::replicate(newValue, fMemoryManager);
  524|  20.9k|}
_ZN11xercesc_3_29XMLAttDef25setExternalAttDeclarationEb:
  533|  14.1k|{
  534|  14.1k|    fExternalAttribute = aValue;
  535|  14.1k|}

_ZNK11xercesc_3_213XMLAttDefList16getMemoryManagerEv:
  149|  59.4k|{
  150|  59.4k|    return fMemoryManager;
  151|  59.4k|}
_ZN11xercesc_3_213XMLAttDefListC2EPNS_13MemoryManagerE:
  165|  27.6k|fMemoryManager(manager)
  166|  27.6k|{
  167|  27.6k|}

_ZN11xercesc_3_27XMLAttrC2EjPKDsS2_S2_NS_9XMLAttDef8AttTypesEbPNS_13MemoryManagerEPNS_17DatatypeValidatorEb:
   59|  2.61k|      fSpecified(specified)
   60|  2.61k|    , fType(type)
   61|  2.61k|    , fValueBufSz(0)
   62|  2.61k|    , fValue(0)
   63|  2.61k|    , fAttName(0)
   64|  2.61k|    , fMemoryManager(manager)
   65|  2.61k|{
   66|  2.61k|    CleanupType cleanup(this, &XMLAttr::cleanUp);
   67|       |
   68|  2.61k|    try
   69|  2.61k|    {
   70|       |        //
   71|       |        //  Just call the local setters to set up everything. Too much
   72|       |        //  work is required to replicate that functionality here.
   73|       |        //
   74|  2.61k|        fAttName = new (fMemoryManager) QName(attrPrefix, attrName, uriId, fMemoryManager);
   75|  2.61k|        setValue(attrValue);
   76|  2.61k|    }
   77|  2.61k|    catch(const OutOfMemoryException&)
   78|  2.61k|    {
   79|      0|        cleanup.release();
   80|       |
   81|      0|        throw;
   82|      0|    }
   83|       |
   84|  2.61k|    cleanup.release();
   85|  2.61k|}
_ZN11xercesc_3_27XMLAttr8setValueEPKDs:
  150|  12.1M|{
  151|  12.1M|    const XMLSize_t newLen = XMLString::stringLen(newValue);
  152|  12.1M|    if (!fValueBufSz || (newLen > fValueBufSz))
  ------------------
  |  Branch (152:9): [True: 2.61k, False: 12.1M]
  |  Branch (152:25): [True: 381, False: 12.1M]
  ------------------
  153|  2.99k|    {
  154|  2.99k|        fMemoryManager->deallocate(fValue); //delete [] fValue;
  155|  2.99k|        fValue = 0;
  156|  2.99k|        fValueBufSz = newLen + 8;
  157|  2.99k|        fValue = (XMLCh*) fMemoryManager->allocate((fValueBufSz+1) * sizeof(XMLCh)); //new XMLCh[fValueBufSz + 1];
  158|  2.99k|    }
  159|  12.1M|    XMLString::moveChars(fValue, newValue, newLen + 1);
  160|  12.1M|}
_ZN11xercesc_3_27XMLAttr7cleanUpEv:
  167|  2.61k|{
  168|  2.61k|    delete fAttName;
  169|  2.61k|    fMemoryManager->deallocate(fValue); //delete [] fValue;
  170|  2.61k|}

_ZNK11xercesc_3_27XMLAttr7getNameEv:
  426|  5.45M|{
  427|  5.45M|    return fAttName->getLocalPart();
  428|  5.45M|}
_ZN11xercesc_3_27XMLAttr3setEjPKDsS2_S2_NS_9XMLAttDef8AttTypesEPNS_17DatatypeValidatorEb:
  465|  6.73M|{
  466|       |    // Set the name info and the value via their respective calls
  467|  6.73M|    fAttName->setName(attrPrefix, attrName, uriId);
  468|  6.73M|    setValue(attrValue);
  469|       |
  470|       |    // And store the type
  471|  6.73M|    fType = type;
  472|  6.73M|}
_ZN11xercesc_3_27XMLAttr12setSpecifiedEb:
  495|  6.73M|{
  496|  6.73M|    fSpecified = newValue;
  497|  6.73M|}
_ZN11xercesc_3_27XMLAttrD2Ev:
  412|  2.61k|{
  413|  2.61k|    cleanUp();
  414|  2.61k|}

_ZN11xercesc_3_29XMLBuffer14ensureCapacityEm:
   37|  6.76k|{    
   38|       |    // If we can't handle it, try doubling the buffer size.
   39|  6.76k|    XMLSize_t newCap = (fIndex + extraNeeded) * 2;
   40|       |
   41|       |    // If a maximum size is set, and double the current buffer size exceeds that
   42|       |    // maximum, first check if the maximum size will accomodate the extra needed.
   43|  6.76k|    if (fFullHandler && (newCap > fFullSize))
  ------------------
  |  Branch (43:9): [True: 400, False: 6.36k]
  |  Branch (43:25): [True: 18, False: 382]
  ------------------
   44|     18|    {
   45|       |        // If the maximum buffer size accomodates the extra needed, resize to
   46|       |        // the maximum
   47|     18|        if (fIndex + extraNeeded <= fFullSize) 
  ------------------
  |  Branch (47:13): [True: 18, False: 0]
  ------------------
   48|     18|        {
   49|     18|            newCap = fFullSize;
   50|     18|        }
   51|       |
   52|       |        // Otherwise, allow the registered full-handler to try to empty the buffer.
   53|       |        // If it claims success, and we can accommodate the extra needed in the buffer
   54|       |        // to be expanded, resize to the maximum
   55|       |        // Note the order of evaluation: bufferFull() has the intentional side-effect
   56|       |        // of modifying fIndex.
   57|      0|        else if (fFullHandler->bufferFull(*this) && (fIndex + extraNeeded <= fFullSize))
  ------------------
  |  Branch (57:18): [True: 0, False: 0]
  |  Branch (57:53): [True: 0, False: 0]
  ------------------
   58|      0|        {
   59|      0|            newCap = fFullSize;
   60|      0|        }
   61|       |
   62|       |        // Finally, if the full-handler failed, or the buffer (of maximum size) 
   63|       |        // still can't accomodate the extra needed, we must fail.
   64|      0|        else
   65|      0|            ThrowXMLwithMemMgr(RuntimeException, XMLExcepts::Array_BadNewSize, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
   66|     18|    }
   67|       |
   68|       |    // Note the previous if block can modify newCap, so we may not need to allocate
   69|       |    // at all.
   70|  6.76k|    if (newCap > fCapacity)
  ------------------
  |  Branch (70:9): [True: 6.76k, False: 0]
  ------------------
   71|  6.76k|    {
   72|       |        // Allocate new buffer
   73|  6.76k|        XMLCh* newBuf = (XMLCh*) fMemoryManager->allocate((newCap+1) * sizeof(XMLCh)); //new XMLCh[newCap+1];
   74|       | 
   75|       |        // Copy over the old stuff
   76|  6.76k|        memcpy(newBuf, fBuffer, fIndex * sizeof(XMLCh));
   77|       |
   78|       |        // Clean up old buffer and store new stuff
   79|  6.76k|        fMemoryManager->deallocate(fBuffer); //delete [] fBuffer;
   80|  6.76k|        fBuffer = newBuf;
   81|  6.76k|        fCapacity = newCap;
   82|  6.76k|    }
   83|  6.76k|}

_ZN11xercesc_3_29XMLBufferC2EmPNS_13MemoryManagerE:
   56|   110k|        fIndex(0)
   57|   110k|        , fCapacity(capacity)
   58|   110k|        , fFullSize(0)
   59|   110k|        , fUsed(false)
   60|   110k|        , fMemoryManager(manager)
   61|   110k|        , fFullHandler(0)
   62|   110k|        , fBuffer(0)
   63|   110k|    {
   64|       |        // Buffer is one larger than capacity, to allow for zero term
   65|   110k|        fBuffer = (XMLCh*) manager->allocate((capacity+1) * sizeof(XMLCh)); //new XMLCh[fCapacity+1];
   66|       |
   67|       |        // Keep it null terminated
   68|   110k|        fBuffer[0] = XMLCh(0);
   69|   110k|    }
_ZN11xercesc_3_29XMLBufferD2Ev:
   75|   110k|    {
   76|   110k|        fMemoryManager->deallocate(fBuffer); //delete [] fBuffer;
   77|   110k|    }
_ZN11xercesc_3_29XMLBuffer14setFullHandlerEPNS_20XMLBufferFullHandlerEm:
   84|  7.12k|    {
   85|  7.12k|        if (handler && fullSize) {
  ------------------
  |  Branch (85:13): [True: 7.12k, False: 0]
  |  Branch (85:24): [True: 7.12k, False: 0]
  ------------------
   86|  7.12k|            fFullHandler = handler;
   87|  7.12k|            fFullSize = fullSize;
   88|       |
   89|       |            // Need to consider the case that the fullsize is less than the current capacity.
   90|       |            // For example, say fullSize = 100 and fCapacity is 1023 (the default).
   91|       |            // If the fIndex is less than the fullSize, then no problem.  We can just carry
   92|       |            // on by resetting fCapacity to fullsize and proceed business as usual.
   93|       |            // If the fIndex is already bigger than the fullSize then we call ensureCapacity
   94|       |            // to see if it can handle emptying the current buffer (it will throw an
   95|       |            // exception if it can't).
   96|  7.12k|            if (fullSize < fCapacity) {
  ------------------
  |  Branch (96:17): [True: 0, False: 7.12k]
  ------------------
   97|      0|                fCapacity = fullSize;
   98|      0|                if (fIndex >= fullSize) {
  ------------------
  |  Branch (98:21): [True: 0, False: 0]
  ------------------
   99|      0|                    ensureCapacity(0);
  100|      0|                }
  101|      0|            }
  102|  7.12k|        }
  103|      0|        else {
  104|       |            // reset fFullHandler to zero because setFullHandler had bad input
  105|      0|            fFullHandler = 0;
  106|      0|        }
  107|  7.12k|    }
_ZN11xercesc_3_29XMLBuffer6appendEDs:
  113|   388M|    {
  114|       |        // Put in char and bump the index
  115|   388M|        if (fIndex == fCapacity)
  ------------------
  |  Branch (115:13): [True: 5.17k, False: 388M]
  ------------------
  116|  5.17k|            ensureCapacity(1);
  117|   388M|        fBuffer[fIndex++] = toAppend;
  118|   388M|    }
_ZN11xercesc_3_29XMLBuffer6appendEPKDsm:
  121|  39.1M|    {
  122|  39.1M|        if (count) {
  ------------------
  |  Branch (122:13): [True: 39.1M, False: 0]
  ------------------
  123|  39.1M|            if (fIndex + count >= fCapacity) {
  ------------------
  |  Branch (123:17): [True: 633, False: 39.1M]
  ------------------
  124|    633|                ensureCapacity(count);
  125|    633|            }
  126|  39.1M|            memcpy(&fBuffer[fIndex], chars, count * sizeof(XMLCh));
  127|  39.1M|            fIndex += count;
  128|  39.1M|        }
  129|      0|        else {
  130|      0|            append(chars);
  131|      0|        }
  132|  39.1M|    }
_ZN11xercesc_3_29XMLBuffer6appendEPKDs:
  135|  2.54M|    {
  136|  2.54M|        if (chars != 0 && *chars != 0) {
  ------------------
  |  Branch (136:13): [True: 2.54M, False: 0]
  |  Branch (136:27): [True: 2.54M, False: 4.85k]
  ------------------
  137|       |            // get length of chars
  138|  2.54M|            XMLSize_t count = 0;
  139|  35.0M|            for (; *(chars+count); count++ ) /*noop*/;
  ------------------
  |  Branch (139:20): [True: 32.5M, False: 2.54M]
  ------------------
  140|       |
  141|  2.54M|            if (fIndex + count >= fCapacity) {
  ------------------
  |  Branch (141:17): [True: 949, False: 2.54M]
  ------------------
  142|    949|                ensureCapacity(count);
  143|    949|            }
  144|  2.54M|            memcpy(&fBuffer[fIndex], chars, count * sizeof(XMLCh));
  145|  2.54M|            fIndex += count;
  146|  2.54M|        }
  147|  2.54M|    }
_ZN11xercesc_3_29XMLBuffer3setEPKDs:
  156|    685|    {
  157|    685|        fIndex = 0;
  158|    685|        if (chars != 0 && *chars != 0)
  ------------------
  |  Branch (158:13): [True: 685, False: 0]
  |  Branch (158:27): [True: 682, False: 3]
  ------------------
  159|    682|            append(chars);
  160|    685|    }
_ZN11xercesc_3_29XMLBuffer12getRawBufferEv:
  169|  46.2M|    {
  170|  46.2M|        fBuffer[fIndex] = 0;
  171|  46.2M|        return fBuffer;
  172|  46.2M|    }
_ZN11xercesc_3_29XMLBuffer5resetEv:
  175|  54.6M|    {
  176|  54.6M|        fIndex = 0;
  177|  54.6M|    }
_ZNK11xercesc_3_29XMLBuffer8getInUseEv:
  183|  4.21M|    {
  184|  4.21M|        return fUsed;
  185|  4.21M|    }
_ZNK11xercesc_3_29XMLBuffer6getLenEv:
  188|  9.60M|    {
  189|  9.60M|        return fIndex;
  190|  9.60M|    }
_ZNK11xercesc_3_29XMLBuffer7isEmptyEv:
  193|  38.8M|    {
  194|  38.8M|        return (fIndex == 0);
  195|  38.8M|    }
_ZN11xercesc_3_29XMLBuffer8setInUseEb:
  201|  7.10M|    {
  202|  7.10M|        fUsed = newValue;
  203|  7.10M|    }
_ZN11xercesc_3_220XMLBufferFullHandlerD2Ev:
  267|  7.12k|    virtual ~XMLBufferFullHandler() {}

_ZN11xercesc_3_212XMLBufferMgrC2EPNS_13MemoryManagerE:
   37|  7.12k|    fBufCount(32)
   38|  7.12k|    , fMemoryManager(manager)
   39|  7.12k|    , fBufList(0)
   40|  7.12k|{
   41|       |    // Allocate the buffer list and zero it out
   42|  7.12k|    fBufList = (XMLBuffer**) fMemoryManager->allocate(fBufCount * sizeof(XMLBuffer*)); // new XMLBuffer*[fBufCount];
   43|   235k|    for (XMLSize_t index = 0; index < fBufCount; index++)
  ------------------
  |  Branch (43:31): [True: 228k, False: 7.12k]
  ------------------
   44|   228k|        fBufList[index] = 0;
   45|  7.12k|}
_ZN11xercesc_3_212XMLBufferMgrD2Ev:
   48|  7.12k|{
   49|       |    // Delete any buffers that got allocated
   50|   235k|    for (XMLSize_t index = 0; index < fBufCount; index++)
  ------------------
  |  Branch (50:31): [True: 228k, False: 7.12k]
  ------------------
   51|   228k|        delete fBufList[index];
   52|       |
   53|       |    // And then the buffer list
   54|  7.12k|    fMemoryManager->deallocate(fBufList); //delete [] fBufList;
   55|  7.12k|}
_ZN11xercesc_3_212XMLBufferMgr11bidOnBufferEv:
   62|  3.55M|{
   63|       |    //
   64|       |    //  Look for a buffer that is not in use. If we hit a null entry, then
   65|       |    //  we have to add one.
   66|       |    //
   67|  4.24M|    for (XMLSize_t index = 0; index < fBufCount; index++)
  ------------------
  |  Branch (67:31): [True: 4.24M, False: 0]
  ------------------
   68|  4.24M|    {
   69|       |        // No more buffers available, so create one and take it
   70|  4.24M|        if (!fBufList[index])
  ------------------
  |  Branch (70:13): [True: 36.1k, False: 4.21M]
  ------------------
   71|  36.1k|        {
   72|  36.1k|            fBufList[index] = new (fMemoryManager) XMLBuffer(1023, fMemoryManager);
   73|  36.1k|            fBufList[index]->setInUse(true);
   74|  36.1k|            return *fBufList[index];
   75|  36.1k|        }
   76|       |
   77|       |        //
   78|       |        //  There's one here, so see if its use. If not, mark it, reset it,
   79|       |        //  and take it
   80|       |        //
   81|  4.21M|        if (!fBufList[index]->getInUse())
  ------------------
  |  Branch (81:13): [True: 3.51M, False: 695k]
  ------------------
   82|  3.51M|        {
   83|  3.51M|            fBufList[index]->reset();
   84|  3.51M|            fBufList[index]->setInUse(true);
   85|  3.51M|            return *(fBufList[index]);
   86|  3.51M|        }
   87|  4.21M|    }
   88|       |
   89|       |    // We did not find one, so freak out
   90|  3.55M|    ThrowXMLwithMemMgr(RuntimeException, XMLExcepts::BufMgr_NoMoreBuffers, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
   91|       |
   92|       |    // NOTE: Dummy return to make some compilers happy. Never really gets called!
   93|      0|    return *fBufList[0];
   94|  3.55M|}
_ZN11xercesc_3_212XMLBufferMgr13releaseBufferERNS_9XMLBufferE:
   98|  3.55M|{
   99|       |    // Look for this buffer in the list
  100|  4.24M|    for (XMLSize_t index = 0; index < fBufCount; index++)
  ------------------
  |  Branch (100:31): [True: 4.24M, False: 0]
  ------------------
  101|  4.24M|    {
  102|  4.24M|        if (fBufList[index] == &toRelease)
  ------------------
  |  Branch (102:13): [True: 3.55M, False: 695k]
  ------------------
  103|  3.55M|        {
  104|       |            // Unmark it
  105|  3.55M|            toRelease.setInUse(false);
  106|  3.55M|            return;
  107|  3.55M|        }
  108|  4.24M|    }
  109|       |
  110|       |    // It was not a legal buffer
  111|      0|    ThrowXMLwithMemMgr(RuntimeException, XMLExcepts::BufMgr_BufferNotInPool, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  112|  3.55M|}

_ZN11xercesc_3_29XMLBufBidC2EPNS_12XMLBufferMgrE:
  121|  3.55M|        fBuffer(srcMgr->bidOnBuffer())
  122|  3.55M|        , fMgr(srcMgr)
  123|  3.55M|    {
  124|  3.55M|    }
_ZN11xercesc_3_29XMLBufBidD2Ev:
  127|  3.55M|    {
  128|  3.55M|        fMgr->releaseBuffer(fBuffer);
  129|  3.55M|    }
_ZN11xercesc_3_29XMLBufBid6appendEDs:
  137|  18.3M|    {
  138|  18.3M|        fBuffer.append(toAppend);
  139|  18.3M|    }
_ZN11xercesc_3_29XMLBufBid9getBufferEv:
  152|  3.34M|    {
  153|  3.34M|        return fBuffer;
  154|  3.34M|    }
_ZN11xercesc_3_29XMLBufBid12getRawBufferEv:
  163|  6.03M|    {
  164|  6.03M|        fBuffer.fBuffer[fBuffer.fIndex] = 0;
  165|  6.03M|        return fBuffer.fBuffer;
  166|  6.03M|    }
_ZNK11xercesc_3_29XMLBufBid6getLenEv:
  169|   166k|    {
  170|   166k|        return fBuffer.fIndex;
  171|   166k|    }
_ZNK11xercesc_3_29XMLBufBid7isEmptyEv:
  174|     83|    {
  175|     83|        return (fBuffer.fIndex == 0);
  176|     83|    }

_ZN11xercesc_3_215XMLContentModelD2Ev:
   74|  1.92k|    {
   75|  1.92k|    }
_ZN11xercesc_3_215XMLContentModelC2Ev:
  131|  1.92k|    {
  132|  1.92k|    }

_ZN11xercesc_3_217XMLDTDDescriptionD2Ev:
   31|  14.2k|{
   32|  14.2k|}
_ZN11xercesc_3_217XMLDTDDescriptionC2EPNS_13MemoryManagerE:
   35|  14.2k|:XMLGrammarDescription(memMgr)
   36|  14.2k|{
   37|  14.2k|}

_ZN11xercesc_3_218XMLDocumentHandlerD2Ev:
   51|  7.12k|    {
   52|  7.12k|    }
_ZN11xercesc_3_218XMLDocumentHandlerC2Ev:
  269|  7.12k|    {
  270|  7.12k|    }

_ZN11xercesc_3_214XMLElementDeclD2Ev:
   52|  37.1k|{
   53|  37.1k|    delete fElementName;
   54|  37.1k|}
_ZN11xercesc_3_214XMLElementDecl14setElementNameEPKDsi:
   73|  40.4k|{
   74|  40.4k|    if (fElementName)
  ------------------
  |  Branch (74:9): [True: 3.24k, False: 37.1k]
  ------------------
   75|  3.24k|        fElementName->setName(rawName, uriId);
   76|  37.1k|    else
   77|  37.1k|        fElementName = new (fMemoryManager) QName(rawName, uriId, fMemoryManager);
   78|  40.4k|}
_ZN11xercesc_3_214XMLElementDeclC2EPNS_13MemoryManagerE:
   94|  37.1k|    fMemoryManager(manager)
   95|  37.1k|    , fElementName(0)
   96|  37.1k|    , fCreateReason(XMLElementDecl::NoReason)
   97|  37.1k|    , fId(XMLElementDecl::fgInvalidElemId)
   98|  37.1k|    , fExternalElement(false)
   99|  37.1k|{
  100|  37.1k|}

_ZN11xercesc_3_214XMLElementDecl14getElementNameEv:
  494|  20.1M|{
  495|  20.1M|    return fElementName;
  496|  20.1M|}
_ZNK11xercesc_3_214XMLElementDecl11getFullNameEv:
  499|  18.3M|{
  500|  18.3M|    return fElementName->getRawName();
  501|  18.3M|}
_ZNK11xercesc_3_214XMLElementDecl15getCreateReasonEv:
  504|  26.6k|{
  505|  26.6k|    return fCreateReason;
  506|  26.6k|}
_ZNK11xercesc_3_214XMLElementDecl5getIdEv:
  509|  14.1k|{
  510|  14.1k|    return fId;
  511|  14.1k|}
_ZNK11xercesc_3_214XMLElementDecl10isDeclaredEv:
  514|  16.9M|{
  515|  16.9M|    return (fCreateReason == Declared);
  516|  16.9M|}
_ZNK11xercesc_3_214XMLElementDecl10isExternalEv:
  520|  1.48k|{
  521|  1.48k|    return fExternalElement;
  522|  1.48k|}
_ZNK11xercesc_3_214XMLElementDecl16getMemoryManagerEv:
  525|   154k|{
  526|   154k|    return fMemoryManager;
  527|   154k|}
_ZN11xercesc_3_214XMLElementDecl15setCreateReasonENS0_13CreateReasonsE:
  535|  38.9k|{
  536|  38.9k|    fCreateReason = newReason;
  537|  38.9k|}
_ZN11xercesc_3_214XMLElementDecl5setIdEm:
  540|  41.1k|{
  541|  41.1k|    fId = newId;
  542|  41.1k|}
_ZN11xercesc_3_214XMLElementDecl26setExternalElemDeclarationEb:
  546|  36.3k|{
  547|  36.3k|    fExternalElement = aValue;
  548|  36.3k|}

_ZN11xercesc_3_213XMLEntityDeclC2EPNS_13MemoryManagerE:
   37|    190|    fId(0)
   38|    190|    , fValueLen(0)
   39|    190|    , fValue(0)
   40|    190|    , fName(0)
   41|    190|    , fNotationName(0)
   42|    190|    , fPublicId(0)
   43|    190|    , fSystemId(0)
   44|    190|    , fBaseURI(0)
   45|    190|    , fIsExternal(false)
   46|    190|    , fMemoryManager(manager)
   47|    190|{
   48|    190|}
_ZN11xercesc_3_213XMLEntityDeclC2EPKDsPNS_13MemoryManagerE:
   53|  5.43k|    fId(0)
   54|  5.43k|    , fValueLen(0)
   55|  5.43k|    , fValue(0)
   56|  5.43k|    , fName(0)
   57|  5.43k|    , fNotationName(0)
   58|  5.43k|    , fPublicId(0)
   59|  5.43k|    , fSystemId(0)
   60|  5.43k|    , fBaseURI(0)
   61|  5.43k|    , fIsExternal(false)
   62|  5.43k|    , fMemoryManager(manager)
   63|  5.43k|{
   64|  5.43k|    fName = XMLString::replicate(entName, fMemoryManager);
   65|  5.43k|}
_ZN11xercesc_3_213XMLEntityDeclC2EPKDsDsPNS_13MemoryManagerE:
  103|      5|    fId(0)
  104|      5|    , fValueLen(1)
  105|      5|    , fValue(0)
  106|      5|    , fName(0)
  107|      5|    , fNotationName(0)
  108|      5|    , fPublicId(0)
  109|      5|    , fSystemId(0)
  110|      5|    , fBaseURI(0)
  111|      5|    , fIsExternal(false)
  112|      5|    , fMemoryManager(manager)
  113|      5|{
  114|      5|    CleanupType cleanup(this, &XMLEntityDecl::cleanUp);
  115|       |
  116|      5|    try
  117|      5|    {
  118|      5|        XMLCh dummy[2] = { chNull, chNull };
  119|      5|        dummy[0] = value;
  120|      5|        fValue = XMLString::replicate(dummy, fMemoryManager);
  121|      5|        fName = XMLString::replicate(entName, fMemoryManager);
  122|      5|    }
  123|      5|    catch(const OutOfMemoryException&)
  124|      5|    {
  125|      0|        cleanup.release();
  126|       |
  127|      0|        throw;
  128|      0|    }
  129|       |
  130|      5|    cleanup.release();
  131|      5|}
_ZN11xercesc_3_213XMLEntityDeclD2Ev:
  134|  5.62k|{
  135|  5.62k|    cleanUp();
  136|  5.62k|}
_ZN11xercesc_3_213XMLEntityDecl7setNameEPKDs:
  143|  4.42k|{
  144|       |    // Clean up the current name stuff
  145|  4.42k|    if (fName)
  ------------------
  |  Branch (145:9): [True: 4.23k, False: 190]
  ------------------
  146|  4.23k|       fMemoryManager->deallocate(fName);
  147|       |
  148|  4.42k|    fName = XMLString::replicate(entName, fMemoryManager);
  149|  4.42k|}
_ZN11xercesc_3_213XMLEntityDecl7cleanUpEv:
  156|  5.62k|{
  157|  5.62k|    fMemoryManager->deallocate(fName);
  158|  5.62k|    fMemoryManager->deallocate(fNotationName);
  159|  5.62k|    fMemoryManager->deallocate(fValue);
  160|  5.62k|    fMemoryManager->deallocate(fPublicId);
  161|  5.62k|    fMemoryManager->deallocate(fSystemId);
  162|  5.62k|    fMemoryManager->deallocate(fBaseURI);
  163|  5.62k|}

_ZNK11xercesc_3_213XMLEntityDecl7getNameEv:
  397|   732k|{
  398|   732k|    return fName;
  399|   732k|}
_ZNK11xercesc_3_213XMLEntityDecl15getNotationNameEv:
  402|  1.66k|{
  403|  1.66k|    return fNotationName;
  404|  1.66k|}
_ZNK11xercesc_3_213XMLEntityDecl11getPublicIdEv:
  407|     61|{
  408|     61|    return fPublicId;
  409|     61|}
_ZNK11xercesc_3_213XMLEntityDecl11getSystemIdEv:
  412|     61|{
  413|     61|    return fSystemId;
  414|     61|}
_ZNK11xercesc_3_213XMLEntityDecl10getBaseURIEv:
  417|     61|{
  418|     61|    return fBaseURI;
  419|     61|}
_ZNK11xercesc_3_213XMLEntityDecl8getValueEv:
  422|   452k|{
  423|   452k|    return fValue;
  424|   452k|}
_ZNK11xercesc_3_213XMLEntityDecl11getValueLenEv:
  427|   365k|{
  428|   365k|    return fValueLen;
  429|   365k|}
_ZNK11xercesc_3_213XMLEntityDecl10isExternalEv:
  432|   453k|{
  433|   453k|    return fIsExternal;
  434|   453k|}
_ZNK11xercesc_3_213XMLEntityDecl10isUnparsedEv:
  437|  2.71k|{
  438|       |    // If it has a notation, its unparsed
  439|  2.71k|    return (fNotationName != 0);
  440|  2.71k|}
_ZN11xercesc_3_213XMLEntityDecl5setIdEm:
  451|  5.44k|{
  452|  5.44k|    fId = newId;
  453|  5.44k|}
_ZN11xercesc_3_213XMLEntityDecl13setIsExternalEb:
  456|  2.98k|{
  457|  2.98k|    fIsExternal = value;
  458|  2.98k|}
_ZN11xercesc_3_213XMLEntityDecl15setNotationNameEPKDs:
  461|    829|{
  462|    829|    if (fNotationName)
  ------------------
  |  Branch (462:9): [True: 510, False: 319]
  ------------------
  463|    510|        fMemoryManager->deallocate(fNotationName);
  464|       |
  465|    829|    fNotationName = XMLString::replicate(newName, fMemoryManager);
  466|    829|}
_ZN11xercesc_3_213XMLEntityDecl11setPublicIdEPKDs:
  469|  2.98k|{
  470|  2.98k|    if (fPublicId)
  ------------------
  |  Branch (470:9): [True: 518, False: 2.47k]
  ------------------
  471|    518|        fMemoryManager->deallocate(fPublicId);
  472|       |
  473|  2.98k|    fPublicId = XMLString::replicate(newId, fMemoryManager);
  474|  2.98k|}
_ZN11xercesc_3_213XMLEntityDecl11setSystemIdEPKDs:
  477|  2.98k|{
  478|  2.98k|    if (fSystemId)
  ------------------
  |  Branch (478:9): [True: 515, False: 2.47k]
  ------------------
  479|    515|        fMemoryManager->deallocate(fSystemId);
  480|       |
  481|  2.98k|    fSystemId = XMLString::replicate(newId, fMemoryManager);
  482|  2.98k|}
_ZN11xercesc_3_213XMLEntityDecl10setBaseURIEPKDs:
  485|  2.98k|{
  486|  2.98k|    if (fBaseURI)
  ------------------
  |  Branch (486:9): [True: 1.54k, False: 1.44k]
  ------------------
  487|  1.54k|        fMemoryManager->deallocate(fBaseURI);
  488|       |
  489|  2.98k|    fBaseURI = XMLString::replicate(newId, fMemoryManager);
  490|  2.98k|}
_ZN11xercesc_3_213XMLEntityDecl8setValueEPKDs:
  493|  6.55k|{
  494|  6.55k|    if (fValue)
  ------------------
  |  Branch (494:9): [True: 2.63k, False: 3.92k]
  ------------------
  495|  2.63k|        fMemoryManager->deallocate(fValue);
  496|       |
  497|  6.55k|    fValue = XMLString::replicate(newValue, fMemoryManager);
  498|  6.55k|    fValueLen = XMLString::stringLen(newValue);
  499|  6.55k|}
_ZNK11xercesc_3_213XMLEntityDecl6getKeyEv:
  506|  10.8k|{
  507|  10.8k|    return fName;
  508|  10.8k|}

_ZN11xercesc_3_216XMLEntityHandlerD2Ev:
   57|  7.12k|    {
   58|  7.12k|    }
_ZN11xercesc_3_216XMLEntityHandlerC2Ev:
  141|  7.12k|    {
  142|  7.12k|    }

_ZN11xercesc_3_27XMLErrs7isFatalENS0_5CodesE:
  308|  35.8k|    {
  309|  35.8k|        return ((toCheck >= F_LowBounds) && (toCheck <= F_HighBounds));
  ------------------
  |  Branch (309:17): [True: 5.82k, False: 30.0k]
  |  Branch (309:45): [True: 5.82k, False: 0]
  ------------------
  310|  35.8k|    }
_ZN11xercesc_3_27XMLErrs9errorTypeENS0_5CodesE:
  323|  35.8k|    {
  324|  35.8k|       if ((toCheck >= W_LowBounds) && (toCheck <= W_HighBounds))
  ------------------
  |  Branch (324:12): [True: 35.8k, False: 0]
  |  Branch (324:40): [True: 30.0k, False: 5.81k]
  ------------------
  325|  30.0k|           return XMLErrorReporter::ErrType_Warning;
  326|  5.81k|       else if ((toCheck >= F_LowBounds) && (toCheck <= F_HighBounds))
  ------------------
  |  Branch (326:17): [True: 5.81k, False: 0]
  |  Branch (326:45): [True: 5.81k, False: 0]
  ------------------
  327|  5.81k|            return XMLErrorReporter::ErrType_Fatal;
  328|      0|       else if ((toCheck >= E_LowBounds) && (toCheck <= E_HighBounds))
  ------------------
  |  Branch (328:17): [True: 0, False: 0]
  |  Branch (328:45): [True: 0, False: 0]
  ------------------
  329|      0|            return XMLErrorReporter::ErrType_Error;
  330|      0|       return XMLErrorReporter::ErrTypes_Unknown;
  331|  35.8k|    }

_ZN11xercesc_3_216XMLErrorReporterD2Ev:
   69|  7.12k|    {
   70|  7.12k|    }
_ZN11xercesc_3_216XMLErrorReporterC2Ev:
  148|  7.12k|    {
  149|  7.12k|    }

_ZN11xercesc_3_221XMLGrammarDescriptionD2Ev:
   31|  14.2k|{
   32|  14.2k|}
_ZN11xercesc_3_221XMLGrammarDescriptionC2EPNS_13MemoryManagerE:
   35|  14.2k|:fMemMgr(memMgr)
   36|  14.2k|{
   37|  14.2k|}

_ZNK11xercesc_3_221XMLGrammarDescription16getMemoryManagerEv:
   99|  14.2k|{
  100|  14.2k|    return fMemMgr;
  101|  14.2k|}

_ZN11xercesc_3_214XMLGrammarPoolD2Ev:
   55|  7.12k|    virtual ~XMLGrammarPool(){};
_ZN11xercesc_3_214XMLGrammarPool16getMemoryManagerEv:
  201|  7.12k|    {
  202|  7.12k|        return fMemMgr;
  203|  7.12k|    }
_ZN11xercesc_3_214XMLGrammarPoolC2EPNS_13MemoryManagerE:
  292|  7.12k|    :fMemMgr(memMgr)
  293|  7.12k|    ,fIgnoreSerializedAnnotations(false)
  294|  7.12k|    {
  295|  7.12k|    };

_ZN11xercesc_3_218XMLGrammarPoolImplD2Ev:
   51|  7.12k|{
   52|  7.12k|    delete fGrammarRegistry;
   53|  7.12k|    delete fStringPool;
   54|  7.12k|    if(fSynchronizedStringPool)
  ------------------
  |  Branch (54:8): [True: 0, False: 7.12k]
  ------------------
   55|      0|        delete fSynchronizedStringPool;
   56|  7.12k|    if(fXSModel)
  ------------------
  |  Branch (56:8): [True: 0, False: 7.12k]
  ------------------
   57|      0|        delete fXSModel;
   58|  7.12k|}
_ZN11xercesc_3_218XMLGrammarPoolImplC2EPNS_13MemoryManagerE:
   61|  7.12k|:XMLGrammarPool(memMgr)
   62|  7.12k|,fGrammarRegistry(0)
   63|  7.12k|,fStringPool(0)
   64|  7.12k|,fSynchronizedStringPool(0)
   65|  7.12k|,fXSModel(0)
   66|  7.12k|,fLocked(false)
   67|  7.12k|,fXSModelIsValid(false)
   68|  7.12k|{
   69|  7.12k|    fGrammarRegistry = new (memMgr) RefHashTableOf<Grammar>(29, true, memMgr);
   70|  7.12k|    fStringPool = new (memMgr) XMLStringPool(109, memMgr);
   71|  7.12k|}
_ZN11xercesc_3_218XMLGrammarPoolImpl16getURIStringPoolEv:
  219|  7.12k|{
  220|  7.12k|    if(fLocked)
  ------------------
  |  Branch (220:8): [True: 0, False: 7.12k]
  ------------------
  221|      0|        return fSynchronizedStringPool;
  222|  7.12k|    return fStringPool;
  223|  7.12k|}

_ZN11xercesc_3_215XMLNotationDeclC2EPKDsS2_S2_S2_PNS_13MemoryManagerE:
   53|  1.88k|    fId(0)
   54|  1.88k|    , fNameSpaceId(0)
   55|  1.88k|    , fName(0)
   56|  1.88k|    , fPublicId(0)
   57|  1.88k|    , fSystemId(0)
   58|  1.88k|    , fBaseURI(0)
   59|  1.88k|    , fMemoryManager(manager)
   60|  1.88k|{
   61|  1.88k|    CleanupType cleanup(this, &XMLNotationDecl::cleanUp);
   62|       |
   63|  1.88k|    try
   64|  1.88k|    {
   65|  1.88k|        fName = XMLString::replicate(notName, fMemoryManager);
   66|  1.88k|        fPublicId = XMLString::replicate(pubId, fMemoryManager);
   67|  1.88k|        fSystemId = XMLString::replicate(sysId, fMemoryManager);
   68|  1.88k|        fBaseURI  = XMLString::replicate(baseURI, fMemoryManager);
   69|  1.88k|    }
   70|  1.88k|    catch(const OutOfMemoryException&)
   71|  1.88k|    {
   72|      0|        cleanup.release();
   73|       |
   74|      0|        throw;
   75|      0|    }
   76|       |
   77|  1.88k|    cleanup.release();
   78|  1.88k|}
_ZN11xercesc_3_215XMLNotationDeclD2Ev:
   81|  1.88k|{
   82|  1.88k|    cleanUp();
   83|  1.88k|}
_ZN11xercesc_3_215XMLNotationDecl7cleanUpEv:
  104|  1.88k|{
  105|  1.88k|    fMemoryManager->deallocate(fName);
  106|  1.88k|    fMemoryManager->deallocate(fPublicId);
  107|  1.88k|    fMemoryManager->deallocate(fSystemId);
  108|  1.88k|    fMemoryManager->deallocate(fBaseURI);
  109|  1.88k|}

_ZN11xercesc_3_215XMLNotationDecl5setIdEm:
  187|  1.88k|{
  188|  1.88k|    fId = newId;
  189|  1.88k|}
_ZNK11xercesc_3_215XMLNotationDecl6getKeyEv:
  225|  3.77k|{
  226|  3.77k|    return fName;
  227|  3.77k|}

_ZN11xercesc_3_213XMLRecognizer18basicEncodingProbeEPKhm:
   91|  7.12k|{
   92|       |    //
   93|       |    //  As an optimization to check the 90% case, check first for the ASCII
   94|       |    //  sequence '<?xml', which means its either US-ASCII, UTF-8, or some
   95|       |    //  other encoding that we don't do manually but which happens to share
   96|       |    //  the US-ASCII code points for these characters. So just return UTF-8
   97|       |    //  to get us through the first line.
   98|       |    //
   99|  7.12k|    if (rawByteCount >= fgASCIIPreLen)
  ------------------
  |  Branch (99:9): [True: 7.12k, False: 0]
  ------------------
  100|  7.12k|    {
  101|  7.12k|        if (!memcmp(rawBuffer, fgASCIIPre, fgASCIIPreLen))
  ------------------
  |  Branch (101:13): [True: 582, False: 6.54k]
  ------------------
  102|    582|            return UTF_8;
  103|  7.12k|    }
  104|       |
  105|       |    //
  106|       |    //  If the count of raw bytes is less than 2, it cannot be anything
  107|       |    //  we understand, so return UTF-8 as a fallback.
  108|       |    //
  109|  6.54k|    if (rawByteCount < 2)
  ------------------
  |  Branch (109:9): [True: 0, False: 6.54k]
  ------------------
  110|      0|        return UTF_8;
  111|       |         
  112|       |    //  
  113|       |    //  We have two to four bytes, so lets check for a UTF-16 BOM. That
  114|       |    //  is quick to check and enough to identify two major encodings.   
  115|       |    // 
  116|       |
  117|  6.54k|    if (rawByteCount < 4)
  ------------------
  |  Branch (117:9): [True: 0, False: 6.54k]
  ------------------
  118|      0|    {
  119|      0|        if ((rawBuffer[0] == 0xFE) && (rawBuffer[1] == 0xFF))
  ------------------
  |  Branch (119:13): [True: 0, False: 0]
  |  Branch (119:39): [True: 0, False: 0]
  ------------------
  120|      0|            return UTF_16B;
  121|      0|        else if ((rawBuffer[0] == 0xFF) && (rawBuffer[1] == 0xFE))
  ------------------
  |  Branch (121:18): [True: 0, False: 0]
  |  Branch (121:44): [True: 0, False: 0]
  ------------------
  122|      0|            return UTF_16L;
  123|      0|        else 
  124|      0|            return UTF_8;
  125|      0|    }
  126|       |
  127|       |    /***
  128|       |     *    F.1 Detection Without External Encoding Information
  129|       |     *
  130|       |     *    Because each XML entity not accompanied by external encoding information and 
  131|       |     *    not in UTF-8 or UTF-16 encoding must begin with an XML encoding declaration, 
  132|       |     *    in which the first characters must be '<?xml', any conforming processor can detect, 
  133|       |     *    after two to four octets of input, which of the following cases apply. 
  134|       |     *
  135|       |     *    In reading this list, it may help to know that in UCS-4, '<' is "#x0000003C" and 
  136|       |     *    '?' is "#x0000003F", and the Byte Order Mark required of UTF-16 data streams is 
  137|       |     *    "#xFEFF". The notation ## is used to denote any byte value except that two consecutive 
  138|       |     *    ##s cannot be both 00.
  139|       |     *
  140|       |     *    With a Byte Order Mark:
  141|       |     *
  142|       |     *    00 00 FE FF           UCS-4,    big-endian machine    (1234 order) 
  143|       |     *    FF FE 00 00           UCS-4,    little-endian machine (4321 order) 
  144|       |     *    00 00 FF FE           UCS-4,    unusual octet order   (2143) 
  145|       |     *    FE FF 00 00           UCS-4,    unusual octet order   (3412) 
  146|       |     *    FE FF ## ##           UTF-16,   big-endian 
  147|       |     *    FF FE ## ##           UTF-16,   little-endian 
  148|       |     *    EF BB BF              UTF-8 
  149|       |     *
  150|       |     ***/
  151|       |
  152|       |    //
  153|       |    //  We have at least four bytes, so we can check all BOM
  154|       |    //  for UCS-4BE, UCS-4LE, UTF-16BE and UTF-16LE as well.
  155|       |    //
  156|  6.54k|    if ((rawBuffer[0] == 0x00) && (rawBuffer[1] == 0x00) && (rawBuffer[2] == 0xFE) && (rawBuffer[3] == 0xFF))
  ------------------
  |  Branch (156:9): [True: 66, False: 6.47k]
  |  Branch (156:35): [True: 35, False: 31]
  |  Branch (156:61): [True: 15, False: 20]
  |  Branch (156:87): [True: 15, False: 0]
  ------------------
  157|     15|        return UCS_4B;
  158|  6.52k|    else if ((rawBuffer[0] == 0xFF) && (rawBuffer[1] == 0xFE) && (rawBuffer[2] == 0x00) && (rawBuffer[3] == 0x00))
  ------------------
  |  Branch (158:14): [True: 216, False: 6.31k]
  |  Branch (158:40): [True: 216, False: 0]
  |  Branch (158:66): [True: 17, False: 199]
  |  Branch (158:92): [True: 17, False: 0]
  ------------------
  159|     17|        return UCS_4L;
  160|  6.51k|    else if ((rawBuffer[0] == 0xFE) && (rawBuffer[1] == 0xFF))
  ------------------
  |  Branch (160:14): [True: 40, False: 6.47k]
  |  Branch (160:40): [True: 40, False: 0]
  ------------------
  161|     40|        return UTF_16B;
  162|  6.47k|    else if ((rawBuffer[0] == 0xFF) && (rawBuffer[1] == 0xFE))
  ------------------
  |  Branch (162:14): [True: 199, False: 6.27k]
  |  Branch (162:40): [True: 199, False: 0]
  ------------------
  163|    199|        return UTF_16L;
  164|       |
  165|       |    //
  166|       |    //  We have at least 4 bytes. So lets check the 4 byte sequences that
  167|       |    //  indicate other UTF-16 and UCS encodings.
  168|       |    //
  169|  6.27k|    if ((rawBuffer[0] == 0x00) || (rawBuffer[0] == 0x3C))
  ------------------
  |  Branch (169:9): [True: 51, False: 6.22k]
  |  Branch (169:35): [True: 5.52k, False: 697]
  ------------------
  170|  5.57k|    {
  171|  5.57k|        if (rawByteCount >= fgUCS4PreLen && !memcmp(rawBuffer, fgUCS4BPre, fgUCS4PreLen))
  ------------------
  |  Branch (171:13): [True: 5.57k, False: 0]
  |  Branch (171:45): [True: 18, False: 5.55k]
  ------------------
  172|     18|            return UCS_4B;
  173|  5.55k|        else if (rawByteCount >= fgUCS4PreLen && !memcmp(rawBuffer, fgUCS4LPre, fgUCS4PreLen))
  ------------------
  |  Branch (173:18): [True: 5.55k, False: 0]
  |  Branch (173:50): [True: 10, False: 5.54k]
  ------------------
  174|     10|            return UCS_4L;
  175|  5.54k|        else if (rawByteCount >= fgUTF16PreLen && !memcmp(rawBuffer, fgUTF16BPre, fgUTF16PreLen))
  ------------------
  |  Branch (175:18): [True: 5.54k, False: 0]
  |  Branch (175:51): [True: 31, False: 5.51k]
  ------------------
  176|     31|            return UTF_16B;
  177|  5.51k|        else if (rawByteCount >= fgUTF16PreLen && !memcmp(rawBuffer, fgUTF16LPre, fgUTF16PreLen))
  ------------------
  |  Branch (177:18): [True: 5.51k, False: 0]
  |  Branch (177:51): [True: 14, False: 5.50k]
  ------------------
  178|     14|            return UTF_16L;
  179|  5.57k|    }
  180|       |
  181|       |    //
  182|       |    //  See if we have enough bytes to possibly match the EBCDIC prefix.
  183|       |    //  If so, try it.
  184|       |    //
  185|  6.20k|    if (rawByteCount > fgEBCDICPreLen)
  ------------------
  |  Branch (185:9): [True: 6.20k, False: 0]
  ------------------
  186|  6.20k|    {
  187|  6.20k|        if (!memcmp(rawBuffer, fgEBCDICPre, fgEBCDICPreLen))
  ------------------
  |  Branch (187:13): [True: 24, False: 6.17k]
  ------------------
  188|     24|            return EBCDIC;
  189|  6.20k|    }
  190|       |
  191|       |    //
  192|       |    //  Does not seem to be anything we know, so go with UTF-8 to get at
  193|       |    //  least through the first line and see what it really is.
  194|       |    //
  195|  6.17k|    return UTF_8;
  196|  6.20k|}
_ZN11xercesc_3_213XMLRecognizer15encodingForNameEPKDs:
  201|    391|{
  202|       |    //
  203|       |    //  Compare the passed string, assume input string is already uppercased,
  204|       |    //  to the variations that we recognize.
  205|       |    //
  206|       |    //  !!NOTE: Note that we don't handle EBCDIC here because we don't handle
  207|       |    //  that one ourselves. It is allowed to fall into 'other'.
  208|       |    //
  209|    391|    if (encName == XMLUni::fgXMLChEncodingString ||
  ------------------
  |  Branch (209:9): [True: 0, False: 391]
  ------------------
  210|    391|        !XMLString::compareString(encName, XMLUni::fgXMLChEncodingString))
  ------------------
  |  Branch (210:9): [True: 0, False: 391]
  ------------------
  211|      0|    {
  212|      0|        return XMLRecognizer::XERCES_XMLCH;
  213|      0|    }
  214|    391|    else if (!XMLString::compareString(encName, XMLUni::fgUTF8EncodingString)
  ------------------
  |  Branch (214:14): [True: 2, False: 389]
  ------------------
  215|    391|         ||  !XMLString::compareString(encName, XMLUni::fgUTF8EncodingString2))
  ------------------
  |  Branch (215:14): [True: 1, False: 388]
  ------------------
  216|      3|    {
  217|      3|        return XMLRecognizer::UTF_8;
  218|      3|    }
  219|    388|    else if (!XMLString::compareString(encName, XMLUni::fgUSASCIIEncodingString)
  ------------------
  |  Branch (219:14): [True: 1, False: 387]
  ------------------
  220|    388|         ||  !XMLString::compareString(encName, XMLUni::fgUSASCIIEncodingString2)
  ------------------
  |  Branch (220:14): [True: 2, False: 385]
  ------------------
  221|    388|         ||  !XMLString::compareString(encName, XMLUni::fgUSASCIIEncodingString3)
  ------------------
  |  Branch (221:14): [True: 119, False: 266]
  ------------------
  222|    388|         ||  !XMLString::compareString(encName, XMLUni::fgUSASCIIEncodingString4))
  ------------------
  |  Branch (222:14): [True: 1, False: 265]
  ------------------
  223|    123|    {
  224|    123|        return XMLRecognizer::US_ASCII;
  225|    123|    }
  226|    265|    else if (!XMLString::compareString(encName, XMLUni::fgUTF16LEncodingString)
  ------------------
  |  Branch (226:14): [True: 0, False: 265]
  ------------------
  227|    265|         ||  !XMLString::compareString(encName, XMLUni::fgUTF16LEncodingString2))
  ------------------
  |  Branch (227:14): [True: 1, False: 264]
  ------------------
  228|      1|    {
  229|      1|        return XMLRecognizer::UTF_16L;
  230|      1|    }
  231|    264|    else if (!XMLString::compareString(encName, XMLUni::fgUTF16BEncodingString)
  ------------------
  |  Branch (231:14): [True: 0, False: 264]
  ------------------
  232|    264|         ||  !XMLString::compareString(encName, XMLUni::fgUTF16BEncodingString2))
  ------------------
  |  Branch (232:14): [True: 1, False: 263]
  ------------------
  233|      1|    {
  234|      1|        return XMLRecognizer::UTF_16B;
  235|      1|    }
  236|    263|    else if (!XMLString::compareString(encName, XMLUni::fgUTF16EncodingString))
  ------------------
  |  Branch (236:14): [True: 0, False: 263]
  ------------------
  237|      0|    {
  238|      0|        return XMLPlatformUtils::fgXMLChBigEndian?XMLRecognizer::UTF_16B:XMLRecognizer::UTF_16L;
  ------------------
  |  Branch (238:16): [True: 0, False: 0]
  ------------------
  239|      0|    }
  240|    263|    else if (!XMLString::compareString(encName, XMLUni::fgUCS4LEncodingString)
  ------------------
  |  Branch (240:14): [True: 0, False: 263]
  ------------------
  241|    263|         ||  !XMLString::compareString(encName, XMLUni::fgUCS4LEncodingString2))
  ------------------
  |  Branch (241:14): [True: 0, False: 263]
  ------------------
  242|      0|    {
  243|      0|        return XMLRecognizer::UCS_4L;
  244|      0|    }
  245|    263|    else if (!XMLString::compareString(encName, XMLUni::fgUCS4BEncodingString)
  ------------------
  |  Branch (245:14): [True: 0, False: 263]
  ------------------
  246|    263|         ||  !XMLString::compareString(encName, XMLUni::fgUCS4BEncodingString2))
  ------------------
  |  Branch (246:14): [True: 0, False: 263]
  ------------------
  247|      0|    {
  248|      0|        return XMLRecognizer::UCS_4B;
  249|      0|    }
  250|    263|    else if (!XMLString::compareString(encName, XMLUni::fgUCS4EncodingString))
  ------------------
  |  Branch (250:14): [True: 0, False: 263]
  ------------------
  251|      0|    {
  252|      0|        return XMLPlatformUtils::fgXMLChBigEndian?XMLRecognizer::UCS_4B:XMLRecognizer::UCS_4L;
  ------------------
  |  Branch (252:16): [True: 0, False: 0]
  ------------------
  253|      0|    }
  254|       |
  255|       |    // Return 'other' since we don't recognizer it
  256|    263|    return XMLRecognizer::OtherEncoding;
  257|    391|}
_ZN11xercesc_3_213XMLRecognizer15nameForEncodingENS0_9EncodingsEPNS_13MemoryManagerE:
  263|   372k|{
  264|   372k|    if (theEncoding >= Encodings_Count)
  ------------------
  |  Branch (264:9): [True: 0, False: 372k]
  ------------------
  265|      0|        ThrowXMLwithMemMgr(RuntimeException, XMLExcepts::XMLRec_UnknownEncoding, manager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  266|       |
  267|   372k|    return gEncodingNameMap[theEncoding];
  268|   372k|}

_ZN11xercesc_3_210XMLRefInfoD2Ev:
  142|  8.08k|{
  143|  8.08k|    fMemoryManager->deallocate(fRefName);
  144|  8.08k|}
_ZNK11xercesc_3_210XMLRefInfo11getDeclaredEv:
  151|  2.48M|{
  152|  2.48M|    return fDeclared;
  153|  2.48M|}
_ZNK11xercesc_3_210XMLRefInfo10getRefNameEv:
  156|  8.72k|{
  157|  8.72k|    return fRefName;
  158|  8.72k|}
_ZNK11xercesc_3_210XMLRefInfo7getUsedEv:
  161|  1.08k|{
  162|  1.08k|    return fUsed;
  163|  1.08k|}
_ZN11xercesc_3_210XMLRefInfo11setDeclaredEb:
  170|  56.7k|{
  171|  56.7k|    fDeclared = newValue;
  172|  56.7k|}
_ZN11xercesc_3_210XMLRefInfo7setUsedEb:
  175|  2.43M|{
  176|  2.43M|    fUsed = newValue;
  177|  2.43M|}
_ZN11xercesc_3_210XMLRefInfoC2EPKDsbbPNS_13MemoryManagerE:
  133|  8.08k|    fDeclared(declared)
  134|  8.08k|    , fUsed(used)
  135|  8.08k|    , fRefName(0)
  136|  8.08k|    , fMemoryManager(manager)
  137|  8.08k|{
  138|  8.08k|    fRefName = XMLString::replicate(refName, fMemoryManager);
  139|  8.08k|}

_ZN11xercesc_3_214XMLInitializer22initializeXMLValidatorEv:
   36|      1|{
   37|      1|    sMsgLoader = XMLPlatformUtils::loadMsgSet(XMLUni::fgValidityDomain);
   38|       |
   39|      1|    if (!sMsgLoader)
  ------------------
  |  Branch (39:9): [True: 0, False: 1]
  ------------------
   40|      0|      XMLPlatformUtils::panic(PanicHandler::Panic_CantLoadMsgDomain);
   41|      1|}
_ZN11xercesc_3_212XMLValidator9emitErrorENS_8XMLValid5CodesE:
   59|  17.4k|{
   60|       |    // Bump the error count if it is not a warning
   61|  17.4k|    if (XMLValid::errorType(toEmit) != XMLErrorReporter::ErrType_Warning)
  ------------------
  |  Branch (61:9): [True: 17.4k, False: 0]
  ------------------
   62|  17.4k|        fScanner->incrementErrorCount();
   63|       |
   64|       |    //	Call error reporter if we have one
   65|  17.4k|    if (fErrorReporter)
  ------------------
  |  Branch (65:9): [True: 0, False: 17.4k]
  ------------------
   66|      0|    {
   67|       |        // Load the message into a local for display
   68|      0|        const XMLSize_t msgSize = 1023;
   69|      0|        XMLCh errText[msgSize + 1];
   70|       |
   71|       |        // load the text
   72|      0|        if (!sMsgLoader->loadMsg(toEmit, errText, msgSize))
  ------------------
  |  Branch (72:13): [True: 0, False: 0]
  ------------------
   73|      0|        {
   74|       |          // <TBD> Probably should load a default msg here
   75|      0|        }
   76|       |
   77|       |        //
   78|       |        //  Create a LastExtEntityInfo structure and get the reader manager
   79|       |        //  to fill it in for us. This will give us the information about
   80|       |        //  the last reader on the stack that was an external entity of some
   81|       |        //  sort (i.e. it will ignore internal entities.
   82|       |        //
   83|      0|        ReaderMgr::LastExtEntityInfo lastInfo;
   84|      0|        fReaderMgr->getLastExtEntityInfo(lastInfo);
   85|       |
   86|      0|        fErrorReporter->error
   87|      0|        (
   88|      0|            toEmit
   89|      0|            , XMLUni::fgValidityDomain
   90|      0|            , XMLValid::errorType(toEmit)
   91|      0|            , errText
   92|      0|            , lastInfo.systemId
   93|      0|            , lastInfo.publicId
   94|      0|            , lastInfo.lineNumber
   95|      0|            , lastInfo.colNumber
   96|      0|        );
   97|      0|    }
   98|       |
   99|       |    // Bail out if its fatal an we are to give up on the first fatal error
  100|  17.4k|    if (((XMLValid::isError(toEmit) && fScanner->getValidationConstraintFatal())
  ------------------
  |  Branch (100:11): [True: 17.4k, False: 0]
  |  Branch (100:40): [True: 0, False: 17.4k]
  ------------------
  101|  17.4k|         || XMLValid::isFatal(toEmit))
  ------------------
  |  Branch (101:13): [True: 0, False: 17.4k]
  ------------------
  102|  17.4k|    &&  fScanner->getExitOnFirstFatal()
  ------------------
  |  Branch (102:9): [True: 0, False: 0]
  ------------------
  103|  17.4k|    &&  !fScanner->getInException())
  ------------------
  |  Branch (103:9): [True: 0, False: 0]
  ------------------
  104|      0|    {
  105|      0|        throw toEmit;
  106|      0|    }
  107|  17.4k|}
_ZN11xercesc_3_212XMLValidator9emitErrorENS_8XMLValid5CodesEPKDsS4_S4_S4_:
  114|  30.5M|{
  115|       |    // Bump the error count if it is not a warning
  116|  30.5M|    if (XMLValid::errorType(toEmit) != XMLErrorReporter::ErrType_Warning)
  ------------------
  |  Branch (116:9): [True: 30.5M, False: 0]
  ------------------
  117|  30.5M|        fScanner->incrementErrorCount();
  118|       |
  119|       |    //	Call error reporter if we have one
  120|  30.5M|    if (fErrorReporter)
  ------------------
  |  Branch (120:9): [True: 0, False: 30.5M]
  ------------------
  121|      0|    {
  122|       |        //
  123|       |        //  Load the message into alocal and replace any tokens found in
  124|       |        //  the text.
  125|       |        //
  126|      0|        const XMLSize_t maxChars = 2047;
  127|      0|        XMLCh errText[maxChars + 1];
  128|       |
  129|       |        // load the text
  130|      0|        if (!sMsgLoader->loadMsg(toEmit, errText, maxChars, text1, text2, text3, text4, fScanner->getMemoryManager()))
  ------------------
  |  Branch (130:13): [True: 0, False: 0]
  ------------------
  131|      0|        {
  132|       |          // <TBD> Should probably load a default message here
  133|      0|        }
  134|       |
  135|       |        //
  136|       |        //  Create a LastExtEntityInfo structure and get the reader manager
  137|       |        //  to fill it in for us. This will give us the information about
  138|       |        //  the last reader on the stack that was an external entity of some
  139|       |        //  sort (i.e. it will ignore internal entities.
  140|       |        //
  141|      0|        ReaderMgr::LastExtEntityInfo lastInfo;
  142|      0|        fReaderMgr->getLastExtEntityInfo(lastInfo);
  143|       |
  144|      0|        fErrorReporter->error
  145|      0|        (
  146|      0|            toEmit
  147|      0|            , XMLUni::fgValidityDomain
  148|      0|            , XMLValid::errorType(toEmit)
  149|      0|            , errText
  150|      0|            , lastInfo.systemId
  151|      0|            , lastInfo.publicId
  152|      0|            , lastInfo.lineNumber
  153|      0|            , lastInfo.colNumber
  154|      0|        );
  155|      0|    }
  156|       |
  157|       |    // Bail out if its fatal an we are to give up on the first fatal error
  158|  30.5M|    if (((XMLValid::isError(toEmit) && fScanner->getValidationConstraintFatal())
  ------------------
  |  Branch (158:11): [True: 30.5M, False: 0]
  |  Branch (158:40): [True: 0, False: 30.5M]
  ------------------
  159|  30.5M|         || XMLValid::isFatal(toEmit))
  ------------------
  |  Branch (159:13): [True: 0, False: 30.5M]
  ------------------
  160|  30.5M|    &&  fScanner->getExitOnFirstFatal()
  ------------------
  |  Branch (160:9): [True: 0, False: 0]
  ------------------
  161|  30.5M|    &&  !fScanner->getInException())
  ------------------
  |  Branch (161:9): [True: 0, False: 0]
  ------------------
  162|      0|    {
  163|      0|        throw toEmit;
  164|      0|    }
  165|  30.5M|}
_ZN11xercesc_3_212XMLValidatorC2EPNS_16XMLErrorReporterE:
  289|  14.2k|    fBufMgr(0)
  290|  14.2k|    , fErrorReporter(errReporter)
  291|  14.2k|    , fReaderMgr(0)
  292|  14.2k|    , fScanner(0)
  293|  14.2k|{
  294|  14.2k|}

_ZN11xercesc_3_212XMLValidatorD2Ev:
   67|  14.2k|    {
   68|  14.2k|    }
_ZN11xercesc_3_212XMLValidator14setScannerInfoEPNS_10XMLScannerEPNS_9ReaderMgrEPNS_12XMLBufferMgrE:
  377|  14.2k|{
  378|       |    // We don't own any of these, we just reference them
  379|  14.2k|    fScanner = owningScanner;
  380|  14.2k|    fReaderMgr = readerMgr;
  381|  14.2k|    fBufMgr = bufMgr;
  382|  14.2k|}
_ZN11xercesc_3_212XMLValidator16setErrorReporterEPNS_16XMLErrorReporterE:
  386|  28.5k|{
  387|  28.5k|    fErrorReporter = errorReporter;
  388|  28.5k|}
_ZN11xercesc_3_212XMLValidator12getReaderMgrEv:
  410|  18.0M|{
  411|  18.0M|    return fReaderMgr;
  412|  18.0M|}
_ZN11xercesc_3_212XMLValidator10getScannerEv:
  420|  19.0M|{
  421|  19.0M|    return fScanner;
  422|  19.0M|}

_ZN11xercesc_3_28XMLValid9errorTypeENS0_5CodesE:
  119|  30.5M|    {
  120|  30.5M|       if ((toCheck >= W_LowBounds) && (toCheck <= W_HighBounds))
  ------------------
  |  Branch (120:12): [True: 0, False: 30.5M]
  |  Branch (120:40): [True: 0, False: 0]
  ------------------
  121|      0|           return XMLErrorReporter::ErrType_Warning;
  122|  30.5M|       else if ((toCheck >= F_LowBounds) && (toCheck <= F_HighBounds))
  ------------------
  |  Branch (122:17): [True: 0, False: 30.5M]
  |  Branch (122:45): [True: 0, False: 0]
  ------------------
  123|      0|            return XMLErrorReporter::ErrType_Fatal;
  124|  30.5M|       else if ((toCheck >= E_LowBounds) && (toCheck <= E_HighBounds))
  ------------------
  |  Branch (124:17): [True: 30.5M, False: 0]
  |  Branch (124:45): [True: 30.5M, False: 0]
  ------------------
  125|  30.5M|            return XMLErrorReporter::ErrType_Error;
  126|      0|       return XMLErrorReporter::ErrTypes_Unknown;
  127|  30.5M|    }
_ZN11xercesc_3_28XMLValid7isErrorENS0_5CodesE:
  114|  30.5M|    {
  115|  30.5M|        return ((toCheck >= E_LowBounds) && (toCheck <= E_HighBounds));
  ------------------
  |  Branch (115:17): [True: 30.5M, False: 0]
  |  Branch (115:45): [True: 30.5M, False: 0]
  ------------------
  116|  30.5M|    }
_ZN11xercesc_3_28XMLValid7isFatalENS0_5CodesE:
  104|  30.5M|    {
  105|  30.5M|        return ((toCheck >= F_LowBounds) && (toCheck <= F_HighBounds));
  ------------------
  |  Branch (105:17): [True: 0, False: 30.5M]
  |  Branch (105:45): [True: 0, False: 0]
  ------------------
  106|  30.5M|    }

_ZN11xercesc_3_217PSVIAttributeListC2EPNS_13MemoryManagerE:
   29|  7.12k|    fMemoryManager(manager)
   30|  7.12k|  , fAttrList(0)
   31|  7.12k|  , fAttrPos(0)
   32|  7.12k|{
   33|  7.12k|    fAttrList= new (fMemoryManager) RefVectorOf<PSVIAttributeStorage> (10, true, fMemoryManager);
   34|  7.12k|}

_ZN11xercesc_3_217PSVIAttributeListD2Ev:
  183|  7.12k|{
  184|  7.12k|    delete fAttrList;
  185|  7.12k|}

_ZN11xercesc_3_211PSVIElementC2EPNS_13MemoryManagerE:
   30|  7.12k|        PSVIItem(manager),
   31|  7.12k|        fElementDecl(0),
   32|  7.12k|        fNotationDecl(0),
   33|  7.12k|        fSchemaInfo(0)
   34|  7.12k|{
   35|  7.12k|}
_ZN11xercesc_3_211PSVIElementD2Ev:
   38|  7.12k|{
   39|  7.12k|    fMemoryManager->deallocate(fCanonicalValue);
   40|  7.12k|}

_ZN11xercesc_3_28PSVIItemC2EPNS_13MemoryManagerE:
   30|  7.12k|        fMemoryManager(manager),
   31|  7.12k|        fValidationContext(0),
   32|  7.12k|        fNormalizedValue(0),
   33|  7.12k|        fDefaultValue(0),
   34|  7.12k|        fCanonicalValue(0),
   35|  7.12k|        fValidityState(VALIDITY_NOTKNOWN),
   36|  7.12k|        fAssessmentType(VALIDATION_FULL),
   37|  7.12k|        fIsSpecified(false),
   38|  7.12k|        fType(0),
   39|  7.12k|        fMemberType(0)
   40|  7.12k|{
   41|  7.12k|}

_ZN11xercesc_3_28PSVIItemD2Ev:
  270|  7.12k|inline PSVIItem::~PSVIItem() {}

_ZN11xercesc_3_214XMLInitializer17initializeXSValueEv:
  149|      1|{
  150|      1|    sXSValueRegEx = new RegularExpression(
  151|      1|      XMLUni::fgLangPattern, SchemaSymbols::fgRegEx_XOption);
  152|       |
  153|      1|    XSValue::initializeRegistry();
  154|      1|}
_ZN11xercesc_3_27XSValue18initializeRegistryEv:
  175|      1|{
  176|       |    //using the XMLPlatformUtils::fgMemoryManager
  177|      1|    fDataTypeRegistry  = new ValueHashTableOf<XSValue::DataType>(43);
  178|       |
  179|      1|    if (fDataTypeRegistry) {
  ------------------
  |  Branch (179:9): [True: 1, False: 0]
  ------------------
  180|      1|        fDataTypeRegistry->put((void*) SchemaSymbols::fgDT_STRING,             XSValue::dt_string);
  181|      1|        fDataTypeRegistry->put((void*) SchemaSymbols::fgDT_BOOLEAN,            XSValue::dt_boolean);
  182|      1|        fDataTypeRegistry->put((void*) SchemaSymbols::fgDT_DECIMAL,            XSValue::dt_decimal);
  183|      1|        fDataTypeRegistry->put((void*) SchemaSymbols::fgDT_FLOAT,              XSValue::dt_float);
  184|      1|        fDataTypeRegistry->put((void*) SchemaSymbols::fgDT_DOUBLE,             XSValue::dt_double);
  185|      1|        fDataTypeRegistry->put((void*) SchemaSymbols::fgDT_DURATION,           XSValue::dt_duration);
  186|      1|        fDataTypeRegistry->put((void*) SchemaSymbols::fgDT_DATETIME,           XSValue::dt_dateTime);
  187|      1|        fDataTypeRegistry->put((void*) SchemaSymbols::fgDT_TIME,               XSValue::dt_time);
  188|      1|        fDataTypeRegistry->put((void*) SchemaSymbols::fgDT_DATE,               XSValue::dt_date);
  189|      1|        fDataTypeRegistry->put((void*) SchemaSymbols::fgDT_YEARMONTH,          XSValue::dt_gYearMonth);
  190|      1|        fDataTypeRegistry->put((void*) SchemaSymbols::fgDT_YEAR,               XSValue::dt_gYear);
  191|      1|        fDataTypeRegistry->put((void*) SchemaSymbols::fgDT_MONTHDAY,           XSValue::dt_gMonthDay);
  192|      1|        fDataTypeRegistry->put((void*) SchemaSymbols::fgDT_DAY,                XSValue::dt_gDay);
  193|      1|        fDataTypeRegistry->put((void*) SchemaSymbols::fgDT_MONTH,              XSValue::dt_gMonth);
  194|      1|        fDataTypeRegistry->put((void*) SchemaSymbols::fgDT_HEXBINARY,          XSValue::dt_hexBinary);
  195|      1|        fDataTypeRegistry->put((void*) SchemaSymbols::fgDT_BASE64BINARY,       XSValue::dt_base64Binary);
  196|      1|        fDataTypeRegistry->put((void*) SchemaSymbols::fgDT_ANYURI,             XSValue::dt_anyURI);
  197|      1|        fDataTypeRegistry->put((void*) SchemaSymbols::fgDT_QNAME,              XSValue::dt_QName);
  198|      1|        fDataTypeRegistry->put((void*) XMLUni::fgNotationString,               XSValue::dt_NOTATION);
  199|      1|        fDataTypeRegistry->put((void*) SchemaSymbols::fgDT_NORMALIZEDSTRING,   XSValue::dt_normalizedString);
  200|      1|        fDataTypeRegistry->put((void*) SchemaSymbols::fgDT_TOKEN,              XSValue::dt_token);
  201|      1|        fDataTypeRegistry->put((void*) SchemaSymbols::fgDT_LANGUAGE,           XSValue::dt_language);
  202|      1|        fDataTypeRegistry->put((void*) XMLUni::fgNmTokenString,                XSValue::dt_NMTOKEN);
  203|      1|        fDataTypeRegistry->put((void*) XMLUni::fgNmTokensString,               XSValue::dt_NMTOKENS);
  204|      1|        fDataTypeRegistry->put((void*) SchemaSymbols::fgDT_NAME,               XSValue::dt_Name);
  205|      1|        fDataTypeRegistry->put((void*) SchemaSymbols::fgDT_NCNAME,             XSValue::dt_NCName);
  206|      1|        fDataTypeRegistry->put((void*) XMLUni::fgIDString,                     XSValue::dt_ID);
  207|      1|        fDataTypeRegistry->put((void*) XMLUni::fgIDRefString,                  XSValue::dt_IDREF);
  208|      1|        fDataTypeRegistry->put((void*) XMLUni::fgIDRefsString,                 XSValue::dt_IDREFS);
  209|      1|        fDataTypeRegistry->put((void*) XMLUni::fgEntityString,                 XSValue::dt_ENTITY);
  210|      1|        fDataTypeRegistry->put((void*) XMLUni::fgEntitiesString,               XSValue::dt_ENTITIES);
  211|      1|        fDataTypeRegistry->put((void*) SchemaSymbols::fgDT_INTEGER,            XSValue::dt_integer);
  212|      1|        fDataTypeRegistry->put((void*) SchemaSymbols::fgDT_NONPOSITIVEINTEGER, XSValue::dt_nonPositiveInteger);
  213|      1|        fDataTypeRegistry->put((void*) SchemaSymbols::fgDT_NEGATIVEINTEGER,    XSValue::dt_negativeInteger);
  214|      1|        fDataTypeRegistry->put((void*) SchemaSymbols::fgDT_LONG,               XSValue::dt_long);
  215|      1|        fDataTypeRegistry->put((void*) SchemaSymbols::fgDT_INT,                XSValue::dt_int);
  216|      1|        fDataTypeRegistry->put((void*) SchemaSymbols::fgDT_SHORT,              XSValue::dt_short);
  217|      1|        fDataTypeRegistry->put((void*) SchemaSymbols::fgDT_BYTE,               XSValue::dt_byte);
  218|      1|        fDataTypeRegistry->put((void*) SchemaSymbols::fgDT_NONNEGATIVEINTEGER, XSValue::dt_nonNegativeInteger);
  219|      1|        fDataTypeRegistry->put((void*) SchemaSymbols::fgDT_ULONG,              XSValue::dt_unsignedLong);
  220|      1|        fDataTypeRegistry->put((void*) SchemaSymbols::fgDT_UINT,               XSValue::dt_unsignedInt);
  221|      1|        fDataTypeRegistry->put((void*) SchemaSymbols::fgDT_USHORT,             XSValue::dt_unsignedShort);
  222|      1|        fDataTypeRegistry->put((void*) SchemaSymbols::fgDT_UBYTE,              XSValue::dt_unsignedByte);
  223|      1|        fDataTypeRegistry->put((void*) SchemaSymbols::fgDT_POSITIVEINTEGER,    XSValue::dt_positiveInteger);
  224|      1|    }
  225|      1|}

_ZN11xercesc_3_29ElemStackC2EPNS_13MemoryManagerE:
   39|  7.12k|    fEmptyNamespaceId(0)
   40|  7.12k|    , fGlobalPoolId(0)
   41|  7.12k|    , fPrefixPool(109, manager)
   42|  7.12k|    , fGlobalNamespaces(0)
   43|  7.12k|    , fStack(0)
   44|  7.12k|    , fStackCapacity(32)
   45|  7.12k|    , fStackTop(0)
   46|  7.12k|    , fUnknownNamespaceId(0)
   47|  7.12k|    , fXMLNamespaceId(0)
   48|  7.12k|    , fXMLPoolId(0)
   49|  7.12k|    , fXMLNSNamespaceId(0)
   50|  7.12k|    , fXMLNSPoolId(0)
   51|  7.12k|    , fNamespaceMap(0)
   52|  7.12k|    , fMemoryManager(manager)
   53|  7.12k|{
   54|       |    // Do an initial allocation of the stack and zero it out
   55|  7.12k|    fStack = (StackElem**) fMemoryManager->allocate
   56|  7.12k|    (
   57|  7.12k|        fStackCapacity * sizeof(StackElem*)
   58|  7.12k|    );//new StackElem*[fStackCapacity];
   59|  7.12k|    memset(fStack, 0, fStackCapacity * sizeof(StackElem*));
   60|       |
   61|  7.12k|    fNamespaceMap = new (fMemoryManager) ValueVectorOf<PrefMapElem*>(16, fMemoryManager);
   62|  7.12k|}
_ZN11xercesc_3_29ElemStackD2Ev:
   65|  7.12k|{
   66|  7.12k|    if(fGlobalNamespaces)
  ------------------
  |  Branch (66:8): [True: 0, False: 7.12k]
  ------------------
   67|      0|    {
   68|      0|        fMemoryManager->deallocate(fGlobalNamespaces->fMap);
   69|      0|        delete fGlobalNamespaces;
   70|      0|    }
   71|       |
   72|       |    //
   73|       |    //  Start working from the bottom of the stack and clear it out as we
   74|       |    //  go up. Once we hit an uninitialized one, we can break out.
   75|       |    //
   76|  11.3M|    for (XMLSize_t stackInd = 0; stackInd < fStackCapacity; stackInd++)
  ------------------
  |  Branch (76:34): [True: 11.3M, False: 25]
  ------------------
   77|  11.3M|    {
   78|       |        // If this entry has been set, then lets clean it up
   79|  11.3M|        if (!fStack[stackInd])
  ------------------
  |  Branch (79:13): [True: 7.10k, False: 11.3M]
  ------------------
   80|  7.10k|            break;
   81|       |
   82|  11.3M|        fMemoryManager->deallocate(fStack[stackInd]->fChildren);//delete [] fStack[stackInd]->fChildren;
   83|  11.3M|        fMemoryManager->deallocate(fStack[stackInd]->fMap);//delete [] fStack[stackInd]->fMap;
   84|  11.3M|        fMemoryManager->deallocate(fStack[stackInd]->fSchemaElemName);
   85|  11.3M|        delete fStack[stackInd];
   86|  11.3M|    }
   87|       |
   88|       |    // Delete the stack array itself now
   89|  7.12k|    fMemoryManager->deallocate(fStack);//delete [] fStack;
   90|  7.12k|    delete fNamespaceMap;
   91|  7.12k|}
_ZN11xercesc_3_29ElemStack8addLevelEPNS_14XMLElementDeclEm:
  135|  17.0M|{
  136|       |    // See if we need to expand the stack
  137|  17.0M|    if (fStackTop == fStackCapacity)
  ------------------
  |  Branch (137:9): [True: 3.33k, False: 17.0M]
  ------------------
  138|  3.33k|        expandStack();
  139|       |
  140|       |    // If this element has not been initialized yet, then initialize it
  141|  17.0M|    if (!fStack[fStackTop])
  ------------------
  |  Branch (141:9): [True: 11.3M, False: 5.72M]
  ------------------
  142|  11.3M|    {
  143|  11.3M|        fStack[fStackTop] = new (fMemoryManager) StackElem;
  144|  11.3M|        fStack[fStackTop]->fChildCapacity = 0;
  145|  11.3M|        fStack[fStackTop]->fChildren = 0;
  146|  11.3M|        fStack[fStackTop]->fMapCapacity = 0;
  147|  11.3M|        fStack[fStackTop]->fMap = 0;
  148|  11.3M|        fStack[fStackTop]->fSchemaElemName = 0;
  149|  11.3M|        fStack[fStackTop]->fSchemaElemNameMaxLen = 0;
  150|  11.3M|    }
  151|       |
  152|       |    // Set up the new top row
  153|  17.0M|    fStack[fStackTop]->fThisElement = toSet;
  154|  17.0M|    fStack[fStackTop]->fReaderNum = readerNum;
  155|  17.0M|    fStack[fStackTop]->fChildCount = 0;
  156|  17.0M|    fStack[fStackTop]->fMapCount = 0;
  157|  17.0M|    fStack[fStackTop]->fValidationFlag = false;
  158|  17.0M|    fStack[fStackTop]->fCommentOrPISeen = false;
  159|  17.0M|    fStack[fStackTop]->fReferenceEscaped = false;
  160|  17.0M|    fStack[fStackTop]->fCurrentURI = fUnknownNamespaceId;
  161|  17.0M|    fStack[fStackTop]->fCurrentScope = Grammar::TOP_LEVEL_SCOPE;
  162|  17.0M|    fStack[fStackTop]->fCurrentGrammar = 0;
  163|       |
  164|       |    // Bump the top of stack
  165|  17.0M|    fStackTop++;
  166|       |
  167|  17.0M|    return fStackTop-1;
  168|  17.0M|}
_ZN11xercesc_3_29ElemStack6popTopEv:
  173|  5.72M|{
  174|       |    // Watch for an underflow error
  175|  5.72M|    if (!fStackTop)
  ------------------
  |  Branch (175:9): [True: 0, False: 5.72M]
  ------------------
  176|      0|        ThrowXMLwithMemMgr(EmptyStackException, XMLExcepts::ElemStack_StackUnderflow, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  177|       |
  178|  5.72M|    fStackTop--;
  179|  5.72M|    return fStack[fStackTop];
  180|  5.72M|}
_ZN11xercesc_3_29ElemStack8addChildEPNS_5QNameEb:
  198|  17.0M|{
  199|  17.0M|    if (!fStackTop)
  ------------------
  |  Branch (199:9): [True: 0, False: 17.0M]
  ------------------
  200|      0|        ThrowXMLwithMemMgr(EmptyStackException, XMLExcepts::ElemStack_EmptyStack, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  201|       |
  202|       |    //
  203|       |    //  If they want to add to the parent, then we have to have at least two
  204|       |    //  elements on the stack.
  205|       |    //
  206|  17.0M|    if (toParent && (fStackTop < 2))
  ------------------
  |  Branch (206:9): [True: 17.0M, False: 0]
  |  Branch (206:21): [True: 0, False: 17.0M]
  ------------------
  207|      0|        ThrowXMLwithMemMgr(NoSuchElementException, XMLExcepts::ElemStack_NoParentPushed, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  208|       |
  209|       |    // Get a convenience pointer to the stack top row
  210|  17.0M|    StackElem* curRow = toParent
  ------------------
  |  Branch (210:25): [True: 17.0M, False: 0]
  ------------------
  211|  17.0M|                        ? fStack[fStackTop - 2] : fStack[fStackTop - 1];
  212|       |
  213|       |    // See if we need to expand this row's child array
  214|  17.0M|    if (curRow->fChildCount == curRow->fChildCapacity)
  ------------------
  |  Branch (214:9): [True: 11.3M, False: 5.70M]
  ------------------
  215|  11.3M|    {
  216|       |        // Increase the capacity by a quarter and allocate a new row
  217|  11.3M|        const XMLSize_t newCapacity = curRow->fChildCapacity ?
  ------------------
  |  Branch (217:39): [True: 22.3k, False: 11.3M]
  ------------------
  218|  22.3k|                                      (XMLSize_t)(curRow->fChildCapacity * 1.25) :
  219|  11.3M|                                      32;
  220|  11.3M|        QName** newRow = (QName**) fMemoryManager->allocate
  221|  11.3M|        (
  222|  11.3M|            newCapacity * sizeof(QName*)
  223|  11.3M|        );//new QName*[newCapacity];
  224|       |
  225|       |        //
  226|       |        //  Copy over the old contents. We don't have to initialize the new
  227|       |        //  part because The current child count is used to know how much of
  228|       |        //  it is valid.
  229|       |        //
  230|       |        //  Only both doing this if there is any current content, since
  231|       |        //  this code also does the initial faulting in of the array when
  232|       |        //  both the current capacity and child count are zero.
  233|       |        //
  234|  35.0M|        for (XMLSize_t index = 0; index < curRow->fChildCount; index++)
  ------------------
  |  Branch (234:35): [True: 23.6M, False: 11.3M]
  ------------------
  235|  23.6M|            newRow[index] = curRow->fChildren[index];
  236|       |
  237|       |        // Clean up the old children and store the new info
  238|  11.3M|        fMemoryManager->deallocate(curRow->fChildren);//delete [] curRow->fChildren;
  239|  11.3M|        curRow->fChildren = newRow;
  240|  11.3M|        curRow->fChildCapacity = newCapacity;
  241|  11.3M|    }
  242|       |
  243|       |    // Add this id to the end of the row's child id array and bump the count
  244|  17.0M|    curRow->fChildren[curRow->fChildCount++] = child;
  245|       |
  246|       |    // Return the level of the index we just filled (before the bump)
  247|  17.0M|    return curRow->fChildCount - 1;
  248|  17.0M|}
_ZNK11xercesc_3_29ElemStack10topElementEv:
  251|  9.82M|{
  252|  9.82M|    if (!fStackTop)
  ------------------
  |  Branch (252:9): [True: 0, False: 9.82M]
  ------------------
  253|      0|        ThrowXMLwithMemMgr(EmptyStackException, XMLExcepts::ElemStack_EmptyStack, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  254|       |
  255|  9.82M|    return fStack[fStackTop - 1];
  256|  9.82M|}
_ZN11xercesc_3_29ElemStack5resetEjjjj:
  445|  7.12k|{
  446|  7.12k|    if(fGlobalNamespaces)
  ------------------
  |  Branch (446:8): [True: 0, False: 7.12k]
  ------------------
  447|      0|    {
  448|      0|        fMemoryManager->deallocate(fGlobalNamespaces->fMap);
  449|      0|        delete fGlobalNamespaces;
  450|      0|        fGlobalNamespaces = 0;
  451|      0|    }
  452|       |
  453|       |    // Reset the stack top to clear the stack
  454|  7.12k|    fStackTop = 0;
  455|       |
  456|       |    // if first time, put in the standard prefixes
  457|  7.12k|    if (fXMLPoolId == 0) {
  ------------------
  |  Branch (457:9): [True: 7.12k, False: 0]
  ------------------
  458|       |
  459|  7.12k|        fGlobalPoolId = fPrefixPool.addOrFind(XMLUni::fgZeroLenString);
  460|  7.12k|        fXMLPoolId = fPrefixPool.addOrFind(XMLUni::fgXMLString);
  461|  7.12k|        fXMLNSPoolId = fPrefixPool.addOrFind(XMLUni::fgXMLNSString);
  462|  7.12k|    }
  463|       |
  464|       |    // And store the new special URI ids
  465|  7.12k|    fEmptyNamespaceId = emptyId;
  466|  7.12k|    fUnknownNamespaceId = unknownId;
  467|  7.12k|    fXMLNamespaceId = xmlId;
  468|  7.12k|    fXMLNSNamespaceId = xmlNSId;
  469|  7.12k|}
_ZN11xercesc_3_29ElemStack11expandStackEv:
  505|  3.33k|{
  506|       |    // Expand the capacity by 25% and allocate a new buffer
  507|  3.33k|    const XMLSize_t newCapacity = (XMLSize_t)(fStackCapacity * 1.25);
  508|  3.33k|    StackElem** newStack = (StackElem**) fMemoryManager->allocate
  509|  3.33k|    (
  510|  3.33k|        newCapacity * sizeof(StackElem*)
  511|  3.33k|    );//new StackElem*[newCapacity];
  512|       |
  513|       |    // Copy over the old stuff
  514|  3.33k|    memcpy(newStack, fStack, fStackCapacity * sizeof(StackElem*));
  515|       |
  516|       |    //
  517|       |    //  And zero out the new stuff. Though we use a stack top, we reuse old
  518|       |    //  stack contents so we need to know if elements have been initially
  519|       |    //  allocated or not as we push new stuff onto the stack.
  520|       |    //
  521|  3.33k|    memset
  522|  3.33k|    (
  523|  3.33k|        &newStack[fStackCapacity]
  524|  3.33k|        , 0
  525|  3.33k|        , (newCapacity - fStackCapacity) * sizeof(StackElem*)
  526|  3.33k|    );
  527|       |
  528|       |    // Delete the old array and update our members
  529|  3.33k|    fMemoryManager->deallocate(fStack);//delete [] fStack;
  530|  3.33k|    fStack = newStack;
  531|  3.33k|    fStackCapacity = newCapacity;
  532|  3.33k|}

_ZNK11xercesc_3_29ElemStack7isEmptyEv:
  464|  17.7M|{
  465|  17.7M|    return (fStackTop == 0);
  466|  17.7M|}
_ZN11xercesc_3_29ElemStack17getValidationFlagEv:
  469|  5.72M|{
  470|  5.72M|    return fStack[fStackTop-1]->fValidationFlag;
  471|  5.72M|}
_ZN11xercesc_3_29ElemStack17setValidationFlagEb:
  474|  17.0M|{
  475|  17.0M|    fStack[fStackTop-1]->fValidationFlag = validationFlag;
  476|  17.0M|}
_ZN11xercesc_3_29ElemStack18setCommentOrPISeenEv:
  484|   210k|{
  485|   210k|    fStack[fStackTop-1]->fCommentOrPISeen = true;
  486|   210k|}
_ZN11xercesc_3_29ElemStack19setReferenceEscapedEv:
  494|  88.2k|{
  495|  88.2k|    fStack[fStackTop-1]->fReferenceEscaped = true;
  496|  88.2k|}

_ZN11xercesc_3_220EndOfEntityExceptionC2EPNS_13XMLEntityDeclEm:
   48|   195k|        fEntity(entityThatEnded)
   49|   195k|        , fReaderNum(readerNum)
   50|   195k|    {
   51|   195k|    }
_ZN11xercesc_3_220EndOfEntityExceptionD2Ev:
   61|   195k|    {
   62|   195k|    }

_ZN11xercesc_3_212IGXMLScannerC2EPNS_12XMLValidatorEPNS_15GrammarResolverEPNS_13MemoryManagerE:
   62|  7.12k|    XMLScanner(valToAdopt, grammarResolver, manager)
   63|  7.12k|    , fSeeXsi(false)
   64|  7.12k|    , fGrammarType(Grammar::UnKnown)
   65|  7.12k|    , fElemStateSize(16)
   66|  7.12k|    , fElemState(0)
   67|  7.12k|    , fElemLoopState(0)
   68|  7.12k|    , fContent(1023, manager)
   69|  7.12k|    , fRawAttrList(0)
   70|  7.12k|    , fRawAttrColonListSize(32)
   71|  7.12k|    , fRawAttrColonList(0)
   72|  7.12k|    , fDTDValidator(0)
   73|  7.12k|    , fSchemaValidator(0)
   74|  7.12k|    , fDTDGrammar(0)
   75|  7.12k|    , fICHandler(0)
   76|  7.12k|    , fLocationPairs(0)
   77|  7.12k|    , fDTDElemNonDeclPool(0)
   78|  7.12k|    , fSchemaElemNonDeclPool(0)
   79|  7.12k|    , fElemCount(0)
   80|  7.12k|    , fAttDefRegistry(0)
   81|  7.12k|    , fUndeclaredAttrRegistry(0)
   82|  7.12k|    , fPSVIAttrList(0)
   83|  7.12k|    , fModel(0)
   84|  7.12k|    , fPSVIElement(0)
   85|  7.12k|    , fErrorStack(0)
   86|  7.12k|    , fSchemaInfoList(0)
   87|  7.12k|    , fCachedSchemaInfoList (0)
   88|  7.12k|{
   89|  7.12k|    CleanupType cleanup(this, &IGXMLScanner::cleanUp);
   90|       |
   91|  7.12k|    try
   92|  7.12k|    {
   93|  7.12k|        commonInit();
   94|  7.12k|    }
   95|  7.12k|    catch(const OutOfMemoryException&)
   96|  7.12k|    {
   97|       |        // Don't cleanup when out of memory, since executing the
   98|       |        // code can cause problems.
   99|      0|        cleanup.release();
  100|       |
  101|      0|        throw;
  102|      0|    }
  103|       |
  104|  7.12k|    cleanup.release();
  105|  7.12k|}
_ZN11xercesc_3_212IGXMLScannerD2Ev:
  161|  7.12k|{
  162|  7.12k|    cleanUp();
  163|  7.12k|}
_ZN11xercesc_3_212IGXMLScanner12scanDocumentERKNS_11InputSourceE:
  186|  7.12k|{
  187|       |    //  Bump up the sequence id for this parser instance. This will invalidate
  188|       |    //  any previous progressive scan tokens.
  189|  7.12k|    fSequenceId++;
  190|       |
  191|  7.12k|    ReaderMgrResetType  resetReaderMgr(&fReaderMgr, &ReaderMgr::reset);
  192|       |
  193|  7.12k|    try
  194|  7.12k|    {
  195|       |        //  Reset the scanner and its plugged in stuff for a new run. This
  196|       |        //  resets all the data structures, creates the initial reader and
  197|       |        //  pushes it on the stack, and sets up the base document path.
  198|  7.12k|        scanReset(src);
  199|       |
  200|       |        // If we have a document handler, then call the start document
  201|  7.12k|        if (fDocHandler)
  ------------------
  |  Branch (201:13): [True: 0, False: 7.12k]
  ------------------
  202|      0|            fDocHandler->startDocument();
  203|       |
  204|       |        //  Scan the prolog part, which is everything before the root element
  205|       |        //  including the DTD subsets.
  206|  7.12k|        scanProlog();
  207|       |
  208|       |        //  If we got to the end of input, then its not a valid XML file.
  209|       |        //  Else, go on to scan the content.
  210|  7.12k|        if (fReaderMgr.atEOF())
  ------------------
  |  Branch (210:13): [True: 0, False: 7.12k]
  ------------------
  211|      0|        {
  212|      0|            emitError(XMLErrs::EmptyMainEntity);
  213|      0|        }
  214|  7.12k|        else
  215|  7.12k|        {
  216|       |            // Scan content, and tell it its not an external entity
  217|  7.12k|            if (scanContent())
  ------------------
  |  Branch (217:17): [True: 1.68k, False: 5.43k]
  ------------------
  218|  1.68k|            {
  219|       |                // Do post-parse validation if required
  220|  1.68k|                if (fValidate)
  ------------------
  |  Branch (220:21): [True: 1.65k, False: 31]
  ------------------
  221|  1.65k|                {
  222|       |                    //  We handle ID reference semantics at this level since
  223|       |                    //  its required by XML 1.0.
  224|  1.65k|                    checkIDRefs();
  225|       |
  226|       |                    // Then allow the validator to do any extra stuff it wants
  227|       |//                    fValidator->postParseValidation();
  228|  1.65k|                }
  229|       |
  230|       |                // That went ok, so scan for any miscellaneous stuff
  231|  1.68k|                if (!fReaderMgr.atEOF())
  ------------------
  |  Branch (231:21): [True: 1.68k, False: 0]
  ------------------
  232|  1.68k|                    scanMiscellaneous();
  233|  1.68k|            }
  234|  7.12k|        }
  235|       |
  236|       |        // If we have a document handler, then call the end document
  237|  7.12k|        if (fDocHandler)
  ------------------
  |  Branch (237:13): [True: 0, False: 7.12k]
  ------------------
  238|      0|            fDocHandler->endDocument();
  239|       |
  240|       |        //cargill debug:
  241|       |        //fGrammarResolver->getXSModel();
  242|  7.12k|    }
  243|       |    //  NOTE:
  244|       |    //
  245|       |    //  In all of the error processing below, the emitError() call MUST come
  246|       |    //  before the flush of the reader mgr, or it will fail because it tries
  247|       |    //  to find out the position in the XML source of the error.
  248|  7.12k|    catch(const XMLErrs::Codes)
  249|  7.12k|    {
  250|       |        // This is a 'first failure' exception, so fall through
  251|  4.45k|    }
  252|  7.12k|    catch(const XMLValid::Codes)
  253|  7.12k|    {
  254|       |        // This is a 'first fatal error' type exit, so fall through
  255|      0|    }
  256|  7.12k|    catch(const XMLException& excToCatch)
  257|  7.12k|    {
  258|       |        //  Emit the error and catch any user exception thrown from here. Make
  259|       |        //  sure in all cases we flush the reader manager.
  260|  1.36k|        fInException = true;
  261|  1.36k|        try
  262|  1.36k|        {
  263|  1.36k|            if (excToCatch.getErrorType() == XMLErrorReporter::ErrType_Warning)
  ------------------
  |  Branch (263:17): [True: 0, False: 1.36k]
  ------------------
  264|      0|                emitError
  265|      0|                (
  266|      0|                    XMLErrs::XMLException_Warning
  267|      0|                    , excToCatch.getCode()
  268|      0|                    , excToCatch.getMessage()
  269|      0|                );
  270|  1.36k|            else if (excToCatch.getErrorType() >= XMLErrorReporter::ErrType_Fatal)
  ------------------
  |  Branch (270:22): [True: 1.36k, False: 0]
  ------------------
  271|  1.36k|                emitError
  272|  1.36k|                (
  273|  1.36k|                    XMLErrs::XMLException_Fatal
  274|  1.36k|                    , excToCatch.getCode()
  275|  1.36k|                    , excToCatch.getMessage()
  276|  1.36k|                );
  277|      0|            else
  278|      0|                emitError
  279|      0|                (
  280|      0|                    XMLErrs::XMLException_Error
  281|      0|                    , excToCatch.getCode()
  282|      0|                    , excToCatch.getMessage()
  283|      0|                );
  284|  1.36k|        }
  285|  1.36k|        catch(const OutOfMemoryException&)
  286|  1.36k|        {
  287|       |            // This is a special case for out-of-memory
  288|       |            // conditions, because resetting the ReaderMgr
  289|       |            // can be problematic.
  290|      0|            resetReaderMgr.release();
  291|       |
  292|      0|            throw;
  293|      0|        }
  294|  1.36k|    }
  295|  7.12k|    catch(const OutOfMemoryException&)
  296|  7.12k|    {
  297|       |        // This is a special case for out-of-memory
  298|       |        // conditions, because resetting the ReaderMgr
  299|       |        // can be problematic.
  300|      0|        resetReaderMgr.release();
  301|       |
  302|      0|        throw;
  303|      0|    }
  304|  7.12k|}
_ZN11xercesc_3_212IGXMLScanner10commonInitEv:
  508|  7.12k|{
  509|       |
  510|       |    //  Create the element state array
  511|  7.12k|    fElemState = (unsigned int*) fMemoryManager->allocate
  512|  7.12k|    (
  513|  7.12k|        fElemStateSize * sizeof(unsigned int)
  514|  7.12k|    ); //new unsigned int[fElemStateSize];
  515|  7.12k|    fElemLoopState = (unsigned int*) fMemoryManager->allocate
  516|  7.12k|    (
  517|  7.12k|        fElemStateSize * sizeof(unsigned int)
  518|  7.12k|    ); //new unsigned int[fElemStateSize];
  519|       |
  520|       |    //  And we need one for the raw attribute scan. This just stores key/
  521|       |    //  value string pairs (prior to any processing.)
  522|  7.12k|    fRawAttrList = new (fMemoryManager) RefVectorOf<KVStringPair>(32, true, fMemoryManager);
  523|  7.12k|    fRawAttrColonList = (int*) fMemoryManager->allocate
  524|  7.12k|    (
  525|  7.12k|        fRawAttrColonListSize * sizeof(int)
  526|  7.12k|    );
  527|       |
  528|       |    //  Create the Validator and init them
  529|  7.12k|    fDTDValidator = new (fMemoryManager) DTDValidator();
  530|  7.12k|    initValidator(fDTDValidator);
  531|  7.12k|    fSchemaValidator = new (fMemoryManager) SchemaValidator(0, fMemoryManager);
  532|  7.12k|    initValidator(fSchemaValidator);
  533|       |
  534|       |    // Create IdentityConstraint info
  535|  7.12k|    fICHandler = new (fMemoryManager) IdentityConstraintHandler(this, fMemoryManager);
  536|       |
  537|       |    // Create schemaLocation pair info
  538|  7.12k|    fLocationPairs = new (fMemoryManager) ValueVectorOf<XMLCh*>(8, fMemoryManager);
  539|       |    // create pools for undeclared elements
  540|  7.12k|    fDTDElemNonDeclPool = new (fMemoryManager) NameIdPool<DTDElementDecl>(29, 128, fMemoryManager);
  541|  7.12k|    fSchemaElemNonDeclPool = new (fMemoryManager) RefHash3KeysIdPool<SchemaElementDecl>(29, true, 128, fMemoryManager);
  542|  7.12k|    fAttDefRegistry = new (fMemoryManager) RefHashTableOf<unsigned int, PtrHasher>
  543|  7.12k|    (
  544|  7.12k|        131, false, fMemoryManager
  545|  7.12k|    );
  546|  7.12k|    fUndeclaredAttrRegistry = new (fMemoryManager) Hash2KeysSetOf<StringHasher>(7, fMemoryManager);
  547|  7.12k|    fPSVIAttrList = new (fMemoryManager) PSVIAttributeList(fMemoryManager);
  548|       |
  549|  7.12k|    fSchemaInfoList = new (fMemoryManager) RefHash2KeysTableOf<SchemaInfo>(29, fMemoryManager);
  550|  7.12k|    fCachedSchemaInfoList = new (fMemoryManager) RefHash2KeysTableOf<SchemaInfo>(29, fMemoryManager);
  551|       |
  552|       |    // use fDTDValidator as the default validator
  553|  7.12k|    if (!fValidator)
  ------------------
  |  Branch (553:9): [True: 7.12k, False: 0]
  ------------------
  554|  7.12k|        fValidator = fDTDValidator;
  555|  7.12k|}
_ZN11xercesc_3_212IGXMLScanner7cleanUpEv:
  558|  7.12k|{
  559|  7.12k|    fMemoryManager->deallocate(fElemState); //delete [] fElemState;
  560|  7.12k|    fMemoryManager->deallocate(fElemLoopState); //delete [] fElemLoopState;
  561|  7.12k|    delete fRawAttrList;
  562|  7.12k|    fMemoryManager->deallocate(fRawAttrColonList);
  563|  7.12k|    delete fDTDValidator;
  564|  7.12k|    delete fSchemaValidator;
  565|  7.12k|    delete fICHandler;
  566|  7.12k|    delete fLocationPairs;
  567|  7.12k|    delete fDTDElemNonDeclPool;
  568|  7.12k|    delete fSchemaElemNonDeclPool;
  569|  7.12k|    delete fAttDefRegistry;
  570|  7.12k|    delete fUndeclaredAttrRegistry;
  571|  7.12k|    delete fPSVIAttrList;
  572|  7.12k|    delete fPSVIElement;
  573|  7.12k|    delete fErrorStack;
  574|  7.12k|    delete fSchemaInfoList;
  575|  7.12k|    delete fCachedSchemaInfoList;
  576|  7.12k|}
_ZN11xercesc_3_212IGXMLScanner11scanContentEv:
  811|  3.73k|{
  812|       |    //  Go into a loop until we hit the end of the root element, or we fall
  813|       |    //  out because there is no root element.
  814|       |    //
  815|       |    //  We have to do kind of a deeply nested double loop here in order to
  816|       |    //  avoid doing the setup/teardown of the exception handler on each
  817|       |    //  round. Doing it this way we only do it when an exception actually
  818|       |    //  occurs.
  819|  3.73k|    bool gotData = true;
  820|  3.73k|    bool inMarkup = false;
  821|   200k|    while (gotData)
  ------------------
  |  Branch (821:12): [True: 199k, False: 1.68k]
  ------------------
  822|   199k|    {
  823|   199k|        try
  824|   199k|        {
  825|  24.6M|            while (gotData)
  ------------------
  |  Branch (825:20): [True: 24.6M, False: 2.58k]
  ------------------
  826|  24.6M|            {
  827|       |                //  Sense what the next top level token is. According to what
  828|       |                //  this tells us, we will call something to handle that kind
  829|       |                //  of thing.
  830|  24.6M|                XMLSize_t orgReader;
  831|  24.6M|                const XMLTokens curToken = senseNextToken(orgReader);
  832|       |
  833|       |                //  Handle character data and end of file specially. Char data
  834|       |                //  is not markup so we don't want to handle it in the loop
  835|       |                //  below.
  836|  24.6M|                if (curToken == Token_CharData)
  ------------------
  |  Branch (836:21): [True: 6.99M, False: 17.6M]
  ------------------
  837|  6.99M|                {
  838|       |                    //  Scan the character data and call appropriate events. Let
  839|       |                    //  him use our local character data buffer for efficiency.
  840|  6.99M|                    scanCharData(fCDataBuf);
  841|  6.99M|                    continue;
  842|  6.99M|                }
  843|  17.6M|                else if (curToken == Token_EOF)
  ------------------
  |  Branch (843:26): [True: 643, False: 17.6M]
  ------------------
  844|    643|                {
  845|       |                    //  The element stack better be empty at this point or we
  846|       |                    //  ended prematurely before all elements were closed.
  847|    643|                    if (!fElemStack.isEmpty())
  ------------------
  |  Branch (847:25): [True: 643, False: 0]
  ------------------
  848|    643|                    {
  849|    643|                        const ElemStack::StackElem* topElem = fElemStack.popTop();
  850|    643|                        emitError
  851|    643|                        (
  852|    643|                            XMLErrs::EndedWithTagsOnStack
  853|    643|                            , topElem->fThisElement->getFullName()
  854|    643|                        );
  855|    643|                    }
  856|       |
  857|       |                    // Its the end of file, so clear the got data flag
  858|    643|                    gotData = false;
  859|    643|                    continue;
  860|    643|                }
  861|       |
  862|       |                // We are in some sort of markup now
  863|  17.6M|                inMarkup = true;
  864|       |
  865|       |                //  According to the token we got, call the appropriate
  866|       |                //  scanning method.
  867|  17.6M|                switch(curToken)
  868|  17.6M|                {
  869|  61.7k|                    case Token_CData :
  ------------------
  |  Branch (869:21): [True: 61.7k, False: 17.5M]
  ------------------
  870|       |                        // Make sure we are within content
  871|  61.7k|                        if (fElemStack.isEmpty())
  ------------------
  |  Branch (871:29): [True: 0, False: 61.7k]
  ------------------
  872|      0|                            emitError(XMLErrs::CDATAOutsideOfContent);
  873|  61.7k|                        scanCDSection();
  874|  61.7k|                        break;
  875|       |
  876|   147k|                    case Token_Comment :
  ------------------
  |  Branch (876:21): [True: 147k, False: 17.5M]
  ------------------
  877|   147k|                        scanComment();
  878|   147k|                        break;
  879|       |
  880|   158k|                    case Token_EndTag :
  ------------------
  |  Branch (880:21): [True: 158k, False: 17.4M]
  ------------------
  881|   158k|                        scanEndTag(gotData);
  882|   158k|                        break;
  883|       |
  884|  63.4k|                    case Token_PI :
  ------------------
  |  Branch (884:21): [True: 63.4k, False: 17.5M]
  ------------------
  885|  63.4k|                        scanPI();
  886|  63.4k|                        break;
  887|       |
  888|  17.0M|                    case Token_StartTag :
  ------------------
  |  Branch (888:21): [True: 17.0M, False: 626k]
  ------------------
  889|  17.0M|                        if (fDoNamespaces)
  ------------------
  |  Branch (889:29): [True: 0, False: 17.0M]
  ------------------
  890|      0|                            scanStartTagNS(gotData);
  891|  17.0M|                        else
  892|  17.0M|                            scanStartTag(gotData);
  893|  17.0M|                        break;
  894|       |
  895|      0|                    default :
  ------------------
  |  Branch (895:21): [True: 0, False: 17.6M]
  ------------------
  896|      0|                        fReaderMgr.skipToChar(chOpenAngle);
  897|      0|                        break;
  898|  17.6M|                }
  899|       |
  900|  17.4M|                if (orgReader != fReaderMgr.getCurrentReaderNum())
  ------------------
  |  Branch (900:21): [True: 1, False: 17.4M]
  ------------------
  901|      1|                    emitError(XMLErrs::PartialMarkupInEntity);
  902|       |
  903|       |                // And we are back out of markup again
  904|  17.4M|                inMarkup = false;
  905|  17.4M|            }
  906|   199k|        }
  907|   199k|        catch(const EndOfEntityException& toCatch)
  908|   199k|        {
  909|       |            //  If we were in some markup when this happened, then its a
  910|       |            //  partial markup error.
  911|   195k|            if (inMarkup)
  ------------------
  |  Branch (911:17): [True: 0, False: 195k]
  ------------------
  912|      0|                emitError(XMLErrs::PartialMarkupInEntity);
  913|       |
  914|       |            // Send an end of entity reference event
  915|   195k|            if (fDocHandler)
  ------------------
  |  Branch (915:17): [True: 0, False: 195k]
  ------------------
  916|      0|                fDocHandler->endEntityReference(toCatch.getEntity());
  917|       |
  918|   195k|            inMarkup = false;
  919|   195k|        }
  920|   199k|    }
  921|       |
  922|       |    // It went ok, so return success
  923|  1.68k|    return true;
  924|  3.73k|}
_ZN11xercesc_3_212IGXMLScanner10scanEndTagERb:
  928|   158k|{
  929|       |    //  Assume we will still have data until proven otherwise. It will only
  930|       |    //  ever be false if this is the end of the root element.
  931|   158k|    gotData = true;
  932|       |
  933|       |    //  Check if the element stack is empty. If so, then this is an unbalanced
  934|       |    //  element (i.e. more ends than starts, perhaps because of bad text
  935|       |    //  causing one to be skipped.)
  936|   158k|    if (fElemStack.isEmpty())
  ------------------
  |  Branch (936:9): [True: 1, False: 158k]
  ------------------
  937|      1|    {
  938|      1|        emitError(XMLErrs::MoreEndThanStartTags);
  939|      1|        fReaderMgr.skipPastChar(chCloseAngle);
  940|      1|        ThrowXMLwithMemMgr(RuntimeException, XMLExcepts::Scan_UnbalancedStartEnd, fMemoryManager);
  ------------------
  |  |  264|      1|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  941|      1|    }
  942|       |
  943|       |    //  Pop the stack of the element we are supposed to be ending. Remember
  944|       |    //  that we don't own this. The stack just keeps them and reuses them.
  945|   158k|    unsigned int uriId = (fDoNamespaces)
  ------------------
  |  Branch (945:26): [True: 0, False: 158k]
  ------------------
  946|   158k|        ? fElemStack.getCurrentURI() : fEmptyNamespaceId;
  947|       |
  948|       |    // these get initialized below
  949|   158k|    const ElemStack::StackElem* topElem = 0;
  950|   158k|    const XMLCh *elemName = 0;
  951|       |
  952|       |    // Make sure that its the end of the element that we expect
  953|       |    // special case for schema validation, whose element decls,
  954|       |    // obviously don't contain prefix information
  955|   158k|    if(fGrammarType == Grammar::SchemaGrammarType)
  ------------------
  |  Branch (955:8): [True: 0, False: 158k]
  ------------------
  956|      0|    {
  957|      0|        elemName = fElemStack.getCurrentSchemaElemName();
  958|      0|        topElem = fElemStack.topElement();
  959|      0|    }
  960|   158k|    else
  961|   158k|    {
  962|   158k|        topElem = fElemStack.topElement();
  963|   158k|        elemName = topElem->fThisElement->getFullName();
  964|   158k|    }
  965|   158k|    if (!fReaderMgr.skippedStringLong(elemName))
  ------------------
  |  Branch (965:9): [True: 68, False: 158k]
  ------------------
  966|     68|    {
  967|     68|        emitError
  968|     68|        (
  969|     68|            XMLErrs::ExpectedEndOfTagX
  970|     68|            , elemName
  971|     68|        );
  972|     68|        fReaderMgr.skipPastChar(chCloseAngle);
  973|     68|        fElemStack.popTop();
  974|     68|        return;
  975|     68|    }
  976|       |
  977|       |    // Make sure we are back on the same reader as where we started
  978|   158k|    if (topElem->fReaderNum != fReaderMgr.getCurrentReaderNum())
  ------------------
  |  Branch (978:9): [True: 13, False: 158k]
  ------------------
  979|     13|        emitError(XMLErrs::PartialTagMarkupError);
  980|       |
  981|       |    // Skip optional whitespace
  982|   158k|    fReaderMgr.skipPastSpaces();
  983|       |
  984|       |    // Make sure we find the closing bracket
  985|   158k|    if (!fReaderMgr.skippedChar(chCloseAngle))
  ------------------
  |  Branch (985:9): [True: 8, False: 158k]
  ------------------
  986|      8|    {
  987|      8|        emitError
  988|      8|        (
  989|      8|            XMLErrs::UnterminatedEndTag
  990|      8|            , topElem->fThisElement->getFullName()
  991|      8|        );
  992|      8|    }
  993|       |
  994|   158k|    if (fGrammarType == Grammar::SchemaGrammarType)
  ------------------
  |  Branch (994:9): [True: 0, False: 158k]
  ------------------
  995|      0|    {
  996|       |        // reset error occurred
  997|      0|        fPSVIElemContext.fErrorOccurred = fErrorStack->pop();
  998|      0|        if (fValidate && topElem->fThisElement->isDeclared())
  ------------------
  |  Branch (998:13): [True: 0, False: 0]
  |  Branch (998:26): [True: 0, False: 0]
  ------------------
  999|      0|        {
 1000|      0|            fPSVIElemContext.fCurrentTypeInfo = ((SchemaValidator*) fValidator)->getCurrentTypeInfo();
 1001|      0|            if(!fPSVIElemContext.fCurrentTypeInfo)
  ------------------
  |  Branch (1001:16): [True: 0, False: 0]
  ------------------
 1002|      0|                fPSVIElemContext.fCurrentDV = ((SchemaValidator*) fValidator)->getCurrentDatatypeValidator();
 1003|      0|            else
 1004|      0|                fPSVIElemContext.fCurrentDV = 0;
 1005|      0|            if(fPSVIHandler)
  ------------------
  |  Branch (1005:16): [True: 0, False: 0]
  ------------------
 1006|      0|            {
 1007|      0|                fPSVIElemContext.fNormalizedValue = ((SchemaValidator*) fValidator)->getNormalizedValue();
 1008|       |
 1009|      0|                if (XMLString::equals(fPSVIElemContext.fNormalizedValue, XMLUni::fgZeroLenString))
  ------------------
  |  Branch (1009:21): [True: 0, False: 0]
  ------------------
 1010|      0|                    fPSVIElemContext.fNormalizedValue = 0;
 1011|      0|            }
 1012|      0|        }
 1013|      0|        else
 1014|      0|        {
 1015|      0|            fPSVIElemContext.fCurrentDV = 0;
 1016|      0|            fPSVIElemContext.fCurrentTypeInfo = 0;
 1017|      0|            fPSVIElemContext.fNormalizedValue = 0;
 1018|      0|        }
 1019|      0|    }
 1020|       |
 1021|       |    //  If validation is enabled, then lets pass him the list of children and
 1022|       |    //  this element and let him validate it.
 1023|   158k|    DatatypeValidator* psviMemberType = 0;
 1024|   158k|    if (fValidate)
  ------------------
  |  Branch (1024:9): [True: 97.0k, False: 61.2k]
  ------------------
 1025|  97.0k|    {
 1026|       |
 1027|       |       //
 1028|       |       // XML1.0-3rd
 1029|       |       // Validity Constraint:
 1030|       |       // The declaration matches EMPTY and the element has no content (not even
 1031|       |       // entity references, comments, PIs or white space).
 1032|       |       //
 1033|  97.0k|       if ( (fGrammarType == Grammar::DTDGrammarType) &&
  ------------------
  |  Branch (1033:13): [True: 97.0k, False: 0]
  ------------------
 1034|  97.0k|            (topElem->fCommentOrPISeen)               &&
  ------------------
  |  Branch (1034:13): [True: 539, False: 96.4k]
  ------------------
 1035|  97.0k|            (((DTDElementDecl*) topElem->fThisElement)->getModelType() == DTDElementDecl::Empty))
  ------------------
  |  Branch (1035:13): [True: 209, False: 330]
  ------------------
 1036|    209|       {
 1037|    209|           fValidator->emitError
 1038|    209|               (
 1039|    209|               XMLValid::EmptyElemHasContent
 1040|    209|               , topElem->fThisElement->getFullName()
 1041|    209|               );
 1042|    209|       }
 1043|       |
 1044|       |       //
 1045|       |       // XML1.0-3rd
 1046|       |       // Validity Constraint:
 1047|       |       //
 1048|       |       // The declaration matches children and the sequence of child elements
 1049|       |       // belongs to the language generated by the regular expression in the
 1050|       |       // content model, with optional white space, comments and PIs
 1051|       |       // (i.e. markup matching production [27] Misc) between the start-tag and
 1052|       |       // the first child element, between child elements, or between the last
 1053|       |       // child element and the end-tag.
 1054|       |       //
 1055|       |       // Note that
 1056|       |       //    a CDATA section containing only white space or
 1057|       |       //    a reference to an entity whose replacement text is character references
 1058|       |       //       expanding to white space do not match the nonterminal S, and hence
 1059|       |       //       cannot appear in these positions; however,
 1060|       |       //    a reference to an internal entity with a literal value consisting
 1061|       |       //       of character references expanding to white space does match S,
 1062|       |       //       since its replacement text is the white space resulting from expansion
 1063|       |       //       of the character references.
 1064|       |       //
 1065|  97.0k|       if ( (fGrammarType == Grammar::DTDGrammarType)  &&
  ------------------
  |  Branch (1065:13): [True: 97.0k, False: 0]
  ------------------
 1066|  97.0k|            (topElem->fReferenceEscaped)               &&
  ------------------
  |  Branch (1066:13): [True: 21.1k, False: 75.8k]
  ------------------
 1067|  97.0k|            (((DTDElementDecl*) topElem->fThisElement)->getModelType() == DTDElementDecl::Children))
  ------------------
  |  Branch (1067:13): [True: 417, False: 20.7k]
  ------------------
 1068|    417|       {
 1069|    417|           fValidator->emitError
 1070|    417|               (
 1071|    417|               XMLValid::ElemChildrenHasInvalidWS
 1072|    417|               , topElem->fThisElement->getFullName()
 1073|    417|               );
 1074|    417|       }
 1075|  97.0k|        XMLSize_t failure;
 1076|  97.0k|        bool res = fValidator->checkContent
 1077|  97.0k|        (
 1078|  97.0k|            topElem->fThisElement
 1079|  97.0k|            , topElem->fChildren
 1080|  97.0k|            , topElem->fChildCount
 1081|  97.0k|            , &failure
 1082|  97.0k|        );
 1083|       |
 1084|  97.0k|        if (!res)
  ------------------
  |  Branch (1084:13): [True: 14.2k, False: 82.7k]
  ------------------
 1085|  14.2k|        {
 1086|       |            //  One of the elements is not valid for the content. NOTE that
 1087|       |            //  if no children were provided but the content model requires
 1088|       |            //  them, it comes back with a zero value. But we cannot use that
 1089|       |            //  to index the child array in this case, and have to put out a
 1090|       |            //  special message.
 1091|  14.2k|            if (!topElem->fChildCount)
  ------------------
  |  Branch (1091:17): [True: 5.67k, False: 8.58k]
  ------------------
 1092|  5.67k|            {
 1093|  5.67k|                fValidator->emitError
 1094|  5.67k|                (
 1095|  5.67k|                    XMLValid::EmptyNotValidForContent
 1096|  5.67k|                    , topElem->fThisElement->getFormattedContentModel()
 1097|  5.67k|                );
 1098|  5.67k|            }
 1099|  8.58k|            else if (failure >= topElem->fChildCount)
  ------------------
  |  Branch (1099:22): [True: 779, False: 7.80k]
  ------------------
 1100|    779|            {
 1101|    779|                fValidator->emitError
 1102|    779|                (
 1103|    779|                    XMLValid::NotEnoughElemsForCM
 1104|    779|                    , topElem->fThisElement->getFormattedContentModel()
 1105|    779|                );
 1106|    779|            }
 1107|  7.80k|            else
 1108|  7.80k|            {
 1109|  7.80k|                fValidator->emitError
 1110|  7.80k|                (
 1111|  7.80k|                    XMLValid::ElementNotValidForContent
 1112|  7.80k|                    , topElem->fChildren[failure]->getRawName()
 1113|  7.80k|                    , topElem->fThisElement->getFormattedContentModel()
 1114|  7.80k|                );
 1115|  7.80k|            }
 1116|  14.2k|        }
 1117|       |
 1118|       |
 1119|  97.0k|        if (fGrammarType == Grammar::SchemaGrammarType) {
  ------------------
  |  Branch (1119:13): [True: 0, False: 97.0k]
  ------------------
 1120|      0|            if (((SchemaValidator*) fValidator)->getErrorOccurred())
  ------------------
  |  Branch (1120:17): [True: 0, False: 0]
  ------------------
 1121|      0|                fPSVIElemContext.fErrorOccurred = true;
 1122|      0|            else if (fPSVIElemContext.fCurrentDV && fPSVIElemContext.fCurrentDV->getType() == DatatypeValidator::Union)
  ------------------
  |  Branch (1122:22): [True: 0, False: 0]
  |  Branch (1122:53): [True: 0, False: 0]
  ------------------
 1123|      0|                psviMemberType = fValidationContext->getValidatingMemberType();
 1124|       |
 1125|      0|            if (fPSVIHandler)
  ------------------
  |  Branch (1125:17): [True: 0, False: 0]
  ------------------
 1126|      0|            {
 1127|      0|                fPSVIElemContext.fIsSpecified = ((SchemaValidator*) fValidator)->getIsElemSpecified();
 1128|      0|                if(fPSVIElemContext.fIsSpecified)
  ------------------
  |  Branch (1128:20): [True: 0, False: 0]
  ------------------
 1129|      0|                    fPSVIElemContext.fNormalizedValue = ((SchemaElementDecl *)topElem->fThisElement)->getDefaultValue();
 1130|      0|            }
 1131|       |
 1132|       |            // call matchers and de-activate context
 1133|      0|            if (toCheckIdentityConstraint())
  ------------------
  |  Branch (1133:17): [True: 0, False: 0]
  ------------------
 1134|      0|            {
 1135|      0|                fICHandler->deactivateContext
 1136|      0|                             (
 1137|      0|                              (SchemaElementDecl *) topElem->fThisElement
 1138|      0|                            , fContent.getRawBuffer()
 1139|      0|                            , fValidationContext
 1140|      0|                            , fPSVIElemContext.fCurrentDV
 1141|      0|                             );
 1142|      0|            }
 1143|       |
 1144|      0|        }
 1145|  97.0k|    }
 1146|       |
 1147|       |    // QName dv needed topElem to resolve URIs on the checkContent
 1148|   158k|    fElemStack.popTop();
 1149|       |
 1150|       |    // See if it was the root element, to avoid multiple calls below
 1151|   158k|    const bool isRoot = fElemStack.isEmpty();
 1152|       |
 1153|   158k|    if (fGrammarType == Grammar::SchemaGrammarType)
  ------------------
  |  Branch (1153:9): [True: 0, False: 158k]
  ------------------
 1154|      0|    {
 1155|      0|        if (fPSVIHandler)
  ------------------
  |  Branch (1155:13): [True: 0, False: 0]
  ------------------
 1156|      0|        {
 1157|      0|            endElementPSVI(
 1158|      0|                (SchemaElementDecl*)topElem->fThisElement, psviMemberType);
 1159|      0|        }
 1160|       |        // now we can reset the datatype buffer, since the
 1161|       |        // application has had a chance to copy the characters somewhere else
 1162|      0|        ((SchemaValidator *)fValidator)->clearDatatypeBuffer();
 1163|      0|    }
 1164|       |
 1165|       |    // If we have a doc handler, tell it about the end tag
 1166|   158k|    if (fDocHandler)
  ------------------
  |  Branch (1166:9): [True: 0, False: 158k]
  ------------------
 1167|      0|    {
 1168|      0|        if (fGrammarType == Grammar::SchemaGrammarType) {
  ------------------
  |  Branch (1168:13): [True: 0, False: 0]
  ------------------
 1169|      0|            if (topElem->fPrefixColonPos != -1)
  ------------------
  |  Branch (1169:17): [True: 0, False: 0]
  ------------------
 1170|      0|                fPrefixBuf.set(elemName, topElem->fPrefixColonPos);
 1171|      0|            else
 1172|      0|                fPrefixBuf.reset();
 1173|      0|        }
 1174|      0|        else {
 1175|      0|            fPrefixBuf.set(topElem->fThisElement->getElementName()->getPrefix());
 1176|      0|        }
 1177|      0|        fDocHandler->endElement
 1178|      0|        (
 1179|      0|            *topElem->fThisElement
 1180|      0|            , uriId
 1181|      0|            , isRoot
 1182|      0|            , fPrefixBuf.getRawBuffer()
 1183|      0|        );
 1184|      0|    }
 1185|       |
 1186|   158k|    if (fGrammarType == Grammar::SchemaGrammarType) {
  ------------------
  |  Branch (1186:9): [True: 0, False: 158k]
  ------------------
 1187|      0|        if (!isRoot)
  ------------------
  |  Branch (1187:13): [True: 0, False: 0]
  ------------------
 1188|      0|        {
 1189|       |            // update error information
 1190|      0|            fErrorStack->push((fErrorStack->size() && fErrorStack->pop()) || fPSVIElemContext.fErrorOccurred);
  ------------------
  |  Branch (1190:32): [True: 0, False: 0]
  |  Branch (1190:55): [True: 0, False: 0]
  |  Branch (1190:78): [True: 0, False: 0]
  ------------------
 1191|       |
 1192|       |
 1193|      0|        }
 1194|      0|    }
 1195|       |
 1196|       |    // If this was the root, then done with content
 1197|   158k|    gotData = !isRoot;
 1198|       |
 1199|   158k|    if (gotData) {
  ------------------
  |  Branch (1199:9): [True: 158k, False: 256]
  ------------------
 1200|   158k|        if (fDoNamespaces) {
  ------------------
  |  Branch (1200:13): [True: 0, False: 158k]
  ------------------
 1201|       |            // Restore the grammar
 1202|      0|            fGrammar = fElemStack.getCurrentGrammar();
 1203|      0|            fGrammarType = fGrammar->getGrammarType();
 1204|      0|            if (fGrammarType == Grammar::SchemaGrammarType && !fValidator->handlesSchema()) {
  ------------------
  |  Branch (1204:17): [True: 0, False: 0]
  |  Branch (1204:63): [True: 0, False: 0]
  ------------------
 1205|      0|                if (fValidatorFromUser)
  ------------------
  |  Branch (1205:21): [True: 0, False: 0]
  ------------------
 1206|      0|                    ThrowXMLwithMemMgr(RuntimeException, XMLExcepts::Gen_NoSchemaValidator, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
 1207|      0|                else {
 1208|      0|                    fValidator = fSchemaValidator;
 1209|      0|                }
 1210|      0|            }
 1211|      0|            else if (fGrammarType == Grammar::DTDGrammarType && !fValidator->handlesDTD()) {
  ------------------
  |  Branch (1211:22): [True: 0, False: 0]
  |  Branch (1211:65): [True: 0, False: 0]
  ------------------
 1212|      0|                if (fValidatorFromUser)
  ------------------
  |  Branch (1212:21): [True: 0, False: 0]
  ------------------
 1213|      0|                    ThrowXMLwithMemMgr(RuntimeException, XMLExcepts::Gen_NoDTDValidator, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
 1214|      0|                else {
 1215|      0|                    fValidator = fDTDValidator;
 1216|      0|                }
 1217|      0|            }
 1218|       |
 1219|      0|            fValidator->setGrammar(fGrammar);
 1220|      0|        }
 1221|       |
 1222|       |        // Restore the validation flag
 1223|   158k|        fValidate = fElemStack.getValidationFlag();
 1224|   158k|    }
 1225|   158k|}
_ZN11xercesc_3_212IGXMLScanner15scanDocTypeDeclEv:
 1235|  6.05k|{
 1236|       |    //  We have a doc type. So, switch the Grammar.
 1237|  6.05k|    switchGrammar(XMLUni::fgDTDEntityString);
 1238|       |
 1239|  6.05k|    if (fDocTypeHandler)
  ------------------
  |  Branch (1239:9): [True: 0, False: 6.05k]
  ------------------
 1240|      0|        fDocTypeHandler->resetDocType();
 1241|       |
 1242|       |    // There must be some space after DOCTYPE
 1243|  6.05k|    bool skippedSomething;
 1244|  6.05k|    fReaderMgr.skipPastSpaces(skippedSomething);
 1245|  6.05k|    if (!skippedSomething)
  ------------------
  |  Branch (1245:9): [True: 0, False: 6.05k]
  ------------------
 1246|      0|    {
 1247|      0|        emitError(XMLErrs::ExpectedWhitespace);
 1248|       |
 1249|       |        // Just skip the Doctype declaration and return
 1250|      0|        fReaderMgr.skipPastChar(chCloseAngle);
 1251|      0|        return;
 1252|      0|    }
 1253|       |
 1254|       |    // Get a buffer for the root element
 1255|  6.05k|    XMLBufBid bbRootName(&fBufMgr);
 1256|       |
 1257|       |    //  Get a name from the input, which should be the name of the root
 1258|       |    //  element of the upcoming content.
 1259|  6.05k|    int  colonPosition;
 1260|  6.05k|    bool validName = fDoNamespaces ? fReaderMgr.getQName(bbRootName.getBuffer(), &colonPosition) :
  ------------------
  |  Branch (1260:22): [True: 0, False: 6.05k]
  ------------------
 1261|  6.05k|                                     fReaderMgr.getName(bbRootName.getBuffer());
 1262|  6.05k|    if (!validName)
  ------------------
  |  Branch (1262:9): [True: 0, False: 6.05k]
  ------------------
 1263|      0|    {
 1264|      0|        if (bbRootName.isEmpty())
  ------------------
  |  Branch (1264:13): [True: 0, False: 0]
  ------------------
 1265|      0|            emitError(XMLErrs::NoRootElemInDOCTYPE);
 1266|      0|        else
 1267|      0|            emitError(XMLErrs::InvalidRootElemInDOCTYPE, bbRootName.getRawBuffer());
 1268|      0|        fReaderMgr.skipPastChar(chCloseAngle);
 1269|      0|        return;
 1270|      0|    }
 1271|       |
 1272|       |    //  Store the root element name for later check
 1273|  6.05k|    setRootElemName(bbRootName.getRawBuffer());
 1274|       |
 1275|       |    //  This element obviously is not going to exist in the element decl
 1276|       |    //  pool yet, but we need to call docTypeDecl. So force it into
 1277|       |    //  the element decl pool, marked as being there because it was in
 1278|       |    //  the DOCTYPE. Later, when its declared, the status will be updated.
 1279|       |    //
 1280|       |    //  Only do this if we are not reusing the validator! If we are reusing,
 1281|       |    //  then look it up instead. It has to exist!
 1282|  6.05k|    MemoryManager* const  rootDeclMgr =
 1283|  6.05k|        fUseCachedGrammar ? fMemoryManager : fGrammarPoolMemoryManager;
  ------------------
  |  Branch (1283:9): [True: 0, False: 6.05k]
  ------------------
 1284|       |
 1285|  6.05k|    DTDElementDecl* rootDecl = new (rootDeclMgr) DTDElementDecl
 1286|  6.05k|    (
 1287|  6.05k|        bbRootName.getRawBuffer()
 1288|  6.05k|        , fEmptyNamespaceId
 1289|  6.05k|        , DTDElementDecl::Any
 1290|  6.05k|        , rootDeclMgr
 1291|  6.05k|    );
 1292|       |
 1293|  6.05k|    Janitor<DTDElementDecl> rootDeclJanitor(rootDecl);
 1294|  6.05k|    rootDecl->setCreateReason(DTDElementDecl::AsRootElem);
 1295|  6.05k|    rootDecl->setExternalElemDeclaration(true);
 1296|  6.05k|    if(!fUseCachedGrammar)
  ------------------
  |  Branch (1296:8): [True: 6.05k, False: 0]
  ------------------
 1297|  6.05k|    {
 1298|  6.05k|        fGrammar->putElemDecl(rootDecl);
 1299|  6.05k|        rootDeclJanitor.release();
 1300|  6.05k|    } else
 1301|      0|    {
 1302|       |        // attach this to the undeclared element pool so that it gets deleted
 1303|      0|        XMLElementDecl* elemDecl = fDTDElemNonDeclPool->getByKey(bbRootName.getRawBuffer());
 1304|      0|        if (elemDecl)
  ------------------
  |  Branch (1304:13): [True: 0, False: 0]
  ------------------
 1305|      0|        {
 1306|      0|            rootDecl->setId(elemDecl->getId());
 1307|      0|        }
 1308|      0|        else
 1309|      0|        {
 1310|      0|            rootDecl->setId(fDTDElemNonDeclPool->put((DTDElementDecl*)rootDecl));
 1311|      0|            rootDeclJanitor.release();
 1312|      0|        }
 1313|      0|    }
 1314|       |
 1315|       |    // Skip any spaces after the name
 1316|  6.05k|    fReaderMgr.skipPastSpaces();
 1317|       |
 1318|       |    //  And now if we are looking at a >, then we are done. It is not
 1319|       |    //  required to have an internal or external subset, though why you
 1320|       |    //  would not escapes me.
 1321|  6.05k|    if (fReaderMgr.skippedChar(chCloseAngle)) {
  ------------------
  |  Branch (1321:9): [True: 10, False: 6.04k]
  ------------------
 1322|       |
 1323|       |        //  If we have a doc type handler and advanced callbacks are enabled,
 1324|       |        //  call the doctype event.
 1325|     10|        if (fDocTypeHandler)
  ------------------
  |  Branch (1325:13): [True: 0, False: 10]
  ------------------
 1326|      0|            fDocTypeHandler->doctypeDecl(*rootDecl, 0, 0, false);
 1327|     10|        return;
 1328|     10|    }
 1329|       |
 1330|       |    // either internal/external subset
 1331|  6.04k|    if (fValScheme == Val_Auto && !fValidate)
  ------------------
  |  Branch (1331:9): [True: 6.03k, False: 2]
  |  Branch (1331:35): [True: 6.03k, False: 0]
  ------------------
 1332|  6.03k|        fValidate = true;
 1333|       |
 1334|  6.04k|    bool    hasIntSubset = false;
 1335|  6.04k|    bool    hasExtSubset = false;
 1336|  6.04k|    XMLCh*  sysId = 0;
 1337|  6.04k|    XMLCh*  pubId = 0;
 1338|       |
 1339|  6.04k|    DTDScanner dtdScanner
 1340|  6.04k|    (
 1341|  6.04k|        (DTDGrammar*) fGrammar
 1342|  6.04k|        , fDocTypeHandler
 1343|  6.04k|        , fGrammarPoolMemoryManager
 1344|  6.04k|        , fMemoryManager
 1345|  6.04k|    );
 1346|  6.04k|    dtdScanner.setScannerInfo(this, &fReaderMgr, &fBufMgr);
 1347|       |
 1348|       |    //  If the next character is '[' then we have no external subset cause
 1349|       |    //  there is no system id, just the opening character of the internal
 1350|       |    //  subset. Else, has to be an id.
 1351|       |    //
 1352|       |    // Just look at the next char, don't eat it.
 1353|  6.04k|    if (fReaderMgr.peekNextChar() == chOpenSquare)
  ------------------
  |  Branch (1353:9): [True: 5.32k, False: 718]
  ------------------
 1354|  5.32k|    {
 1355|  5.32k|        hasIntSubset = true;
 1356|  5.32k|    }
 1357|    718|    else
 1358|    718|    {
 1359|       |        // Indicate we have an external subset
 1360|    718|        hasExtSubset = true;
 1361|    718|        fHasNoDTD = false;
 1362|       |
 1363|       |        // Get buffers for the ids
 1364|    718|        XMLBufBid bbPubId(&fBufMgr);
 1365|    718|        XMLBufBid bbSysId(&fBufMgr);
 1366|       |
 1367|       |        // Get the external subset id
 1368|    718|        if (!dtdScanner.scanId(bbPubId.getBuffer(), bbSysId.getBuffer(), DTDScanner::IDType_External))
  ------------------
  |  Branch (1368:13): [True: 0, False: 718]
  ------------------
 1369|      0|        {
 1370|      0|            fReaderMgr.skipPastChar(chCloseAngle);
 1371|      0|            return;
 1372|      0|        }
 1373|       |
 1374|       |        // Get copies of the ids we got
 1375|    718|        pubId = XMLString::replicate(bbPubId.getRawBuffer(), fMemoryManager);
 1376|    718|        sysId = XMLString::replicate(bbSysId.getRawBuffer(), fMemoryManager);
 1377|       |
 1378|       |        // Skip spaces and check again for the opening of an internal subset
 1379|    718|        fReaderMgr.skipPastSpaces();
 1380|       |
 1381|       |        // Just look at the next char, don't eat it.
 1382|    718|        if (fReaderMgr.peekNextChar() == chOpenSquare) {
  ------------------
  |  Branch (1382:13): [True: 3, False: 715]
  ------------------
 1383|      3|            hasIntSubset = true;
 1384|      3|        }
 1385|    718|    }
 1386|       |
 1387|       |    // Insure that the ids get cleaned up, if they got allocated
 1388|  6.04k|    ArrayJanitor<XMLCh> janSysId(sysId, fMemoryManager);
 1389|  6.04k|    ArrayJanitor<XMLCh> janPubId(pubId, fMemoryManager);
 1390|       |
 1391|       |    //  If we have a doc type handler and advanced callbacks are enabled,
 1392|       |    //  call the doctype event.
 1393|  6.04k|    if (fDocTypeHandler)
  ------------------
  |  Branch (1393:9): [True: 0, False: 6.04k]
  ------------------
 1394|      0|        fDocTypeHandler->doctypeDecl(*rootDecl, pubId, sysId, hasIntSubset, hasExtSubset);
 1395|       |
 1396|       |    //  Ok, if we had an internal subset, we are just past the [ character
 1397|       |    //  and need to parse that first.
 1398|  6.04k|    if (hasIntSubset)
  ------------------
  |  Branch (1398:9): [True: 5.32k, False: 715]
  ------------------
 1399|  5.32k|    {
 1400|       |        // Eat the opening square bracket
 1401|  5.32k|        fReaderMgr.getNextChar();
 1402|       |
 1403|  5.32k|        checkInternalDTD(hasExtSubset, sysId, pubId);
 1404|       |
 1405|       |        //  And try to scan the internal subset. If we fail, try to recover
 1406|       |        //  by skipping forward tot he close angle and returning.
 1407|  5.32k|        if (!dtdScanner.scanInternalSubset())
  ------------------
  |  Branch (1407:13): [True: 501, False: 4.82k]
  ------------------
 1408|    501|        {
 1409|    501|            fReaderMgr.skipPastChar(chCloseAngle);
 1410|    501|            return;
 1411|    501|        }
 1412|       |
 1413|       |        //  Do a sanity check that some expanded PE did not propogate out of
 1414|       |        //  the doctype. This could happen if it was terminated early by bad
 1415|       |        //  syntax.
 1416|  4.82k|        if (fReaderMgr.getReaderDepth() > 1)
  ------------------
  |  Branch (1416:13): [True: 0, False: 4.82k]
  ------------------
 1417|      0|        {
 1418|      0|            emitError(XMLErrs::PEPropogated);
 1419|       |
 1420|       |            // Ask the reader manager to pop back down to the main level
 1421|      0|            fReaderMgr.cleanStackBackTo(1);
 1422|      0|        }
 1423|       |
 1424|  4.82k|        fReaderMgr.skipPastSpaces();
 1425|  4.82k|    }
 1426|       |
 1427|       |    // And that should leave us at the closing > of the DOCTYPE line
 1428|  5.53k|    if (!fReaderMgr.skippedChar(chCloseAngle))
  ------------------
  |  Branch (1428:9): [True: 8, False: 5.53k]
  ------------------
 1429|      8|    {
 1430|       |        //  Do a special check for the common scenario of an extra ] char at
 1431|       |        //  the end. This is easy to recover from.
 1432|      8|        if (fReaderMgr.skippedChar(chCloseSquare)
  ------------------
  |  Branch (1432:13): [True: 0, False: 8]
  ------------------
 1433|      8|        &&  fReaderMgr.skippedChar(chCloseAngle))
  ------------------
  |  Branch (1433:13): [True: 0, False: 0]
  ------------------
 1434|      0|        {
 1435|      0|            emitError(XMLErrs::ExtraCloseSquare);
 1436|      0|        }
 1437|      8|         else
 1438|      8|        {
 1439|      8|            emitError(XMLErrs::UnterminatedDOCTYPE);
 1440|      8|            fReaderMgr.skipPastChar(chCloseAngle);
 1441|      8|        }
 1442|      8|    }
 1443|       |
 1444|       |    //  If we had an external subset, then we need to deal with that one
 1445|       |    //  next. If we are reusing the validator, then don't scan it.
 1446|  5.53k|    if (hasExtSubset) {
  ------------------
  |  Branch (1446:9): [True: 624, False: 4.91k]
  ------------------
 1447|       |
 1448|    624|        InputSource* srcUsed=0;
 1449|    624|        Janitor<InputSource> janSrc(srcUsed);
 1450|       |        // If we had an internal subset and we're using the cached grammar, it
 1451|       |        // means that the ignoreCachedDTD is set, so we ignore the cached
 1452|       |        // grammar
 1453|    624|        if (fUseCachedGrammar && !hasIntSubset)
  ------------------
  |  Branch (1453:13): [True: 0, False: 624]
  |  Branch (1453:34): [True: 0, False: 0]
  ------------------
 1454|      0|        {
 1455|      0|            srcUsed = resolveSystemId(sysId, pubId);
 1456|      0|            if (srcUsed) {
  ------------------
  |  Branch (1456:17): [True: 0, False: 0]
  ------------------
 1457|      0|                janSrc.reset(srcUsed);
 1458|      0|                Grammar* grammar = fGrammarResolver->getGrammar(srcUsed->getSystemId());
 1459|       |
 1460|      0|                if (grammar && grammar->getGrammarType() == Grammar::DTDGrammarType) {
  ------------------
  |  Branch (1460:21): [True: 0, False: 0]
  |  Branch (1460:32): [True: 0, False: 0]
  ------------------
 1461|       |
 1462|      0|                    fDTDGrammar = (DTDGrammar*) grammar;
 1463|      0|                    fGrammar = fDTDGrammar;
 1464|      0|                    fValidator->setGrammar(fGrammar);
 1465|       |                    // If we don't report at least the external subset boundaries,
 1466|       |                    // an advanced document handler cannot know when the DTD end,
 1467|       |                    // since we've already sent a doctype decl that indicates there's
 1468|       |                    // there's an external subset.
 1469|      0|                    if (fDocTypeHandler)
  ------------------
  |  Branch (1469:25): [True: 0, False: 0]
  ------------------
 1470|      0|                    {
 1471|      0|                        fDocTypeHandler->startExtSubset();
 1472|      0|                        fDocTypeHandler->endExtSubset();
 1473|      0|                    }
 1474|       |
 1475|      0|                    return;
 1476|      0|                }
 1477|      0|            }
 1478|      0|        }
 1479|       |
 1480|    624|        if (fLoadExternalDTD || fValidate)
  ------------------
  |  Branch (1480:13): [True: 624, False: 0]
  |  Branch (1480:33): [True: 0, False: 0]
  ------------------
 1481|    624|        {
 1482|       |            // And now create a reader to read this entity
 1483|    624|            XMLReader* reader;
 1484|    624|            if (srcUsed) {
  ------------------
  |  Branch (1484:17): [True: 0, False: 624]
  ------------------
 1485|      0|                reader = fReaderMgr.createReader
 1486|      0|                        (
 1487|      0|                            *srcUsed
 1488|      0|                            , false
 1489|      0|                            , XMLReader::RefFrom_NonLiteral
 1490|      0|                            , XMLReader::Type_General
 1491|      0|                            , XMLReader::Source_External
 1492|      0|                            , fCalculateSrcOfs
 1493|      0|                            , fLowWaterMark
 1494|      0|                        );
 1495|      0|            }
 1496|    624|            else {
 1497|    624|                reader = fReaderMgr.createReader
 1498|    624|                        (
 1499|    624|                            sysId
 1500|    624|                            , pubId
 1501|    624|                            , false
 1502|    624|                            , XMLReader::RefFrom_NonLiteral
 1503|    624|                            , XMLReader::Type_General
 1504|    624|                            , XMLReader::Source_External
 1505|    624|                            , srcUsed
 1506|    624|                            , fCalculateSrcOfs
 1507|    624|                            , fLowWaterMark
 1508|    624|                            , fDisableDefaultEntityResolution
 1509|    624|                        );
 1510|    624|                janSrc.reset(srcUsed);
 1511|    624|            }
 1512|       |            //  If it failed then throw an exception
 1513|    624|            if (!reader)
  ------------------
  |  Branch (1513:17): [True: 229, False: 395]
  ------------------
 1514|    229|                ThrowXMLwithMemMgr1(RuntimeException, XMLExcepts::Gen_CouldNotOpenDTD, srcUsed ? srcUsed->getSystemId() : sysId, fMemoryManager);
  ------------------
  |  |  266|    458|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  |  |  ------------------
  |  |  |  Branch (266:87): [True: 229, False: 0]
  |  |  ------------------
  ------------------
 1515|       |
 1516|    395|            if (fToCacheGrammar) {
  ------------------
  |  Branch (1516:17): [True: 0, False: 395]
  ------------------
 1517|       |
 1518|      0|                unsigned int stringId = fGrammarResolver->getStringPool()->addOrFind(srcUsed->getSystemId());
 1519|      0|                const XMLCh* sysIdStr = fGrammarResolver->getStringPool()->getValueForId(stringId);
 1520|       |
 1521|      0|                fGrammarResolver->orphanGrammar(XMLUni::fgDTDEntityString);
 1522|      0|                ((XMLDTDDescription*) (fGrammar->getGrammarDescription()))->setSystemId(sysIdStr);
 1523|      0|                fGrammarResolver->putGrammar(fGrammar);
 1524|      0|            }
 1525|       |
 1526|       |            //  In order to make the processing work consistently, we have to
 1527|       |            //  make this look like an external entity. So create an entity
 1528|       |            //  decl and fill it in and push it with the reader, as happens
 1529|       |            //  with an external entity. Put a janitor on it to insure it gets
 1530|       |            //  cleaned up. The reader manager does not adopt them.
 1531|    395|            const XMLCh gDTDStr[] = { chLatin_D, chLatin_T, chLatin_D , chNull };
 1532|    395|            DTDEntityDecl* declDTD = new (fMemoryManager) DTDEntityDecl(gDTDStr, false, fMemoryManager);
 1533|    395|            declDTD->setSystemId(sysId);
 1534|    395|            declDTD->setIsExternal(true);
 1535|    395|            Janitor<DTDEntityDecl> janDecl(declDTD);
 1536|       |
 1537|       |            // Mark this one as a throw at end
 1538|    395|            reader->setThrowAtEnd(true);
 1539|       |
 1540|       |            // And push it onto the stack, with its pseudo name
 1541|    395|            fReaderMgr.pushReader(reader, declDTD);
 1542|       |
 1543|       |            // Tell it its not in an include section
 1544|    395|            dtdScanner.scanExtSubsetDecl(false, true);
 1545|    395|        }
 1546|    624|    }
 1547|  5.53k|}
_ZN11xercesc_3_212IGXMLScanner12scanStartTagERb:
 1550|  17.0M|{
 1551|       |    //  Assume we will still have data until proven otherwise. It will only
 1552|       |    //  ever be false if this is the root and its empty.
 1553|  17.0M|    gotData = true;
 1554|       |
 1555|       |    //  Get the QName. In this case, we are not doing namespaces, so we just
 1556|       |    //  use it as is and don't have to break it into parts.
 1557|  17.0M|    if (!fReaderMgr.getName(fQNameBuf))
  ------------------
  |  Branch (1557:9): [True: 139, False: 17.0M]
  ------------------
 1558|    139|    {
 1559|    139|        emitError(XMLErrs::ExpectedElementName);
 1560|    139|        fReaderMgr.skipToChar(chOpenAngle);
 1561|    139|        return false;
 1562|    139|    }
 1563|       |
 1564|       |    // Assume it won't be an empty tag
 1565|  17.0M|    bool isEmpty = false;
 1566|       |
 1567|       |    //  Lets try to look up the element in the validator's element decl pool
 1568|       |    //  We can pass bogus values for the URI id and the base name. We know that
 1569|       |    //  this can only be called if we are doing a DTD style validator and that
 1570|       |    //  he will only look at the QName.
 1571|       |    //
 1572|       |    //  We tell him to fault in a decl if he does not find one.
 1573|       |    //  Actually, we *don't* tell him to fault in a decl if he does not find one- NG
 1574|  17.0M|    bool wasAdded = false;
 1575|  17.0M|    const XMLCh *rawQName = fQNameBuf.getRawBuffer();
 1576|  17.0M|    XMLElementDecl* elemDecl = fGrammar->getElemDecl
 1577|  17.0M|    (
 1578|  17.0M|        fEmptyNamespaceId
 1579|  17.0M|        , 0
 1580|  17.0M|        , rawQName
 1581|  17.0M|        , Grammar::TOP_LEVEL_SCOPE
 1582|  17.0M|    );
 1583|       |    // look for it in the undeclared pool:
 1584|  17.0M|    if(!elemDecl)
  ------------------
  |  Branch (1584:8): [True: 4.33M, False: 12.6M]
  ------------------
 1585|  4.33M|    {
 1586|  4.33M|        elemDecl = fDTDElemNonDeclPool->getByKey(rawQName);
 1587|  4.33M|    }
 1588|  17.0M|    if(!elemDecl)
  ------------------
  |  Branch (1588:8): [True: 4.11k, False: 17.0M]
  ------------------
 1589|  4.11k|    {
 1590|       |        // we're assuming this must be a DTD element.  DTD's can be
 1591|       |        // used with or without namespaces, but schemas cannot be used without
 1592|       |        // namespaces.
 1593|  4.11k|        wasAdded = true;
 1594|  4.11k|        elemDecl = new (fMemoryManager) DTDElementDecl
 1595|  4.11k|        (
 1596|  4.11k|            rawQName
 1597|  4.11k|            , fEmptyNamespaceId
 1598|  4.11k|            , DTDElementDecl::Any
 1599|  4.11k|            , fMemoryManager
 1600|  4.11k|        );
 1601|  4.11k|        elemDecl->setId(fDTDElemNonDeclPool->put((DTDElementDecl*)elemDecl));
 1602|  4.11k|    }
 1603|       |
 1604|       |    //  We do something different here according to whether we found the
 1605|       |    //  element or not.
 1606|  17.0M|    if (wasAdded)
  ------------------
  |  Branch (1606:9): [True: 4.11k, False: 17.0M]
  ------------------
 1607|  4.11k|    {
 1608|       |        // If validating then emit an error
 1609|  4.11k|        if (fValidate)
  ------------------
  |  Branch (1609:13): [True: 2.56k, False: 1.54k]
  ------------------
 1610|  2.56k|        {
 1611|       |            // This is to tell the reuse Validator that this element was
 1612|       |            // faulted-in, was not an element in the validator pool originally
 1613|  2.56k|            elemDecl->setCreateReason(XMLElementDecl::JustFaultIn);
 1614|       |
 1615|  2.56k|            fValidator->emitError
 1616|  2.56k|            (
 1617|  2.56k|                XMLValid::ElementNotDefined
 1618|  2.56k|                , elemDecl->getFullName()
 1619|  2.56k|            );
 1620|  2.56k|        }
 1621|  4.11k|    }
 1622|  17.0M|    else
 1623|  17.0M|    {
 1624|       |        // If its not marked declared and validating, then emit an error
 1625|  17.0M|        if (fValidate && !elemDecl->isDeclared())
  ------------------
  |  Branch (1625:13): [True: 16.9M, False: 95.1k]
  |  Branch (1625:26): [True: 16.8M, False: 36.6k]
  ------------------
 1626|  16.8M|        {
 1627|  16.8M|            fValidator->emitError
 1628|  16.8M|            (
 1629|  16.8M|                XMLValid::ElementNotDefined
 1630|  16.8M|                , elemDecl->getFullName()
 1631|  16.8M|            );
 1632|  16.8M|        }
 1633|  17.0M|    }
 1634|       |
 1635|       |    // See if its the root element
 1636|  17.0M|    const bool isRoot = fElemStack.isEmpty();
 1637|       |
 1638|       |    // Expand the element stack and add the new element
 1639|  17.0M|    fElemStack.addLevel(elemDecl, fReaderMgr.getCurrentReaderNum());
 1640|  17.0M|    fElemStack.setValidationFlag(fValidate);
 1641|       |
 1642|       |    //  Validate the element
 1643|  17.0M|    if (fValidate)
  ------------------
  |  Branch (1643:9): [True: 16.9M, False: 96.7k]
  ------------------
 1644|  16.9M|        fValidator->validateElement(elemDecl);
 1645|       |
 1646|       |    //  If this is the first element and we are validating, check the root
 1647|       |    //  element.
 1648|  17.0M|    if (isRoot)
  ------------------
  |  Branch (1648:9): [True: 3.69k, False: 17.0M]
  ------------------
 1649|  3.69k|    {
 1650|  3.69k|        fRootGrammar = fGrammar;
 1651|       |
 1652|  3.69k|        if (fValidate)
  ------------------
  |  Branch (1652:13): [True: 3.18k, False: 510]
  ------------------
 1653|  3.18k|        {
 1654|       |            //  If a DocType exists, then check if it matches the root name there.
 1655|  3.18k|            if (fRootElemName && !XMLString::equals(fQNameBuf.getRawBuffer(), fRootElemName))
  ------------------
  |  Branch (1655:17): [True: 3.18k, False: 0]
  |  Branch (1655:34): [True: 2.94k, False: 244]
  ------------------
 1656|  2.94k|                fValidator->emitError(XMLValid::RootElemNotLikeDocType);
 1657|  3.18k|        }
 1658|  3.69k|    }
 1659|  17.0M|    else
 1660|  17.0M|    {
 1661|       |        //  If the element stack is not empty, then add this element as a
 1662|       |        //  child of the previous top element. If its empty, this is the root
 1663|       |        //  elem and is not the child of anything.
 1664|  17.0M|        fElemStack.addChild(elemDecl->getElementName(), true);
 1665|  17.0M|    }
 1666|       |
 1667|       |    // Skip any whitespace after the name
 1668|  17.0M|    fReaderMgr.skipPastSpaces();
 1669|       |
 1670|       |    //  We loop until we either see a /> or >, handling attribute/value
 1671|       |    //  pairs until we get there.
 1672|  17.0M|    XMLSize_t    attCount = 0;
 1673|  17.0M|    XMLSize_t    curAttListSize = fAttrList->size();
 1674|  17.0M|    wasAdded = false;
 1675|       |
 1676|  17.0M|    fElemCount++;
 1677|       |
 1678|  22.4M|    while (true)
  ------------------
  |  Branch (1678:12): [Folded - Ignored]
  ------------------
 1679|  22.4M|    {
 1680|       |        // And get the next non-space character
 1681|  22.4M|        XMLCh nextCh = fReaderMgr.peekNextChar();
 1682|       |
 1683|       |        //  If the next character is not a slash or closed angle bracket,
 1684|       |        //  then it must be whitespace, since whitespace is required
 1685|       |        //  between the end of the last attribute and the name of the next
 1686|       |        //  one.
 1687|  22.4M|        if (attCount)
  ------------------
  |  Branch (1687:13): [True: 5.45M, False: 17.0M]
  ------------------
 1688|  5.45M|        {
 1689|  5.45M|            if ((nextCh != chForwardSlash) && (nextCh != chCloseAngle))
  ------------------
  |  Branch (1689:17): [True: 11.9k, False: 5.44M]
  |  Branch (1689:47): [True: 2.73k, False: 9.21k]
  ------------------
 1690|  2.73k|            {
 1691|  2.73k|                bool bFoundSpace;
 1692|  2.73k|                fReaderMgr.skipPastSpaces(bFoundSpace);
 1693|  2.73k|                if (!bFoundSpace)
  ------------------
  |  Branch (1693:21): [True: 160, False: 2.57k]
  ------------------
 1694|    160|                {
 1695|       |                    // Emit the error but keep on going
 1696|    160|                    emitError(XMLErrs::ExpectedWhitespace);
 1697|    160|                }
 1698|       |                // Ok, peek another char
 1699|  2.73k|                nextCh = fReaderMgr.peekNextChar();
 1700|  2.73k|            }
 1701|  5.45M|        }
 1702|       |
 1703|       |        //  Ok, here we first check for any of the special case characters.
 1704|       |        //  If its not one, then we do the normal case processing, which
 1705|       |        //  assumes that we've hit an attribute value, Otherwise, we do all
 1706|       |        //  the special case checks.
 1707|  22.4M|        if (!fReaderMgr.getCurrentReader()->isSpecialStartTagChar(nextCh))
  ------------------
  |  Branch (1707:13): [True: 5.45M, False: 17.0M]
  ------------------
 1708|  5.45M|        {
 1709|       |            //  Assume its going to be an attribute, so get a name from
 1710|       |            //  the input.
 1711|  5.45M|            if (!fReaderMgr.getName(fAttNameBuf))
  ------------------
  |  Branch (1711:17): [True: 113, False: 5.45M]
  ------------------
 1712|    113|            {
 1713|    113|                emitError(XMLErrs::ExpectedAttrName);
 1714|    113|                fReaderMgr.skipPastChar(chCloseAngle);
 1715|    113|                return false;
 1716|    113|            }
 1717|       |
 1718|       |            // And next must be an equal sign
 1719|  5.45M|            if (!scanEq())
  ------------------
  |  Branch (1719:17): [True: 28, False: 5.45M]
  ------------------
 1720|     28|            {
 1721|     28|                static const XMLCh tmpList[] =
 1722|     28|                {
 1723|     28|                    chSingleQuote, chDoubleQuote, chCloseAngle
 1724|     28|                    , chOpenAngle, chForwardSlash, chNull
 1725|     28|                };
 1726|       |
 1727|     28|                emitError(XMLErrs::ExpectedEqSign);
 1728|       |
 1729|       |                //  Try to sync back up by skipping forward until we either
 1730|       |                //  hit something meaningful.
 1731|     28|                const XMLCh chFound = fReaderMgr.skipUntilInOrWS(tmpList);
 1732|       |
 1733|     28|                if ((chFound == chCloseAngle) || (chFound == chForwardSlash))
  ------------------
  |  Branch (1733:21): [True: 28, False: 0]
  |  Branch (1733:50): [True: 0, False: 0]
  ------------------
 1734|      0|                {
 1735|       |                    // Jump back to top for normal processing of these
 1736|      0|                    continue;
 1737|      0|                }
 1738|     28|                else if ((chFound == chSingleQuote)
  ------------------
  |  Branch (1738:26): [True: 28, False: 0]
  ------------------
 1739|     28|                      ||  (chFound == chDoubleQuote)
  ------------------
  |  Branch (1739:27): [True: 0, False: 0]
  ------------------
 1740|     28|                      ||  fReaderMgr.getCurrentReader()->isWhitespace(chFound))
  ------------------
  |  Branch (1740:27): [True: 0, False: 0]
  ------------------
 1741|      0|                {
 1742|       |                    // Just fall through assuming that the value is to follow
 1743|      0|                }
 1744|     28|                else if (chFound == chOpenAngle)
  ------------------
  |  Branch (1744:26): [True: 0, False: 28]
  ------------------
 1745|      0|                {
 1746|       |                    // Assume a malformed tag and that new one is starting
 1747|      0|                    emitError(XMLErrs::UnterminatedStartTag, elemDecl->getFullName());
 1748|      0|                    return false;
 1749|      0|                }
 1750|     28|                else
 1751|     28|                {
 1752|       |                    // Something went really wrong
 1753|     28|                    return false;
 1754|     28|                }
 1755|     28|            }
 1756|       |            //  See if this attribute is declared for this element. If we are
 1757|       |            //  not validating of course it will not be at first, but we will
 1758|       |            //  fault it into the pool (to avoid lots of redundant errors.)
 1759|  5.45M|            XMLCh * namePtr = fAttNameBuf.getRawBuffer();
 1760|  5.45M|            XMLAttDef* attDef = ((DTDElementDecl *)elemDecl)->getAttDef(namePtr);
 1761|       |
 1762|       |            //  Add this attribute to the attribute list that we use to
 1763|       |            //  pass them to the handler. We reuse its existing elements
 1764|       |            //  but expand it as required.
 1765|       |            // Note that we want to this first since this will
 1766|       |            // make a copy of the namePtr; we can then make use of
 1767|       |            // that copy in the hashtable lookup that checks
 1768|       |            // for duplicates.  This will mean we may have to update
 1769|       |            // the type of the XMLAttr later.
 1770|  5.45M|            XMLAttr* curAtt;
 1771|  5.45M|            if (attCount >= curAttListSize)
  ------------------
  |  Branch (1771:17): [True: 1.49k, False: 5.45M]
  ------------------
 1772|  1.49k|            {
 1773|  1.49k|                curAtt = new (fMemoryManager) XMLAttr
 1774|  1.49k|                (
 1775|  1.49k|                    0
 1776|  1.49k|                    , namePtr
 1777|  1.49k|                    , XMLUni::fgZeroLenString
 1778|  1.49k|                    , XMLUni::fgZeroLenString
 1779|  1.49k|                    , (attDef)?attDef->getType():XMLAttDef::CData
  ------------------
  |  Branch (1779:23): [True: 409, False: 1.09k]
  ------------------
 1780|  1.49k|                    , true
 1781|  1.49k|                    , fMemoryManager
 1782|  1.49k|                );
 1783|  1.49k|                fAttrList->addElement(curAtt);
 1784|  1.49k|            }
 1785|  5.45M|            else
 1786|  5.45M|            {
 1787|  5.45M|                curAtt = fAttrList->elementAt(attCount);
 1788|  5.45M|                curAtt->set
 1789|  5.45M|                (
 1790|  5.45M|                    0
 1791|  5.45M|                    , namePtr
 1792|  5.45M|                    , XMLUni::fgZeroLenString
 1793|  5.45M|                    , XMLUni::fgZeroLenString
 1794|  5.45M|                    , (attDef)?attDef->getType():XMLAttDef::CData
  ------------------
  |  Branch (1794:23): [True: 4.23M, False: 1.21M]
  ------------------
 1795|  5.45M|                );
 1796|  5.45M|                curAtt->setSpecified(true);
 1797|  5.45M|            }
 1798|       |            // reset namePtr so it refers to newly-allocated memory
 1799|  5.45M|            namePtr = (XMLCh *)curAtt->getName();
 1800|       |
 1801|  5.45M|            if (!attDef)
  ------------------
  |  Branch (1801:17): [True: 1.21M, False: 4.23M]
  ------------------
 1802|  1.21M|            {
 1803|       |                //  If there is a validation handler, then we are validating
 1804|       |                //  so emit an error.
 1805|  1.21M|                if (fValidate)
  ------------------
  |  Branch (1805:21): [True: 1.21M, False: 1.38k]
  ------------------
 1806|  1.21M|                {
 1807|  1.21M|                    fValidator->emitError
 1808|  1.21M|                    (
 1809|  1.21M|                        XMLValid::AttNotDefinedForElement
 1810|  1.21M|                        , fAttNameBuf.getRawBuffer()
 1811|  1.21M|                        , elemDecl->getFullName()
 1812|  1.21M|                    );
 1813|  1.21M|                }
 1814|  1.21M|                if(!fUndeclaredAttrRegistry->putIfNotPresent(namePtr, 0))
  ------------------
  |  Branch (1814:20): [True: 3, False: 1.21M]
  ------------------
 1815|      3|                {
 1816|      3|                    emitError
 1817|      3|                    (
 1818|      3|                        XMLErrs::AttrAlreadyUsedInSTag
 1819|      3|                        , namePtr
 1820|      3|                        , elemDecl->getFullName()
 1821|      3|                     );
 1822|      3|                }
 1823|  1.21M|            }
 1824|  4.23M|            else
 1825|  4.23M|            {
 1826|       |                // prepare for duplicate detection
 1827|  4.23M|                unsigned int *curCountPtr = fAttDefRegistry->get(attDef);
 1828|  4.23M|                if(!curCountPtr)
  ------------------
  |  Branch (1828:20): [True: 523, False: 4.23M]
  ------------------
 1829|    523|                {
 1830|    523|                    curCountPtr = getNewUIntPtr();
 1831|    523|                    *curCountPtr = fElemCount;
 1832|    523|                    fAttDefRegistry->put(attDef, curCountPtr);
 1833|    523|                }
 1834|  4.23M|                else if(*curCountPtr < fElemCount)
  ------------------
  |  Branch (1834:25): [True: 4.23M, False: 6]
  ------------------
 1835|  4.23M|                    *curCountPtr = fElemCount;
 1836|      6|                else
 1837|      6|                {
 1838|      6|                    emitError
 1839|      6|                    (
 1840|      6|                        XMLErrs::AttrAlreadyUsedInSTag
 1841|      6|                        , attDef->getFullName()
 1842|      6|                        , elemDecl->getFullName()
 1843|      6|                    );
 1844|      6|                }
 1845|  4.23M|            }
 1846|       |
 1847|       |            //  Skip any whitespace before the value and then scan the att
 1848|       |            //  value. This will come back normalized with entity refs and
 1849|       |            //  char refs expanded.
 1850|  5.45M|            fReaderMgr.skipPastSpaces();
 1851|  5.45M|            if (!scanAttValue(attDef, namePtr, fAttValueBuf))
  ------------------
  |  Branch (1851:17): [True: 28, False: 5.45M]
  ------------------
 1852|     28|            {
 1853|     28|                static const XMLCh tmpList[] =
 1854|     28|                {
 1855|     28|                    chCloseAngle, chOpenAngle, chForwardSlash, chNull
 1856|     28|                };
 1857|       |
 1858|     28|                emitError(XMLErrs::ExpectedAttrValue);
 1859|       |
 1860|       |                //  It failed, so lets try to get synced back up. We skip
 1861|       |                //  forward until we find some whitespace or one of the
 1862|       |                //  chars in our list.
 1863|     28|                const XMLCh chFound = fReaderMgr.skipUntilInOrWS(tmpList);
 1864|       |
 1865|     28|                if ((chFound == chCloseAngle)
  ------------------
  |  Branch (1865:21): [True: 28, False: 0]
  ------------------
 1866|     28|                ||  (chFound == chForwardSlash)
  ------------------
  |  Branch (1866:21): [True: 0, False: 0]
  ------------------
 1867|     28|                ||  fReaderMgr.getCurrentReader()->isWhitespace(chFound))
  ------------------
  |  Branch (1867:21): [True: 0, False: 0]
  ------------------
 1868|      0|                {
 1869|       |                    //  Just fall through and process this attribute, though
 1870|       |                    //  the value will be "".
 1871|      0|                }
 1872|     28|                else if (chFound == chOpenAngle)
  ------------------
  |  Branch (1872:26): [True: 0, False: 28]
  ------------------
 1873|      0|                {
 1874|       |                    // Assume a malformed tag and that new one is starting
 1875|      0|                    emitError(XMLErrs::UnterminatedStartTag, elemDecl->getFullName());
 1876|      0|                    return false;
 1877|      0|                }
 1878|     28|                else
 1879|     28|                {
 1880|       |                    // Something went really wrong
 1881|     28|                    return false;
 1882|     28|                }
 1883|     28|            }
 1884|       |            // must set the newly-minted value on the XMLAttr:
 1885|  5.45M|            curAtt->setValue(fAttValueBuf.getRawBuffer());
 1886|       |
 1887|       |            //  Now that its all stretched out, lets look at its type and
 1888|       |            //  determine if it has a valid value. It will output any needed
 1889|       |            //  errors, but we just keep going. We only need to do this if
 1890|       |            //  we are validating.
 1891|  5.45M|            if (attDef)
  ------------------
  |  Branch (1891:17): [True: 4.23M, False: 1.21M]
  ------------------
 1892|  4.23M|            {
 1893|       |                // Let the validator pass judgement on the attribute value
 1894|  4.23M|                if (fValidate)
  ------------------
  |  Branch (1894:21): [True: 4.23M, False: 0]
  ------------------
 1895|  4.23M|                {
 1896|  4.23M|                    fValidator->validateAttrValue
 1897|  4.23M|                    (
 1898|  4.23M|                        attDef
 1899|  4.23M|                        , fAttValueBuf.getRawBuffer()
 1900|  4.23M|                        , false
 1901|  4.23M|                        , elemDecl
 1902|  4.23M|                    );
 1903|  4.23M|                }
 1904|  4.23M|            }
 1905|       |
 1906|  5.45M|            attCount++;
 1907|       |            // And jump back to the top of the loop
 1908|  5.45M|            continue;
 1909|  5.45M|        }
 1910|       |
 1911|       |        //  It was some special case character so do all of the checks and
 1912|       |        //  deal with it.
 1913|  17.0M|        if (!nextCh)
  ------------------
  |  Branch (1913:13): [True: 106, False: 17.0M]
  ------------------
 1914|    106|            ThrowXMLwithMemMgr(UnexpectedEOFException, XMLExcepts::Gen_UnexpectedEOF, fMemoryManager);
  ------------------
  |  |  264|    106|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
 1915|       |
 1916|  17.0M|        if (nextCh == chForwardSlash)
  ------------------
  |  Branch (1916:13): [True: 5.56M, False: 11.4M]
  ------------------
 1917|  5.56M|        {
 1918|  5.56M|            fReaderMgr.getNextChar();
 1919|  5.56M|            isEmpty = true;
 1920|  5.56M|            if (!fReaderMgr.skippedChar(chCloseAngle))
  ------------------
  |  Branch (1920:17): [True: 27, False: 5.56M]
  ------------------
 1921|     27|                emitError(XMLErrs::UnterminatedStartTag, elemDecl->getFullName());
 1922|  5.56M|            break;
 1923|  5.56M|        }
 1924|  11.4M|        else if (nextCh == chCloseAngle)
  ------------------
  |  Branch (1924:18): [True: 11.4M, False: 187]
  ------------------
 1925|  11.4M|        {
 1926|  11.4M|            fReaderMgr.getNextChar();
 1927|  11.4M|            break;
 1928|  11.4M|        }
 1929|    187|        else if (nextCh == chOpenAngle)
  ------------------
  |  Branch (1929:18): [True: 16, False: 171]
  ------------------
 1930|     16|        {
 1931|       |            //  Check for this one specially, since its going to be common
 1932|       |            //  and it is kind of auto-recovering since we've already hit the
 1933|       |            //  next open bracket, which is what we would have seeked to (and
 1934|       |            //  skipped this whole tag.)
 1935|     16|            emitError(XMLErrs::UnterminatedStartTag, elemDecl->getFullName());
 1936|     16|            break;
 1937|     16|        }
 1938|    171|        else if ((nextCh == chSingleQuote) || (nextCh == chDoubleQuote))
  ------------------
  |  Branch (1938:18): [True: 162, False: 9]
  |  Branch (1938:47): [True: 9, False: 0]
  ------------------
 1939|     11|        {
 1940|       |            //  Check for this one specially, which is probably a missing
 1941|       |            //  attribute name, e.g. ="value". Just issue expected name
 1942|       |            //  error and eat the quoted string, then jump back to the
 1943|       |            //  top again.
 1944|     11|            emitError(XMLErrs::ExpectedAttrName);
 1945|     11|            fReaderMgr.getNextChar();
 1946|     11|            fReaderMgr.skipQuotedString(nextCh);
 1947|     11|            fReaderMgr.skipPastSpaces();
 1948|     11|            continue;
 1949|     11|        }
 1950|  17.0M|    }
 1951|       |
 1952|  17.0M|    if(attCount)
  ------------------
  |  Branch (1952:8): [True: 5.45M, False: 11.5M]
  ------------------
 1953|  5.45M|    {
 1954|       |        // clean up after ourselves:
 1955|       |        // clear the map used to detect duplicate attributes
 1956|  5.45M|        fUndeclaredAttrRegistry->removeAll();
 1957|  5.45M|    }
 1958|       |
 1959|       |    //  Ok, so lets get an enumerator for the attributes of this element
 1960|       |    //  and run through them for well formedness and validity checks. But
 1961|       |    //  make sure that we had any attributes before we do it, since the list
 1962|       |    //  would have have gotten faulted in anyway.
 1963|  17.0M|    if (elemDecl->hasAttDefs())
  ------------------
  |  Branch (1963:9): [True: 5.51M, False: 11.5M]
  ------------------
 1964|  5.51M|    {
 1965|       |        // N.B.:  this assumes DTD validation.
 1966|  5.51M|        XMLAttDefList& attDefList = elemDecl->getAttDefList();
 1967|  11.0M|        for(XMLSize_t i=0; i<attDefList.getAttDefCount(); i++)
  ------------------
  |  Branch (1967:28): [True: 5.52M, False: 5.51M]
  ------------------
 1968|  5.52M|        {
 1969|       |            // Get the current att def, for convenience and its def type
 1970|  5.52M|            const XMLAttDef& curDef = attDefList.getAttDef(i);
 1971|  5.52M|            const XMLAttDef::DefAttTypes defType = curDef.getDefaultType();
 1972|       |
 1973|  5.52M|            unsigned int *attCountPtr = fAttDefRegistry->get(&curDef);
 1974|  5.52M|            if (!attCountPtr || *attCountPtr < fElemCount)
  ------------------
  |  Branch (1974:17): [True: 18.0k, False: 5.51M]
  |  Branch (1974:33): [True: 1.27M, False: 4.23M]
  ------------------
 1975|  1.28M|            { // did not occur
 1976|  1.28M|                if (fValidate)
  ------------------
  |  Branch (1976:21): [True: 1.28M, False: 0]
  ------------------
 1977|  1.28M|                {
 1978|       |                    // If we are validating and its required, then an error
 1979|  1.28M|                    if (defType == XMLAttDef::Required)
  ------------------
  |  Branch (1979:25): [True: 375, False: 1.28M]
  ------------------
 1980|    375|                    {
 1981|    375|                        fValidator->emitError
 1982|    375|                        (
 1983|    375|                            XMLValid::RequiredAttrNotProvided
 1984|    375|                            , curDef.getFullName()
 1985|    375|                        );
 1986|    375|                    }
 1987|  1.28M|                    else if ((defType == XMLAttDef::Default) ||
  ------------------
  |  Branch (1987:30): [True: 1.28M, False: 2.23k]
  ------------------
 1988|  1.28M|		                       (defType == XMLAttDef::Fixed)  )
  ------------------
  |  Branch (1988:26): [True: 1.51k, False: 723]
  ------------------
 1989|  1.28M|                    {
 1990|  1.28M|                        if (fStandalone && curDef.isExternal())
  ------------------
  |  Branch (1990:29): [True: 2.76k, False: 1.28M]
  |  Branch (1990:44): [True: 291, False: 2.47k]
  ------------------
 1991|    291|                        {
 1992|       |                            // XML 1.0 Section 2.9
 1993|       |                            // Document is standalone, so attributes must not be defaulted.
 1994|    291|                            fValidator->emitError(XMLValid::NoDefAttForStandalone, curDef.getFullName(), elemDecl->getFullName());
 1995|       |
 1996|    291|                        }
 1997|  1.28M|                    }
 1998|  1.28M|                }
 1999|       |
 2000|       |                // Fault in the value if needed, and bump the att count
 2001|  1.28M|                if ((defType == XMLAttDef::Default)
  ------------------
  |  Branch (2001:21): [True: 1.28M, False: 2.61k]
  ------------------
 2002|  1.28M|                ||  (defType == XMLAttDef::Fixed))
  ------------------
  |  Branch (2002:21): [True: 1.51k, False: 1.09k]
  ------------------
 2003|  1.28M|                {
 2004|       |                    // Let the validator pass judgement on the attribute value
 2005|  1.28M|                    if (fValidate)
  ------------------
  |  Branch (2005:25): [True: 1.28M, False: 0]
  ------------------
 2006|  1.28M|                    {
 2007|  1.28M|                        fValidator->validateAttrValue
 2008|  1.28M|                        (
 2009|  1.28M|                            &curDef
 2010|  1.28M|                            , curDef.getValue()
 2011|  1.28M|                            , false
 2012|  1.28M|                            , elemDecl
 2013|  1.28M|                        );
 2014|  1.28M|                    }
 2015|       |
 2016|  1.28M|                    XMLAttr* curAtt;
 2017|  1.28M|                    if (attCount >= curAttListSize)
  ------------------
  |  Branch (2017:25): [True: 1.11k, False: 1.28M]
  ------------------
 2018|  1.11k|                    {
 2019|  1.11k|                        curAtt = new (fMemoryManager) XMLAttr
 2020|  1.11k|                        (
 2021|  1.11k|                            0
 2022|  1.11k|                            , curDef.getFullName()
 2023|  1.11k|                            , XMLUni::fgZeroLenString
 2024|  1.11k|                            , curDef.getValue()
 2025|  1.11k|                            , curDef.getType()
 2026|  1.11k|                            , false
 2027|  1.11k|                            , fMemoryManager
 2028|  1.11k|                        );
 2029|  1.11k|                        fAttrList->addElement(curAtt);
 2030|  1.11k|                        curAttListSize++;
 2031|  1.11k|                    }
 2032|  1.28M|                    else
 2033|  1.28M|                    {
 2034|  1.28M|                        curAtt = fAttrList->elementAt(attCount);
 2035|  1.28M|                        curAtt->set
 2036|  1.28M|                        (
 2037|  1.28M|                            0
 2038|  1.28M|                            , curDef.getFullName()
 2039|  1.28M|                            , XMLUni::fgZeroLenString
 2040|  1.28M|                            , curDef.getValue()
 2041|  1.28M|                            , curDef.getType()
 2042|  1.28M|                        );
 2043|  1.28M|                        curAtt->setSpecified(false);
 2044|  1.28M|                    }
 2045|  1.28M|                    attCount++;
 2046|  1.28M|                }
 2047|  1.28M|            }
 2048|  5.52M|        }
 2049|  5.51M|    }
 2050|       |
 2051|       |    //  If empty, validate content right now if we are validating and then
 2052|       |    //  pop the element stack top. Else, we have to update the current stack
 2053|       |    //  top's namespace mapping elements.
 2054|  17.0M|    if (isEmpty)
  ------------------
  |  Branch (2054:9): [True: 5.56M, False: 11.4M]
  ------------------
 2055|  5.56M|    {
 2056|       |        // If validating, then insure that its legal to have no content
 2057|  5.56M|        if (fValidate)
  ------------------
  |  Branch (2057:13): [True: 5.56M, False: 289]
  ------------------
 2058|  5.56M|        {
 2059|  5.56M|            XMLSize_t failure;
 2060|  5.56M|            bool res = fValidator->checkContent(elemDecl, 0, 0, &failure);
 2061|  5.56M|            if (!res)
  ------------------
  |  Branch (2061:17): [True: 6.54k, False: 5.56M]
  ------------------
 2062|  6.54k|            {
 2063|  6.54k|                fValidator->emitError
 2064|  6.54k|                (
 2065|  6.54k|                    XMLValid::ElementNotValidForContent
 2066|  6.54k|                    , elemDecl->getFullName()
 2067|  6.54k|                    , elemDecl->getFormattedContentModel()
 2068|  6.54k|                );
 2069|  6.54k|            }
 2070|  5.56M|        }
 2071|       |
 2072|       |        // Pop the element stack back off since it'll never be used now
 2073|  5.56M|        fElemStack.popTop();
 2074|       |
 2075|       |        // If the elem stack is empty, then it was an empty root
 2076|  5.56M|        if (isRoot)
  ------------------
  |  Branch (2076:13): [True: 1.45k, False: 5.56M]
  ------------------
 2077|  1.45k|            gotData = false;
 2078|  5.56M|        else {
 2079|       |            // Restore the validation flag
 2080|  5.56M|            fValidate = fElemStack.getValidationFlag();
 2081|  5.56M|        }
 2082|  5.56M|    }
 2083|       |
 2084|       |    //  If we have a document handler, then tell it about this start tag. We
 2085|       |    //  don't have any URI id to send along, so send fEmptyNamespaceId. We also do not send
 2086|       |    //  any prefix since its just one big name if we are not doing namespaces.
 2087|  17.0M|    if (fDocHandler)
  ------------------
  |  Branch (2087:9): [True: 0, False: 17.0M]
  ------------------
 2088|      0|    {
 2089|      0|        fDocHandler->startElement
 2090|      0|        (
 2091|      0|            *elemDecl
 2092|      0|            , fEmptyNamespaceId
 2093|      0|            , 0
 2094|      0|            , *fAttrList
 2095|      0|            , attCount
 2096|      0|            , isEmpty
 2097|      0|            , isRoot
 2098|      0|        );
 2099|      0|    }
 2100|       |
 2101|  17.0M|    return true;
 2102|  17.0M|}
_ZN11xercesc_3_212IGXMLScanner20resetPSVIElemContextEv:
 3260|  7.12k|{
 3261|  7.12k|    fPSVIElemContext.fIsSpecified = false;
 3262|  7.12k|    fPSVIElemContext.fErrorOccurred = false;
 3263|  7.12k|    fPSVIElemContext.fElemDepth = -1;
 3264|  7.12k|    fPSVIElemContext.fFullValidationDepth = -1;
 3265|  7.12k|    fPSVIElemContext.fNoneValidationDepth = -1;
 3266|  7.12k|    fPSVIElemContext.fCurrentDV = 0;
 3267|  7.12k|    fPSVIElemContext.fCurrentTypeInfo = 0;
 3268|  7.12k|    fPSVIElemContext.fNormalizedValue = 0;
 3269|  7.12k|}

_ZN11xercesc_3_212IGXMLScanner9scanResetERKNS_11InputSourceE:
 1160|  7.12k|{
 1161|       |    //  This call implicitly tells us that we are going to reuse the scanner
 1162|       |    //  if it was previously used. So tell the validator to reset itself.
 1163|       |    //
 1164|       |    //  But, if the fUseCacheGrammar flag is set, then don't reset it.
 1165|       |    //
 1166|       |    //  NOTE:   The ReaderMgr is flushed on the way out, because that is
 1167|       |    //          required to insure that files are closed.
 1168|  7.12k|    fGrammarResolver->cacheGrammarFromParse(fToCacheGrammar);
 1169|  7.12k|    fGrammarResolver->useCachedGrammarInParse(fUseCachedGrammar);
 1170|       |
 1171|       |    // Clear transient schema info list.
 1172|       |    //
 1173|  7.12k|    fSchemaInfoList->removeAll ();
 1174|       |
 1175|       |    // fModel may need updating, as fGrammarResolver could have cleaned it
 1176|  7.12k|    if(getPSVIHandler())
  ------------------
  |  Branch (1176:8): [True: 0, False: 7.12k]
  ------------------
 1177|      0|        fModel = fGrammarResolver->getXSModel();
 1178|       |
 1179|  7.12k|    {
 1180|  7.12k|        XMLDTDDescriptionImpl   theDTDDescription(XMLUni::fgDTDEntityString, fMemoryManager);
 1181|  7.12k|        fDTDGrammar = (DTDGrammar*) fGrammarResolver->getGrammar(&theDTDDescription);
 1182|  7.12k|    }
 1183|       |
 1184|  7.12k|    if (!fDTDGrammar) {
  ------------------
  |  Branch (1184:9): [True: 7.12k, False: 0]
  ------------------
 1185|       |
 1186|  7.12k|        fDTDGrammar = new (fGrammarPoolMemoryManager) DTDGrammar(fGrammarPoolMemoryManager);
 1187|  7.12k|        fGrammarResolver->putGrammar(fDTDGrammar);
 1188|  7.12k|    }
 1189|      0|    else
 1190|      0|        fDTDGrammar->reset();
 1191|       |
 1192|  7.12k|    fGrammar = fDTDGrammar;
 1193|  7.12k|    fGrammarType = fGrammar->getGrammarType();
 1194|  7.12k|    fRootGrammar = 0;
 1195|       |
 1196|  7.12k|    if (fValidatorFromUser) {
  ------------------
  |  Branch (1196:9): [True: 0, False: 7.12k]
  ------------------
 1197|      0|        if (fValidator->handlesDTD())
  ------------------
  |  Branch (1197:13): [True: 0, False: 0]
  ------------------
 1198|      0|            fValidator->setGrammar(fGrammar);
 1199|      0|        else if (fValidator->handlesSchema()) {
  ------------------
  |  Branch (1199:18): [True: 0, False: 0]
  ------------------
 1200|       |
 1201|      0|            ((SchemaValidator*) fValidator)->setErrorReporter(fErrorReporter);
 1202|      0|            ((SchemaValidator*) fValidator)->setGrammarResolver(fGrammarResolver);
 1203|      0|            ((SchemaValidator*) fValidator)->setExitOnFirstFatal(fExitOnFirstFatal);
 1204|      0|        }
 1205|      0|    }
 1206|  7.12k|    else {
 1207|       |        // set fValidator as fDTDValidator
 1208|  7.12k|        fValidator = fDTDValidator;
 1209|  7.12k|        fValidator->setGrammar(fGrammar);
 1210|  7.12k|    }
 1211|       |
 1212|       |    // Reset validation
 1213|  7.12k|    fValidate = (fValScheme == Val_Always) ? true : false;
  ------------------
  |  Branch (1213:17): [True: 0, False: 7.12k]
  ------------------
 1214|       |
 1215|       |    // Ignore skipDTDValidation flag if no schema processing is taking place */
 1216|  7.12k|    fSkipDTDValidation = fSkipDTDValidation && fDoSchema;
  ------------------
  |  Branch (1216:26): [True: 0, False: 7.12k]
  |  Branch (1216:48): [True: 0, False: 0]
  ------------------
 1217|       |
 1218|       |    //  And for all installed handlers, send reset events. This gives them
 1219|       |    //  a chance to flush any cached data.
 1220|  7.12k|    if (fDocHandler)
  ------------------
  |  Branch (1220:9): [True: 0, False: 7.12k]
  ------------------
 1221|      0|        fDocHandler->resetDocument();
 1222|  7.12k|    if (fEntityHandler)
  ------------------
  |  Branch (1222:9): [True: 0, False: 7.12k]
  ------------------
 1223|      0|        fEntityHandler->resetEntities();
 1224|  7.12k|    if (fErrorReporter)
  ------------------
  |  Branch (1224:9): [True: 0, False: 7.12k]
  ------------------
 1225|      0|        fErrorReporter->resetErrors();
 1226|       |
 1227|       |    // Clear out the id reference list
 1228|  7.12k|    resetValidationContext();
 1229|       |
 1230|       |    // Reset the Root Element Name
 1231|  7.12k|    fMemoryManager->deallocate(fRootElemName);//delete [] fRootElemName;
 1232|  7.12k|    fRootElemName = 0;
 1233|       |
 1234|       |    // Reset IdentityConstraints
 1235|  7.12k|    if (fICHandler)
  ------------------
  |  Branch (1235:9): [True: 7.12k, False: 0]
  ------------------
 1236|  7.12k|        fICHandler->reset();
 1237|       |
 1238|       |    //  Reset the element stack, and give it the latest ids for the special
 1239|       |    //  URIs it has to know about.
 1240|  7.12k|    fElemStack.reset
 1241|  7.12k|    (
 1242|  7.12k|        fEmptyNamespaceId
 1243|  7.12k|        , fUnknownNamespaceId
 1244|  7.12k|        , fXMLNamespaceId
 1245|  7.12k|        , fXMLNSNamespaceId
 1246|  7.12k|    );
 1247|       |
 1248|  7.12k|    if (!fSchemaNamespaceId)
  ------------------
  |  Branch (1248:9): [True: 7.12k, False: 0]
  ------------------
 1249|  7.12k|        fSchemaNamespaceId  = fURIStringPool->addOrFind(SchemaSymbols::fgURI_XSI);
 1250|       |
 1251|       |    // Reset some status flags
 1252|  7.12k|    fInException = false;
 1253|  7.12k|    fStandalone = false;
 1254|  7.12k|    fErrorCount = 0;
 1255|  7.12k|    fHasNoDTD = true;
 1256|  7.12k|    fSeeXsi = false;
 1257|       |
 1258|       |    // Reset PSVI context
 1259|       |    // note that we always need this around for DOMTypeInfo
 1260|  7.12k|    if (!fPSVIElement)
  ------------------
  |  Branch (1260:9): [True: 7.12k, False: 0]
  ------------------
 1261|  7.12k|        fPSVIElement = new (fMemoryManager) PSVIElement(fMemoryManager);
 1262|       |
 1263|  7.12k|    if (!fErrorStack)
  ------------------
  |  Branch (1263:9): [True: 7.12k, False: 0]
  ------------------
 1264|  7.12k|    {
 1265|  7.12k|        fErrorStack = new (fMemoryManager) ValueStackOf<bool>(8, fMemoryManager);
 1266|  7.12k|    }
 1267|      0|    else
 1268|      0|    {
 1269|      0|        fErrorStack->removeAllElements();
 1270|      0|    }
 1271|       |
 1272|  7.12k|    resetPSVIElemContext();
 1273|       |
 1274|       |    // Reset the validators
 1275|  7.12k|    fDTDValidator->reset();
 1276|  7.12k|    fDTDValidator->setErrorReporter(fErrorReporter);
 1277|  7.12k|    fSchemaValidator->reset();
 1278|  7.12k|    fSchemaValidator->setErrorReporter(fErrorReporter);
 1279|  7.12k|    fSchemaValidator->setExitOnFirstFatal(fExitOnFirstFatal);
 1280|  7.12k|    fSchemaValidator->setGrammarResolver(fGrammarResolver);
 1281|  7.12k|    if (fValidatorFromUser)
  ------------------
  |  Branch (1281:9): [True: 0, False: 7.12k]
  ------------------
 1282|      0|        fValidator->reset();
 1283|       |
 1284|       |    //  Handle the creation of the XML reader object for this input source.
 1285|       |    //  This will provide us with transcoding and basic lexing services.
 1286|  7.12k|    XMLReader* newReader = fReaderMgr.createReader
 1287|  7.12k|    (
 1288|  7.12k|        src
 1289|  7.12k|        , true
 1290|  7.12k|        , XMLReader::RefFrom_NonLiteral
 1291|  7.12k|        , XMLReader::Type_General
 1292|  7.12k|        , XMLReader::Source_External
 1293|  7.12k|        , fCalculateSrcOfs
 1294|  7.12k|        , fLowWaterMark
 1295|  7.12k|    );
 1296|       |
 1297|  7.12k|    if (!newReader) {
  ------------------
  |  Branch (1297:9): [True: 0, False: 7.12k]
  ------------------
 1298|      0|        if (src.getIssueFatalErrorIfNotFound())
  ------------------
  |  Branch (1298:13): [True: 0, False: 0]
  ------------------
 1299|      0|            ThrowXMLwithMemMgr1(RuntimeException, XMLExcepts::Scan_CouldNotOpenSource, src.getSystemId(), fMemoryManager);
  ------------------
  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
 1300|      0|        else
 1301|      0|            ThrowXMLwithMemMgr1(RuntimeException, XMLExcepts::Scan_CouldNotOpenSource_Warning, src.getSystemId(), fMemoryManager);
  ------------------
  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
 1302|      0|    }
 1303|       |
 1304|       |    // Push this read onto the reader manager
 1305|  7.12k|    fReaderMgr.pushReader(newReader, 0);
 1306|       |
 1307|       |    // and reset security-related things if necessary:
 1308|  7.12k|    if(fSecurityManager != 0)
  ------------------
  |  Branch (1308:8): [True: 0, False: 7.12k]
  ------------------
 1309|      0|    {
 1310|      0|        fEntityExpansionLimit = fSecurityManager->getEntityExpansionLimit();
 1311|      0|        fEntityExpansionCount = 0;
 1312|      0|    }
 1313|  7.12k|    fElemCount = 0;
 1314|  7.12k|    if(fUIntPoolRowTotal >= 32)
  ------------------
  |  Branch (1314:8): [True: 0, False: 7.12k]
  ------------------
 1315|      0|    { // 8 KB tied up with validating attributes...
 1316|      0|        fAttDefRegistry->removeAll();
 1317|      0|        recreateUIntPool();
 1318|      0|    }
 1319|  7.12k|    else
 1320|  7.12k|    {
 1321|       |        // note that this will implicitly reset the values of the hashtables,
 1322|       |        // though their buckets will still be tied up
 1323|  7.12k|        resetUIntPool();
 1324|  7.12k|    }
 1325|  7.12k|    fUndeclaredAttrRegistry->removeAll();
 1326|  7.12k|    fDTDElemNonDeclPool->removeAll();
 1327|  7.12k|}
_ZN11xercesc_3_212IGXMLScanner12sendCharDataERNS_9XMLBufferE:
 1338|  9.89M|{
 1339|       |    // If no data in the buffer, then nothing to do
 1340|  9.89M|    if (toSend.isEmpty())
  ------------------
  |  Branch (1340:9): [True: 266k, False: 9.62M]
  ------------------
 1341|   266k|        return;
 1342|       |
 1343|       |    //  We do different things according to whether we are validating or
 1344|       |    //  not. If not, its always just characters; else, it depends on the
 1345|       |    //  current element's content model.
 1346|  9.62M|    if (fValidate)
  ------------------
  |  Branch (1346:9): [True: 9.60M, False: 22.1k]
  ------------------
 1347|  9.60M|    {
 1348|       |        // Get the raw data we need for the callback
 1349|  9.60M|        const XMLCh* rawBuf = toSend.getRawBuffer();
 1350|  9.60M|        XMLSize_t len = toSend.getLen();
 1351|       |
 1352|       |        // And see if the current element is a 'Children' style content model
 1353|  9.60M|        const ElemStack::StackElem* topElem = fElemStack.topElement();
 1354|       |
 1355|       |        // Get the character data opts for the current element
 1356|  9.60M|        XMLElementDecl::CharDataOpts charOpts = XMLElementDecl::AllCharData;
 1357|  9.60M|        if(fGrammar->getGrammarType() == Grammar::SchemaGrammarType)
  ------------------
  |  Branch (1357:12): [True: 0, False: 9.60M]
  ------------------
 1358|      0|        {
 1359|       |            // And see if the current element is a 'Children' style content model
 1360|      0|            ComplexTypeInfo *currType = ((SchemaValidator*)fValidator)->getCurrentTypeInfo();
 1361|      0|            if(currType)
  ------------------
  |  Branch (1361:16): [True: 0, False: 0]
  ------------------
 1362|      0|            {
 1363|      0|                SchemaElementDecl::ModelTypes modelType = (SchemaElementDecl::ModelTypes) currType->getContentType();
 1364|      0|                if(modelType == SchemaElementDecl::Children ||
  ------------------
  |  Branch (1364:20): [True: 0, False: 0]
  ------------------
 1365|      0|                   modelType == SchemaElementDecl::ElementOnlyEmpty)
  ------------------
  |  Branch (1365:20): [True: 0, False: 0]
  ------------------
 1366|      0|                    charOpts = XMLElementDecl::SpacesOk;
 1367|      0|                else if(modelType == SchemaElementDecl::Empty)
  ------------------
  |  Branch (1367:25): [True: 0, False: 0]
  ------------------
 1368|      0|                    charOpts = XMLElementDecl::NoCharData;
 1369|      0|            }
 1370|      0|        } else // DTD grammar
 1371|  9.60M|            charOpts = topElem->fThisElement->getCharDataOpts();
 1372|       |
 1373|  9.60M|        if (charOpts == XMLElementDecl::NoCharData)
  ------------------
  |  Branch (1373:13): [True: 282, False: 9.60M]
  ------------------
 1374|    282|        {
 1375|       |            // They definitely cannot handle any type of char data
 1376|    282|            fValidator->emitError(XMLValid::NoCharDataInCM);
 1377|       |            //if(fGrammarType == Grammar::SchemaGrammarType)
 1378|       |            //{
 1379|       |              //  if (getPSVIHandler())
 1380|       |              //  {
 1381|       |                    // REVISIT:
 1382|       |                    // PSVIElement->setValidity(PSVIItem::VALIDITY_INVALID);
 1383|       |              //  }
 1384|       |           // }
 1385|    282|        }
 1386|  9.60M|        else if (fReaderMgr.getCurrentReader()->isAllSpaces(rawBuf, len))
  ------------------
  |  Branch (1386:18): [True: 8.44k, False: 9.59M]
  ------------------
 1387|  8.44k|        {
 1388|       |            //  Its all spaces. So, if they can take spaces, then send it
 1389|       |            //  as ignorable whitespace. If they can handle any char data
 1390|       |            //  send it as characters.
 1391|  8.44k|            if (charOpts == XMLElementDecl::SpacesOk) {
  ------------------
  |  Branch (1391:17): [True: 375, False: 8.07k]
  ------------------
 1392|    375|                if (fDocHandler)
  ------------------
  |  Branch (1392:21): [True: 0, False: 375]
  ------------------
 1393|      0|                    fDocHandler->ignorableWhitespace(rawBuf, len, false);
 1394|    375|            }
 1395|  8.07k|            else if (charOpts == XMLElementDecl::AllCharData)
  ------------------
  |  Branch (1395:22): [True: 8.07k, False: 0]
  ------------------
 1396|  8.07k|            {
 1397|  8.07k|                if (fGrammarType != Grammar::SchemaGrammarType)
  ------------------
  |  Branch (1397:21): [True: 8.07k, False: 0]
  ------------------
 1398|  8.07k|                {
 1399|  8.07k|                    if (fDocHandler)
  ------------------
  |  Branch (1399:25): [True: 0, False: 8.07k]
  ------------------
 1400|      0|                        fDocHandler->docCharacters(rawBuf, len, false);
 1401|  8.07k|                }
 1402|      0|                else
 1403|      0|                {
 1404|      0|                    XMLSize_t xsLen;
 1405|      0|                    const XMLCh* xsNormalized;
 1406|      0|                    SchemaValidator *schemaValidator = (SchemaValidator *)fValidator;
 1407|      0|                    DatatypeValidator* tempDV = ((SchemaValidator*) fValidator)->getCurrentDatatypeValidator();
 1408|      0|                    if (tempDV && tempDV->getWSFacet() != DatatypeValidator::PRESERVE)
  ------------------
  |  Branch (1408:25): [True: 0, False: 0]
  |  Branch (1408:35): [True: 0, False: 0]
  ------------------
 1409|      0|                    {
 1410|       |                        // normalize the character according to schema whitespace facet
 1411|      0|                        ((SchemaValidator*) fValidator)->normalizeWhiteSpace(tempDV, rawBuf, fWSNormalizeBuf);
 1412|      0|                        xsNormalized = fWSNormalizeBuf.getRawBuffer();
 1413|      0|                        xsLen = fWSNormalizeBuf.getLen();
 1414|      0|                    }
 1415|      0|                    else {
 1416|      0|                        xsNormalized = rawBuf;
 1417|      0|                        xsLen = len ;
 1418|      0|                    }
 1419|       |
 1420|       |                    // tell the schema validation about the character data for checkContent later
 1421|      0|                    schemaValidator->setDatatypeBuffer(xsNormalized);
 1422|       |
 1423|       |                    // call all active identity constraints
 1424|      0|                    if (toCheckIdentityConstraint() && fICHandler->getMatcherCount()) {
  ------------------
  |  Branch (1424:25): [True: 0, False: 0]
  |  Branch (1424:56): [True: 0, False: 0]
  ------------------
 1425|      0|                        fContent.append(xsNormalized, xsLen);
 1426|      0|                    }
 1427|       |
 1428|      0|                    if (fDocHandler) {
  ------------------
  |  Branch (1428:25): [True: 0, False: 0]
  ------------------
 1429|      0|                        if (fNormalizeData) {
  ------------------
  |  Branch (1429:29): [True: 0, False: 0]
  ------------------
 1430|      0|                           fDocHandler->docCharacters(xsNormalized, xsLen, false);
 1431|      0|                        }
 1432|      0|                        else {
 1433|      0|                            fDocHandler->docCharacters(rawBuf, len, false);
 1434|      0|                        }
 1435|      0|                    }
 1436|      0|                }
 1437|  8.07k|            }
 1438|  8.44k|        }
 1439|  9.59M|        else
 1440|  9.59M|        {
 1441|       |            //  If they can take any char data, then send it. Otherwise, they
 1442|       |            //  can only handle whitespace and can't handle this stuff so
 1443|       |            //  issue an error.
 1444|  9.59M|            if (charOpts == XMLElementDecl::AllCharData)
  ------------------
  |  Branch (1444:17): [True: 9.58M, False: 13.7k]
  ------------------
 1445|  9.58M|            {
 1446|  9.58M|                if (fGrammarType != Grammar::SchemaGrammarType)
  ------------------
  |  Branch (1446:21): [True: 9.58M, False: 0]
  ------------------
 1447|  9.58M|                {
 1448|  9.58M|                    if (fDocHandler)
  ------------------
  |  Branch (1448:25): [True: 0, False: 9.58M]
  ------------------
 1449|      0|                        fDocHandler->docCharacters(rawBuf, len, false);
 1450|  9.58M|                }
 1451|      0|                else
 1452|      0|                {
 1453|      0|                    XMLSize_t xsLen;
 1454|      0|                    const XMLCh* xsNormalized;
 1455|      0|                    SchemaValidator *schemaValidator = (SchemaValidator*)fValidator;
 1456|      0|                    DatatypeValidator* tempDV = ((SchemaValidator*) fValidator)->getCurrentDatatypeValidator();
 1457|      0|                    if (tempDV && tempDV->getWSFacet() != DatatypeValidator::PRESERVE)
  ------------------
  |  Branch (1457:25): [True: 0, False: 0]
  |  Branch (1457:35): [True: 0, False: 0]
  ------------------
 1458|      0|                    {
 1459|       |                        // normalize the character according to schema whitespace facet
 1460|      0|                        ((SchemaValidator*) fValidator)->normalizeWhiteSpace(tempDV, rawBuf, fWSNormalizeBuf);
 1461|      0|                        xsNormalized = fWSNormalizeBuf.getRawBuffer();
 1462|      0|                        xsLen = fWSNormalizeBuf.getLen();
 1463|      0|                    }
 1464|      0|                    else {
 1465|      0|                        xsNormalized = rawBuf;
 1466|      0|                        xsLen = len;
 1467|      0|                    }
 1468|       |
 1469|       |                    // tell the schema validation about the character data for checkContent later
 1470|      0|                    schemaValidator->setDatatypeBuffer(xsNormalized);
 1471|       |
 1472|       |                    // call all active identity constraints
 1473|      0|                    if (toCheckIdentityConstraint() && fICHandler->getMatcherCount()) {
  ------------------
  |  Branch (1473:25): [True: 0, False: 0]
  |  Branch (1473:56): [True: 0, False: 0]
  ------------------
 1474|      0|                        fContent.append(xsNormalized, xsLen);
 1475|      0|                    }
 1476|       |
 1477|      0|                    if (fDocHandler) {
  ------------------
  |  Branch (1477:25): [True: 0, False: 0]
  ------------------
 1478|      0|                        if (fNormalizeData) {
  ------------------
  |  Branch (1478:29): [True: 0, False: 0]
  ------------------
 1479|      0|                            fDocHandler->docCharacters(xsNormalized, xsLen, false);
 1480|      0|                        }
 1481|      0|                        else {
 1482|      0|                            fDocHandler->docCharacters(rawBuf, len, false);
 1483|      0|                        }
 1484|      0|                    }
 1485|      0|                }
 1486|  9.58M|            }
 1487|  13.7k|            else
 1488|  13.7k|            {
 1489|  13.7k|                fValidator->emitError(XMLValid::NoCharDataInCM);
 1490|  13.7k|                if(fGrammarType == Grammar::SchemaGrammarType)
  ------------------
  |  Branch (1490:20): [True: 0, False: 13.7k]
  ------------------
 1491|      0|                {
 1492|      0|                    if (getPSVIHandler())
  ------------------
  |  Branch (1492:25): [True: 0, False: 0]
  ------------------
 1493|      0|                    {
 1494|       |                        // REVISIT:
 1495|       |                        // PSVIAttribute->setValidity(PSVIItem::VALIDITY_INVALID);
 1496|      0|                    }
 1497|      0|                }
 1498|  13.7k|            }
 1499|  9.59M|        }
 1500|  9.60M|    }
 1501|  22.1k|    else
 1502|  22.1k|    {
 1503|       |        // call all active identity constraints
 1504|  22.1k|        if (fGrammarType == Grammar::SchemaGrammarType) {
  ------------------
  |  Branch (1504:13): [True: 0, False: 22.1k]
  ------------------
 1505|       |
 1506|      0|            if (toCheckIdentityConstraint() && fICHandler->getMatcherCount())
  ------------------
  |  Branch (1506:17): [True: 0, False: 0]
  |  Branch (1506:48): [True: 0, False: 0]
  ------------------
 1507|      0|                fContent.append(toSend.getRawBuffer(), toSend.getLen());
 1508|      0|        }
 1509|       |
 1510|       |        // Always assume its just char data if not validating
 1511|  22.1k|        if (fDocHandler)
  ------------------
  |  Branch (1511:13): [True: 0, False: 22.1k]
  ------------------
 1512|      0|            fDocHandler->docCharacters(toSend.getRawBuffer(), toSend.getLen(), false);
 1513|  22.1k|    }
 1514|       |
 1515|       |    // Reset buffer
 1516|  9.62M|    toSend.reset();
 1517|  9.62M|}
_ZN11xercesc_3_212IGXMLScanner12scanAttValueEPKNS_9XMLAttDefEPKDsRNS_9XMLBufferE:
 2407|  5.45M|{
 2408|  5.45M|    enum States
 2409|  5.45M|    {
 2410|  5.45M|        InWhitespace
 2411|  5.45M|        , InContent
 2412|  5.45M|    };
 2413|       |
 2414|       |    // Get the type and name
 2415|  5.45M|    const XMLAttDef::AttTypes type = (attDef)
  ------------------
  |  Branch (2415:38): [True: 4.23M, False: 1.21M]
  ------------------
 2416|  5.45M|                ?attDef->getType()
 2417|  5.45M|                :XMLAttDef::CData;
 2418|       |
 2419|       |    // Reset the target buffer
 2420|  5.45M|    toFill.reset();
 2421|       |
 2422|       |    // Get the next char which must be a single or double quote
 2423|  5.45M|    XMLCh quoteCh;
 2424|  5.45M|    if (!fReaderMgr.skipIfQuote(quoteCh))
  ------------------
  |  Branch (2424:9): [True: 28, False: 5.45M]
  ------------------
 2425|     28|        return false;
 2426|       |
 2427|       |    //  We have to get the current reader because we have to ignore closing
 2428|       |    //  quotes until we hit the same reader again.
 2429|  5.45M|    const XMLSize_t curReader = fReaderMgr.getCurrentReaderNum();
 2430|       |
 2431|       |    // check to see if it's a tokenized type that is declared externally 
 2432|  5.45M|    bool  isAttTokenizedExternal = (attDef)
  ------------------
  |  Branch (2432:36): [True: 4.23M, False: 1.21M]
  ------------------
 2433|  5.45M|                                   ?attDef->isExternal() && (type == XMLAttDef::ID || 
  ------------------
  |  Branch (2433:37): [True: 4.23M, False: 3.46k]
  |  Branch (2433:62): [True: 881, False: 4.23M]
  ------------------
 2434|  4.23M|                                                             type == XMLAttDef::IDRef || 
  ------------------
  |  Branch (2434:62): [True: 6, False: 4.23M]
  ------------------
 2435|  4.23M|                                                             type == XMLAttDef::IDRefs || 
  ------------------
  |  Branch (2435:62): [True: 4.23M, False: 435]
  ------------------
 2436|  4.23M|                                                             type == XMLAttDef::Entity || 
  ------------------
  |  Branch (2436:62): [True: 12, False: 423]
  ------------------
 2437|  4.23M|                                                             type == XMLAttDef::Entities || 
  ------------------
  |  Branch (2437:62): [True: 0, False: 423]
  ------------------
 2438|  4.23M|                                                             type == XMLAttDef::NmToken || 
  ------------------
  |  Branch (2438:62): [True: 0, False: 423]
  ------------------
 2439|  4.23M|                                                             type == XMLAttDef::NmTokens)
  ------------------
  |  Branch (2439:62): [True: 0, False: 423]
  ------------------
 2440|  5.45M|                                   :false;
 2441|       |
 2442|       |    //  Loop until we get the attribute value. Note that we use a double
 2443|       |    //  loop here to avoid the setup/teardown overhead of the exception
 2444|       |    //  handler on every round.
 2445|  5.45M|    XMLCh   nextCh;
 2446|  5.45M|    XMLCh   secondCh = 0;
 2447|  5.45M|    States  curState = InContent;
 2448|  5.45M|    bool    firstNonWS = false;
 2449|  5.45M|    bool    gotLeadingSurrogate = false;
 2450|  5.45M|    bool    escaped;
 2451|  5.45M|    while (true)
  ------------------
  |  Branch (2451:12): [Folded - Ignored]
  ------------------
 2452|  5.45M|    {
 2453|  5.45M|        try
 2454|  5.45M|        {
 2455|   271M|            while(true)
  ------------------
  |  Branch (2455:19): [Folded - Ignored]
  ------------------
 2456|   271M|            {
 2457|   271M|                nextCh = fReaderMgr.getNextChar();
 2458|       |
 2459|   271M|                if (!nextCh)
  ------------------
  |  Branch (2459:21): [True: 152, False: 271M]
  ------------------
 2460|    152|                    ThrowXMLwithMemMgr(UnexpectedEOFException, XMLExcepts::Gen_UnexpectedEOF, fMemoryManager);
  ------------------
  |  |  264|    152|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
 2461|       |
 2462|       |                // Check for our ending quote in the same entity
 2463|   271M|                if (nextCh == quoteCh)
  ------------------
  |  Branch (2463:21): [True: 5.58M, False: 265M]
  ------------------
 2464|  5.58M|                {
 2465|  5.58M|                    if (curReader == fReaderMgr.getCurrentReaderNum())
  ------------------
  |  Branch (2465:25): [True: 5.45M, False: 134k]
  ------------------
 2466|  5.45M|                        return true;
 2467|       |
 2468|       |                    // Watch for spillover into a previous entity
 2469|   134k|                    if (curReader > fReaderMgr.getCurrentReaderNum())
  ------------------
  |  Branch (2469:25): [True: 2, False: 134k]
  ------------------
 2470|      2|                    {
 2471|      2|                        emitError(XMLErrs::PartialMarkupInEntity);
 2472|      2|                        return false;
 2473|      2|                    }
 2474|   134k|                }
 2475|       |
 2476|       |                //  Check for an entity ref now, before we let it affect our
 2477|       |                //  whitespace normalization logic below. We ignore the empty flag
 2478|       |                //  in this one.
 2479|   265M|                escaped = false;
 2480|   265M|                if (nextCh == chAmpersand)
  ------------------
  |  Branch (2480:21): [True: 161k, False: 265M]
  ------------------
 2481|   161k|                {
 2482|   161k|                    if (scanEntityRef(true, nextCh, secondCh, escaped) != EntityExp_Returned)
  ------------------
  |  Branch (2482:25): [True: 153k, False: 7.97k]
  ------------------
 2483|   153k|                    {
 2484|   153k|                        gotLeadingSurrogate = false;
 2485|   153k|                        continue;
 2486|   153k|                    }
 2487|   161k|                }
 2488|   265M|                else if ((nextCh >= 0xD800) && (nextCh <= 0xDBFF))
  ------------------
  |  Branch (2488:26): [True: 20.7k, False: 265M]
  |  Branch (2488:48): [True: 9.69k, False: 11.0k]
  ------------------
 2489|  9.69k|                {
 2490|       |                    // Deal with surrogate pairs
 2491|       |                    //  Its a leading surrogate. If we already got one, then
 2492|       |                    //  issue an error, else set leading flag to make sure that
 2493|       |                    //  we look for a trailing next time.
 2494|  9.69k|                    if (gotLeadingSurrogate)
  ------------------
  |  Branch (2494:25): [True: 0, False: 9.69k]
  ------------------
 2495|      0|                        emitError(XMLErrs::Expected2ndSurrogateChar);
 2496|  9.69k|                     else
 2497|  9.69k|                        gotLeadingSurrogate = true;
 2498|  9.69k|                }
 2499|   265M|                else
 2500|   265M|                {
 2501|       |                    //  If its a trailing surrogate, make sure that we are
 2502|       |                    //  prepared for that. Else, its just a regular char so make
 2503|       |                    //  sure that we were not expected a trailing surrogate.
 2504|   265M|                    if ((nextCh >= 0xDC00) && (nextCh <= 0xDFFF))
  ------------------
  |  Branch (2504:25): [True: 11.0k, False: 265M]
  |  Branch (2504:47): [True: 9.69k, False: 1.30k]
  ------------------
 2505|  9.69k|                    {
 2506|       |                        // Its trailing, so make sure we were expecting it
 2507|  9.69k|                        if (!gotLeadingSurrogate)
  ------------------
  |  Branch (2507:29): [True: 1, False: 9.69k]
  ------------------
 2508|      1|                            emitError(XMLErrs::Unexpected2ndSurrogateChar);
 2509|  9.69k|                    }
 2510|   265M|                    else
 2511|   265M|                    {
 2512|       |                        //  Its just a char, so make sure we were not expecting a
 2513|       |                        //  trailing surrogate.
 2514|   265M|                        if (gotLeadingSurrogate)
  ------------------
  |  Branch (2514:29): [True: 2, False: 265M]
  ------------------
 2515|      2|                            emitError(XMLErrs::Expected2ndSurrogateChar);
 2516|       |
 2517|       |                        // Its got to at least be a valid XML character
 2518|   265M|                        if (!fReaderMgr.getCurrentReader()->isXMLChar(nextCh))
  ------------------
  |  Branch (2518:29): [True: 21, False: 265M]
  ------------------
 2519|     21|                        {
 2520|     21|                            XMLCh tmpBuf[9];
 2521|     21|                            XMLString::binToText
 2522|     21|                            (
 2523|     21|                                nextCh
 2524|     21|                                , tmpBuf
 2525|     21|                                , 8
 2526|     21|                                , 16
 2527|     21|                                , fMemoryManager
 2528|     21|                            );
 2529|     21|                            emitError(XMLErrs::InvalidCharacterInAttrValue, attrName, tmpBuf);
 2530|     21|                        }
 2531|   265M|                    }
 2532|   265M|                    gotLeadingSurrogate = false;
 2533|   265M|                }
 2534|       |
 2535|       |                //  If its not escaped, then make sure its not a < character, which
 2536|       |                //  is not allowed in attribute values.
 2537|   265M|                if (!escaped && (nextCh == chOpenAngle))
  ------------------
  |  Branch (2537:21): [True: 265M, False: 8.00k]
  |  Branch (2537:33): [True: 15, False: 265M]
  ------------------
 2538|     15|                    emitError(XMLErrs::BracketInAttrValue, attrName);
 2539|       |
 2540|       |                //  If the attribute is a CDATA type we do simple replacement of
 2541|       |                //  tabs and new lines with spaces, if the character is not escaped
 2542|       |                //  by way of a char ref.
 2543|       |                //
 2544|       |                //  Otherwise, we do the standard non-CDATA normalization of
 2545|       |                //  compressing whitespace to single spaces and getting rid of leading
 2546|       |                //  and trailing whitespace.
 2547|   265M|                if (type == XMLAttDef::CData)
  ------------------
  |  Branch (2547:21): [True: 31.6M, False: 234M]
  ------------------
 2548|  31.6M|                {
 2549|  31.6M|                    if (!escaped)
  ------------------
  |  Branch (2549:25): [True: 31.6M, False: 684]
  ------------------
 2550|  31.6M|                    {
 2551|  31.6M|                        if ((nextCh == 0x09) || (nextCh == 0x0A) || (nextCh == 0x0D))
  ------------------
  |  Branch (2551:29): [True: 13.7k, False: 31.6M]
  |  Branch (2551:49): [True: 5.05k, False: 31.5M]
  |  Branch (2551:69): [True: 633, False: 31.5M]
  ------------------
 2552|  19.4k|                        {
 2553|       |                            // Check Validity Constraint for Standalone document declaration
 2554|       |                            // XML 1.0, Section 2.9
 2555|  19.4k|                            if (fStandalone && fValidate && isAttTokenizedExternal)
  ------------------
  |  Branch (2555:33): [True: 1.89k, False: 17.5k]
  |  Branch (2555:48): [True: 1.68k, False: 208]
  |  Branch (2555:61): [True: 0, False: 1.68k]
  ------------------
 2556|      0|                            {
 2557|       |                                // Can't have a standalone document declaration of "yes" if  attribute
 2558|       |                                // values are subject to normalisation
 2559|      0|                                fValidator->emitError(XMLValid::NoAttNormForStandalone, attrName);
 2560|      0|                            }
 2561|  19.4k|                            nextCh = chSpace;
 2562|  19.4k|                        }
 2563|  31.6M|                    }
 2564|  31.6M|                }
 2565|   234M|                else
 2566|   234M|                {
 2567|   234M|                    if (curState == InWhitespace)
  ------------------
  |  Branch (2567:25): [True: 1.42M, False: 232M]
  ------------------
 2568|  1.42M|                    {
 2569|  1.42M|                        if ((escaped && nextCh != chSpace) || !fReaderMgr.getCurrentReader()->isWhitespace(nextCh))
  ------------------
  |  Branch (2569:30): [True: 2.90k, False: 1.41M]
  |  Branch (2569:41): [True: 2.86k, False: 44]
  |  Branch (2569:63): [True: 1.06M, False: 347k]
  ------------------
 2570|  1.07M|                        {
 2571|  1.07M|                            if (firstNonWS)
  ------------------
  |  Branch (2571:33): [True: 1.07M, False: 934]
  ------------------
 2572|  1.07M|                                toFill.append(chSpace);
 2573|  1.07M|                            curState = InContent;
 2574|  1.07M|                            firstNonWS = true;
 2575|  1.07M|                        }
 2576|   347k|                        else
 2577|   347k|                        {
 2578|   347k|                            continue;
 2579|   347k|                        }
 2580|  1.42M|                    }
 2581|   232M|                    else if (curState == InContent)
  ------------------
  |  Branch (2581:30): [True: 232M, False: 150]
  ------------------
 2582|   232M|                    {
 2583|   232M|                        if ((nextCh == chSpace) ||
  ------------------
  |  Branch (2583:29): [True: 347k, False: 232M]
  ------------------
 2584|   232M|                            (fReaderMgr.getCurrentReader()->isWhitespace(nextCh) && !escaped))
  ------------------
  |  Branch (2584:30): [True: 728k, False: 231M]
  |  Branch (2584:85): [True: 725k, False: 2.67k]
  ------------------
 2585|  1.07M|                        {
 2586|  1.07M|                            curState = InWhitespace;
 2587|       |
 2588|       |                            // Check Validity Constraint for Standalone document declaration
 2589|       |                            // XML 1.0, Section 2.9
 2590|  1.07M|                            if (fStandalone && fValidate && isAttTokenizedExternal)
  ------------------
  |  Branch (2590:33): [True: 9.34k, False: 1.06M]
  |  Branch (2590:48): [True: 9.34k, False: 0]
  |  Branch (2590:61): [True: 9.11k, False: 233]
  ------------------
 2591|  9.11k|                            {
 2592|  9.11k|                                if (!firstNonWS || (nextCh != chSpace && fReaderMgr.lookingAtSpace()))
  ------------------
  |  Branch (2592:37): [True: 115, False: 8.99k]
  |  Branch (2592:53): [True: 4.47k, False: 4.51k]
  |  Branch (2592:74): [True: 2.45k, False: 2.02k]
  ------------------
 2593|  2.56k|                                {
 2594|       |                                     // Can't have a standalone document declaration of "yes" if  attribute
 2595|       |                                     // values are subject to normalisation
 2596|  2.56k|                                     fValidator->emitError(XMLValid::NoAttNormForStandalone, attrName);
 2597|  2.56k|                                }
 2598|  9.11k|                            }
 2599|  1.07M|                            continue;
 2600|  1.07M|                        }
 2601|   231M|                        firstNonWS = true;
 2602|   231M|                    }
 2603|   234M|                }
 2604|       |
 2605|       |                // Else add it to the buffer
 2606|   264M|                toFill.append(nextCh);
 2607|       |
 2608|   264M|                if (secondCh)
  ------------------
  |  Branch (2608:21): [True: 1.56k, False: 264M]
  ------------------
 2609|  1.56k|                {
 2610|  1.56k|                    toFill.append(secondCh);
 2611|  1.56k|                    secondCh=0;
 2612|  1.56k|                }
 2613|   264M|            }
 2614|  5.45M|        }
 2615|  5.45M|        catch(const EndOfEntityException&)
 2616|  5.45M|        {
 2617|       |            // Just eat it and continue.
 2618|      0|            gotLeadingSurrogate = false;
 2619|      0|            escaped = false;
 2620|      0|        }
 2621|  5.45M|    }
 2622|      0|    return true;
 2623|  5.45M|}
_ZN11xercesc_3_212IGXMLScanner13scanCDSectionEv:
 2631|  61.7k|{
 2632|  61.7k|    static const XMLCh CDataClose[] =
 2633|  61.7k|    {
 2634|  61.7k|            chCloseSquare, chCloseAngle, chNull
 2635|  61.7k|    };
 2636|       |
 2637|       |    //  The next character should be the opening square bracket. If not
 2638|       |    //  issue an error, but then try to recover by skipping any whitespace
 2639|       |    //  and checking again.
 2640|  61.7k|    if (!fReaderMgr.skippedChar(chOpenSquare))
  ------------------
  |  Branch (2640:9): [True: 0, False: 61.7k]
  ------------------
 2641|      0|    {
 2642|      0|        emitError(XMLErrs::ExpectedOpenSquareBracket);
 2643|      0|        fReaderMgr.skipPastSpaces();
 2644|       |
 2645|       |        // If we still don't find it, then give up, else keep going
 2646|      0|        if (!fReaderMgr.skippedChar(chOpenSquare))
  ------------------
  |  Branch (2646:13): [True: 0, False: 0]
  ------------------
 2647|      0|            return;
 2648|      0|    }
 2649|       |
 2650|       |    // Get a buffer for this
 2651|  61.7k|    XMLBufBid bbCData(&fBufMgr);
 2652|       |
 2653|       |    //  We just scan forward until we hit the end of CDATA section sequence.
 2654|       |    //  CDATA is effectively a big escape mechanism so we don't treat markup
 2655|       |    //  characters specially here.
 2656|  61.7k|    bool            emittedError = false;
 2657|  61.7k|    bool    gotLeadingSurrogate = false;
 2658|  61.7k|    const ElemStack::StackElem* topElem = fElemStack.topElement();
 2659|       |
 2660|       |    // Get the character data opts for the current element
 2661|  61.7k|    XMLElementDecl::CharDataOpts charOpts = XMLElementDecl::AllCharData;
 2662|  61.7k|    if(fGrammar->getGrammarType() == Grammar::SchemaGrammarType)
  ------------------
  |  Branch (2662:8): [True: 0, False: 61.7k]
  ------------------
 2663|      0|    {
 2664|       |        // And see if the current element is a 'Children' style content model
 2665|      0|        ComplexTypeInfo *currType = ((SchemaValidator*)fValidator)->getCurrentTypeInfo();
 2666|      0|        if(currType)
  ------------------
  |  Branch (2666:12): [True: 0, False: 0]
  ------------------
 2667|      0|        {
 2668|      0|            SchemaElementDecl::ModelTypes modelType = (SchemaElementDecl::ModelTypes) currType->getContentType();
 2669|      0|            if(modelType == SchemaElementDecl::Children ||
  ------------------
  |  Branch (2669:16): [True: 0, False: 0]
  ------------------
 2670|      0|               modelType == SchemaElementDecl::ElementOnlyEmpty)
  ------------------
  |  Branch (2670:16): [True: 0, False: 0]
  ------------------
 2671|      0|                charOpts = XMLElementDecl::SpacesOk;
 2672|      0|            else if(modelType == SchemaElementDecl::Empty)
  ------------------
  |  Branch (2672:21): [True: 0, False: 0]
  ------------------
 2673|      0|                charOpts = XMLElementDecl::NoCharData;
 2674|      0|        }
 2675|      0|    } else // DTD grammar
 2676|  61.7k|        charOpts = topElem->fThisElement->getCharDataOpts();
 2677|       |
 2678|  4.10M|    while (true)
  ------------------
  |  Branch (2678:12): [Folded - Ignored]
  ------------------
 2679|  4.10M|    {
 2680|  4.10M|        const XMLCh nextCh = fReaderMgr.getNextChar();
 2681|       |
 2682|       |        // Watch for unexpected end of file
 2683|  4.10M|        if (!nextCh)
  ------------------
  |  Branch (2683:13): [True: 52, False: 4.10M]
  ------------------
 2684|     52|        {
 2685|     52|            emitError(XMLErrs::UnterminatedCDATASection);
 2686|     52|            ThrowXMLwithMemMgr(UnexpectedEOFException, XMLExcepts::Gen_UnexpectedEOF, fMemoryManager);
  ------------------
  |  |  264|     52|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
 2687|     52|        }
 2688|       |
 2689|  4.10M|        if (fValidate && fStandalone && (fReaderMgr.getCurrentReader()->isWhitespace(nextCh)))
  ------------------
  |  Branch (2689:13): [True: 2.62M, False: 1.47M]
  |  Branch (2689:26): [True: 133k, False: 2.49M]
  |  Branch (2689:41): [True: 568, False: 133k]
  ------------------
 2690|    568|        {
 2691|       |            // This document is standalone; this ignorable CDATA whitespace is forbidden.
 2692|       |            // XML 1.0, Section 2.9
 2693|       |            // And see if the current element is a 'Children' style content model
 2694|    568|            if (topElem->fThisElement->isExternal()) {
  ------------------
  |  Branch (2694:17): [True: 291, False: 277]
  ------------------
 2695|       |
 2696|    291|                if (charOpts == XMLElementDecl::SpacesOk) // Element Content
  ------------------
  |  Branch (2696:21): [True: 0, False: 291]
  ------------------
 2697|      0|                {
 2698|       |                    // Error - standalone should have a value of "no" as whitespace detected in an
 2699|       |                    // element type with element content whose element declaration was external
 2700|      0|                    fValidator->emitError(XMLValid::NoWSForStandalone);
 2701|      0|                    if(fGrammarType == Grammar::SchemaGrammarType)
  ------------------
  |  Branch (2701:24): [True: 0, False: 0]
  ------------------
 2702|      0|                    {
 2703|      0|                        if (getPSVIHandler())
  ------------------
  |  Branch (2703:29): [True: 0, False: 0]
  ------------------
 2704|      0|                        {
 2705|       |                            // REVISIT:
 2706|       |                            // PSVIElement->setValidity(PSVIItem::VALIDITY_INVALID);
 2707|      0|                        }
 2708|      0|                    }
 2709|      0|                }
 2710|    291|            }
 2711|    568|        }
 2712|       |
 2713|       |        //  If this is a close square bracket it could be our closing
 2714|       |        //  sequence.
 2715|  4.10M|        if (nextCh == chCloseSquare && fReaderMgr.skippedString(CDataClose))
  ------------------
  |  Branch (2715:13): [True: 1.36M, False: 2.74M]
  |  Branch (2715:40): [True: 61.7k, False: 1.30M]
  ------------------
 2716|  61.7k|        {
 2717|       |            //  make sure we were not expecting a trailing surrogate.
 2718|  61.7k|            if (gotLeadingSurrogate)
  ------------------
  |  Branch (2718:17): [True: 0, False: 61.7k]
  ------------------
 2719|      0|                emitError(XMLErrs::Expected2ndSurrogateChar);
 2720|       |
 2721|  61.7k|            if (fGrammarType == Grammar::SchemaGrammarType) {
  ------------------
  |  Branch (2721:17): [True: 0, False: 61.7k]
  ------------------
 2722|       |
 2723|      0|                XMLSize_t xsLen = bbCData.getLen();
 2724|      0|                const XMLCh* xsNormalized = bbCData.getRawBuffer();
 2725|      0|                DatatypeValidator* tempDV = ((SchemaValidator*) fValidator)->getCurrentDatatypeValidator();
 2726|      0|                if (tempDV && tempDV->getWSFacet() != DatatypeValidator::PRESERVE)
  ------------------
  |  Branch (2726:21): [True: 0, False: 0]
  |  Branch (2726:31): [True: 0, False: 0]
  ------------------
 2727|      0|                {
 2728|       |                    // normalize the character according to schema whitespace facet
 2729|      0|                    ((SchemaValidator*) fValidator)->normalizeWhiteSpace(tempDV, xsNormalized, fWSNormalizeBuf);
 2730|      0|                    xsNormalized = fWSNormalizeBuf.getRawBuffer();
 2731|      0|                    xsLen = fWSNormalizeBuf.getLen();
 2732|      0|                    if (fNormalizeData && fValidate) {
  ------------------
  |  Branch (2732:25): [True: 0, False: 0]
  |  Branch (2732:43): [True: 0, False: 0]
  ------------------
 2733|      0|                        bbCData.set(xsNormalized);
 2734|      0|                    }
 2735|      0|                }
 2736|       |
 2737|      0|                if (fValidate) {
  ------------------
  |  Branch (2737:21): [True: 0, False: 0]
  ------------------
 2738|       |
 2739|       |                    // tell the schema validation about the character data for checkContent later
 2740|      0|                    ((SchemaValidator*)fValidator)->setDatatypeBuffer(xsNormalized);
 2741|       |
 2742|      0|                    if (charOpts != XMLElementDecl::AllCharData)
  ------------------
  |  Branch (2742:25): [True: 0, False: 0]
  ------------------
 2743|      0|                    {
 2744|       |                        // They definitely cannot handle any type of char data
 2745|      0|                        fValidator->emitError(XMLValid::NoCharDataInCM);
 2746|      0|                        if (getPSVIHandler())
  ------------------
  |  Branch (2746:29): [True: 0, False: 0]
  ------------------
 2747|      0|                        {
 2748|       |                            // REVISIT:
 2749|       |                            // PSVIElement->setValidity(PSVIItem::VALIDITY_INVALID);
 2750|      0|                        }
 2751|      0|                    }
 2752|      0|                }
 2753|       |
 2754|       |                // call all active identity constraints
 2755|      0|                if (toCheckIdentityConstraint() && fICHandler->getMatcherCount()) {
  ------------------
  |  Branch (2755:21): [True: 0, False: 0]
  |  Branch (2755:52): [True: 0, False: 0]
  ------------------
 2756|      0|                    fContent.append(xsNormalized, xsLen);
 2757|      0|                }
 2758|      0|            }
 2759|  61.7k|            else {
 2760|  61.7k|                if (fValidate) {
  ------------------
  |  Branch (2760:21): [True: 61.6k, False: 68]
  ------------------
 2761|       |
 2762|  61.6k|                    if (charOpts != XMLElementDecl::AllCharData)
  ------------------
  |  Branch (2762:25): [True: 453, False: 61.2k]
  ------------------
 2763|    453|                    {
 2764|       |                        // They definitely cannot handle any type of char data
 2765|    453|                        fValidator->emitError(XMLValid::NoCharDataInCM);
 2766|    453|                    }
 2767|  61.6k|                }
 2768|  61.7k|            }
 2769|       |
 2770|       |            // If we have a doc handler, call it
 2771|  61.7k|            if (fDocHandler)
  ------------------
  |  Branch (2771:17): [True: 0, False: 61.7k]
  ------------------
 2772|      0|            {
 2773|      0|                fDocHandler->docCharacters(
 2774|      0|                    bbCData.getRawBuffer(), bbCData.getLen(), true
 2775|      0|                );
 2776|      0|            }
 2777|       |
 2778|       |            // And we are done
 2779|  61.7k|            break;
 2780|  61.7k|        }
 2781|       |
 2782|       |        //  Make sure its a valid character. But if we've emitted an error
 2783|       |        //  already, don't bother with the overhead since we've already told
 2784|       |        //  them about it.
 2785|  4.04M|        if (!emittedError)
  ------------------
  |  Branch (2785:13): [True: 4.04M, False: 0]
  ------------------
 2786|  4.04M|        {
 2787|       |            // Deal with surrogate pairs
 2788|  4.04M|            if ((nextCh >= 0xD800) && (nextCh <= 0xDBFF))
  ------------------
  |  Branch (2788:17): [True: 141k, False: 3.90M]
  |  Branch (2788:39): [True: 70.6k, False: 70.9k]
  ------------------
 2789|  70.6k|            {
 2790|       |                //  Its a leading surrogate. If we already got one, then
 2791|       |                //  issue an error, else set leading flag to make sure that
 2792|       |                //  we look for a trailing next time.
 2793|  70.6k|                if (gotLeadingSurrogate)
  ------------------
  |  Branch (2793:21): [True: 0, False: 70.6k]
  ------------------
 2794|      0|                    emitError(XMLErrs::Expected2ndSurrogateChar);
 2795|  70.6k|                else
 2796|  70.6k|                    gotLeadingSurrogate = true;
 2797|  70.6k|            }
 2798|  3.97M|            else
 2799|  3.97M|            {
 2800|       |                //  If its a trailing surrogate, make sure that we are
 2801|       |                //  prepared for that. Else, its just a regular char so make
 2802|       |                //  sure that we were not expected a trailing surrogate.
 2803|  3.97M|                if ((nextCh >= 0xDC00) && (nextCh <= 0xDFFF))
  ------------------
  |  Branch (2803:21): [True: 70.9k, False: 3.90M]
  |  Branch (2803:43): [True: 70.6k, False: 261]
  ------------------
 2804|  70.6k|                {
 2805|       |                    // Its trailing, so make sure we were expecting it
 2806|  70.6k|                    if (!gotLeadingSurrogate)
  ------------------
  |  Branch (2806:25): [True: 2, False: 70.6k]
  ------------------
 2807|      2|                        emitError(XMLErrs::Unexpected2ndSurrogateChar);
 2808|  70.6k|                }
 2809|  3.90M|                else
 2810|  3.90M|                {
 2811|       |                    //  Its just a char, so make sure we were not expecting a
 2812|       |                    //  trailing surrogate.
 2813|  3.90M|                    if (gotLeadingSurrogate)
  ------------------
  |  Branch (2813:25): [True: 0, False: 3.90M]
  ------------------
 2814|      0|                        emitError(XMLErrs::Expected2ndSurrogateChar);
 2815|       |
 2816|       |                    // Its got to at least be a valid XML character
 2817|  3.90M|                    else if (!fReaderMgr.getCurrentReader()->isXMLChar(nextCh))
  ------------------
  |  Branch (2817:30): [True: 7, False: 3.90M]
  ------------------
 2818|      7|                    {
 2819|      7|                        XMLCh tmpBuf[9];
 2820|      7|                        XMLString::binToText
 2821|      7|                        (
 2822|      7|                            nextCh
 2823|      7|                            , tmpBuf
 2824|      7|                            , 8
 2825|      7|                            , 16
 2826|      7|                            , fMemoryManager
 2827|      7|                        );
 2828|      7|                        emitError(XMLErrs::InvalidCharacter, tmpBuf);
 2829|      7|                        emittedError = true;
 2830|      7|                    }
 2831|  3.90M|                }
 2832|  3.97M|                gotLeadingSurrogate = false;
 2833|  3.97M|            }
 2834|  4.04M|        }
 2835|       |
 2836|       |        // Add it to the buffer
 2837|  4.04M|        bbCData.append(nextCh);
 2838|  4.04M|    }
 2839|  61.7k|}
_ZN11xercesc_3_212IGXMLScanner12scanCharDataERNS_9XMLBufferE:
 2843|  6.99M|{
 2844|       |    //  We have to watch for the stupid ]]> sequence, which is illegal in
 2845|       |    //  character data. So this is a little state machine that handles that.
 2846|  6.99M|    enum States
 2847|  6.99M|    {
 2848|  6.99M|        State_Waiting
 2849|  6.99M|        , State_GotOne
 2850|  6.99M|        , State_GotTwo
 2851|  6.99M|    };
 2852|       |
 2853|       |    // Reset the buffer before we start
 2854|  6.99M|    toUse.reset();
 2855|       |
 2856|       |    // Turn on the 'throw at end' flag of the reader manager
 2857|  6.99M|    ThrowEOEJanitor jan(&fReaderMgr, true);
 2858|       |
 2859|       |    //  In order to be more efficient we have to use kind of a deeply nested
 2860|       |    //  set of blocks here. The outer block puts on a try and catches end of
 2861|       |    //  entity exceptions. The inner loop is the per-character loop. If we
 2862|       |    //  put the try inside the inner loop, it would work but would require
 2863|       |    //  the exception handling code setup/teardown code to be invoked for
 2864|       |    //  each character.
 2865|  6.99M|    XMLCh   nextCh;
 2866|  6.99M|    XMLCh   secondCh = 0;
 2867|  6.99M|    States  curState = State_Waiting;
 2868|  6.99M|    bool    escaped = false;
 2869|  6.99M|    bool    gotLeadingSurrogate = false;
 2870|  6.99M|    bool    notDone = true;
 2871|  13.9M|    while (notDone)
  ------------------
  |  Branch (2871:12): [True: 6.99M, False: 6.99M]
  ------------------
 2872|  6.99M|    {
 2873|  6.99M|        try
 2874|  6.99M|        {
 2875|  13.6M|            while (true)
  ------------------
  |  Branch (2875:20): [Folded - Ignored]
  ------------------
 2876|  13.6M|            {
 2877|       |                //  Eat through as many plain content characters as possible without
 2878|       |                //  needing special handling.  Moving most content characters here,
 2879|       |                //  in this one call, rather than running the overall loop once
 2880|       |                //  per content character, is a speed optimization.
 2881|  13.6M|                if (curState == State_Waiting  &&  !gotLeadingSurrogate)
  ------------------
  |  Branch (2881:21): [True: 13.5M, False: 109k]
  |  Branch (2881:52): [True: 13.5M, False: 51.1k]
  ------------------
 2882|  13.5M|                {
 2883|  13.5M|                     fReaderMgr.movePlainContentChars(toUse);
 2884|  13.5M|                }
 2885|       |
 2886|       |                // Try to get another char from the source
 2887|       |                //   The code from here on down covers all contengencies,
 2888|  13.6M|                if (!fReaderMgr.getNextCharIfNot(chOpenAngle, nextCh))
  ------------------
  |  Branch (2888:21): [True: 6.99M, False: 6.69M]
  ------------------
 2889|  6.99M|                {
 2890|       |                    // If we were waiting for a trailing surrogate, its an error
 2891|  6.99M|                    if (gotLeadingSurrogate)
  ------------------
  |  Branch (2891:25): [True: 0, False: 6.99M]
  ------------------
 2892|      0|                        emitError(XMLErrs::Expected2ndSurrogateChar);
 2893|       |
 2894|  6.99M|                    notDone = false;
 2895|  6.99M|                    break;
 2896|  6.99M|                }
 2897|       |
 2898|       |                //  Watch for a reference. Note that the escapement mechanism
 2899|       |                //  is ignored in this content.
 2900|  6.69M|                escaped = false;
 2901|  6.69M|                if (nextCh == chAmpersand)
  ------------------
  |  Branch (2901:21): [True: 2.90M, False: 3.79M]
  ------------------
 2902|  2.90M|                {
 2903|  2.90M|                    sendCharData(toUse);
 2904|       |
 2905|       |                    // Turn off the throwing at the end of entity during this
 2906|  2.90M|                    ThrowEOEJanitor jan(&fReaderMgr, false);
 2907|       |
 2908|  2.90M|                    if (scanEntityRef(false, nextCh, secondCh, escaped) != EntityExp_Returned)
  ------------------
  |  Branch (2908:25): [True: 2.81M, False: 88.3k]
  ------------------
 2909|  2.81M|                    {
 2910|  2.81M|                        gotLeadingSurrogate = false;
 2911|  2.81M|                        continue;
 2912|  2.81M|                    }
 2913|  88.3k|                    else
 2914|  88.3k|                    {
 2915|  88.3k|                        if (escaped && !fElemStack.isEmpty())
  ------------------
  |  Branch (2915:29): [True: 88.2k, False: 175]
  |  Branch (2915:40): [True: 88.2k, False: 0]
  ------------------
 2916|  88.2k|                            fElemStack.setReferenceEscaped();
 2917|  88.3k|                    }
 2918|  2.90M|                }
 2919|  3.79M|                else if ((nextCh >= 0xD800) && (nextCh <= 0xDBFF))
  ------------------
  |  Branch (2919:26): [True: 102k, False: 3.69M]
  |  Branch (2919:48): [True: 51.1k, False: 51.5k]
  ------------------
 2920|  51.1k|                {
 2921|       |                    // Deal with surrogate pairs
 2922|       |                    //  Its a leading surrogate. If we already got one, then
 2923|       |                    //  issue an error, else set leading flag to make sure that
 2924|       |                    //  we look for a trailing next time.
 2925|  51.1k|                    if (gotLeadingSurrogate)
  ------------------
  |  Branch (2925:25): [True: 0, False: 51.1k]
  ------------------
 2926|      0|                        emitError(XMLErrs::Expected2ndSurrogateChar);
 2927|  51.1k|                    else
 2928|  51.1k|                        gotLeadingSurrogate = true;
 2929|  51.1k|                }
 2930|  3.74M|                else
 2931|  3.74M|                {
 2932|       |                    //  If its a trailing surrogate, make sure that we are
 2933|       |                    //  prepared for that. Else, its just a regular char so make
 2934|       |                    //  sure that we were not expected a trailing surrogate.
 2935|  3.74M|                    if ((nextCh >= 0xDC00) && (nextCh <= 0xDFFF))
  ------------------
  |  Branch (2935:25): [True: 51.5k, False: 3.69M]
  |  Branch (2935:47): [True: 51.1k, False: 306]
  ------------------
 2936|  51.1k|                    {
 2937|       |                        // Its trailing, so make sure we were expecting it
 2938|  51.1k|                        if (!gotLeadingSurrogate)
  ------------------
  |  Branch (2938:29): [True: 4, False: 51.1k]
  ------------------
 2939|      4|                            emitError(XMLErrs::Unexpected2ndSurrogateChar);
 2940|  51.1k|                    }
 2941|  3.69M|                    else
 2942|  3.69M|                    {
 2943|       |                        //  Its just a char, so make sure we were not expecting a
 2944|       |                        //  trailing surrogate.
 2945|  3.69M|                        if (gotLeadingSurrogate)
  ------------------
  |  Branch (2945:29): [True: 1, False: 3.69M]
  ------------------
 2946|      1|                            emitError(XMLErrs::Expected2ndSurrogateChar);
 2947|       |
 2948|       |                        // Make sure the returned char is a valid XML char
 2949|  3.69M|                        if (!fReaderMgr.getCurrentReader()->isXMLChar(nextCh))
  ------------------
  |  Branch (2949:29): [True: 68, False: 3.69M]
  ------------------
 2950|     68|                        {
 2951|     68|                            XMLCh tmpBuf[9];
 2952|     68|                            XMLString::binToText
 2953|     68|                            (
 2954|     68|                                nextCh
 2955|     68|                                , tmpBuf
 2956|     68|                                , 8
 2957|     68|                                , 16
 2958|     68|                                , fMemoryManager
 2959|     68|                            );
 2960|     68|                            emitError(XMLErrs::InvalidCharacter, tmpBuf);
 2961|     68|                        }
 2962|  3.69M|                    }
 2963|  3.74M|                    gotLeadingSurrogate = false;
 2964|  3.74M|                }
 2965|       |
 2966|       |                 // Keep the state machine up to date
 2967|  3.88M|                if (!escaped)
  ------------------
  |  Branch (2967:21): [True: 3.79M, False: 88.4k]
  ------------------
 2968|  3.79M|                {
 2969|  3.79M|                    if (nextCh == chCloseSquare)
  ------------------
  |  Branch (2969:25): [True: 109k, False: 3.68M]
  ------------------
 2970|   109k|                    {
 2971|   109k|                        if (curState == State_Waiting)
  ------------------
  |  Branch (2971:29): [True: 88.1k, False: 21.7k]
  ------------------
 2972|  88.1k|                            curState = State_GotOne;
 2973|  21.7k|                        else if (curState == State_GotOne)
  ------------------
  |  Branch (2973:34): [True: 1.61k, False: 20.1k]
  ------------------
 2974|  1.61k|                            curState = State_GotTwo;
 2975|   109k|                    }
 2976|  3.68M|                    else if (nextCh == chCloseAngle)
  ------------------
  |  Branch (2976:30): [True: 28.0k, False: 3.66M]
  ------------------
 2977|  28.0k|                    {
 2978|  28.0k|                        if (curState == State_GotTwo)
  ------------------
  |  Branch (2978:29): [True: 2, False: 28.0k]
  ------------------
 2979|      2|                            emitError(XMLErrs::BadSequenceInCharData);
 2980|  28.0k|                        curState = State_Waiting;
 2981|  28.0k|                    }
 2982|  3.66M|                    else
 2983|  3.66M|                    {
 2984|  3.66M|                        curState = State_Waiting;
 2985|  3.66M|                    }
 2986|  3.79M|                }
 2987|  88.4k|                else
 2988|  88.4k|                {
 2989|  88.4k|                    curState = State_Waiting;
 2990|  88.4k|                }
 2991|       |
 2992|       |                // Add this char to the buffer
 2993|  3.88M|                toUse.append(nextCh);
 2994|       |
 2995|  3.88M|                if (secondCh)
  ------------------
  |  Branch (2995:21): [True: 264, False: 3.88M]
  ------------------
 2996|    264|                {
 2997|    264|                    toUse.append(secondCh);
 2998|    264|                    secondCh=0;
 2999|    264|                }
 3000|  3.88M|            }
 3001|  6.99M|        }
 3002|  6.99M|        catch(const EndOfEntityException& toCatch)
 3003|  6.99M|        {
 3004|       |            //  Some entity ended, so we have to send any accumulated
 3005|       |            //  chars and send an end of entity event.
 3006|      0|            sendCharData(toUse);
 3007|      0|            gotLeadingSurrogate = false;
 3008|       |
 3009|      0|            if (fDocHandler)
  ------------------
  |  Branch (3009:17): [True: 0, False: 0]
  ------------------
 3010|      0|                fDocHandler->endEntityReference(toCatch.getEntity());
 3011|      0|        }
 3012|  6.99M|    }
 3013|       |
 3014|       |    // Check the validity constraints as per XML 1.0 Section 2.9
 3015|  6.99M|    if (fValidate && fStandalone)
  ------------------
  |  Branch (3015:9): [True: 6.97M, False: 21.7k]
  |  Branch (3015:22): [True: 3.18k, False: 6.96M]
  ------------------
 3016|  3.18k|    {
 3017|       |        // See if the text contains whitespace
 3018|       |        // Get the raw data we need for the callback
 3019|  3.18k|        const XMLCh* rawBuf = toUse.getRawBuffer();
 3020|  3.18k|        const XMLSize_t len = toUse.getLen();
 3021|  3.18k|        const bool isSpaces = fReaderMgr.getCurrentReader()->containsWhiteSpace(rawBuf, len);
 3022|       |
 3023|  3.18k|        if (isSpaces)
  ------------------
  |  Branch (3023:13): [True: 915, False: 2.26k]
  ------------------
 3024|    915|        {
 3025|       |            // And see if the current element is a 'Children' style content model
 3026|    915|            const ElemStack::StackElem* topElem = fElemStack.topElement();
 3027|       |
 3028|    915|            if (topElem->fThisElement->isExternal()) {
  ------------------
  |  Branch (3028:17): [True: 444, False: 471]
  ------------------
 3029|       |
 3030|       |                // Get the character data opts for the current element
 3031|    444|                XMLElementDecl::CharDataOpts charOpts = XMLElementDecl::AllCharData;
 3032|    444|                if(fGrammar->getGrammarType() == Grammar::SchemaGrammarType)
  ------------------
  |  Branch (3032:20): [True: 0, False: 444]
  ------------------
 3033|      0|                {
 3034|       |                    // And see if the current element is a 'Children' style content model
 3035|      0|                    ComplexTypeInfo *currType = ((SchemaValidator*)fValidator)->getCurrentTypeInfo();
 3036|      0|                    if(currType)
  ------------------
  |  Branch (3036:24): [True: 0, False: 0]
  ------------------
 3037|      0|                    {
 3038|      0|                        SchemaElementDecl::ModelTypes modelType = (SchemaElementDecl::ModelTypes) currType->getContentType();
 3039|      0|                        if(modelType == SchemaElementDecl::Children ||
  ------------------
  |  Branch (3039:28): [True: 0, False: 0]
  ------------------
 3040|      0|                           modelType == SchemaElementDecl::ElementOnlyEmpty)
  ------------------
  |  Branch (3040:28): [True: 0, False: 0]
  ------------------
 3041|      0|                            charOpts = XMLElementDecl::SpacesOk;
 3042|      0|                        else if(modelType == SchemaElementDecl::Empty)
  ------------------
  |  Branch (3042:33): [True: 0, False: 0]
  ------------------
 3043|      0|                            charOpts = XMLElementDecl::NoCharData;
 3044|      0|                    }
 3045|      0|                } else // DTD grammar
 3046|    444|                    charOpts = topElem->fThisElement->getCharDataOpts();
 3047|       |
 3048|    444|                if (charOpts == XMLElementDecl::SpacesOk)  // => Element Content
  ------------------
  |  Branch (3048:21): [True: 0, False: 444]
  ------------------
 3049|      0|                {
 3050|       |                    // Error - standalone should have a value of "no" as whitespace detected in an
 3051|       |                    // element type with element content whose element declaration was external
 3052|       |                    //
 3053|      0|                    fValidator->emitError(XMLValid::NoWSForStandalone);
 3054|      0|                    if(fGrammarType == Grammar::SchemaGrammarType)
  ------------------
  |  Branch (3054:24): [True: 0, False: 0]
  ------------------
 3055|      0|                    {
 3056|      0|                        if (getPSVIHandler())
  ------------------
  |  Branch (3056:29): [True: 0, False: 0]
  ------------------
 3057|      0|                        {
 3058|       |                            // REVISIT:
 3059|       |                            // PSVIElement->setValidity(PSVIItem::VALIDITY_INVALID);
 3060|      0|                        }
 3061|      0|                    }
 3062|      0|                }
 3063|    444|            }
 3064|    915|        }
 3065|  3.18k|    }
 3066|       |    // Send any char data that we accumulated into the buffer
 3067|  6.99M|    sendCharData(toUse);
 3068|  6.99M|}
_ZN11xercesc_3_212IGXMLScanner13scanEntityRefEbRDsS1_Rb:
 3087|  3.06M|{
 3088|       |    // Assume no escape
 3089|  3.06M|    secondCh = 0;
 3090|  3.06M|    escaped = false;
 3091|       |
 3092|       |    // We have to insure that its all in one entity
 3093|  3.06M|    const XMLSize_t curReader = fReaderMgr.getCurrentReaderNum();
 3094|       |
 3095|       |    //  If the next char is a pound, then its a character reference and we
 3096|       |    //  need to expand it always.
 3097|  3.06M|    if (fReaderMgr.skippedChar(chPound))
  ------------------
  |  Branch (3097:9): [True: 8.77k, False: 3.05M]
  ------------------
 3098|  8.77k|    {
 3099|       |        //  Its a character reference, so scan it and get back the numeric
 3100|       |        //  value it represents.
 3101|  8.77k|        if (!scanCharRef(firstCh, secondCh))
  ------------------
  |  Branch (3101:13): [True: 0, False: 8.77k]
  ------------------
 3102|      0|            return EntityExp_Failed;
 3103|       |
 3104|  8.77k|        escaped = true;
 3105|       |
 3106|  8.77k|        if (curReader != fReaderMgr.getCurrentReaderNum())
  ------------------
  |  Branch (3106:13): [True: 0, False: 8.77k]
  ------------------
 3107|      0|            emitError(XMLErrs::PartialMarkupInEntity);
 3108|       |
 3109|  8.77k|        return EntityExp_Returned;
 3110|  8.77k|    }
 3111|       |
 3112|       |    // Expand it since its a normal entity ref
 3113|  3.05M|    XMLBufBid bbName(&fBufMgr);
 3114|  3.05M|    int  colonPosition;
 3115|  3.05M|    bool validName = fDoNamespaces ? fReaderMgr.getQName(bbName.getBuffer(), &colonPosition) :
  ------------------
  |  Branch (3115:22): [True: 0, False: 3.05M]
  ------------------
 3116|  3.05M|                                     fReaderMgr.getName(bbName.getBuffer());
 3117|  3.05M|    if (!validName)
  ------------------
  |  Branch (3117:9): [True: 83, False: 3.05M]
  ------------------
 3118|     83|    {
 3119|     83|        if (bbName.isEmpty())
  ------------------
  |  Branch (3119:13): [True: 83, False: 0]
  ------------------
 3120|     83|            emitError(XMLErrs::ExpectedEntityRefName);
 3121|      0|        else
 3122|      0|            emitError(XMLErrs::InvalidEntityRefName, bbName.getRawBuffer());
 3123|     83|        return EntityExp_Failed;
 3124|     83|    }
 3125|       |
 3126|       |    //  Next char must be a semi-colon. But if its not, just emit
 3127|       |    //  an error and try to continue.
 3128|  3.05M|    if (!fReaderMgr.skippedChar(chSemiColon))
  ------------------
  |  Branch (3128:9): [True: 90, False: 3.05M]
  ------------------
 3129|     90|        emitError(XMLErrs::UnterminatedEntityRef, bbName.getRawBuffer());
 3130|       |
 3131|       |    // Make sure we ended up on the same entity reader as the & char
 3132|  3.05M|    if (curReader != fReaderMgr.getCurrentReaderNum())
  ------------------
  |  Branch (3132:9): [True: 0, False: 3.05M]
  ------------------
 3133|      0|        emitError(XMLErrs::PartialMarkupInEntity);
 3134|       |
 3135|       |    // Look up the name in the general entity pool
 3136|  3.05M|    XMLEntityDecl* decl = fDTDGrammar->getEntityDecl(bbName.getRawBuffer());
 3137|       |
 3138|       |    // If it does not exist, then obviously an error
 3139|  3.05M|    if (!decl)
  ------------------
  |  Branch (3139:9): [True: 2.62M, False: 432k]
  ------------------
 3140|  2.62M|    {
 3141|       |        // XML 1.0 Section 4.1
 3142|       |        // Well-formedness Constraint for entity not found:
 3143|       |        //   In a document without any DTD, a document with only an internal DTD subset which contains no parameter entity references,
 3144|       |        //      or a document with "standalone='yes'", for an entity reference that does not occur within the external subset
 3145|       |        //      or a parameter entity
 3146|       |        //
 3147|       |        // Else it's Validity Constraint
 3148|  2.62M|        if (fStandalone || fHasNoDTD)
  ------------------
  |  Branch (3148:13): [True: 8, False: 2.62M]
  |  Branch (3148:28): [True: 35, False: 2.62M]
  ------------------
 3149|     43|            emitError(XMLErrs::EntityNotFound, bbName.getRawBuffer());
 3150|  2.62M|        else {
 3151|  2.62M|            if (fValidate)
  ------------------
  |  Branch (3151:17): [True: 2.62M, False: 0]
  ------------------
 3152|  2.62M|                fValidator->emitError(XMLValid::VC_EntityNotFound, bbName.getRawBuffer());
 3153|  2.62M|        }
 3154|       |
 3155|  2.62M|        return EntityExp_Failed;
 3156|  2.62M|    }
 3157|       |
 3158|       |    // XML 1.0 Section 4.1
 3159|       |    //  If we are a standalone document, then it has to have been declared
 3160|       |    //  in the internal subset.
 3161|   432k|    if (fStandalone && !decl->getDeclaredInIntSubset())
  ------------------
  |  Branch (3161:9): [True: 3.80k, False: 428k]
  |  Branch (3161:24): [True: 0, False: 3.80k]
  ------------------
 3162|      0|        emitError(XMLErrs::IllegalRefInStandalone, bbName.getRawBuffer());
 3163|       |
 3164|   432k|    if (decl->isExternal())
  ------------------
  |  Branch (3164:9): [True: 4, False: 432k]
  ------------------
 3165|      4|    {
 3166|       |        // If its unparsed, then its not valid here
 3167|      4|        if (decl->isUnparsed())
  ------------------
  |  Branch (3167:13): [True: 1, False: 3]
  ------------------
 3168|      1|        {
 3169|      1|            emitError(XMLErrs::NoUnparsedEntityRefs, bbName.getRawBuffer());
 3170|      1|            return EntityExp_Failed;
 3171|      1|        }
 3172|       |
 3173|       |        // If we are in an attribute value, then not valid but keep going
 3174|      3|        if (inAttVal)
  ------------------
  |  Branch (3174:13): [True: 1, False: 2]
  ------------------
 3175|      1|            emitError(XMLErrs::NoExtRefsInAttValue);
 3176|       |
 3177|       |        // And now create a reader to read this entity
 3178|      3|        InputSource* srcUsed;
 3179|      3|        XMLReader* reader = fReaderMgr.createReader
 3180|      3|        (
 3181|      3|            decl->getBaseURI()
 3182|      3|            , decl->getSystemId()
 3183|      3|            , decl->getPublicId()
 3184|      3|            , false
 3185|      3|            , XMLReader::RefFrom_NonLiteral
 3186|      3|            , XMLReader::Type_General
 3187|      3|            , XMLReader::Source_External
 3188|      3|            , srcUsed
 3189|      3|            , fCalculateSrcOfs
 3190|      3|            , fLowWaterMark
 3191|      3|            , fDisableDefaultEntityResolution
 3192|      3|        );
 3193|       |
 3194|       |        // Put a janitor on the source so it gets cleaned up on exit
 3195|      3|        Janitor<InputSource> janSrc(srcUsed);
 3196|       |
 3197|       |        //  If the creation failed, and its not because the source was empty,
 3198|       |        //  then emit an error and return.
 3199|      3|        if (!reader)
  ------------------
  |  Branch (3199:13): [True: 1, False: 2]
  ------------------
 3200|      1|            ThrowXMLwithMemMgr1(RuntimeException, XMLExcepts::Gen_CouldNotOpenExtEntity, srcUsed ? srcUsed->getSystemId() : decl->getSystemId(), fMemoryManager);
  ------------------
  |  |  266|      2|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  |  |  ------------------
  |  |  |  Branch (266:87): [True: 1, False: 0]
  |  |  ------------------
  ------------------
 3201|       |
 3202|       |        //  Push the reader. If its a recursive expansion, then emit an error
 3203|       |        //  and return an failure.
 3204|      2|        if (!fReaderMgr.pushReader(reader, decl))
  ------------------
  |  Branch (3204:13): [True: 0, False: 2]
  ------------------
 3205|      0|        {
 3206|      0|            emitError(XMLErrs::RecursiveEntity, decl->getName());
 3207|      0|            return EntityExp_Failed;
 3208|      0|        }
 3209|       |
 3210|       |        // here's where we need to check if there's a SecurityManager,
 3211|       |        // how many entity references we've had
 3212|      2|        if(fSecurityManager != 0 && ++fEntityExpansionCount > fEntityExpansionLimit) {
  ------------------
  |  Branch (3212:12): [True: 0, False: 2]
  |  Branch (3212:37): [True: 0, False: 0]
  ------------------
 3213|      0|            XMLCh expLimStr[32];
 3214|      0|            XMLString::sizeToText(fEntityExpansionLimit, expLimStr, 31, 10, fMemoryManager);
 3215|      0|            emitError
 3216|      0|            (
 3217|      0|                XMLErrs::EntityExpansionLimitExceeded
 3218|      0|                , expLimStr
 3219|      0|            );
 3220|       |            // there seems nothing  better to be done than to reset the entity expansion counter
 3221|      0|            fEntityExpansionCount = 0;
 3222|      0|        }
 3223|       |
 3224|       |        //  Do a start entity reference event.
 3225|       |        //
 3226|       |        //  <TBD> For now, we supress them in att values. Later, when
 3227|       |        //  the stuff is in place to correctly allow DOM to handle them
 3228|       |        //  we'll turn this back on.
 3229|      2|        if (fDocHandler && !inAttVal)
  ------------------
  |  Branch (3229:13): [True: 0, False: 2]
  |  Branch (3229:28): [True: 0, False: 0]
  ------------------
 3230|      0|            fDocHandler->startEntityReference(*decl);
 3231|       |
 3232|       |        // If it starts with the XML string, then parse a text decl
 3233|      2|        if (checkXMLDecl(true))
  ------------------
  |  Branch (3233:13): [True: 0, False: 2]
  ------------------
 3234|      0|            scanXMLDecl(Decl_Text);
 3235|      2|    }
 3236|   432k|    else
 3237|   432k|    {
 3238|       |        //  If its one of the special char references, then we can return
 3239|       |        //  it as a character, and its considered escaped.
 3240|   432k|        if (decl->getIsSpecialChar())
  ------------------
  |  Branch (3240:13): [True: 87.3k, False: 345k]
  ------------------
 3241|  87.3k|        {
 3242|  87.3k|            firstCh = decl->getValue()[0];
 3243|  87.3k|            escaped = true;
 3244|  87.3k|            return EntityExp_Returned;
 3245|  87.3k|        }
 3246|       |
 3247|       |        //  Create a reader over a memory stream over the entity value
 3248|       |        //  We force it to assume UTF-16 by passing in an encoding
 3249|       |        //  string. This way it won't both trying to predecode the
 3250|       |        //  first line, looking for an XML/TextDecl.
 3251|   345k|        XMLReader* valueReader = fReaderMgr.createIntEntReader
 3252|   345k|        (
 3253|   345k|            decl->getName()
 3254|   345k|            , XMLReader::RefFrom_NonLiteral
 3255|   345k|            , XMLReader::Type_General
 3256|   345k|            , decl->getValue()
 3257|   345k|            , decl->getValueLen()
 3258|   345k|            , false
 3259|   345k|        );
 3260|       |
 3261|       |        //  Try to push the entity reader onto the reader manager stack,
 3262|       |        //  where it will become the subsequent input. If it fails, that
 3263|       |        //  means the entity is recursive, so issue an error. The reader
 3264|       |        //  will have just been discarded, but we just keep going.
 3265|   345k|        if (!fReaderMgr.pushReader(valueReader, decl))
  ------------------
  |  Branch (3265:13): [True: 11, False: 345k]
  ------------------
 3266|     11|            emitError(XMLErrs::RecursiveEntity, decl->getName());
 3267|       |
 3268|       |        // here's where we need to check if there's a SecurityManager,
 3269|       |        // how many entity references we've had
 3270|   345k|        if(fSecurityManager != 0 && ++fEntityExpansionCount > fEntityExpansionLimit) {
  ------------------
  |  Branch (3270:12): [True: 0, False: 345k]
  |  Branch (3270:37): [True: 0, False: 0]
  ------------------
 3271|      0|            XMLCh expLimStr[32];
 3272|      0|            XMLString::sizeToText(fEntityExpansionLimit, expLimStr, 31, 10, fMemoryManager);
 3273|      0|            emitError
 3274|      0|            (
 3275|      0|                XMLErrs::EntityExpansionLimitExceeded
 3276|      0|                , expLimStr
 3277|      0|            );
 3278|      0|        }
 3279|       |
 3280|       |        //  Do a start entity reference event.
 3281|       |        //
 3282|       |        //  <TBD> For now, we supress them in att values. Later, when
 3283|       |        //  the stuff is in place to correctly allow DOM to handle them
 3284|       |        //  we'll turn this back on.
 3285|   345k|        if (fDocHandler && !inAttVal)
  ------------------
  |  Branch (3285:13): [True: 0, False: 345k]
  |  Branch (3285:28): [True: 0, False: 0]
  ------------------
 3286|      0|            fDocHandler->startEntityReference(*decl);
 3287|       |
 3288|       |        // If it starts with the XML string, then it's an error
 3289|   345k|        if (checkXMLDecl(true)) {
  ------------------
  |  Branch (3289:13): [True: 1, False: 345k]
  ------------------
 3290|      1|            emitError(XMLErrs::TextDeclNotLegalHere);
 3291|      1|            fReaderMgr.skipPastChar(chCloseAngle);
 3292|      1|        }
 3293|   345k|    }
 3294|   345k|    return EntityExp_Pushed;
 3295|   432k|}
_ZN11xercesc_3_212IGXMLScanner13switchGrammarEPKDs:
 3299|  6.05k|{
 3300|  6.05k|    Grammar* tempGrammar = fGrammarResolver->getGrammar(newGrammarNameSpace);
 3301|       |
 3302|  6.05k|    if (!tempGrammar && !fSkipDTDValidation) {
  ------------------
  |  Branch (3302:9): [True: 0, False: 6.05k]
  |  Branch (3302:25): [True: 0, False: 0]
  ------------------
 3303|       |        // This is a case where namespaces is on with a DTD grammar.
 3304|      0|        tempGrammar = fDTDGrammar;
 3305|      0|    }
 3306|  6.05k|    if (!tempGrammar) {
  ------------------
  |  Branch (3306:9): [True: 0, False: 6.05k]
  ------------------
 3307|      0|        return false;
 3308|      0|    }
 3309|  6.05k|    else {
 3310|       |
 3311|  6.05k|        Grammar::GrammarType tempGrammarType = tempGrammar->getGrammarType();
 3312|  6.05k|        if (tempGrammarType == Grammar::SchemaGrammarType && !fValidator->handlesSchema()) {
  ------------------
  |  Branch (3312:13): [True: 0, False: 6.05k]
  |  Branch (3312:62): [True: 0, False: 0]
  ------------------
 3313|      0|            if (fValidatorFromUser)
  ------------------
  |  Branch (3313:17): [True: 0, False: 0]
  ------------------
 3314|      0|                ThrowXMLwithMemMgr(RuntimeException, XMLExcepts::Gen_NoSchemaValidator, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
 3315|      0|            else {
 3316|      0|                fValidator = fSchemaValidator;
 3317|      0|            }
 3318|      0|        }
 3319|  6.05k|        else if (tempGrammarType == Grammar::DTDGrammarType) {
  ------------------
  |  Branch (3319:18): [True: 6.05k, False: 0]
  ------------------
 3320|  6.05k|            if (fSkipDTDValidation) {
  ------------------
  |  Branch (3320:17): [True: 0, False: 6.05k]
  ------------------
 3321|      0|                return false;
 3322|      0|            }
 3323|       |
 3324|  6.05k|            if (!fValidator->handlesDTD()) {
  ------------------
  |  Branch (3324:17): [True: 0, False: 6.05k]
  ------------------
 3325|      0|                if (fValidatorFromUser)
  ------------------
  |  Branch (3325:21): [True: 0, False: 0]
  ------------------
 3326|      0|                    ThrowXMLwithMemMgr(RuntimeException, XMLExcepts::Gen_NoDTDValidator, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
 3327|      0|                else {
 3328|      0|                    fValidator = fDTDValidator;
 3329|      0|                }
 3330|      0|            }
 3331|  6.05k|        }
 3332|       |
 3333|  6.05k|        fGrammarType = tempGrammarType;
 3334|  6.05k|        fGrammar = tempGrammar;
 3335|  6.05k|        fValidator->setGrammar(fGrammar);
 3336|  6.05k|        return true;
 3337|  6.05k|    }
 3338|  6.05k|}

_ZN11xercesc_3_217MemoryManagerImpl25getExceptionMemoryManagerEv:
   32|  1.36k|{
   33|  1.36k|    return this;
   34|  1.36k|}
_ZN11xercesc_3_217MemoryManagerImpl8allocateEm:
   37|   103M|{
   38|   103M|    void* memptr;
   39|   103M|    try {
   40|   103M|        memptr = ::operator new(size);
   41|   103M|    }
   42|   103M|    catch(...) {
   43|      0|        throw OutOfMemoryException();
   44|      0|    }
   45|   103M|    if(memptr==NULL && size!=0)
  ------------------
  |  Branch (45:8): [True: 0, False: 103M]
  |  Branch (45:24): [True: 0, False: 0]
  ------------------
   46|      0|        throw OutOfMemoryException();
   47|   103M|    return memptr;
   48|   103M|}
_ZN11xercesc_3_217MemoryManagerImpl10deallocateEPv:
   51|   147M|{
   52|   147M|    if (p)
  ------------------
  |  Branch (52:9): [True: 103M, False: 44.0M]
  ------------------
   53|   103M|        ::operator delete(p);
   54|   147M|}

_ZN11xercesc_3_217MemoryManagerImplC2Ev:
   49|      1|    {
   50|      1|    }

_ZN11xercesc_3_29ReaderMgrC2EPNS_13MemoryManagerE:
   53|  7.12k|    fCurEntity(0)
   54|  7.12k|    , fCurReader(0)
   55|  7.12k|    , fEntityHandler(0)
   56|  7.12k|    , fEntityStack(0)
   57|  7.12k|    , fNextReaderNum(1)
   58|  7.12k|    , fReaderStack(0)
   59|  7.12k|    , fThrowEOE(false)
   60|  7.12k|    , fXMLVersion(XMLReader::XMLV1_0)
   61|  7.12k|    , fStandardUriConformant(false)
   62|  7.12k|    , fMemoryManager(manager)
   63|  7.12k|{
   64|  7.12k|}
_ZN11xercesc_3_29ReaderMgrD2Ev:
   67|  7.12k|{
   68|       |    //
   69|       |    //  Clean up the reader and entity stacks. Note that we don't own the
   70|       |    //  entities, so we don't delete the current entity (and the entity stack
   71|       |    //  does not own its elements either, so deleting it will not delete the
   72|       |    //  entities it still references!)
   73|       |    //
   74|  7.12k|    delete fCurReader;
   75|  7.12k|    delete fReaderStack;
   76|  7.12k|    delete fEntityStack;
   77|  7.12k|}
_ZN11xercesc_3_29ReaderMgr11getNextCharEv:
   93|   373M|{
   94|   373M|    XMLCh chRet;
   95|   373M|    if (fCurReader->getNextChar(chRet))
  ------------------
  |  Branch (95:9): [True: 373M, False: 163k]
  ------------------
   96|   373M|        return chRet;
   97|       |
   98|       |    //
   99|       |    //  Didn't get anything back so this reader is hosed. So lets move to
  100|       |    //  the next reader on the stack. If this fails, it will be because
  101|       |    //  its the end of the original file, and we just return zero.
  102|       |    //
  103|       |    //  If its the end of an entity and fThrowEOE is set, it will throw out
  104|       |    //  of here. Otherwise, it will take us down to the next reader and
  105|       |    //  we'll have more chars.
  106|       |    //
  107|   163k|    if (!popReader())
  ------------------
  |  Branch (107:9): [True: 897, False: 162k]
  ------------------
  108|    897|        return XMLCh(0);
  109|       |
  110|       |    // Else try again and return the new character
  111|   162k|    fCurReader->getNextChar(chRet);
  112|   162k|    return chRet;
  113|   163k|}
_ZN11xercesc_3_29ReaderMgr15getUpToCharOrWSERNS_9XMLBufferEDs:
  136|  1.51k|{
  137|       |    // Reset the target buffer before we start
  138|  1.51k|    toFill.reset();
  139|       |
  140|       |    //
  141|       |    //  Ok, enter a loop where we ask the current reader to get chars until
  142|       |    //  it meets the criteria. It returns false if it came back due to eating
  143|       |    //  up all of its data. Else it returned because something matched, and
  144|       |    //  we are done.
  145|       |    //
  146|  1.51k|    while (!fCurReader->getUpToCharOrWS(toFill, toCheck))
  ------------------
  |  Branch (146:12): [True: 87, False: 1.42k]
  ------------------
  147|     87|    {
  148|       |        // We ate that one up, lets try to pop another. If not, break out
  149|     87|        if (!popReader())
  ------------------
  |  Branch (149:13): [True: 87, False: 0]
  ------------------
  150|     87|            break;
  151|     87|    }
  152|  1.51k|}
_ZN11xercesc_3_29ReaderMgr12peekNextCharEv:
  156|  69.9M|{
  157|  69.9M|    XMLCh chRet;
  158|  69.9M|    if (fCurReader->peekNextChar(chRet))
  ------------------
  |  Branch (158:9): [True: 69.7M, False: 200k]
  ------------------
  159|  69.7M|        return chRet;
  160|       |
  161|       |    //
  162|       |    //  Didn't get anything back so this reader is hosed. So lets move to
  163|       |    //  the next reader on the stack. If this fails, it will be because
  164|       |    //  its the end of the original file, and we just return zero.
  165|       |    //
  166|   200k|    if (!popReader())
  ------------------
  |  Branch (166:9): [True: 3.01k, False: 197k]
  ------------------
  167|  3.01k|        return XMLCh(0);
  168|       |
  169|       |    // Else peek again and return the character
  170|   197k|    fCurReader->peekNextChar(chRet);
  171|   197k|    return chRet;
  172|   200k|}
_ZN11xercesc_3_29ReaderMgr11skippedCharEDs:
  176|  29.6M|{
  177|  29.6M|    while (true)
  ------------------
  |  Branch (177:12): [Folded - Ignored]
  ------------------
  178|  29.6M|    {
  179|       |        // If we get it, then just return true now
  180|  29.6M|        if (fCurReader->skippedChar(toCheck))
  ------------------
  |  Branch (180:13): [True: 17.8M, False: 11.8M]
  ------------------
  181|  17.8M|            return true;
  182|       |
  183|       |        //
  184|       |        //  Check to see if we hit end of input on this reader. If so, then
  185|       |        //  lets pop and try again. Else, we failed. If we cannot pop another
  186|       |        //  then we failed.
  187|       |        //
  188|  11.8M|        if (!fCurReader->getNoMoreFlag())
  ------------------
  |  Branch (188:13): [True: 11.8M, False: 713]
  ------------------
  189|  11.8M|            break;
  190|       |
  191|    713|        if (!popReader())
  ------------------
  |  Branch (191:13): [True: 709, False: 4]
  ------------------
  192|    709|            break;
  193|    713|    }
  194|  11.8M|    return false;
  195|  29.6M|}
_ZN11xercesc_3_29ReaderMgr12skippedSpaceEv:
  199|  6.85M|{
  200|  6.85M|    while (true)
  ------------------
  |  Branch (200:12): [Folded - Ignored]
  ------------------
  201|  6.85M|    {
  202|       |        // If we get it, then just return true now
  203|  6.85M|        if (fCurReader->skippedSpace())
  ------------------
  |  Branch (203:13): [True: 158k, False: 6.69M]
  ------------------
  204|   158k|            return true;
  205|       |
  206|       |        //
  207|       |        //  Check to see if we hit end of input on this reader. If so, then
  208|       |        //  lets pop and try again. Else, we failed. If we cannot pop another
  209|       |        //  then we failed.
  210|       |        //
  211|  6.69M|        if (!fCurReader->getNoMoreFlag())
  ------------------
  |  Branch (211:13): [True: 6.69M, False: 356]
  ------------------
  212|  6.69M|            break;
  213|       |
  214|    356|        if (!popReader())
  ------------------
  |  Branch (214:13): [True: 348, False: 8]
  ------------------
  215|    348|            break;
  216|    356|    }
  217|  6.69M|    return false;
  218|  6.85M|}
_ZN11xercesc_3_29ReaderMgr11skipIfQuoteERDs:
  222|  5.49M|{
  223|  5.49M|    while (true)
  ------------------
  |  Branch (223:12): [Folded - Ignored]
  ------------------
  224|  5.49M|    {
  225|       |        // If we get it, then just return true now
  226|  5.49M|        if (fCurReader->skipIfQuote(chGotten))
  ------------------
  |  Branch (226:13): [True: 5.49M, False: 57]
  ------------------
  227|  5.49M|            return true;
  228|       |
  229|       |        //
  230|       |        //  Check to see if we hit end of input on this reader. If so, then
  231|       |        //  lets pop and try again. Else, we failed. If we cannot pop another
  232|       |        //  then we failed.
  233|       |        //
  234|     57|        if (!fCurReader->getNoMoreFlag())
  ------------------
  |  Branch (234:13): [True: 29, False: 28]
  ------------------
  235|     29|            break;
  236|       |
  237|     28|        if (!popReader())
  ------------------
  |  Branch (237:13): [True: 28, False: 0]
  ------------------
  238|     28|            break;
  239|     28|    }
  240|     57|    return false;
  241|  5.49M|}
_ZN11xercesc_3_29ReaderMgr14skipPastSpacesERbb:
  244|  24.8k|{
  245|       |    // we rely on the fact that fCurReader->skipSpaces will NOT reset the flag to false, but only
  246|       |    // set it to true if a space is found
  247|  24.8k|    skippedSomething = false;
  248|       |    //
  249|       |    //  Skip all the spaces in the current reader. If it returned because
  250|       |    //  it hit a non-space, break out. Else we have to pop another entity
  251|       |    //  and keep going.
  252|       |    //
  253|  24.8k|    while (!fCurReader->skipSpaces(skippedSomething, inDecl))
  ------------------
  |  Branch (253:12): [True: 103, False: 24.7k]
  ------------------
  254|    103|    {
  255|       |        // Try to pop another entity. If we can't then we are done
  256|    103|        if (!popReader())
  ------------------
  |  Branch (256:13): [True: 102, False: 1]
  ------------------
  257|    102|            break;
  258|    103|    }
  259|  24.8k|}
_ZN11xercesc_3_29ReaderMgr14skipPastSpacesEv:
  262|  33.7M|{
  263|       |    // we are not using it, so we don't care to initialize it
  264|  33.7M|    bool tmpFlag;
  265|       |    //
  266|       |    //  Skip all the spaces in the current reader. If it returned because
  267|       |    //  it hit a non-space, break out. Else we have to pop another entity
  268|       |    //  and keep going.
  269|       |    //
  270|  33.7M|    while (!fCurReader->skipSpaces(tmpFlag, false))
  ------------------
  |  Branch (270:12): [True: 3.94k, False: 33.7M]
  ------------------
  271|  3.94k|    {
  272|       |        // Try to pop another entity. If we can't then we are done
  273|  3.94k|        if (!popReader())
  ------------------
  |  Branch (273:13): [True: 311, False: 3.63k]
  ------------------
  274|    311|            break;
  275|  3.94k|    }
  276|  33.7M|}
_ZNK11xercesc_3_29ReaderMgr5atEOFEv:
  336|  5.42k|{
  337|  5.42k|    return fReaderStack->empty() && fCurReader->getNoMoreFlag();
  ------------------
  |  Branch (337:12): [True: 5.42k, False: 0]
  |  Branch (337:37): [True: 0, False: 5.42k]
  ------------------
  338|  5.42k|}
_ZN11xercesc_3_29ReaderMgr12createReaderERKNS_11InputSourceEbNS_9XMLReader7RefFromENS4_5TypesENS4_7SourcesEbm:
  374|  7.78k|{
  375|       |    //
  376|       |    //  Ask the input source to create us an input stream. The particular
  377|       |    //  type of input source will know what kind to create.
  378|       |    //
  379|  7.78k|    BinInputStream* newStream = src.makeStream();
  380|  7.78k|    if (!newStream)
  ------------------
  |  Branch (380:9): [True: 261, False: 7.52k]
  ------------------
  381|    261|        return 0;
  382|       |
  383|  7.52k|    Janitor<BinInputStream>   streamJanitor(newStream);
  384|       |
  385|       |    //
  386|       |    //  Create a new reader and return it. If the source has an encoding that
  387|       |    //  it wants to force, then we call the constructor that does that.
  388|       |    //  Otherwise, we just call the one that provides the provisional encoding
  389|       |    //  to be possibly updated later by the encoding="" setting.
  390|       |    //
  391|  7.52k|    XMLReader* retVal = 0;
  392|       |
  393|       |    // XMLReader ctor invokes refreshRawBuffer() which calls
  394|       |    // newStream->readBytes().
  395|       |    // This readBytes() may throw exception, which neither
  396|       |    // refresRawBuffer(), nor XMLReader ctor catches.
  397|       |    // We need to handle this exception to avoid leak on newStream.
  398|       |
  399|  7.52k|    try {
  400|  7.52k|		const XMLCh* encoding = src.getEncoding();
  401|  7.52k|		if(encoding == 0)
  ------------------
  |  Branch (401:6): [True: 7.14k, False: 385]
  ------------------
  402|  7.14k|			encoding = newStream->getEncoding();
  403|  7.52k|        if (encoding)
  ------------------
  |  Branch (403:13): [True: 0, False: 7.52k]
  ------------------
  404|      0|        {
  405|      0|            retVal = new (fMemoryManager) XMLReader
  406|      0|                (
  407|      0|                src.getPublicId()
  408|      0|                , src.getSystemId()
  409|      0|                , newStream
  410|      0|                , encoding
  411|      0|                , refFrom
  412|      0|                , type
  413|      0|                , source
  414|      0|                , false
  415|      0|                , calcSrcOfs
  416|      0|                , lowWaterMark
  417|      0|                , fXMLVersion
  418|      0|                , fMemoryManager
  419|      0|                );
  420|      0|        }
  421|  7.52k|        else
  422|  7.52k|        {
  423|  7.52k|            retVal = new (fMemoryManager) XMLReader
  424|  7.52k|                (
  425|  7.52k|                src.getPublicId()
  426|  7.52k|                , src.getSystemId()
  427|  7.52k|                , newStream
  428|  7.52k|                , refFrom
  429|  7.52k|                , type
  430|  7.52k|                , source
  431|  7.52k|                , false
  432|  7.52k|                , calcSrcOfs
  433|  7.52k|                , lowWaterMark
  434|  7.52k|                , fXMLVersion
  435|  7.52k|                , fMemoryManager
  436|  7.52k|                );
  437|  7.52k|        }
  438|  7.52k|    }
  439|  7.52k|    catch(const OutOfMemoryException&)
  440|  7.52k|    {
  441|      0|        streamJanitor.release();
  442|       |
  443|      0|        throw;
  444|      0|    }
  445|       |
  446|  7.10k|    assert(retVal);
  447|       |
  448|  7.10k|    streamJanitor.release();
  449|       |
  450|       |    // Set the next available reader number on this reader
  451|  7.10k|    retVal->setReaderNum(fNextReaderNum++);
  452|  7.10k|    return retVal;
  453|  7.10k|}
_ZN11xercesc_3_29ReaderMgr12createReaderEPKDsS2_bNS_9XMLReader7RefFromENS3_5TypesENS3_7SourcesERPNS_11InputSourceEbmb:
  466|    624|{
  467|       |    //Normalize sysId
  468|    624|    XMLBuffer normalizedSysId(1023, fMemoryManager);
  469|    624|    if(sysId)
  ------------------
  |  Branch (469:8): [True: 624, False: 0]
  ------------------
  470|    624|        XMLString::removeChar(sysId, 0xFFFF, normalizedSysId);
  471|    624|    const XMLCh* normalizedURI = normalizedSysId.getRawBuffer();
  472|       |
  473|       |    // Create a buffer for expanding the system id
  474|    624|    XMLBuffer expSysId(1023, fMemoryManager);
  475|       |
  476|       |    //
  477|       |    //  Allow the entity handler to expand the system id if they choose
  478|       |    //  to do so.
  479|       |    //
  480|    624|    if (fEntityHandler)
  ------------------
  |  Branch (480:9): [True: 0, False: 624]
  ------------------
  481|      0|    {
  482|      0|        if (!fEntityHandler->expandSystemId(normalizedURI, expSysId))
  ------------------
  |  Branch (482:13): [True: 0, False: 0]
  ------------------
  483|      0|            expSysId.set(normalizedURI);
  484|      0|    }
  485|    624|     else
  486|    624|    {
  487|    624|        expSysId.set(normalizedURI);
  488|    624|    }
  489|       |
  490|       |    // Call the entity resolver interface to get an input source
  491|    624|    srcToFill = 0;
  492|    624|    if (fEntityHandler)
  ------------------
  |  Branch (492:9): [True: 0, False: 624]
  ------------------
  493|      0|    {
  494|      0|        LastExtEntityInfo lastInfo;
  495|      0|        getLastExtEntityInfo(lastInfo);
  496|      0|        XMLResourceIdentifier resourceIdentifier(XMLResourceIdentifier::ExternalEntity,
  497|      0|                            expSysId.getRawBuffer(), XMLUni::fgZeroLenString, pubId, lastInfo.systemId,
  498|      0|                            this);
  499|      0|        srcToFill = fEntityHandler->resolveEntity(&resourceIdentifier);
  500|      0|    }
  501|       |
  502|       |    //
  503|       |    //  If they didn't create a source via the entity resolver, then we
  504|       |    //  have to create one on our own.
  505|       |    //
  506|    624|    if (!srcToFill)
  ------------------
  |  Branch (506:9): [True: 624, False: 0]
  ------------------
  507|    624|    {
  508|    624|        if (disableDefaultEntityResolution)
  ------------------
  |  Branch (508:13): [True: 0, False: 624]
  ------------------
  509|      0|            return 0;
  510|       |
  511|    624|        LastExtEntityInfo lastInfo;
  512|    624|        getLastExtEntityInfo(lastInfo);
  513|       |
  514|       |// Keep this #if 0 block as it was exposing a threading problem on AIX.
  515|       |// Got rid of the problem by changing XMLURL to not throw malformedurl
  516|       |// exceptions.
  517|       |#if 0
  518|       |        try
  519|       |        {
  520|       |            XMLURL urlTmp(lastInfo.systemId, expSysId.getRawBuffer(), fMemoryManager);
  521|       |            if (urlTmp.isRelative())
  522|       |            {
  523|       |                ThrowXMLwithMemMgr
  524|       |                (
  525|       |                    MalformedURLException
  526|       |                    , XMLExcepts::URL_NoProtocolPresent
  527|       |                    , fMemoryManager
  528|       |                );
  529|       |            }
  530|       |            else {
  531|       |                if (fStandardUriConformant && urlTmp.hasInvalidChar())
  532|       |                    ThrowXMLwithMemMgr(MalformedURLException, XMLExcepts::URL_MalformedURL, fMemoryManager);
  533|       |                srcToFill = new (fMemoryManager) URLInputSource(urlTmp, fMemoryManager);
  534|       |            }
  535|       |        }
  536|       |
  537|       |        catch(const MalformedURLException& e)
  538|       |        {
  539|       |            // Its not a URL, so lets assume its a local file name if non-standard uri is allowed
  540|       |            if (!fStandardUriConformant)
  541|       |                srcToFill = new (fMemoryManager) LocalFileInputSource
  542|       |                (
  543|       |                    lastInfo.systemId
  544|       |                    , expSysId.getRawBuffer()
  545|       |                    , fMemoryManager
  546|       |                );
  547|       |            else
  548|       |                throw e;
  549|       |        }
  550|       |#else
  551|    624|        XMLURL urlTmp(fMemoryManager);
  552|    624|        if ((!urlTmp.setURL(lastInfo.systemId, expSysId.getRawBuffer(), urlTmp)) ||
  ------------------
  |  Branch (552:13): [True: 299, False: 325]
  ------------------
  553|    624|            (urlTmp.isRelative()))
  ------------------
  |  Branch (553:13): [True: 0, False: 325]
  ------------------
  554|    277|        {
  555|    277|            if (!fStandardUriConformant)
  ------------------
  |  Branch (555:17): [True: 277, False: 0]
  ------------------
  556|    277|            {
  557|    277|                XMLBuffer resolvedSysId(1023, fMemoryManager);
  558|    277|                XMLUri::normalizeURI(expSysId.getRawBuffer(), resolvedSysId);
  559|       |
  560|    277|                srcToFill = new (fMemoryManager) LocalFileInputSource
  561|    277|                (
  562|    277|                    lastInfo.systemId
  563|    277|                    , resolvedSysId.getRawBuffer()
  564|    277|                    , fMemoryManager
  565|    277|                );
  566|    277|            }
  567|      0|            else
  568|      0|                ThrowXMLwithMemMgr(MalformedURLException, XMLExcepts::URL_MalformedURL, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  569|    277|        }
  570|    347|        else
  571|    347|        {
  572|    347|            if (fStandardUriConformant && urlTmp.hasInvalidChar())
  ------------------
  |  Branch (572:17): [True: 0, False: 347]
  |  Branch (572:43): [True: 0, False: 0]
  ------------------
  573|      0|                ThrowXMLwithMemMgr(MalformedURLException, XMLExcepts::URL_MalformedURL, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  574|    347|            srcToFill = new (fMemoryManager) URLInputSource(urlTmp, fMemoryManager);
  575|    347|        }
  576|    624|#endif
  577|    624|    }
  578|       |
  579|       |    // Put a janitor on the input source
  580|    624|    Janitor<InputSource> janSrc(srcToFill);
  581|       |
  582|       |    //
  583|       |    //  Now call the other version with the input source that we have, and
  584|       |    //  return the resulting reader.
  585|       |    //
  586|    624|    XMLReader* retVal = createReader
  587|    624|    (
  588|    624|        *srcToFill
  589|    624|        , xmlDecl
  590|    624|        , refFrom
  591|    624|        , type
  592|    624|        , source
  593|    624|        , calcSrcOfs
  594|    624|        , lowWaterMark
  595|    624|    );
  596|       |
  597|       |    // Either way, we can release the input source now
  598|    624|    janSrc.orphan();
  599|       |
  600|       |    // If it failed for any reason, then return zero.
  601|    624|    if (!retVal)
  ------------------
  |  Branch (601:9): [True: 229, False: 395]
  ------------------
  602|    229|        return 0;
  603|       |
  604|       |    // Give this reader the next available reader number and return it
  605|    395|    retVal->setReaderNum(fNextReaderNum++);
  606|    395|    return retVal;
  607|    624|}
_ZN11xercesc_3_29ReaderMgr12createReaderEPKDsS2_S2_bNS_9XMLReader7RefFromENS3_5TypesENS3_7SourcesERPNS_11InputSourceEbmb:
  621|     61|{
  622|       |    //Normalize sysId
  623|     61|    XMLBuffer normalizedSysId(1023, fMemoryManager);
  624|     61|    XMLString::removeChar(sysId, 0xFFFF, normalizedSysId);
  625|     61|    const XMLCh* normalizedURI = normalizedSysId.getRawBuffer();
  626|       |
  627|       |    // Create a buffer for expanding the system id
  628|     61|    XMLBuffer expSysId(1023, fMemoryManager);
  629|       |
  630|       |    //
  631|       |    //  Allow the entity handler to expand the system id if they choose
  632|       |    //  to do so.
  633|       |    //
  634|     61|    if (fEntityHandler)
  ------------------
  |  Branch (634:9): [True: 0, False: 61]
  ------------------
  635|      0|    {
  636|      0|        if (!fEntityHandler->expandSystemId(normalizedURI, expSysId))
  ------------------
  |  Branch (636:13): [True: 0, False: 0]
  ------------------
  637|      0|            expSysId.set(normalizedURI);
  638|      0|    }
  639|     61|     else
  640|     61|    {
  641|     61|        expSysId.set(normalizedURI);
  642|     61|    }
  643|       |
  644|       |    // Call the entity resolver interface to get an input source
  645|     61|    srcToFill = 0;
  646|     61|    if (fEntityHandler)
  ------------------
  |  Branch (646:9): [True: 0, False: 61]
  ------------------
  647|      0|    {
  648|      0|        XMLResourceIdentifier resourceIdentifier(XMLResourceIdentifier::ExternalEntity,
  649|      0|                            expSysId.getRawBuffer(), XMLUni::fgZeroLenString, pubId, baseURI,
  650|      0|                            this);
  651|      0|        srcToFill = fEntityHandler->resolveEntity(&resourceIdentifier);
  652|      0|    }
  653|       |
  654|       |    //
  655|       |    //  If they didn't create a source via the entity resolver, then we
  656|       |    //  have to create one on our own.
  657|       |    //
  658|     61|    if (!srcToFill)
  ------------------
  |  Branch (658:9): [True: 61, False: 0]
  ------------------
  659|     61|    {
  660|     61|        if (disableDefaultEntityResolution)
  ------------------
  |  Branch (660:13): [True: 0, False: 61]
  ------------------
  661|      0|            return 0;
  662|       |
  663|     61|        LastExtEntityInfo lastInfo;
  664|       |
  665|     61|        const XMLCh* baseuri=baseURI;
  666|     61|        if(!baseuri || !*baseuri)
  ------------------
  |  Branch (666:12): [True: 0, False: 61]
  |  Branch (666:24): [True: 0, False: 61]
  ------------------
  667|      0|        {
  668|      0|            getLastExtEntityInfo(lastInfo);
  669|      0|            baseuri = lastInfo.systemId;
  670|      0|        }
  671|       |
  672|     61|        XMLURL urlTmp(fMemoryManager);
  673|     61|        if ((!urlTmp.setURL(baseuri, expSysId.getRawBuffer(), urlTmp)) ||
  ------------------
  |  Branch (673:13): [True: 41, False: 20]
  ------------------
  674|     61|            (urlTmp.isRelative()))
  ------------------
  |  Branch (674:13): [True: 0, False: 20]
  ------------------
  675|     41|        {
  676|     41|            if (!fStandardUriConformant)
  ------------------
  |  Branch (676:17): [True: 41, False: 0]
  ------------------
  677|     41|            {
  678|     41|                XMLBuffer resolvedSysId(1023, fMemoryManager);
  679|     41|                XMLUri::normalizeURI(expSysId.getRawBuffer(), resolvedSysId);
  680|       |
  681|     41|                srcToFill = new (fMemoryManager) LocalFileInputSource
  682|     41|                (
  683|     41|                    baseuri
  684|     41|                    , resolvedSysId.getRawBuffer()
  685|     41|                    , fMemoryManager
  686|     41|                );
  687|     41|            }
  688|      0|            else
  689|      0|                ThrowXMLwithMemMgr(MalformedURLException, XMLExcepts::URL_MalformedURL, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  690|     41|        }
  691|     20|        else
  692|     20|        {
  693|     20|            if (fStandardUriConformant && urlTmp.hasInvalidChar())
  ------------------
  |  Branch (693:17): [True: 0, False: 20]
  |  Branch (693:43): [True: 0, False: 0]
  ------------------
  694|      0|                ThrowXMLwithMemMgr(MalformedURLException, XMLExcepts::URL_MalformedURL, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  695|     20|            srcToFill = new (fMemoryManager) URLInputSource(urlTmp, fMemoryManager);
  696|     20|        }
  697|     61|    }
  698|       |
  699|       |    // Put a janitor on the input source
  700|     61|    Janitor<InputSource> janSrc(srcToFill);
  701|       |
  702|       |    //
  703|       |    //  Now call the other version with the input source that we have, and
  704|       |    //  return the resulting reader.
  705|       |    //
  706|     61|    XMLReader* retVal = createReader
  707|     61|    (
  708|     61|        *srcToFill
  709|     61|        , xmlDecl
  710|     61|        , refFrom
  711|     61|        , type
  712|     61|        , source
  713|     61|        , calcSrcOfs
  714|     61|        , lowWaterMark
  715|     61|    );
  716|       |
  717|       |    // Either way, we can release the input source now
  718|     61|    janSrc.orphan();
  719|       |
  720|       |    // If it failed for any reason, then return zero.
  721|     61|    if (!retVal)
  ------------------
  |  Branch (721:9): [True: 32, False: 29]
  ------------------
  722|     32|        return 0;
  723|       |
  724|       |    // Give this reader the next available reader number and return it
  725|     29|    retVal->setReaderNum(fNextReaderNum++);
  726|     29|    return retVal;
  727|     61|}
_ZN11xercesc_3_29ReaderMgr18createIntEntReaderEPKDsNS_9XMLReader7RefFromENS3_5TypesES2_mbbm:
  739|   365k|{
  740|       |    //
  741|       |    //  This one is easy, we just create an input stream for the data and
  742|       |    //  provide a few extra goodies.
  743|       |    //
  744|       |    //  NOTE: We use a special encoding string that will be recognized
  745|       |    //  as a 'do nothing' transcoder for the already internalized XMLCh
  746|       |    //  data that makes up an internal entity.
  747|       |    //
  748|   365k|    BinMemInputStream* newStream = new (fMemoryManager) BinMemInputStream
  749|   365k|                                   (
  750|   365k|                                     (const XMLByte*)dataBuf
  751|   365k|                                     , dataLen * sizeof(XMLCh)
  752|   365k|                                     , copyBuf ? BinMemInputStream::BufOpt_Copy
  ------------------
  |  Branch (752:40): [True: 0, False: 365k]
  ------------------
  753|   365k|                                               : BinMemInputStream::BufOpt_Reference
  754|   365k|                                     , fMemoryManager
  755|   365k|                                   );
  756|   365k|    if (!newStream)
  ------------------
  |  Branch (756:9): [True: 0, False: 365k]
  ------------------
  757|      0|        return 0;
  758|       |
  759|   365k|    XMLReader* retVal = new (fMemoryManager) XMLReader
  760|   365k|    (
  761|   365k|        sysId
  762|   365k|        , 0
  763|   365k|        , newStream
  764|   365k|        , XMLRecognizer::XERCES_XMLCH
  765|   365k|        , refFrom
  766|   365k|        , type
  767|   365k|        , XMLReader::Source_Internal
  768|   365k|        , false
  769|   365k|        , calcSrcOfs
  770|   365k|        , lowWaterMark
  771|   365k|        , fXMLVersion
  772|   365k|        , fMemoryManager
  773|   365k|    );
  774|       |
  775|       |    // If it failed for any reason, then return zero.
  776|   365k|    if (!retVal) {
  ------------------
  |  Branch (776:9): [True: 0, False: 365k]
  ------------------
  777|      0|        delete newStream;
  778|      0|        return 0;
  779|      0|    }
  780|       |
  781|       |    // Set the reader number to the next available number
  782|   365k|    retVal->setReaderNum(fNextReaderNum++);
  783|   365k|    return retVal;
  784|   365k|}
_ZNK11xercesc_3_29ReaderMgr21getCurrentEncodingStrEv:
  788|    674|{
  789|    674|    const XMLEntityDecl*    theEntity;
  790|    674|    const XMLReader*        theReader = getLastExtEntity(theEntity);
  791|       |
  792|    674|    return theReader->getEncodingStr();
  793|    674|}
_ZNK11xercesc_3_29ReaderMgr14getReaderDepthEv:
  809|  3.09k|{
  810|       |    // If the stack doesn't exist, its obviously zero
  811|  3.09k|    if (!fEntityStack)
  ------------------
  |  Branch (811:9): [True: 0, False: 3.09k]
  ------------------
  812|      0|        return 0;
  813|       |
  814|       |    //
  815|       |    //  The return is the stack size, plus one if there is a current
  816|       |    //  reader. So if there is no current reader and none on the stack,
  817|       |    //  its zero, else its some non-zero value.
  818|       |    //
  819|  3.09k|    XMLSize_t retVal = fEntityStack->size();
  820|  3.09k|    if (fCurReader)
  ------------------
  |  Branch (820:9): [True: 3.09k, False: 0]
  ------------------
  821|  3.09k|        retVal++;
  822|  3.09k|    return retVal;
  823|  3.09k|}
_ZNK11xercesc_3_29ReaderMgr20getLastExtEntityInfoERNS0_17LastExtEntityInfoE:
  826|  5.50k|{
  827|       |    //
  828|       |    //  If the reader stack never got created or we've not managed to open any
  829|       |    //  main entity yet, then we can't give this information.
  830|       |    //
  831|  5.50k|    if (!fReaderStack || !fCurReader)
  ------------------
  |  Branch (831:9): [True: 0, False: 5.50k]
  |  Branch (831:26): [True: 0, False: 5.50k]
  ------------------
  832|      0|    {
  833|      0|        lastInfo.systemId = XMLUni::fgZeroLenString;
  834|      0|        lastInfo.publicId = XMLUni::fgZeroLenString;
  835|      0|        lastInfo.lineNumber = 0;
  836|      0|        lastInfo.colNumber = 0;
  837|      0|        return;
  838|      0|    }
  839|       |
  840|       |    // We have at least one entity so get the data
  841|  5.50k|    const XMLEntityDecl*    theEntity;
  842|  5.50k|    const XMLReader*        theReader = getLastExtEntity(theEntity);
  843|       |
  844|       |    // Fill in the info structure with the reader we found
  845|  5.50k|    lastInfo.systemId = theReader->getSystemId();
  846|  5.50k|    lastInfo.publicId = theReader->getPublicId();
  847|  5.50k|    lastInfo.lineNumber = theReader->getLineNumber();
  848|  5.50k|    lastInfo.colNumber = theReader->getColumnNumber();
  849|  5.50k|}
_ZN11xercesc_3_29ReaderMgr10pushReaderEPNS_9XMLReaderEPNS_13XMLEntityDeclE:
  873|   372k|{
  874|       |    //
  875|       |    //  First, if an entity was passed, we have to confirm that this entity
  876|       |    //  is not already on the entity stack. If so, then this is a recursive
  877|       |    //  entity expansion, so we issue an error and refuse to put the reader
  878|       |    //  on the stack.
  879|       |    //
  880|       |    //  If there is no entity passed, then its not an entity being pushed, so
  881|       |    //  nothing to do. If there is no entity stack yet, then of coures it
  882|       |    //  cannot already be there.
  883|       |    //
  884|   372k|    if (entity && fEntityStack)
  ------------------
  |  Branch (884:9): [True: 365k, False: 7.10k]
  |  Branch (884:19): [True: 365k, False: 0]
  ------------------
  885|   365k|    {
  886|   365k|        const XMLSize_t count = fEntityStack->size();
  887|   365k|        const XMLCh* const theName = entity->getName();
  888|   687k|        for (XMLSize_t index = 0; index < count; index++)
  ------------------
  |  Branch (888:35): [True: 322k, False: 365k]
  ------------------
  889|   322k|        {
  890|   322k|            const XMLEntityDecl* curDecl = fEntityStack->elementAt(index);
  891|   322k|            if (curDecl)
  ------------------
  |  Branch (891:17): [True: 1.50k, False: 321k]
  ------------------
  892|  1.50k|            {
  893|  1.50k|                if (XMLString::equals(theName, curDecl->getName()))
  ------------------
  |  Branch (893:21): [True: 19, False: 1.48k]
  ------------------
  894|     19|                {
  895|       |                    // Oops, already there so delete reader and return
  896|     19|                    delete reader;
  897|     19|                    return false;
  898|     19|                }
  899|  1.50k|            }
  900|   322k|        }
  901|   365k|    }
  902|       |
  903|       |    //
  904|       |    //  Fault in the reader stack. Give it an initial capacity of 16, and
  905|       |    //  tell it it does own its elements.
  906|       |    //
  907|   372k|    if (!fReaderStack)
  ------------------
  |  Branch (907:9): [True: 7.10k, False: 365k]
  ------------------
  908|  7.10k|        fReaderStack = new (fMemoryManager) RefStackOf<XMLReader>(16, true, fMemoryManager);
  909|       |
  910|       |    // And the entity stack, which does not own its elements
  911|   372k|    if (!fEntityStack)
  ------------------
  |  Branch (911:9): [True: 7.10k, False: 365k]
  ------------------
  912|  7.10k|        fEntityStack = new (fMemoryManager) RefStackOf<XMLEntityDecl>(16, false, fMemoryManager);
  913|       |
  914|       |    //
  915|       |    //  Push the current reader and entity onto their respective stacks.
  916|       |    //  Note that the the current entity can be null if the current reader
  917|       |    //  is not for an entity.
  918|       |    //
  919|   372k|    if (fCurReader)
  ------------------
  |  Branch (919:9): [True: 365k, False: 7.10k]
  ------------------
  920|   365k|    {
  921|   365k|        fReaderStack->push(fCurReader);
  922|   365k|        fEntityStack->push(fCurEntity);
  923|   365k|    }
  924|       |
  925|       |    //
  926|       |    //  Make the passed reader and entity the current top of stack. The
  927|       |    //  passed entity can (and often is) null.
  928|       |    //
  929|   372k|    fCurReader = reader;
  930|   372k|    fCurEntity = entity;
  931|       |
  932|   372k|    return true;
  933|   372k|}
_ZN11xercesc_3_29ReaderMgr5resetEv:
  937|  7.12k|{
  938|       |    // Reset all of the flags
  939|  7.12k|    fThrowEOE = false;
  940|       |
  941|       |    // Delete the current reader and flush the reader stack
  942|  7.12k|    delete fCurReader;
  943|  7.12k|    fCurReader = 0;
  944|  7.12k|    if (fReaderStack)
  ------------------
  |  Branch (944:9): [True: 7.10k, False: 18]
  ------------------
  945|  7.10k|        fReaderStack->removeAllElements();
  946|       |
  947|       |    //
  948|       |    //  And do the same for the entity stack, but don't delete the current
  949|       |    //  entity (if any) since we don't own them.
  950|       |    //
  951|  7.12k|    fCurEntity = 0;
  952|  7.12k|    if (fEntityStack)
  ------------------
  |  Branch (952:9): [True: 7.10k, False: 18]
  ------------------
  953|  7.10k|        fEntityStack->removeAllElements();
  954|  7.12k|}
_ZNK11xercesc_3_29ReaderMgr16getLastExtEntityERPKNS_13XMLEntityDeclE:
 1003|  6.17k|{
 1004|       |    //
 1005|       |    //  Scan down the reader stack until we find a reader for an entity that
 1006|       |    //  is external. First check that there is anything in the stack at all,
 1007|       |    //  in which case the current reader is the main file and that's the one
 1008|       |    //  that we want.
 1009|       |    //
 1010|  6.17k|    const XMLReader* theReader = fCurReader;
 1011|       |
 1012|       |    //
 1013|       |    //  If there is a current entity and it is not an external entity, then
 1014|       |    //  search the stack; else, keep the reader that we've got since its
 1015|       |    //  either an external entity reader or the main file reader.
 1016|       |    //
 1017|  6.17k|    const XMLEntityDecl* curEntity = fCurEntity;
 1018|  6.17k|    if (curEntity && !curEntity->isExternal())
  ------------------
  |  Branch (1018:9): [True: 583, False: 5.59k]
  |  Branch (1018:22): [True: 583, False: 0]
  ------------------
 1019|    583|    {
 1020|    583|        XMLSize_t index = fReaderStack->size();
 1021|    583|        if (index)
  ------------------
  |  Branch (1021:13): [True: 583, False: 0]
  ------------------
 1022|    583|        {
 1023|    583|            while (true)
  ------------------
  |  Branch (1023:20): [Folded - Ignored]
  ------------------
 1024|    583|            {
 1025|       |                // Move down to the previous element and get a pointer to it
 1026|    583|                index--;
 1027|    583|                curEntity = fEntityStack->elementAt(index);
 1028|       |
 1029|       |                //
 1030|       |                //  If its null or its an external entity, then this reader
 1031|       |                //  is what we want, so break out with that one.
 1032|       |                //
 1033|    583|                if (!curEntity)
  ------------------
  |  Branch (1033:21): [True: 583, False: 0]
  ------------------
 1034|    583|                {
 1035|    583|                    theReader = fReaderStack->elementAt(index);
 1036|    583|                    break;
 1037|    583|                }
 1038|      0|                 else if (curEntity->isExternal())
  ------------------
  |  Branch (1038:27): [True: 0, False: 0]
  ------------------
 1039|      0|                {
 1040|      0|                    theReader = fReaderStack->elementAt(index);
 1041|      0|                    break;
 1042|      0|                }
 1043|       |
 1044|       |                // We hit the end, so leave the main file reader as the one
 1045|      0|                if (!index)
  ------------------
  |  Branch (1045:21): [True: 0, False: 0]
  ------------------
 1046|      0|                    break;
 1047|      0|            }
 1048|    583|        }
 1049|    583|    }
 1050|       |
 1051|  6.17k|    itsEntity = curEntity;
 1052|  6.17k|    return theReader;
 1053|  6.17k|}
_ZN11xercesc_3_29ReaderMgr9popReaderEv:
 1057|   369k|{
 1058|       |    //
 1059|       |    //  We didn't get any more, so try to pop off a reader. If the reader
 1060|       |    //  stack is empty, then we are at the end, so return false.
 1061|       |    //
 1062|   369k|    if (fReaderStack->empty())
  ------------------
  |  Branch (1062:9): [True: 5.35k, False: 363k]
  ------------------
 1063|  5.35k|        return false;
 1064|       |
 1065|       |    //
 1066|       |    //  Remember the current entity, before we pop off a new one. We might
 1067|       |    //  need this to throw the end of entity exception at the end.
 1068|       |    //
 1069|   363k|    XMLEntityDecl* prevEntity = fCurEntity;
 1070|   363k|    const bool prevReaderThrowAtEnd = fCurReader->getThrowAtEnd();
 1071|   363k|    const XMLSize_t readerNum = fCurReader->getReaderNum();
 1072|       |
 1073|       |    //
 1074|       |    //  Delete the current reader and pop a new reader and entity off
 1075|       |    //  the stacks.
 1076|       |    //
 1077|   363k|    delete fCurReader;
 1078|   363k|    fCurReader = fReaderStack->pop();
 1079|   363k|    fCurEntity = fEntityStack->pop();
 1080|       |
 1081|       |    //
 1082|       |    //  If there was a previous entity, and either the fThrowEOE flag is set
 1083|       |    //  or reader was marked as such, then throw an end of entity.
 1084|       |    //
 1085|   363k|    if (prevEntity && (fThrowEOE || prevReaderThrowAtEnd))
  ------------------
  |  Branch (1085:9): [True: 363k, False: 0]
  |  Branch (1085:24): [True: 195k, False: 168k]
  |  Branch (1085:37): [True: 0, False: 168k]
  ------------------
 1086|   195k|        throw EndOfEntityException(prevEntity, readerNum);
 1087|       |
 1088|   169k|    while (true)
  ------------------
  |  Branch (1088:12): [Folded - Ignored]
  ------------------
 1089|   169k|    {
 1090|       |        //
 1091|       |        //  They don't want us to throw, so lets just return with a new
 1092|       |        //  reader. Here we have to do a loop because we might have multiple
 1093|       |        //  readers on these stack that are empty (i.e. the last char in them
 1094|       |        //  was the ';' at the end of the entity ref that caused the next
 1095|       |        //  entity to be pushed.
 1096|       |        //
 1097|       |        //  So we loop until we find a non-empty reader, or hit the main
 1098|       |        //  file entity. If we find one with some chars available, then break
 1099|       |        //  out and take that one.
 1100|       |        //
 1101|   169k|        if (fCurReader->charsLeftInBuffer())
  ------------------
  |  Branch (1101:13): [True: 167k, False: 1.96k]
  ------------------
 1102|   167k|            break;
 1103|       |
 1104|  1.96k|        fCurReader->refreshCharBuffer();
 1105|  1.96k|        if (fCurReader->charsLeftInBuffer())
  ------------------
  |  Branch (1105:13): [True: 458, False: 1.50k]
  ------------------
 1106|    458|            break;
 1107|       |
 1108|       |        //
 1109|       |        //  The current one is hosed. So, if the reader stack is empty we
 1110|       |        //  are dead meat and can give up now.
 1111|       |        //
 1112|  1.50k|        if (fReaderStack->empty())
  ------------------
  |  Branch (1112:13): [True: 136, False: 1.36k]
  ------------------
 1113|    136|            return false;
 1114|       |
 1115|       |        // Else pop again and try it one more time
 1116|  1.36k|        delete fCurReader;
 1117|  1.36k|        fCurReader = fReaderStack->pop();
 1118|  1.36k|        fCurEntity = fEntityStack->pop();
 1119|  1.36k|    }
 1120|   168k|    return true;
 1121|   168k|}

_ZN11xercesc_3_215ThrowEOEJanitorC2EPNS_9ReaderMgrEb:
  412|  10.0M|        fOld(mgrTarget->getThrowEOE())
  413|  10.0M|        , fMgr(mgrTarget)
  414|  10.0M|    {
  415|  10.0M|        mgrTarget->setThrowEOE(newValue);
  416|  10.0M|    }
_ZN11xercesc_3_215ThrowEOEJanitorD2Ev:
  419|  10.0M|    {
  420|  10.0M|        fMgr->setThrowEOE(fOld);
  421|  10.0M|    };
_ZNK11xercesc_3_29ReaderMgr19getCurrentReaderNumEv:
  277|  69.7M|{
  278|  69.7M|    return fCurReader->getReaderNum();
  279|  69.7M|}
_ZN11xercesc_3_29ReaderMgr16getCurrentReaderEv:
  287|   619M|{
  288|   619M|    return fCurReader;
  289|   619M|}
_ZN11xercesc_3_29ReaderMgr7getNameERNS_9XMLBufferE:
  292|  28.9M|{
  293|  28.9M|    toFill.reset();
  294|  28.9M|    return fCurReader->getName(toFill, false);
  295|  28.9M|}
_ZN11xercesc_3_29ReaderMgr12getNameTokenERNS_9XMLBufferE:
  304|  12.6k|{
  305|  12.6k|    toFill.reset();
  306|  12.6k|    return fCurReader->getName(toFill, true);
  307|  12.6k|}
_ZN11xercesc_3_29ReaderMgr16getNextCharIfNotEDsRDs:
  310|  13.6M|{
  311|  13.6M|    return fCurReader->getNextCharIfNot(chNotToGet, chGotten);
  312|  13.6M|}
_ZN11xercesc_3_29ReaderMgr21movePlainContentCharsERNS_9XMLBufferE:
  315|  13.5M|{
  316|  13.5M|    fCurReader->movePlainContentChars(dest);
  317|  13.5M|}
_ZNK11xercesc_3_29ReaderMgr11getThrowEOEEv:
  320|  10.0M|{
  321|  10.0M|    return fThrowEOE;
  322|  10.0M|}
_ZN11xercesc_3_29ReaderMgr13lookingAtCharEDs:
  330|  3.18M|{
  331|  3.18M|    return (chToCheck == peekNextChar());
  332|  3.18M|}
_ZN11xercesc_3_29ReaderMgr14lookingAtSpaceEv:
  335|  84.3k|{
  336|  84.3k|    XMLCh c = peekNextChar();
  337|  84.3k|    return fCurReader->isWhitespace(c);
  338|  84.3k|}
_ZN11xercesc_3_29ReaderMgr11setThrowEOEEb:
  341|  20.1M|{
  342|  20.1M|    fThrowEOE = newValue;
  343|  20.1M|}
_ZN11xercesc_3_29ReaderMgr13skippedStringEPKDs:
  351|  3.45M|{
  352|  3.45M|    return fCurReader->skippedString(toSkip);
  353|  3.45M|}
_ZN11xercesc_3_29ReaderMgr17skippedStringLongEPKDs:
  356|   158k|{
  357|   158k|    return fCurReader->skippedStringLong(toSkip);
  358|   158k|}
_ZN11xercesc_3_29ReaderMgr12skipPastCharEDs:
  373|    501|{
  374|    501|	XMLCh nextCh = 0;
  375|    501|    do
  376|    501|    {
  377|       |        // Get chars until we find the one to skip
  378|    501|        nextCh = getNextChar();
  379|    501|	}
  380|    501|	while((nextCh != toSkipPast) && nextCh!=0);
  ------------------
  |  Branch (380:8): [True: 501, False: 0]
  |  Branch (380:34): [True: 0, False: 501]
  ------------------
  381|    501|}
_ZN11xercesc_3_29ReaderMgr10peekStringEPKDs:
  384|   363k|{
  385|   363k|    return fCurReader->peekString(toPeek);
  386|   363k|}
_ZN11xercesc_3_29ReaderMgr13setXMLVersionENS_9XMLReader10XMLVersionE:
  394|    704|{
  395|    704|    fXMLVersion = version;
  396|    704|    fCurReader->setXMLVersion(version);
  397|    704|}

_ZN11xercesc_3_221ValidationContextImplD2Ev:
   41|  7.12k|{
   42|  7.12k|    if (fIdRefList)
  ------------------
  |  Branch (42:9): [True: 7.12k, False: 0]
  ------------------
   43|  7.12k|        delete fIdRefList;
   44|  7.12k|}
_ZN11xercesc_3_221ValidationContextImplC2EPNS_13MemoryManagerE:
   47|  7.12k|:ValidationContext(manager)
   48|  7.12k|,fIdRefList(0)
   49|  7.12k|,fEntityDeclPool(0)
   50|  7.12k|,fToCheckIdRefList(true)
   51|  7.12k|,fValidatingMemberType(0)
   52|  7.12k|,fElemStack(0)
   53|  7.12k|,fScanner(0)
   54|  7.12k|,fNamespaceScope(0)
   55|  7.12k|{
   56|  7.12k|    fIdRefList = new (fMemoryManager) RefHashTableOf<XMLRefInfo>(109, fMemoryManager);
   57|  7.12k|}
_ZNK11xercesc_3_221ValidationContextImpl12getIdRefListEv:
   64|  2.50M|{
   65|  2.50M|    return fIdRefList;
   66|  2.50M|}
_ZN11xercesc_3_221ValidationContextImpl14clearIdRefListEv:
   77|  7.12k|{
   78|  7.12k|    if (fIdRefList)
  ------------------
  |  Branch (78:9): [True: 7.12k, False: 0]
  ------------------
   79|  7.12k|        fIdRefList->removeAll();
   80|       |
   81|  7.12k|}
_ZN11xercesc_3_221ValidationContextImpl17setEntityDeclPoolEPKNS_10NameIdPoolINS_13DTDEntityDeclEEE:
  148|  7.12k|{
  149|       |    // we don't own it so we return the existing one for the owner to delete
  150|  7.12k|    const NameIdPool<DTDEntityDecl>* tempPool = fEntityDeclPool;
  151|  7.12k|    fEntityDeclPool = newEntityDeclPool;
  152|  7.12k|    return tempPool;
  153|       |
  154|  7.12k|}

_ZN11xercesc_3_221ValidationContextImpl12setElemStackEPNS_9ElemStackE:
  158|  7.12k|inline void ValidationContextImpl::setElemStack(ElemStack* elemStack) {
  159|  7.12k|    fElemStack = elemStack;
  160|  7.12k|}
_ZN11xercesc_3_221ValidationContextImpl10setScannerEPNS_10XMLScannerE:
  162|  7.12k|inline void ValidationContextImpl::setScanner(XMLScanner* scanner) {
  163|  7.12k|    fScanner = scanner;
  164|  7.12k|}

_ZN11xercesc_3_215VecAttrListImplC2Ev:
   36|  7.12k|    fAdopt(false)
   37|  7.12k|    , fCount(0)
   38|  7.12k|    , fVector(0)
   39|  7.12k|{
   40|  7.12k|}
_ZN11xercesc_3_215VecAttrListImplD2Ev:
   43|  7.12k|{
   44|       |    //
   45|       |    //  Note that some compilers can't deal with the fact that the pointer
   46|       |    //  is to a const object, so we have to cast off the const'ness here!
   47|       |    //
   48|  7.12k|    if (fAdopt)
  ------------------
  |  Branch (48:9): [True: 0, False: 7.12k]
  ------------------
   49|      0|        delete (RefVectorOf<XMLAttr>*)fVector;
   50|  7.12k|}

_ZNK11xercesc_3_29XMLReader11isAllSpacesEPKDsm:
   45|  9.60M|{
   46|  9.60M|    const XMLCh* curCh = toCheck;
   47|  9.60M|    const XMLCh* endPtr = toCheck + count;
   48|  9.74M|    while (curCh < endPtr)
  ------------------
  |  Branch (48:12): [True: 9.73M, False: 8.44k]
  ------------------
   49|  9.73M|    {
   50|  9.73M|        if (!(fgCharCharsTable[*curCh++] & gWhitespaceCharMask))
  ------------------
  |  Branch (50:13): [True: 9.59M, False: 140k]
  ------------------
   51|  9.59M|            return false;
   52|  9.73M|    }
   53|  8.44k|    return true;
   54|  9.60M|}
_ZNK11xercesc_3_29XMLReader18containsWhiteSpaceEPKDsm:
   63|  3.18k|{
   64|  3.18k|    const XMLCh* curCh = toCheck;
   65|  3.18k|    const XMLCh* endPtr = toCheck + count;
   66|  11.3k|    while (curCh < endPtr)
  ------------------
  |  Branch (66:12): [True: 9.06k, False: 2.26k]
  ------------------
   67|  9.06k|    {
   68|  9.06k|        if (fgCharCharsTable[*curCh++] & gWhitespaceCharMask)
  ------------------
  |  Branch (68:13): [True: 915, False: 8.15k]
  ------------------
   69|    915|            return true;
   70|  9.06k|    }
   71|  2.26k|    return false;
   72|  3.18k|}
_ZNK11xercesc_3_29XMLReader14isPublicIdCharEDs:
   78|  1.88M|{
   79|  1.88M|    if (fXMLVersion == XMLV1_1)
  ------------------
  |  Branch (79:9): [True: 1.79M, False: 88.1k]
  ------------------
   80|  1.79M|        return XMLChar1_1::isPublicIdChar(toCheck);
   81|  88.1k|    else
   82|  88.1k|        return XMLChar1_0::isPublicIdChar(toCheck);
   83|  1.88M|}
_ZN11xercesc_3_29XMLReaderC2EPKDsS2_PNS_14BinInputStreamENS0_7RefFromENS0_5TypesENS0_7SourcesEbbmNS0_10XMLVersionEPNS_13MemoryManagerE:
   99|  7.14k|    fCharIndex(0)
  100|  7.14k|    , fCharsAvail(0)
  101|  7.14k|    , fCurCol(1)
  102|  7.14k|    , fCurLine(1)
  103|  7.14k|    , fEncodingStr(0)
  104|  7.14k|    , fForcedEncoding(false)
  105|  7.14k|    , fNoMore(false)
  106|  7.14k|    , fPublicId(XMLString::replicate(pubId, manager))
  107|  7.14k|    , fRawBufIndex(0)
  108|  7.14k|    , fRawBytesAvail(0)
  109|  7.14k|    , fLowWaterMark (lowWaterMark)
  110|  7.14k|    , fReaderNum(0xFFFFFFFF)
  111|  7.14k|    , fRefFrom(from)
  112|  7.14k|    , fSentTrailingSpace(false)
  113|  7.14k|    , fSource(source)
  114|  7.14k|    , fSrcOfsBase(0)
  115|  7.14k|    , fSrcOfsSupported(false)
  116|  7.14k|    , fCalculateSrcOfs(calculateSrcOfs)
  117|  7.14k|    , fSystemId(XMLString::replicate(sysId, manager))
  118|  7.14k|    , fStream(streamToAdopt)
  119|  7.14k|    , fSwapped(false)
  120|  7.14k|    , fThrowAtEnd(throwAtEnd)
  121|  7.14k|    , fTranscoder(0)
  122|  7.14k|    , fType(type)
  123|  7.14k|    , fMemoryManager(manager)
  124|  7.14k|{
  125|  7.14k|    setXMLVersion(version);
  126|       |
  127|       |    // Do an initial load of raw bytes
  128|  7.14k|    refreshRawBuffer();
  129|       |
  130|       |    // Ask the transcoding service if it supports src offset info
  131|  7.14k|    fSrcOfsSupported = XMLPlatformUtils::fgTransService->supportsSrcOfs();
  132|       |
  133|       |    //
  134|       |    //  Use the recognizer class to get a basic sense of what family of
  135|       |    //  encodings this file is in. We'll start off with a reader of that
  136|       |    //  type, and update it later if needed when we read the XMLDecl line.
  137|       |    //
  138|  7.14k|    fEncoding = XMLRecognizer::basicEncodingProbe(fRawByteBuf, fRawBytesAvail);
  139|       |
  140|       |    #if defined(XERCES_DEBUG)
  141|       |    if ((fEncoding < XMLRecognizer::Encodings_Min)
  142|       |    ||  (fEncoding > XMLRecognizer::Encodings_Max))
  143|       |    {
  144|       |        ThrowXMLwithMemMgr(RuntimeException, XMLExcepts::Reader_BadAutoEncoding, fMemoryManager);
  145|       |    }
  146|       |    #endif
  147|       |
  148|  7.14k|    fEncodingStr = XMLString::replicate(XMLRecognizer::nameForEncoding(fEncoding, fMemoryManager), fMemoryManager);
  149|       |
  150|       |    // Check whether the fSwapped flag should be set or not
  151|  7.14k|    checkForSwapped();
  152|       |
  153|       |    //
  154|       |    //  This will check to see if the first line is an XMLDecl and, if
  155|       |    //  so, decode that first line manually one character at a time. This
  156|       |    //  leaves enough characters in the buffer that the high level code
  157|       |    //  can get through the Decl and call us back with the real encoding.
  158|       |    //
  159|  7.14k|    doInitDecode();
  160|       |
  161|       |    //
  162|       |    //  NOTE: We won't create a transcoder until we either get a call to
  163|       |    //  setEncoding() or we get a call to refreshCharBuffer() and no
  164|       |    //  transcoder has been set yet.
  165|       |    //
  166|  7.14k|}
_ZN11xercesc_3_29XMLReaderC2EPKDsS2_PNS_14BinInputStreamENS_13XMLRecognizer9EncodingsENS0_7RefFromENS0_5TypesENS0_7SourcesEbbmNS0_10XMLVersionEPNS_13MemoryManagerE:
  364|   365k|    fCharIndex(0)
  365|   365k|    , fCharsAvail(0)
  366|   365k|    , fCurCol(1)
  367|   365k|    , fCurLine(1)
  368|   365k|    , fEncoding(XMLRecognizer::UTF_8)
  369|   365k|    , fEncodingStr(0)
  370|   365k|    , fForcedEncoding(true)
  371|   365k|    , fNoMore(false)
  372|   365k|    , fPublicId(XMLString::replicate(pubId, manager))
  373|   365k|    , fRawBufIndex(0)
  374|   365k|    , fRawBytesAvail(0)
  375|   365k|    , fLowWaterMark (lowWaterMark)
  376|   365k|    , fReaderNum(0xFFFFFFFF)
  377|   365k|    , fRefFrom(from)
  378|   365k|    , fSentTrailingSpace(false)
  379|   365k|    , fSource(source)
  380|   365k|    , fSrcOfsBase(0)
  381|   365k|    , fSrcOfsSupported(false)
  382|   365k|    , fCalculateSrcOfs(calculateSrcOfs)
  383|   365k|    , fSystemId(XMLString::replicate(sysId, manager))
  384|   365k|    , fStream(streamToAdopt)
  385|   365k|    , fSwapped(false)
  386|   365k|    , fThrowAtEnd(throwAtEnd)
  387|   365k|    , fTranscoder(0)
  388|   365k|    , fType(type)
  389|   365k|    , fMemoryManager(manager)
  390|   365k|{
  391|   365k|    setXMLVersion(version);
  392|       |
  393|       |    // Do an initial load of raw bytes
  394|   365k|    refreshRawBuffer();
  395|       |
  396|       |    // Ask the transcoding service if it supports src offset info
  397|   365k|    fSrcOfsSupported = XMLPlatformUtils::fgTransService->supportsSrcOfs();
  398|       |
  399|       |    //
  400|       |    //  Use the passed encoding code
  401|       |    //
  402|   365k|    fEncoding = encodingEnum;
  403|   365k|    fEncodingStr = XMLString::replicate(XMLRecognizer::nameForEncoding(fEncoding, fMemoryManager), fMemoryManager);
  404|       |
  405|       |    // Check whether the fSwapped flag should be set or not
  406|   365k|    checkForSwapped();
  407|       |
  408|       |    //
  409|       |    //  Create a transcoder for the encoding. Since the encoding has been
  410|       |    //  forced, this will be the one we will use, period.
  411|       |    //
  412|   365k|    XMLTransService::Codes failReason;
  413|   365k|    fTranscoder = XMLPlatformUtils::fgTransService->makeNewTranscoderFor
  414|   365k|    (
  415|   365k|        fEncoding
  416|   365k|        , failReason
  417|   365k|        , kCharBufSize
  418|   365k|        , fMemoryManager
  419|   365k|    );
  420|       |
  421|   365k|    if (!fTranscoder)
  ------------------
  |  Branch (421:9): [True: 0, False: 365k]
  ------------------
  422|      0|    {
  423|       |        // We are about to throw which means the d-tor won't be called.
  424|       |        // Clean up some memory.
  425|       |        //
  426|      0|        fMemoryManager->deallocate(fPublicId);
  427|      0|        fMemoryManager->deallocate(fSystemId);
  428|      0|        ArrayJanitor<XMLCh> jan (fEncodingStr, fMemoryManager);
  429|       |
  430|      0|        ThrowXMLwithMemMgr1
  ------------------
  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
  431|      0|        (
  432|      0|            TranscodingException
  433|      0|            , XMLExcepts::Trans_CantCreateCvtrFor
  434|      0|            , fEncodingStr
  435|      0|            , fMemoryManager
  436|      0|        );
  437|      0|    }
  438|       |
  439|       |    //
  440|       |    //  Note that, unlike above, we do not do an initial decode of the
  441|       |    //  first line. We take the caller's word that the encoding is correct
  442|       |    //  and just assume that the first bulk decode (kicked off by the first
  443|       |    //  get of a character) will work.
  444|       |    //
  445|       |    //  So we do here the slipping in of the leading space if required.
  446|       |    //
  447|   365k|    if ((fType == Type_PE) && (fRefFrom == RefFrom_NonLiteral))
  ------------------
  |  Branch (447:9): [True: 3.78k, False: 361k]
  |  Branch (447:31): [True: 3.78k, False: 0]
  ------------------
  448|  3.78k|    {
  449|       |        // This represents no data from the source
  450|  3.78k|        fCharSizeBuf[fCharsAvail] = 0;
  451|  3.78k|        fCharOfsBuf[fCharsAvail] = 0;
  452|  3.78k|        fCharBuf[fCharsAvail++] = chSpace;
  453|  3.78k|    }
  454|   365k|}
_ZN11xercesc_3_29XMLReaderD2Ev:
  458|   372k|{
  459|   372k|    fMemoryManager->deallocate(fEncodingStr);
  460|   372k|    fMemoryManager->deallocate(fPublicId);
  461|   372k|    fMemoryManager->deallocate(fSystemId);
  462|   372k|    delete fStream;
  463|   372k|    delete fTranscoder;
  464|   372k|}
_ZN11xercesc_3_29XMLReader17refreshCharBufferEv:
  493|   836k|{
  494|       |    // If the no more flag is set, then don't bother doing anything.
  495|   836k|    if (fNoMore)
  ------------------
  |  Branch (495:9): [True: 40.2k, False: 796k]
  ------------------
  496|  40.2k|        return false;
  497|       |
  498|   796k|    XMLSize_t startInd;
  499|       |
  500|       |    // See if we have any existing chars.
  501|   796k|    const XMLSize_t spareChars = fCharsAvail - fCharIndex;
  502|       |
  503|       |    // If we are full, then don't do anything.
  504|   796k|    if (spareChars == kCharBufSize)
  ------------------
  |  Branch (504:9): [True: 0, False: 796k]
  ------------------
  505|      0|        return true;
  506|       |
  507|       |    //
  508|       |    //  If no transcoder has been created yet, then we never saw the
  509|       |    //  any encoding="" string and the encoding was not forced, so lets
  510|       |    //  create one now. We know that it won't change now.
  511|       |    //
  512|       |    //  However, note that if we autosensed EBCDIC, then we have to
  513|       |    //  consider it an error if we never got an encoding since we don't
  514|       |    //  know what variant of EBCDIC it is.
  515|       |    //
  516|   796k|    if (!fTranscoder)
  ------------------
  |  Branch (516:9): [True: 6.73k, False: 789k]
  ------------------
  517|  6.73k|    {
  518|  6.73k|        if (fEncoding == XMLRecognizer::EBCDIC)
  ------------------
  |  Branch (518:13): [True: 11, False: 6.72k]
  ------------------
  519|     11|            ThrowXMLwithMemMgr(RuntimeException, XMLExcepts::Reader_EncodingStrRequired, fMemoryManager);
  ------------------
  |  |  264|     11|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  520|       |
  521|       |        // Ask the transcoding service to make use a transcoder
  522|  6.72k|        XMLTransService::Codes failReason;
  523|  6.72k|        fTranscoder = XMLPlatformUtils::fgTransService->makeNewTranscoderFor
  524|  6.72k|        (
  525|  6.72k|            fEncodingStr
  526|  6.72k|            , failReason
  527|  6.72k|            , kCharBufSize
  528|  6.72k|            , fMemoryManager
  529|  6.72k|        );
  530|       |
  531|  6.72k|        if (!fTranscoder)
  ------------------
  |  Branch (531:13): [True: 0, False: 6.72k]
  ------------------
  532|      0|        {
  533|      0|            ThrowXMLwithMemMgr1
  ------------------
  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
  534|      0|            (
  535|      0|                TranscodingException
  536|      0|                , XMLExcepts::Trans_CantCreateCvtrFor
  537|      0|                , fEncodingStr
  538|      0|                , fMemoryManager
  539|      0|            );
  540|      0|        }
  541|  6.72k|    }
  542|       |
  543|       |    //
  544|       |    //  Add the number of source bytes eaten so far to the base src
  545|       |    //  offset member.
  546|       |    //
  547|   796k|    if (fCalculateSrcOfs) {
  ------------------
  |  Branch (547:9): [True: 767k, False: 28.7k]
  ------------------
  548|   708M|        for (startInd = 0; startInd < fCharIndex; startInd++)
  ------------------
  |  Branch (548:28): [True: 708M, False: 767k]
  ------------------
  549|   708M|            fSrcOfsBase += fCharSizeBuf[startInd];
  550|   767k|    }
  551|       |
  552|       |    //
  553|       |    //  If there are spare chars, then move then down to the bottom. We
  554|       |    //  have to move the char sizes down also.
  555|       |    //
  556|   796k|    startInd = 0;
  557|   796k|    if (spareChars)
  ------------------
  |  Branch (557:9): [True: 27.1k, False: 769k]
  ------------------
  558|  27.1k|    {
  559|  1.00M|        for (XMLSize_t index = fCharIndex; index < fCharsAvail; index++)
  ------------------
  |  Branch (559:44): [True: 979k, False: 27.1k]
  ------------------
  560|   979k|        {
  561|   979k|            fCharBuf[startInd] = fCharBuf[index];
  562|   979k|            fCharSizeBuf[startInd] = fCharSizeBuf[index];
  563|   979k|            startInd++;
  564|   979k|        }
  565|  27.1k|    }
  566|       |
  567|       |    //
  568|       |    //  And then get more chars, starting after any spare chars that were
  569|       |    //  left over from the last time.
  570|       |    //
  571|   796k|    fCharsAvail = xcodeMoreChars
  572|   796k|    (
  573|   796k|        &fCharBuf[startInd]
  574|   796k|        , &fCharSizeBuf[startInd]
  575|   796k|        , kCharBufSize - spareChars
  576|   796k|    );
  577|       |
  578|       |    // Add back in the spare chars
  579|   796k|    fCharsAvail += spareChars;
  580|       |
  581|       |    // Reset the buffer index to zero, so we start from the 0th char again
  582|   796k|    fCharIndex = 0;
  583|       |
  584|       |    //
  585|       |    //  If no chars available, then we have to check for one last thing. If
  586|       |    //  this is reader for a PE and its not being expanded inside a literal,
  587|       |    //  then unget a trailing space. We use a boolean to avoid triggering
  588|       |    //  this more than once.
  589|       |    //
  590|   796k|    if (!fCharsAvail
  ------------------
  |  Branch (590:9): [True: 372k, False: 423k]
  ------------------
  591|   796k|    &&  (fType == Type_PE)
  ------------------
  |  Branch (591:9): [True: 7.50k, False: 365k]
  ------------------
  592|   796k|    &&  (fRefFrom == RefFrom_NonLiteral)
  ------------------
  |  Branch (592:9): [True: 7.50k, False: 0]
  ------------------
  593|   796k|    &&  !fSentTrailingSpace)
  ------------------
  |  Branch (593:9): [True: 3.75k, False: 3.75k]
  ------------------
  594|  3.75k|    {
  595|  3.75k|        fCharBuf[0] = chSpace;
  596|  3.75k|        fCharsAvail = 1;
  597|  3.75k|        fSentTrailingSpace = true;
  598|  3.75k|    }
  599|       |
  600|       |    //
  601|       |    //  If we get here with no more chars, then set the fNoMore flag which
  602|       |    //  lets us optimize and know without checking that no more chars are
  603|       |    //  available.
  604|       |    //
  605|   796k|    if (!fCharsAvail)
  ------------------
  |  Branch (605:9): [True: 368k, False: 427k]
  ------------------
  606|   368k|        fNoMore = true;
  607|       |
  608|       |    //  Calculate fCharOfsBuf using the elements from fCharBufSize
  609|   796k|    if (fCalculateSrcOfs)
  ------------------
  |  Branch (609:9): [True: 767k, False: 28.7k]
  ------------------
  610|   767k|    {
  611|   767k|        unsigned int last = 0;
  612|   767k|        fCharOfsBuf[0] = 0;
  613|   708M|        for (XMLSize_t index = 1; index < fCharsAvail; ++index) {
  ------------------
  |  Branch (613:35): [True: 707M, False: 767k]
  ------------------
  614|   707M|            fCharOfsBuf[index] = last+fCharSizeBuf[index-1];
  615|   707M|            last = fCharOfsBuf[index];
  616|       |            // code was:
  617|       |            // fCharOfsBuf[index] = fCharOfsBuf[index-1]+fCharSizeBuf[index-1];
  618|       |            // but on Solaris 64 bit with sun studio 11 this didn't work as
  619|       |            // every value of fCharOfsBuf[] was 1.
  620|   707M|        }
  621|   767k|    }
  622|       |
  623|   796k|    return (fCharsAvail != 0);
  624|   796k|}
_ZN11xercesc_3_29XMLReader7getNameERNS_9XMLBufferEb:
  632|  28.9M|{
  633|       |    //  Ok, first lets see if we have chars in the buffer. If not, then lets
  634|       |    //  reload.
  635|  28.9M|    if (fCharIndex == fCharsAvail)
  ------------------
  |  Branch (635:9): [True: 290, False: 28.9M]
  ------------------
  636|    290|    {
  637|    290|        if (!refreshCharBuffer())
  ------------------
  |  Branch (637:13): [True: 176, False: 114]
  ------------------
  638|    176|            return false;
  639|    290|    }
  640|       |
  641|  28.9M|    XMLSize_t charIndex_start = fCharIndex;
  642|       |
  643|       |    //  Lets check the first char for being a first name char. If not, then
  644|       |    //  what's the point in living mannnn? Just give up now. We only do this
  645|       |    //  if its a name and not a name token that they want.
  646|  28.9M|    if (!token)
  ------------------
  |  Branch (646:9): [True: 28.9M, False: 12.6k]
  ------------------
  647|  28.9M|    {
  648|  28.9M|        if ((fCharBuf[fCharIndex] >= 0xD800) && (fCharBuf[fCharIndex] <= 0xDB7F)) {
  ------------------
  |  Branch (648:13): [True: 56.6k, False: 28.8M]
  |  Branch (648:49): [True: 2.94k, False: 53.6k]
  ------------------
  649|       |            // if there isn't one more char in the buffer, read more data
  650|  2.94k|            if (fCharIndex+1 == fCharsAvail)
  ------------------
  |  Branch (650:17): [True: 39, False: 2.90k]
  ------------------
  651|     39|            {
  652|     39|                if (!refreshCharBuffer())
  ------------------
  |  Branch (652:21): [True: 0, False: 39]
  ------------------
  653|      0|                    return false;
  654|       |                // reset the start buffer to the new location of the cursor
  655|     39|                charIndex_start = fCharIndex;
  656|     39|            }
  657|  2.94k|            if ((fCharBuf[fCharIndex+1] < 0xDC00) || (fCharBuf[fCharIndex+1] > 0xDFFF))
  ------------------
  |  Branch (657:17): [True: 45, False: 2.89k]
  |  Branch (657:54): [True: 1, False: 2.89k]
  ------------------
  658|     46|                return false;
  659|       |
  660|       |            // Looks ok, so lets eat it
  661|  2.89k|            fCharIndex += 2;
  662|  2.89k|        }
  663|  28.9M|        else {
  664|  28.9M|            if (!isFirstNameChar(fCharBuf[fCharIndex]))
  ------------------
  |  Branch (664:17): [True: 300, False: 28.9M]
  ------------------
  665|    300|                return false;
  666|       |
  667|       |            // Looks ok, so lets eat it
  668|  28.9M|            fCharIndex ++;
  669|  28.9M|        }
  670|       |
  671|  28.9M|    }
  672|       |
  673|       |    //  And now we loop until we run out of data in this reader or we hit
  674|       |    //  a non-name char.
  675|  28.9M|    while (true)
  ------------------
  |  Branch (675:12): [Folded - Ignored]
  ------------------
  676|  28.9M|    {
  677|  62.6M|        while (fCharIndex < fCharsAvail)
  ------------------
  |  Branch (677:16): [True: 62.5M, False: 3.08k]
  ------------------
  678|  62.5M|        {
  679|       |            //  Check the current char and take it if its a name char. Else
  680|       |            //  break out.
  681|  62.5M|            if ( (fCharBuf[fCharIndex] >= 0xD800) && (fCharBuf[fCharIndex] <= 0xDB7F) )
  ------------------
  |  Branch (681:18): [True: 39.9k, False: 62.5M]
  |  Branch (681:54): [True: 38.8k, False: 1.04k]
  ------------------
  682|  38.8k|            {
  683|       |                // if there isn't one more char in the buffer, read more data
  684|  38.8k|                if (fCharIndex+1 == fCharsAvail)
  ------------------
  |  Branch (684:21): [True: 195, False: 38.6k]
  ------------------
  685|    195|                {
  686|       |                    // but first copy the accepted character(s), and update column
  687|    195|                    if (fCharIndex != charIndex_start)
  ------------------
  |  Branch (687:25): [True: 194, False: 1]
  ------------------
  688|    194|                    {
  689|    194|                        fCurCol += (XMLFileLoc)(fCharIndex - charIndex_start);
  690|    194|                        toFill.append(&fCharBuf[charIndex_start], fCharIndex - charIndex_start);
  691|    194|                    }
  692|       |
  693|    195|                    if (!refreshCharBuffer())
  ------------------
  |  Branch (693:25): [True: 0, False: 195]
  ------------------
  694|      0|                        break;
  695|       |
  696|    195|                    charIndex_start = fCharIndex;
  697|    195|                }
  698|  38.8k|                if ( (fCharBuf[fCharIndex+1] < 0xDC00) ||
  ------------------
  |  Branch (698:22): [True: 46, False: 38.8k]
  ------------------
  699|  38.8k|                        (fCharBuf[fCharIndex+1] > 0xDFFF)  )
  ------------------
  |  Branch (699:25): [True: 1, False: 38.8k]
  ------------------
  700|     47|                    break;
  701|  38.8k|                fCharIndex += 2;
  702|       |
  703|  38.8k|            }
  704|  62.5M|            else
  705|  62.5M|            {
  706|  62.5M|                if (!isNameChar(fCharBuf[fCharIndex]))
  ------------------
  |  Branch (706:21): [True: 28.9M, False: 33.6M]
  ------------------
  707|  28.9M|                    break;
  708|  33.6M|                fCharIndex++;
  709|  33.6M|            }
  710|  62.5M|        }
  711|       |
  712|       |        // we have to copy the accepted character(s), and update column
  713|  28.9M|        if (fCharIndex != charIndex_start)
  ------------------
  |  Branch (713:13): [True: 28.9M, False: 746]
  ------------------
  714|  28.9M|        {
  715|  28.9M|            fCurCol += (XMLFileLoc)(fCharIndex - charIndex_start);
  716|  28.9M|            toFill.append(&fCharBuf[charIndex_start], fCharIndex - charIndex_start);
  717|  28.9M|        }
  718|       |
  719|       |        // something is wrong if there is still something in the buffer
  720|       |        // or if we don't get no more, then break out.
  721|  28.9M|        if ((fCharIndex < fCharsAvail) ||
  ------------------
  |  Branch (721:13): [True: 28.9M, False: 3.08k]
  ------------------
  722|  28.9M|             !refreshCharBuffer())
  ------------------
  |  Branch (722:14): [True: 365, False: 2.71k]
  ------------------
  723|  28.9M|            break;
  724|       |
  725|  2.72k|        charIndex_start = fCharIndex;
  726|  2.72k|    }
  727|       |
  728|  28.9M|    return !toFill.isEmpty();
  729|  28.9M|}
_ZN11xercesc_3_29XMLReader15getUpToCharOrWSERNS_9XMLBufferEDs:
  921|  1.51k|{
  922|  2.23k|    while (true)
  ------------------
  |  Branch (922:12): [Folded - Ignored]
  ------------------
  923|  2.22k|    {
  924|       |        // Loop through the current chars in the buffer
  925|  5.97M|        while (fCharIndex < fCharsAvail)
  ------------------
  |  Branch (925:16): [True: 5.97M, False: 806]
  ------------------
  926|  5.97M|        {
  927|       |            // Get the current char out of the buffer
  928|  5.97M|            XMLCh curCh = fCharBuf[fCharIndex];
  929|       |
  930|       |            //
  931|       |            //  See if its not a white space or our target char, then process
  932|       |            //  it. Else, we need to return.
  933|       |            //
  934|  5.97M|            if (!isWhitespace(curCh) && (curCh != toCheck))
  ------------------
  |  Branch (934:17): [True: 5.97M, False: 41]
  |  Branch (934:41): [True: 5.97M, False: 1.37k]
  ------------------
  935|  5.97M|            {
  936|       |                // Eat this char
  937|  5.97M|                fCharIndex++;
  938|       |
  939|       |                //
  940|       |                //  'curCh' is not a whitespace(x20|x9|xD|xA), so we only can
  941|       |                //  have end-of-line combinations with a leading chNEL(x85) or
  942|       |                //  chLineSeparator(x2028)
  943|       |                //
  944|       |                //  0010000000101000 chLineSeparator
  945|       |                //  0000000010000101 chNEL
  946|       |                //  ---------------------
  947|       |                //  1101111101010010 == ~(chNEL|chLineSeparator)
  948|       |                //
  949|       |                //  if the result of the logical-& operation is
  950|       |                //  true  : 'curCh' can not be chNEL or chLineSeparator
  951|       |                //  false : 'curCh' can be chNEL or chLineSeparator
  952|       |                //
  953|  5.97M|                if ( curCh & (XMLCh) ~(chNEL|chLineSeparator) )
  ------------------
  |  Branch (953:22): [True: 5.89M, False: 75.7k]
  ------------------
  954|  5.89M|                {
  955|  5.89M|                    fCurCol++;
  956|  5.89M|                } else
  957|  75.7k|                {
  958|  75.7k|                    handleEOL(curCh, false);
  959|  75.7k|                }
  960|       |
  961|       |                // Add it to our buffer
  962|  5.97M|                toFill.append(curCh);
  963|  5.97M|            }
  964|  1.41k|             else
  965|  1.41k|            {
  966|  1.41k|                return true;
  967|  1.41k|            }
  968|  5.97M|        }
  969|       |
  970|       |        //
  971|       |        //  We've eaten up the current buffer, so lets try to reload it. If
  972|       |        //  we don't get anything new, then break out. If we do, then we go
  973|       |        //  back to the top to keep getting spaces.
  974|       |        //
  975|    806|        if (!refreshCharBuffer())
  ------------------
  |  Branch (975:13): [True: 87, False: 719]
  ------------------
  976|     87|            break;
  977|    806|    }
  978|       |
  979|       |    // We never hit any non-space and ate up the whole reader
  980|     98|    return false;
  981|       |
  982|  1.51k|}
_ZN11xercesc_3_29XMLReader11skipIfQuoteERDs:
  985|  5.49M|{
  986|  5.49M|    if (fCharIndex == fCharsAvail && !refreshCharBuffer())
  ------------------
  |  Branch (986:9): [True: 28, False: 5.49M]
  |  Branch (986:38): [True: 28, False: 0]
  ------------------
  987|     28|        return false;
  988|       |
  989|  5.49M|    chGotten = fCharBuf[fCharIndex];
  990|  5.49M|    if ((chGotten == chDoubleQuote) || (chGotten == chSingleQuote))
  ------------------
  |  Branch (990:9): [True: 5.46M, False: 26.1k]
  |  Branch (990:40): [True: 26.1k, False: 29]
  ------------------
  991|  5.49M|    {
  992|  5.49M|        fCharIndex++;
  993|  5.49M|        fCurCol++;
  994|  5.49M|        return true;
  995|  5.49M|    }
  996|     29|    return false;
  997|  5.49M|}
_ZN11xercesc_3_29XMLReader10skipSpacesERbb:
 1001|  33.7M|{
 1002|       |    //  DO NOT set the skippedSomething to 'false', but change it to be 'true' only
 1003|       |
 1004|       |    //  We enter a loop where we skip over spaces until we hit the end of
 1005|       |    //  this reader or a non-space value. The return indicates whether we
 1006|       |    //  hit the non-space (true) or the end (false).
 1007|  33.7M|    do
 1008|  33.7M|    {
 1009|       |        // Loop through the current chars in the buffer
 1010|  39.4M|        while (fCharIndex < fCharsAvail)
  ------------------
  |  Branch (1010:16): [True: 39.4M, False: 8.92k]
  ------------------
 1011|  39.4M|        {
 1012|       |            //  See if its a white space char. If so, then process it. Else
 1013|       |            //  we've hit a non-space and need to return.
 1014|  39.4M|            if (isWhitespace(fCharBuf[fCharIndex]))
  ------------------
  |  Branch (1014:17): [True: 5.65M, False: 33.7M]
  ------------------
 1015|  5.65M|            {
 1016|       |                // Get the current char out of the buffer and eat it
 1017|  5.65M|                XMLCh curCh = fCharBuf[fCharIndex++];
 1018|  5.65M|                skippedSomething = true;
 1019|       |                //
 1020|       |                //  'curCh' is a whitespace(x20|x9|xD|xA), so we only can have
 1021|       |                //  end-of-line combinations with a leading chCR(xD) or chLF(xA)
 1022|       |                //
 1023|       |                //  100000 x20
 1024|       |                //  001001 x9
 1025|       |                //  001010 chLF
 1026|       |                //  001101 chCR
 1027|       |                //  -----------
 1028|       |                //  000110 == (chCR|chLF) & ~(0x9|0x20)
 1029|       |                //
 1030|       |                //  if the result of the logical-& operation is
 1031|       |                //  true  : 'curCh' must be xA  or xD
 1032|       |                //  false : 'curCh' must be x20 or x9
 1033|       |                //
 1034|  5.65M|                if ( ( curCh & (chCR|chLF) & ~(0x9|0x20) ) == 0 )
  ------------------
  |  Branch (1034:22): [True: 154k, False: 5.50M]
  ------------------
 1035|   154k|                {
 1036|   154k|                    fCurCol++;
 1037|   154k|                } else
 1038|  5.50M|                {
 1039|  5.50M|                    handleEOL(curCh, inDecl);
 1040|  5.50M|                }
 1041|  5.65M|            }
 1042|  33.7M|            else
 1043|  33.7M|                return true;
 1044|  39.4M|        }
 1045|       |
 1046|       |        //  We've eaten up the current buffer, so lets try to reload it. If
 1047|       |        //  we don't get anything new, then break out. If we do, then we go
 1048|       |        //  back to the top to keep getting spaces.
 1049|  33.7M|    } while(refreshCharBuffer());
  ------------------
  |  Branch (1049:13): [True: 4.86k, False: 4.06k]
  ------------------
 1050|       |
 1051|       |    // We never hit any non-space and ate up the whole reader
 1052|  4.06k|    return false;
 1053|  33.7M|}
_ZN11xercesc_3_29XMLReader11skippedCharEDs:
 1056|  29.6M|{
 1057|       |    //
 1058|       |    //  If the buffer is empty, then try to reload it. If we still get
 1059|       |    //  nothing, then return false.
 1060|       |    //
 1061|  29.6M|    if (fCharIndex == fCharsAvail)
  ------------------
  |  Branch (1061:9): [True: 1.23k, False: 29.6M]
  ------------------
 1062|  1.23k|    {
 1063|  1.23k|        if (!refreshCharBuffer())
  ------------------
  |  Branch (1063:13): [True: 711, False: 520]
  ------------------
 1064|    711|            return false;
 1065|  1.23k|    }
 1066|       |
 1067|       |    //
 1068|       |    //  See if the current char is the one we want. If so, then we need
 1069|       |    //  to eat it and return true.
 1070|       |    //
 1071|  29.6M|    if (fCharBuf[fCharIndex] == toSkip)
  ------------------
  |  Branch (1071:9): [True: 17.8M, False: 11.8M]
  ------------------
 1072|  17.8M|    {
 1073|  17.8M|        fCharIndex++;
 1074|  17.8M|        fCurCol++;
 1075|  17.8M|        return true;
 1076|  17.8M|    }
 1077|  11.8M|    return false;
 1078|  29.6M|}
_ZN11xercesc_3_29XMLReader12skippedSpaceEv:
 1082|  6.85M|{
 1083|       |    //
 1084|       |    //  If the buffer is empty, then try to reload it. If we still get
 1085|       |    //  nothing, then return false.
 1086|       |    //
 1087|  6.85M|    if (fCharIndex == fCharsAvail)
  ------------------
  |  Branch (1087:9): [True: 711, False: 6.85M]
  ------------------
 1088|    711|    {
 1089|    711|        if (!refreshCharBuffer())
  ------------------
  |  Branch (1089:13): [True: 349, False: 362]
  ------------------
 1090|    349|            return false;
 1091|    711|    }
 1092|       |
 1093|       |    //
 1094|       |    //  See if the current char is a whitespace. If so, then we need to eat
 1095|       |    //  it and return true.
 1096|       |    //
 1097|  6.85M|    const XMLCh curCh = fCharBuf[fCharIndex];
 1098|  6.85M|    if (isWhitespace(curCh))
  ------------------
  |  Branch (1098:9): [True: 158k, False: 6.69M]
  ------------------
 1099|   158k|    {
 1100|       |        // Eat the character
 1101|   158k|        fCharIndex++;
 1102|       |
 1103|       |        //
 1104|       |        //  'curCh' is a whitespace(x20|x9|xD|xA), so we only can have
 1105|       |        //  end-of-line combinations with a leading chCR(xD) or chLF(xA)
 1106|       |        //
 1107|       |        //  100000 x20
 1108|       |        //  001001 x9
 1109|       |        //  001010 chLF
 1110|       |        //  001101 chCR
 1111|       |        //  -----------
 1112|       |        //  000110 == (chCR|chLF) & ~(0x9|0x20)
 1113|       |        //
 1114|       |        //  if the result of the logical-& operation is
 1115|       |        //  true  : 'curCh' must be xA  or xD
 1116|       |        //  false : 'curCh' must be x20 or x9
 1117|       |        //
 1118|   158k|        if ( ( curCh & (chCR|chLF) & ~(0x9|0x20) ) == 0 )
  ------------------
  |  Branch (1118:14): [True: 94.8k, False: 64.0k]
  ------------------
 1119|  94.8k|        {
 1120|  94.8k|            fCurCol++;
 1121|  94.8k|        } else
 1122|  64.0k|        {
 1123|  64.0k|            handleEOL((XMLCh&)curCh, false);
 1124|  64.0k|        }
 1125|       |
 1126|   158k|        return true;
 1127|   158k|    }
 1128|  6.69M|    return false;
 1129|  6.85M|}
_ZN11xercesc_3_29XMLReader13skippedStringEPKDs:
 1132|  3.45M|{
 1133|       |    // This function works on strings that are smaller than kCharBufSize.
 1134|       |    // This function guarantees that in case the comparison is unsuccessful
 1135|       |    // the fCharIndex will point to the original data.
 1136|       |    //
 1137|       |
 1138|       |    // Get the length of the string to skip.
 1139|       |    //
 1140|  3.45M|    const XMLSize_t srcLen = XMLString::stringLen(toSkip);
 1141|  3.45M|    XMLSize_t charsLeft = charsLeftInBuffer();
 1142|       |
 1143|       |    //  See if the current reader has enough chars to test against this
 1144|       |    //  string. If not, then ask it to reload its buffer. If that does not
 1145|       |    //  get us enough, then it cannot match.
 1146|       |    //
 1147|       |    //  NOTE: This works because strings never have to cross a reader! And
 1148|       |    //  a string to skip will never have a new line in it, so we will never
 1149|       |    //  miss adjusting the current line.
 1150|       |    //
 1151|  3.45M|    while (charsLeft < srcLen)
  ------------------
  |  Branch (1151:12): [True: 27.3k, False: 3.42M]
  ------------------
 1152|  27.3k|    {
 1153|  27.3k|      if (!refreshCharBuffer())
  ------------------
  |  Branch (1153:11): [True: 2.41k, False: 24.9k]
  ------------------
 1154|  2.41k|        return false;
 1155|       |
 1156|  24.9k|      XMLSize_t tmp = charsLeftInBuffer();
 1157|  24.9k|      if (tmp == charsLeft) // if the refreshCharBuf() did not add anything new
  ------------------
  |  Branch (1157:11): [True: 24.5k, False: 364]
  ------------------
 1158|  24.5k|        return false;     // give up and return.
 1159|       |
 1160|    364|      charsLeft = tmp;
 1161|    364|    }
 1162|       |
 1163|       |    //  Ok, now we now that the current reader has enough chars in its
 1164|       |    //  buffer and that its index is back at zero. So we can do a quick and
 1165|       |    //  dirty comparison straight to its buffer with no requirement to unget
 1166|       |    //  if it fails.
 1167|       |    //
 1168|  3.42M|    if (memcmp(&fCharBuf[fCharIndex], toSkip, srcLen * sizeof(XMLCh)))
  ------------------
  |  Branch (1168:9): [True: 3.09M, False: 331k]
  ------------------
 1169|  3.09M|      return false;
 1170|       |
 1171|       |    // Add the source length to the current column to get it back right.
 1172|       |    //
 1173|   331k|    fCurCol += (XMLFileLoc)srcLen;
 1174|       |
 1175|       |    //  And get the character buffer index back right by just adding the
 1176|       |    //  source len to it.
 1177|       |    //
 1178|   331k|    fCharIndex += srcLen;
 1179|       |
 1180|   331k|    return true;
 1181|  3.42M|}
_ZN11xercesc_3_29XMLReader17skippedStringLongEPKDs:
 1184|   158k|{
 1185|       |    // This function works on strings that are potentially longer than
 1186|       |    // kCharBufSize (e.g., end tag). This function does not guarantee
 1187|       |    // that in case the comparison is unsuccessful the fCharIndex will
 1188|       |    // point to the original data.
 1189|       |    //
 1190|       |
 1191|   158k|    XMLSize_t srcLen = XMLString::stringLen(toSkip);
 1192|   158k|    XMLSize_t charsLeft = charsLeftInBuffer();
 1193|       |
 1194|   316k|    while (srcLen != 0)
  ------------------
  |  Branch (1194:12): [True: 158k, False: 158k]
  ------------------
 1195|   158k|    {
 1196|       |      // Fill up the buffer with as much data as possible.
 1197|       |      //
 1198|   158k|      while (charsLeft < srcLen && charsLeft != kCharBufSize)
  ------------------
  |  Branch (1198:14): [True: 402, False: 158k]
  |  Branch (1198:36): [True: 401, False: 1]
  ------------------
 1199|    401|      {
 1200|    401|        if (!refreshCharBuffer())
  ------------------
  |  Branch (1200:13): [True: 5, False: 396]
  ------------------
 1201|      5|          return false;
 1202|       |
 1203|    396|        XMLSize_t tmp = charsLeftInBuffer();
 1204|    396|        if (tmp == charsLeft) // if the refreshCharBuf() did not add anything
  ------------------
  |  Branch (1204:13): [True: 38, False: 358]
  ------------------
 1205|     38|          return false;       // new give up and return.
 1206|       |
 1207|    358|        charsLeft = tmp;
 1208|    358|      }
 1209|       |
 1210|   158k|      XMLSize_t n = charsLeft < srcLen ? charsLeft : srcLen;
  ------------------
  |  Branch (1210:21): [True: 1, False: 158k]
  ------------------
 1211|       |
 1212|   158k|      if (memcmp(&fCharBuf[fCharIndex], toSkip, n * sizeof(XMLCh)))
  ------------------
  |  Branch (1212:11): [True: 25, False: 158k]
  ------------------
 1213|     25|        return false;
 1214|       |
 1215|   158k|      toSkip += n;
 1216|   158k|      srcLen -= n;
 1217|       |
 1218|   158k|      fCharIndex += n;
 1219|   158k|      fCurCol += (XMLFileLoc)n;
 1220|   158k|      charsLeft -= n;
 1221|   158k|    }
 1222|       |
 1223|   158k|    return true;
 1224|   158k|}
_ZN11xercesc_3_29XMLReader10peekStringEPKDs:
 1232|   363k|{
 1233|       |    // Get the length of the string to skip
 1234|   363k|    const XMLSize_t srcLen = XMLString::stringLen(toPeek);
 1235|       |
 1236|       |    //
 1237|       |    //  See if the current reader has enough chars to test against this
 1238|       |    //  string. If not, then ask it to reload its buffer. If that does not
 1239|       |    //  get us enough, then it cannot match.
 1240|       |    //
 1241|       |    //  NOTE: This works because strings never have to cross a reader! And
 1242|       |    //  a string to skip will never have a new line in it, so we will never
 1243|       |    //  miss adjusting the current line.
 1244|       |    //
 1245|   363k|    XMLSize_t charsLeft = charsLeftInBuffer();
 1246|   708k|    while (charsLeft < srcLen)
  ------------------
  |  Branch (1246:12): [True: 347k, False: 361k]
  ------------------
 1247|   347k|    {
 1248|   347k|         refreshCharBuffer();
 1249|   347k|         XMLSize_t t = charsLeftInBuffer();
 1250|   347k|         if (t == charsLeft)   // if the refreshCharBuf() did not add anything new
  ------------------
  |  Branch (1250:14): [True: 2.35k, False: 344k]
  ------------------
 1251|  2.35k|             return false;     //   give up and return.
 1252|   344k|         charsLeft = t;
 1253|   344k|	}
 1254|       |
 1255|       |
 1256|       |
 1257|       |
 1258|       |    //
 1259|       |    //  Ok, now we now that the current reader has enough chars in its
 1260|       |    //  buffer and that its index is back at zero. So we can do a quick and
 1261|       |    //  dirty comparison straight to its buffer with no requirement to unget
 1262|       |    //  if it fails.
 1263|       |    //
 1264|   361k|    if (memcmp(&fCharBuf[fCharIndex], toPeek, srcLen*sizeof(XMLCh)))
  ------------------
  |  Branch (1264:9): [True: 359k, False: 1.36k]
  ------------------
 1265|   359k|        return false;
 1266|       |
 1267|  1.36k|    return true;
 1268|   361k|}
_ZN11xercesc_3_29XMLReader11setEncodingEPKDs:
 1275|    401|{
 1276|       |    //
 1277|       |    //  If the encoding was forced, then we ignore the new value and just
 1278|       |    //  return with success. If it was forced, then we are to use that
 1279|       |    //  encoding without question. Note that, if we are forced, we created
 1280|       |    //  a transcoder up front so there is no need to do one here in that
 1281|       |    //  case.
 1282|       |    //
 1283|    401|    if (fForcedEncoding)
  ------------------
  |  Branch (1283:9): [True: 0, False: 401]
  ------------------
 1284|      0|        return true;
 1285|       |
 1286|       |    //
 1287|       |    // upperCase the newEncoding first for better performance
 1288|       |    //
 1289|    401|    XMLCh* inputEncoding = XMLString::replicate(newEncoding, fMemoryManager);
 1290|    401|    XMLString::upperCaseASCII(inputEncoding);
 1291|       |
 1292|    401|    XMLRecognizer::Encodings newBaseEncoding;
 1293|       |    //
 1294|       |    //  Check for non-endian specific UTF-16 or UCS-4. If so, and if we
 1295|       |    //  are already in one of the endian versions of those encodings,
 1296|       |    //  then just keep it and go on. Otherwise, its not valid.
 1297|       |    //
 1298|    401|    if (XMLString::equals(inputEncoding, XMLUni::fgUTF16EncodingString)
  ------------------
  |  Branch (1298:9): [True: 1, False: 400]
  ------------------
 1299|    401|    ||  XMLString::equals(inputEncoding, XMLUni::fgUTF16EncodingString2)
  ------------------
  |  Branch (1299:9): [True: 1, False: 399]
  ------------------
 1300|    401|    ||  XMLString::equals(inputEncoding, XMLUni::fgUTF16EncodingString3)
  ------------------
  |  Branch (1300:9): [True: 1, False: 398]
  ------------------
 1301|    401|    ||  XMLString::equals(inputEncoding, XMLUni::fgUTF16EncodingString4)
  ------------------
  |  Branch (1301:9): [True: 1, False: 397]
  ------------------
 1302|    401|    ||  XMLString::equals(inputEncoding, XMLUni::fgUTF16EncodingString5)
  ------------------
  |  Branch (1302:9): [True: 1, False: 396]
  ------------------
 1303|    401|    ||  XMLString::equals(inputEncoding, XMLUni::fgUTF16EncodingString6)
  ------------------
  |  Branch (1303:9): [True: 1, False: 395]
  ------------------
 1304|    401|    ||  XMLString::equals(inputEncoding, XMLUni::fgUTF16EncodingString7))
  ------------------
  |  Branch (1304:9): [True: 0, False: 395]
  ------------------
 1305|      6|    {
 1306|      6|        fMemoryManager->deallocate(inputEncoding);
 1307|       |
 1308|      6|        if ((fEncoding != XMLRecognizer::UTF_16L)
  ------------------
  |  Branch (1308:13): [True: 6, False: 0]
  ------------------
 1309|      6|        &&  (fEncoding != XMLRecognizer::UTF_16B))
  ------------------
  |  Branch (1309:13): [True: 6, False: 0]
  ------------------
 1310|      6|        {
 1311|      6|            return false;
 1312|      6|        }
 1313|       |
 1314|       |        // Override with the original endian specific encoding
 1315|      0|        newBaseEncoding = fEncoding;
 1316|       |
 1317|      0|        if (fEncoding == XMLRecognizer::UTF_16L) {
  ------------------
  |  Branch (1317:13): [True: 0, False: 0]
  ------------------
 1318|      0|            fMemoryManager->deallocate(fEncodingStr);
 1319|      0|            fEncodingStr = 0;
 1320|      0|            fEncodingStr = XMLString::replicate(XMLUni::fgUTF16LEncodingString, fMemoryManager);
 1321|      0|        }
 1322|      0|        else {
 1323|      0|            fMemoryManager->deallocate(fEncodingStr);
 1324|      0|            fEncodingStr = 0;
 1325|      0|            fEncodingStr = XMLString::replicate(XMLUni::fgUTF16BEncodingString, fMemoryManager);
 1326|      0|        }
 1327|      0|    }
 1328|    395|    else if (XMLString::equals(inputEncoding, XMLUni::fgUCS4EncodingString)
  ------------------
  |  Branch (1328:14): [True: 1, False: 394]
  ------------------
 1329|    395|         ||  XMLString::equals(inputEncoding, XMLUni::fgUCS4EncodingString2)
  ------------------
  |  Branch (1329:14): [True: 1, False: 393]
  ------------------
 1330|    395|         ||  XMLString::equals(inputEncoding, XMLUni::fgUCS4EncodingString3)
  ------------------
  |  Branch (1330:14): [True: 1, False: 392]
  ------------------
 1331|    395|         ||  XMLString::equals(inputEncoding, XMLUni::fgUCS4EncodingString4)
  ------------------
  |  Branch (1331:14): [True: 1, False: 391]
  ------------------
 1332|    395|         ||  XMLString::equals(inputEncoding, XMLUni::fgUCS4EncodingString5))
  ------------------
  |  Branch (1332:14): [True: 0, False: 391]
  ------------------
 1333|      4|    {
 1334|      4|        fMemoryManager->deallocate(inputEncoding);
 1335|       |
 1336|      4|        if ((fEncoding != XMLRecognizer::UCS_4L)
  ------------------
  |  Branch (1336:13): [True: 4, False: 0]
  ------------------
 1337|      4|        &&  (fEncoding != XMLRecognizer::UCS_4B))
  ------------------
  |  Branch (1337:13): [True: 4, False: 0]
  ------------------
 1338|      4|        {
 1339|      4|            return false;
 1340|      4|        }
 1341|       |
 1342|       |        // Override with the original endian specific encoding
 1343|      0|        newBaseEncoding = fEncoding;
 1344|       |
 1345|      0|        if (fEncoding == XMLRecognizer::UCS_4L) {
  ------------------
  |  Branch (1345:13): [True: 0, False: 0]
  ------------------
 1346|       |
 1347|      0|            fMemoryManager->deallocate(fEncodingStr);
 1348|      0|            fEncodingStr = 0;
 1349|      0|            fEncodingStr = XMLString::replicate(XMLUni::fgUCS4LEncodingString, fMemoryManager);
 1350|      0|        }
 1351|      0|        else {
 1352|       |
 1353|      0|            fMemoryManager->deallocate(fEncodingStr);
 1354|      0|            fEncodingStr = 0;
 1355|      0|            fEncodingStr = XMLString::replicate(XMLUni::fgUCS4BEncodingString, fMemoryManager);
 1356|      0|        }
 1357|      0|    }
 1358|    391|     else
 1359|    391|    {
 1360|       |        //
 1361|       |        //  Try to map the string to one of our standard encodings. If its not
 1362|       |        //  one of them, then it has to be one of the non-intrinsic encodings,
 1363|       |        //  in which case we have to delete our intrinsic encoder and create a
 1364|       |        //  new one.
 1365|       |        //
 1366|    391|        newBaseEncoding = XMLRecognizer::encodingForName(inputEncoding);
 1367|       |
 1368|       |        //
 1369|       |        //  If it does not come back as one of the auto-sensed encodings, then we
 1370|       |        //  have to possibly replace it and at least check a few things.
 1371|       |        //
 1372|    391|        if (newBaseEncoding == XMLRecognizer::OtherEncoding)
  ------------------
  |  Branch (1372:13): [True: 263, False: 128]
  ------------------
 1373|    263|        {
 1374|       |            //
 1375|       |            // We already know it's none of those non-endian special cases,
 1376|       |            // so just replicate the new name and use it directly to create the transcoder
 1377|       |            //
 1378|    263|            fMemoryManager->deallocate(fEncodingStr);
 1379|    263|            fEncodingStr = inputEncoding;
 1380|       |
 1381|       |            // Check for a pre-created transcoder to delete.
 1382|    263|            if (fTranscoder) {
  ------------------
  |  Branch (1382:17): [True: 54, False: 209]
  ------------------
 1383|     54|                delete fTranscoder;
 1384|     54|                fTranscoder = 0;
 1385|     54|            }
 1386|       |
 1387|    263|            XMLTransService::Codes failReason;
 1388|    263|            fTranscoder = XMLPlatformUtils::fgTransService->makeNewTranscoderFor
 1389|    263|            (
 1390|    263|                fEncodingStr
 1391|    263|                , failReason
 1392|    263|                , kCharBufSize
 1393|    263|                , fMemoryManager
 1394|    263|            );
 1395|       |
 1396|    263|            if (!fTranscoder)
  ------------------
  |  Branch (1396:17): [True: 67, False: 196]
  ------------------
 1397|     67|                ThrowXMLwithMemMgr1(TranscodingException, XMLExcepts::Trans_CantCreateCvtrFor, fEncodingStr, fMemoryManager);
  ------------------
  |  |  266|     67|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
 1398|    263|        }
 1399|    128|        else
 1400|    128|        {
 1401|       |            // Store the new encoding string since it is just an intrinsic
 1402|    128|            fMemoryManager->deallocate(fEncodingStr);
 1403|    128|            fEncodingStr = inputEncoding;
 1404|    128|        }
 1405|    391|    }
 1406|       |
 1407|    324|    if (!fTranscoder) {
  ------------------
  |  Branch (1407:9): [True: 126, False: 198]
  ------------------
 1408|       |        //
 1409|       |        //  Now we can create a transcoder using the recognized fEncoding.  We
 1410|       |        //  might get back a transcoder for an intrinsically supported encoding,
 1411|       |        //  or we might get one from the underlying transcoding service.
 1412|       |        //
 1413|    126|        XMLTransService::Codes failReason;
 1414|    126|        fTranscoder = XMLPlatformUtils::fgTransService->makeNewTranscoderFor
 1415|    126|        (
 1416|    126|            newBaseEncoding
 1417|    126|            , failReason
 1418|    126|            , kCharBufSize
 1419|    126|            , fMemoryManager
 1420|    126|        );
 1421|       |
 1422|    126|        if (!fTranscoder)
  ------------------
  |  Branch (1422:13): [True: 0, False: 126]
  ------------------
 1423|      0|            ThrowXMLwithMemMgr1(TranscodingException, XMLExcepts::Trans_CantCreateCvtrFor, fEncodingStr, fMemoryManager);
  ------------------
  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
 1424|    126|    }
 1425|       |
 1426|       |    // Update the base encoding member with the new base encoding found
 1427|    324|    fEncoding = newBaseEncoding;
 1428|       |
 1429|       |    // Looks ok to us
 1430|    324|    return true;
 1431|    324|}
_ZN11xercesc_3_29XMLReader15checkForSwappedEv:
 1443|   372k|{
 1444|       |    // Assume not swapped
 1445|   372k|    fSwapped = false;
 1446|       |
 1447|   372k|	if (XMLPlatformUtils::fgXMLChBigEndian)
  ------------------
  |  Branch (1447:6): [True: 0, False: 372k]
  ------------------
 1448|      0|	{
 1449|      0|        if ((fEncoding == XMLRecognizer::UTF_16L)
  ------------------
  |  Branch (1449:13): [True: 0, False: 0]
  ------------------
 1450|      0|        ||  (fEncoding == XMLRecognizer::UCS_4L))
  ------------------
  |  Branch (1450:13): [True: 0, False: 0]
  ------------------
 1451|      0|        {
 1452|      0|            fSwapped = true;
 1453|      0|        }
 1454|      0|    }
 1455|   372k|    else
 1456|   372k|    {
 1457|   372k|        if ((fEncoding == XMLRecognizer::UTF_16B)
  ------------------
  |  Branch (1457:13): [True: 71, False: 372k]
  ------------------
 1458|   372k|        ||  (fEncoding == XMLRecognizer::UCS_4B))
  ------------------
  |  Branch (1458:13): [True: 33, False: 372k]
  ------------------
 1459|    104|        {
 1460|    104|            fSwapped = true;
 1461|    104|        }
 1462|   372k|    }
 1463|   372k|}
_ZN11xercesc_3_29XMLReader12doInitDecodeEv:
 1476|  7.12k|{
 1477|  7.12k|    switch(fEncoding)
 1478|  7.12k|    {
 1479|     33|        case XMLRecognizer::UCS_4B :
  ------------------
  |  Branch (1479:9): [True: 33, False: 7.09k]
  ------------------
 1480|     60|        case XMLRecognizer::UCS_4L :
  ------------------
  |  Branch (1480:9): [True: 27, False: 7.09k]
  ------------------
 1481|     60|        {
 1482|       |            // Remove bom if any
 1483|     60|            if (((fRawByteBuf[0] == 0x00) && (fRawByteBuf[1] == 0x00) && (fRawByteBuf[2] == 0xFE) && (fRawByteBuf[3] == 0xFF)) ||
  ------------------
  |  Branch (1483:18): [True: 33, False: 27]
  |  Branch (1483:46): [True: 33, False: 0]
  |  Branch (1483:74): [True: 15, False: 18]
  |  Branch (1483:102): [True: 15, False: 0]
  ------------------
 1484|     60|                ((fRawByteBuf[0] == 0xFF) && (fRawByteBuf[1] == 0xFE) && (fRawByteBuf[2] == 0x00) && (fRawByteBuf[3] == 0x00))  )
  ------------------
  |  Branch (1484:18): [True: 17, False: 28]
  |  Branch (1484:46): [True: 17, False: 0]
  |  Branch (1484:74): [True: 17, False: 0]
  |  Branch (1484:102): [True: 17, False: 0]
  ------------------
 1485|     32|            {
 1486|   126k|                for (XMLSize_t i = 0; i < fRawBytesAvail; i++)
  ------------------
  |  Branch (1486:39): [True: 126k, False: 32]
  ------------------
 1487|   126k|                    fRawByteBuf[i] = fRawByteBuf[i+4];
 1488|       |
 1489|     32|                fRawBytesAvail -=4;
 1490|     32|            }
 1491|       |
 1492|       |            // Look at the raw buffer as UCS4 chars
 1493|     60|            const UCS4Ch* asUCS = reinterpret_cast<const UCS4Ch*>(fRawByteBuf);
 1494|       |
 1495|  10.3k|            while (fRawBufIndex < fRawBytesAvail)
  ------------------
  |  Branch (1495:20): [True: 10.3k, False: 6]
  ------------------
 1496|  10.3k|            {
 1497|       |                // Make sure there are at least sizeof(UCS4Ch) bytes to consume.
 1498|  10.3k|                if (fRawBufIndex + sizeof(UCS4Ch) > fRawBytesAvail) {
  ------------------
  |  Branch (1498:21): [True: 2, False: 10.3k]
  ------------------
 1499|      2|                    fCharsAvail = 0;
 1500|      2|                    fRawBufIndex = 0;
 1501|      2|                    fMemoryManager->deallocate(fPublicId);
 1502|      2|                    fMemoryManager->deallocate(fEncodingStr);
 1503|      2|                    ArrayJanitor<XMLCh> janValue(fSystemId, fMemoryManager);
 1504|      2|                    ThrowXMLwithMemMgr1
  ------------------
  |  |  266|      2|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
 1505|      2|                    (
 1506|      2|                        TranscodingException
 1507|      2|                        , XMLExcepts::Reader_CouldNotDecodeFirstLine
 1508|      2|                        , fSystemId
 1509|      2|                        , fMemoryManager
 1510|      2|                    );
 1511|      2|                }
 1512|       |
 1513|       |                // Make sure we don't exhaust the limited prolog buffer size.
 1514|       |                // Leave room for a space added at the end of this function.
 1515|  10.3k|                if (fCharsAvail == kCharBufSize - 1) {
  ------------------
  |  Branch (1515:21): [True: 0, False: 10.3k]
  ------------------
 1516|      0|                    fCharsAvail = 0;
 1517|      0|                    fRawBufIndex = 0;
 1518|      0|                    fMemoryManager->deallocate(fPublicId);
 1519|      0|                    fMemoryManager->deallocate(fEncodingStr);
 1520|      0|                    ArrayJanitor<XMLCh> janValue(fSystemId, fMemoryManager);
 1521|      0|                    ThrowXMLwithMemMgr1
  ------------------
  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
 1522|      0|                    (
 1523|      0|                        TranscodingException
 1524|      0|                        , XMLExcepts::Reader_CouldNotDecodeFirstLine
 1525|      0|                        , fSystemId
 1526|      0|                        , fMemoryManager
 1527|      0|                    );
 1528|      0|                }
 1529|       |
 1530|       |                // Get out the current 4 byte value and inc our raw buf index
 1531|  10.3k|                UCS4Ch curVal = *asUCS++;
 1532|  10.3k|                fRawBufIndex += sizeof(UCS4Ch);
 1533|       |
 1534|       |                // Swap if that is required for this machine
 1535|  10.3k|                if (fSwapped)
  ------------------
  |  Branch (1535:21): [True: 583, False: 9.78k]
  ------------------
 1536|    583|                    curVal = BitOps::swapBytes(curVal);
 1537|       |
 1538|       |                // Make sure its at least semi legal. If not, undo and throw
 1539|  10.3k|                if (curVal > 0xFFFF)
  ------------------
  |  Branch (1539:21): [True: 7, False: 10.3k]
  ------------------
 1540|      7|                {
 1541|      7|                    fCharsAvail = 0;
 1542|      7|                    fRawBufIndex = 0;
 1543|      7|                    fMemoryManager->deallocate(fPublicId);
 1544|      7|                    fMemoryManager->deallocate(fEncodingStr);
 1545|      7|                    ArrayJanitor<XMLCh> janValue(fSystemId, fMemoryManager);
 1546|      7|                    ThrowXMLwithMemMgr1
  ------------------
  |  |  266|      7|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
 1547|      7|                    (
 1548|      7|                        TranscodingException
 1549|      7|                        , XMLExcepts::Reader_CouldNotDecodeFirstLine
 1550|      7|                        , fSystemId
 1551|      7|                        , fMemoryManager
 1552|      7|                    );
 1553|      7|                }
 1554|       |
 1555|       |                // Convert the value to an XML char and store it
 1556|  10.3k|                fCharSizeBuf[fCharsAvail] = 4;
 1557|  10.3k|                fCharBuf[fCharsAvail++] = XMLCh(curVal);
 1558|       |
 1559|       |                // Break out on the > character
 1560|  10.3k|                if (curVal == chCloseAngle)
  ------------------
  |  Branch (1560:21): [True: 45, False: 10.3k]
  ------------------
 1561|     45|                    break;
 1562|  10.3k|            }
 1563|     51|            break;
 1564|     60|        }
 1565|       |
 1566|  6.75k|        case XMLRecognizer::UTF_8 :
  ------------------
  |  Branch (1566:9): [True: 6.75k, False: 368]
  ------------------
 1567|  6.75k|        {
 1568|       |            // If there's a utf-8 BOM  (0xEF 0xBB 0xBF), skip past it.
 1569|       |            //   Don't move to char buf - no one wants to see it.
 1570|       |            //   Note: this causes any encoding= declaration to override
 1571|       |            //         the BOM's attempt to say that the encoding is utf-8.
 1572|       |
 1573|       |            // Look at the raw buffer as short chars
 1574|  6.75k|            const char* asChars = (const char*)fRawByteBuf;
 1575|       |
 1576|  6.75k|            if (fRawBytesAvail > XMLRecognizer::fgUTF8BOMLen &&
  ------------------
  |  Branch (1576:17): [True: 6.75k, False: 0]
  ------------------
 1577|  6.75k|                XMLString::compareNString(  asChars
  ------------------
  |  Branch (1577:17): [True: 429, False: 6.32k]
  ------------------
 1578|  6.75k|                                            , XMLRecognizer::fgUTF8BOM
 1579|  6.75k|                                            , XMLRecognizer::fgUTF8BOMLen) == 0)
 1580|    429|            {
 1581|    429|                fRawBufIndex += XMLRecognizer::fgUTF8BOMLen;
 1582|    429|                asChars      += XMLRecognizer::fgUTF8BOMLen;
 1583|    429|            }
 1584|       |
 1585|       |            //
 1586|       |            //  First check that there are enough bytes to even see the
 1587|       |            //  decl indentifier. If not, get out now with no action since
 1588|       |            //  there is no decl.
 1589|       |            //
 1590|  6.75k|            if (fRawBytesAvail < XMLRecognizer::fgASCIIPreLen)
  ------------------
  |  Branch (1590:17): [True: 0, False: 6.75k]
  ------------------
 1591|      0|                break;
 1592|       |
 1593|       |            // Check for the opening sequence. If not, then no decl
 1594|  6.75k|            if (XMLString::compareNString(  asChars
  ------------------
  |  Branch (1594:17): [True: 6.08k, False: 675]
  ------------------
 1595|  6.75k|                                            , XMLRecognizer::fgASCIIPre
 1596|  6.75k|                                            , XMLRecognizer::fgASCIIPreLen))
 1597|  6.08k|            {
 1598|  6.08k|                break;
 1599|  6.08k|            }
 1600|       |
 1601|   156k|            while (fRawBufIndex < fRawBytesAvail)
  ------------------
  |  Branch (1601:20): [True: 156k, False: 38]
  ------------------
 1602|   156k|            {
 1603|   156k|                const char curCh = *asChars++;
 1604|   156k|                fRawBufIndex++;
 1605|       |
 1606|       |                // Make sure we don't exhaust the limited prolog buffer size.
 1607|       |                // Leave room for a space added at the end of this function.
 1608|   156k|                if (fCharsAvail == kCharBufSize - 1) {
  ------------------
  |  Branch (1608:21): [True: 2, False: 156k]
  ------------------
 1609|      2|                    fCharsAvail = 0;
 1610|      2|                    fRawBufIndex = 0;
 1611|      2|                    fMemoryManager->deallocate(fPublicId);
 1612|      2|                    fMemoryManager->deallocate(fEncodingStr);
 1613|      2|                    ArrayJanitor<XMLCh> janValue(fSystemId, fMemoryManager);
 1614|      2|                    ThrowXMLwithMemMgr1
  ------------------
  |  |  266|      2|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
 1615|      2|                    (
 1616|      2|                        TranscodingException
 1617|      2|                        , XMLExcepts::Reader_CouldNotDecodeFirstLine
 1618|      2|                        , fSystemId
 1619|      2|                        , fMemoryManager
 1620|      2|                    );
 1621|      2|                }
 1622|       |
 1623|       |                // Looks ok, so store it
 1624|   156k|                fCharSizeBuf[fCharsAvail] = 1;
 1625|   156k|                fCharBuf[fCharsAvail++] = XMLCh(curCh);
 1626|       |
 1627|       |                // Break out on a > character
 1628|   156k|                if (curCh == chCloseAngle)
  ------------------
  |  Branch (1628:21): [True: 635, False: 155k]
  ------------------
 1629|    635|                    break;
 1630|       |
 1631|       |                //
 1632|       |                //  A char greater than 0x7F is not allowed in this case. If
 1633|       |                //  so, undo and throw.
 1634|       |                //
 1635|   155k|                if (curCh & 0x80)
  ------------------
  |  Branch (1635:21): [True: 0, False: 155k]
  ------------------
 1636|      0|                {
 1637|      0|                    fCharsAvail = 0;
 1638|      0|                    fRawBufIndex = 0;
 1639|      0|                    fMemoryManager->deallocate(fPublicId);
 1640|      0|                    fMemoryManager->deallocate(fEncodingStr);
 1641|      0|                    ArrayJanitor<XMLCh> janValue(fSystemId, fMemoryManager);
 1642|      0|                    ThrowXMLwithMemMgr1
  ------------------
  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
 1643|      0|                    (
 1644|      0|                        TranscodingException
 1645|      0|                        , XMLExcepts::Reader_CouldNotDecodeFirstLine
 1646|      0|                        , fSystemId
 1647|      0|                        , fMemoryManager
 1648|      0|                    );
 1649|      0|                }
 1650|   155k|            }
 1651|    673|            break;
 1652|    675|        }
 1653|       |
 1654|    673|        case XMLRecognizer::UTF_16B :
  ------------------
  |  Branch (1654:9): [True: 71, False: 7.05k]
  ------------------
 1655|    284|        case XMLRecognizer::UTF_16L :
  ------------------
  |  Branch (1655:9): [True: 213, False: 6.91k]
  ------------------
 1656|    284|        {
 1657|       |            //
 1658|       |            //  If there is a decl here, we just truncate back the characters
 1659|       |            //  as we go. No surrogate creation would be allowed here in legal
 1660|       |            //  XML, so we consider it a transoding error if we find one.
 1661|       |            //
 1662|    284|            if (fRawBytesAvail < 2)
  ------------------
  |  Branch (1662:17): [True: 0, False: 284]
  ------------------
 1663|      0|                break;
 1664|       |
 1665|    284|            XMLSize_t postBOMIndex = 0;
 1666|    284|            const UTF16Ch* asUTF16 = reinterpret_cast<const UTF16Ch*>(&fRawByteBuf[fRawBufIndex]);
 1667|    284|            if ((*asUTF16 == chUnicodeMarker) || (*asUTF16 == chSwappedUnicodeMarker))
  ------------------
  |  Branch (1667:17): [True: 199, False: 85]
  |  Branch (1667:50): [True: 40, False: 45]
  ------------------
 1668|    239|            {
 1669|    239|                fRawBufIndex += sizeof(UTF16Ch);
 1670|    239|                asUTF16++;
 1671|    239|                postBOMIndex = fRawBufIndex;
 1672|    239|            }
 1673|       |
 1674|       |            //  First check that there are enough raw bytes for there to even
 1675|       |            //  be a decl indentifier. If not, then nothing to do.
 1676|       |            //
 1677|    284|            if (fRawBytesAvail - fRawBufIndex < XMLRecognizer::fgUTF16PreLen)
  ------------------
  |  Branch (1677:17): [True: 0, False: 284]
  ------------------
 1678|      0|            {
 1679|      0|                fRawBufIndex = postBOMIndex;
 1680|      0|                break;
 1681|      0|            }
 1682|       |
 1683|       |            //
 1684|       |            //  See we get a match on the prefix. If not, then reset and
 1685|       |            //  break out.
 1686|       |            //
 1687|    284|            if (fEncoding == XMLRecognizer::UTF_16B)
  ------------------
  |  Branch (1687:17): [True: 71, False: 213]
  ------------------
 1688|     71|            {
 1689|     71|                if (memcmp(asUTF16, XMLRecognizer::fgUTF16BPre, XMLRecognizer::fgUTF16PreLen))
  ------------------
  |  Branch (1689:21): [True: 40, False: 31]
  ------------------
 1690|     40|                {
 1691|     40|                    fRawBufIndex = postBOMIndex;
 1692|     40|                    break;
 1693|     40|                }
 1694|     71|            }
 1695|    213|             else
 1696|    213|            {
 1697|    213|                if (memcmp(asUTF16, XMLRecognizer::fgUTF16LPre, XMLRecognizer::fgUTF16PreLen))
  ------------------
  |  Branch (1697:21): [True: 199, False: 14]
  ------------------
 1698|    199|                {
 1699|    199|                    fRawBufIndex = postBOMIndex;
 1700|    199|                    break;
 1701|    199|                }
 1702|    213|            }
 1703|       |
 1704|   189k|            while (fRawBufIndex < fRawBytesAvail)
  ------------------
  |  Branch (1704:20): [True: 189k, False: 24]
  ------------------
 1705|   189k|            {
 1706|       |                // Make sure there are at least sizeof(UTF16Ch) bytes to consume.
 1707|   189k|                if (fRawBufIndex + sizeof(UTF16Ch) > fRawBytesAvail) {
  ------------------
  |  Branch (1707:21): [True: 4, False: 189k]
  ------------------
 1708|      4|                    fCharsAvail = 0;
 1709|      4|                    fRawBufIndex = 0;
 1710|      4|                    fMemoryManager->deallocate(fPublicId);
 1711|      4|                    fMemoryManager->deallocate(fEncodingStr);
 1712|      4|                    ArrayJanitor<XMLCh> janValue(fSystemId, fMemoryManager);
 1713|      4|                    ThrowXMLwithMemMgr1
  ------------------
  |  |  266|      4|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
 1714|      4|                    (
 1715|      4|                        TranscodingException
 1716|      4|                        , XMLExcepts::Reader_CouldNotDecodeFirstLine
 1717|      4|                        , fSystemId
 1718|      4|                        , fMemoryManager
 1719|      4|                    );
 1720|      4|                }
 1721|       |
 1722|       |                // Make sure we don't exhaust the limited prolog buffer size.
 1723|       |                // Leave room for a space added at the end of this function.
 1724|   189k|                if (fCharsAvail == kCharBufSize - 1) {
  ------------------
  |  Branch (1724:21): [True: 2, False: 189k]
  ------------------
 1725|      2|                    fCharsAvail = 0;
 1726|      2|                    fRawBufIndex = 0;
 1727|      2|                    fMemoryManager->deallocate(fPublicId);
 1728|      2|                    fMemoryManager->deallocate(fEncodingStr);
 1729|      2|                    ArrayJanitor<XMLCh> janValue(fSystemId, fMemoryManager);
 1730|      2|                    ThrowXMLwithMemMgr1
  ------------------
  |  |  266|      2|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
 1731|      2|                    (
 1732|      2|                        TranscodingException
 1733|      2|                        , XMLExcepts::Reader_CouldNotDecodeFirstLine
 1734|      2|                        , fSystemId
 1735|      2|                        , fMemoryManager
 1736|      2|                    );
 1737|      2|                }
 1738|       |
 1739|       |                // Get out the current 2 byte value
 1740|   189k|                UTF16Ch curVal = *asUTF16++;
 1741|   189k|                fRawBufIndex += sizeof(UTF16Ch);
 1742|       |
 1743|       |                // Swap if that is required for this machine
 1744|   189k|                if (fSwapped)
  ------------------
  |  Branch (1744:21): [True: 94.8k, False: 94.8k]
  ------------------
 1745|  94.8k|                    curVal = BitOps::swapBytes(curVal);
 1746|       |
 1747|       |                //
 1748|       |                //  Store it and bump the target index, implicitly converting
 1749|       |                //  if UTF16Ch and XMLCh are not the same size.
 1750|       |                //
 1751|   189k|                fCharSizeBuf[fCharsAvail] = 2;
 1752|   189k|                fCharBuf[fCharsAvail++] = curVal;
 1753|       |
 1754|       |                // Break out on a > char
 1755|   189k|                if (curVal == chCloseAngle)
  ------------------
  |  Branch (1755:21): [True: 15, False: 189k]
  ------------------
 1756|     15|                    break;
 1757|   189k|            }
 1758|     39|            break;
 1759|     45|        }
 1760|       |
 1761|     39|        case XMLRecognizer::EBCDIC :
  ------------------
  |  Branch (1761:9): [True: 24, False: 7.10k]
  ------------------
 1762|     24|        {
 1763|       |            //
 1764|       |            //  We use special support in the intrinsic EBCDIC-US transcoder
 1765|       |            //  to go through one char at a time.
 1766|       |            //
 1767|     24|            const XMLByte* srcPtr = fRawByteBuf;
 1768|   125k|            while (1)
  ------------------
  |  Branch (1768:20): [Folded - Ignored]
  ------------------
 1769|   125k|            {
 1770|       |                // Transcode one char from the source
 1771|   125k|                const XMLCh chCur = XMLEBCDICTranscoder::xlatThisOne(*srcPtr++);
 1772|   125k|                fRawBufIndex++;
 1773|       |
 1774|       |                // Make sure we don't exhaust the limited prolog buffer size.
 1775|       |                // Leave room for a space added at the end of this function.
 1776|   125k|                if (fCharsAvail == kCharBufSize - 1) {
  ------------------
  |  Branch (1776:21): [True: 1, False: 125k]
  ------------------
 1777|      1|                    fCharsAvail = 0;
 1778|      1|                    fRawBufIndex = 0;
 1779|      1|                    fMemoryManager->deallocate(fPublicId);
 1780|      1|                    fMemoryManager->deallocate(fEncodingStr);
 1781|      1|                    ArrayJanitor<XMLCh> janValue(fSystemId, fMemoryManager);
 1782|      1|                    ThrowXMLwithMemMgr1
  ------------------
  |  |  266|      1|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
 1783|      1|                    (
 1784|      1|                        TranscodingException
 1785|      1|                        , XMLExcepts::Reader_CouldNotDecodeFirstLine
 1786|      1|                        , fSystemId
 1787|      1|                        , fMemoryManager
 1788|      1|                    );
 1789|      1|                }
 1790|       |
 1791|       |
 1792|       |                //
 1793|       |                //  And put it into the character buffer. This stuff has to
 1794|       |                //  look like it was normally transcoded.
 1795|       |                //
 1796|   125k|                fCharSizeBuf[fCharsAvail] = 1;
 1797|   125k|                fCharBuf[fCharsAvail++] = chCur;
 1798|       |
 1799|       |                // If its a > char, then break out
 1800|   125k|                if (chCur == chCloseAngle)
  ------------------
  |  Branch (1800:21): [True: 1, False: 125k]
  ------------------
 1801|      1|                    break;
 1802|       |
 1803|       |                // Watch for using up all input and get out
 1804|   125k|                if (fRawBufIndex == fRawBytesAvail)
  ------------------
  |  Branch (1804:21): [True: 22, False: 125k]
  ------------------
 1805|     22|                    break;
 1806|   125k|            }
 1807|     23|            break;
 1808|     24|        }
 1809|       |
 1810|     23|        default :
  ------------------
  |  Branch (1810:9): [True: 0, False: 7.12k]
  ------------------
 1811|       |            // It should never be anything else here
 1812|      0|            fMemoryManager->deallocate(fPublicId);
 1813|      0|            fMemoryManager->deallocate(fEncodingStr);
 1814|      0|            fMemoryManager->deallocate(fSystemId);
 1815|      0|            ThrowXMLwithMemMgr(TranscodingException, XMLExcepts::Reader_BadAutoEncoding, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
 1816|      0|            break;
 1817|  7.12k|    }
 1818|       |
 1819|       |    //
 1820|       |    //  Ok, by the time we get here, if its a legal XML file we have eaten
 1821|       |    //  the XML/TextDecl. So, if we are a PE and are being referenced from
 1822|       |    //  outside a literal, then we need to throw in an arbitrary space that
 1823|       |    //  is required by XML.
 1824|       |    //
 1825|  7.10k|    if ((fType == Type_PE) && (fRefFrom == RefFrom_NonLiteral))
  ------------------
  |  Branch (1825:9): [True: 0, False: 7.10k]
  |  Branch (1825:31): [True: 0, False: 0]
  ------------------
 1826|      0|        fCharBuf[fCharsAvail++] = chSpace;
 1827|       |
 1828|       |    //  Calculate fCharOfsBuf buffer using the elements from fCharBufSize
 1829|  7.10k|    if (fCalculateSrcOfs)
  ------------------
  |  Branch (1829:9): [True: 0, False: 7.10k]
  ------------------
 1830|      0|    {
 1831|      0|        fCharOfsBuf[0] = 0;
 1832|      0|        for (XMLSize_t index = 1; index < fCharsAvail; ++index) {
  ------------------
  |  Branch (1832:35): [True: 0, False: 0]
  ------------------
 1833|      0|            fCharOfsBuf[index] = fCharOfsBuf[index-1]+fCharSizeBuf[index-1];
 1834|      0|        }
 1835|      0|    }
 1836|  7.10k|}
_ZN11xercesc_3_29XMLReader16refreshRawBufferEv:
 1845|   799k|{
 1846|       |    // Make sure we don't underflow on the subtraction.
 1847|   799k|    if (fRawBufIndex > fRawBytesAvail) {
  ------------------
  |  Branch (1847:9): [True: 0, False: 799k]
  ------------------
 1848|      0|        ThrowXMLwithMemMgr1
  ------------------
  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
 1849|      0|        (
 1850|      0|            RuntimeException
 1851|      0|            , XMLExcepts::Str_StartIndexPastEnd
 1852|      0|            , fSystemId
 1853|      0|            , fMemoryManager
 1854|      0|        );
 1855|      0|    }
 1856|       |
 1857|       |    //
 1858|       |    //  If there are any bytes left, move them down to the start. There
 1859|       |    //  should only ever be (max bytes per char - 1) at the most.
 1860|       |    //
 1861|   799k|    const XMLSize_t bytesLeft = fRawBytesAvail - fRawBufIndex;
 1862|       |
 1863|       |    // Move the existing ones down
 1864|  2.20M|    for (XMLSize_t index = 0; index < bytesLeft; index++)
  ------------------
  |  Branch (1864:31): [True: 1.41M, False: 799k]
  ------------------
 1865|  1.41M|        fRawByteBuf[index] = fRawByteBuf[fRawBufIndex + index];
 1866|       |
 1867|       |    //
 1868|       |    //  And then read into the buffer past the existing bytes. Add back in
 1869|       |    //  that many to the bytes read, and subtract that many from the bytes
 1870|       |    //  requested.
 1871|       |    //
 1872|   799k|    fRawBytesAvail = fStream->readBytes
 1873|   799k|    (
 1874|   799k|        &fRawByteBuf[bytesLeft], kRawBufSize - bytesLeft
 1875|   799k|    ) + bytesLeft;
 1876|       |
 1877|       |    //
 1878|       |    //  We need to reset the buffer index back to the start in all cases,
 1879|       |    //  since any trailing data was copied down to the start.
 1880|       |    //
 1881|   799k|    fRawBufIndex = 0;
 1882|   799k|}
_ZN11xercesc_3_29XMLReader14xcodeMoreCharsEPDsPhm:
 1894|   796k|{
 1895|   796k|    XMLSize_t charsDone = 0;
 1896|   796k|    XMLSize_t bytesEaten = 0;
 1897|   796k|    bool needMode = false;
 1898|       |
 1899|  1.19M|    while (!bytesEaten)
  ------------------
  |  Branch (1899:12): [True: 796k, False: 397k]
  ------------------
 1900|   796k|    {
 1901|       |        // If our raw buffer is low, then lets load up another batch of
 1902|       |        // raw bytes now.
 1903|       |        //
 1904|   796k|        XMLSize_t bytesLeft = fRawBytesAvail - fRawBufIndex;
 1905|   796k|        if (needMode || bytesLeft == 0 || bytesLeft < fLowWaterMark)
  ------------------
  |  Branch (1905:13): [True: 326, False: 796k]
  |  Branch (1905:25): [True: 405k, False: 391k]
  |  Branch (1905:43): [True: 21.3k, False: 369k]
  ------------------
 1906|   427k|        {
 1907|   427k|            refreshRawBuffer();
 1908|       |
 1909|       |            // If there are no characters or if we need more but didn't get
 1910|       |            // any, return zero now.
 1911|       |            //
 1912|   427k|            if (fRawBytesAvail == 0 ||
  ------------------
  |  Branch (1912:17): [True: 398k, False: 28.2k]
  ------------------
 1913|   427k|                (needMode && (bytesLeft == fRawBytesAvail - fRawBufIndex)))
  ------------------
  |  Branch (1913:18): [True: 326, False: 27.9k]
  |  Branch (1913:30): [True: 312, False: 14]
  ------------------
 1914|   399k|                return 0;
 1915|   427k|        }
 1916|       |
 1917|       |        // Ask the transcoder to internalize another batch of chars. It is
 1918|       |        // possible that there is data in the raw buffer but the transcoder
 1919|       |        // is unable to produce anything because transcoding of multi-byte
 1920|       |        // encodings may have left a few bytes representing a partial
 1921|       |        // character in the buffer that can't be used until the next chunk
 1922|       |        // (and the rest of the character) is read. In this case set the
 1923|       |        // needMore flag and try again.
 1924|       |        //
 1925|       |
 1926|   397k|        charsDone = fTranscoder->transcodeFrom
 1927|   397k|          (
 1928|   397k|            &fRawByteBuf[fRawBufIndex]
 1929|   397k|            , fRawBytesAvail - fRawBufIndex
 1930|   397k|            , bufToFill
 1931|   397k|            , maxChars
 1932|   397k|            , bytesEaten
 1933|   397k|            , charSizes
 1934|   397k|          );
 1935|       |
 1936|   397k|        if (bytesEaten == 0)
  ------------------
  |  Branch (1936:13): [True: 326, False: 397k]
  ------------------
 1937|    326|            needMode = true;
 1938|   397k|        else
 1939|   397k|            fRawBufIndex += bytesEaten;
 1940|   397k|    }
 1941|       |
 1942|   397k|    return charsDone;
 1943|   796k|}
_ZN11xercesc_3_29XMLReader9handleEOLERDsb:
 1969|  41.3M|{
 1970|       |    // 1. the two-character sequence #xD #xA
 1971|       |    // 2. the two-character sequence #xD #x85
 1972|       |    // 5. any #xD character that is not immediately followed by #xA or #x85.
 1973|  41.3M|    switch(curCh)
 1974|  41.3M|    {
 1975|  1.16M|    case chCR:
  ------------------
  |  Branch (1975:5): [True: 1.16M, False: 40.2M]
  ------------------
 1976|  1.16M|        fCurCol = 1;
 1977|  1.16M|        fCurLine++;
 1978|       |
 1979|       |        //
 1980|       |        //  If not already internalized, then convert it to an
 1981|       |        //  LF and eat any following LF.
 1982|       |        //
 1983|  1.16M|        if (fSource == Source_External)
  ------------------
  |  Branch (1983:13): [True: 1.15M, False: 4.19k]
  ------------------
 1984|  1.15M|        {
 1985|  1.15M|            if ((fCharIndex < fCharsAvail) || refreshCharBuffer())
  ------------------
  |  Branch (1985:17): [True: 1.15M, False: 679]
  |  Branch (1985:47): [True: 617, False: 62]
  ------------------
 1986|  1.15M|            {
 1987|  1.15M|                if ( fCharBuf[fCharIndex] == chLF              ||
  ------------------
  |  Branch (1987:22): [True: 5.43k, False: 1.15M]
  ------------------
 1988|  1.15M|                    ((fCharBuf[fCharIndex] == chNEL) && fNEL)  )
  ------------------
  |  Branch (1988:22): [True: 1.21k, False: 1.14M]
  |  Branch (1988:57): [True: 378, False: 838]
  ------------------
 1989|  5.80k|                {
 1990|  5.80k|                    fCharIndex++;
 1991|  5.80k|                }
 1992|  1.15M|            }
 1993|  1.15M|            curCh = chLF;
 1994|  1.15M|        }
 1995|  1.16M|        break;
 1996|       |
 1997|  9.07M|    case chLF:
  ------------------
  |  Branch (1997:5): [True: 9.07M, False: 32.3M]
  ------------------
 1998|  9.07M|        fCurCol = 1;
 1999|  9.07M|        fCurLine++;
 2000|  9.07M|        break;
 2001|       |
 2002|       |    // 3. the single character #x85
 2003|       |    // 4. the single character #x2028
 2004|   100k|    case chNEL:
  ------------------
  |  Branch (2004:5): [True: 100k, False: 41.2M]
  ------------------
 2005|   147k|    case chLineSeparator:
  ------------------
  |  Branch (2005:5): [True: 46.4k, False: 41.3M]
  ------------------
 2006|   147k|        if (inDecl && fXMLVersion == XMLV1_1)
  ------------------
  |  Branch (2006:13): [True: 1, False: 147k]
  |  Branch (2006:23): [True: 1, False: 0]
  ------------------
 2007|      1|        {
 2008|       |
 2009|       |        /***
 2010|       |         * XML1.1
 2011|       |         *
 2012|       |         * 2.11 End-of-Line Handling
 2013|       |         *  ...
 2014|       |         *   The characters #x85 and #x2028 cannot be reliably recognized and translated
 2015|       |         *   until an entity's encoding declaration (if present) has been read.
 2016|       |         *   Therefore, it is a fatal error to use them within the XML declaration or
 2017|       |         *   text declaration.
 2018|       |         *
 2019|       |         ***/
 2020|      1|            ThrowXMLwithMemMgr1
  ------------------
  |  |  266|      1|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
 2021|      1|                (
 2022|      1|                TranscodingException
 2023|      1|                , XMLExcepts::Reader_NelLsepinDecl
 2024|      1|                , fSystemId
 2025|      1|                , fMemoryManager
 2026|      1|                );
 2027|      1|        }
 2028|       |
 2029|   147k|        if (fNEL && fSource == Source_External)
  ------------------
  |  Branch (2029:13): [True: 2.36k, False: 144k]
  |  Branch (2029:21): [True: 2.09k, False: 267]
  ------------------
 2030|  2.09k|        {
 2031|  2.09k|            fCurCol = 1;
 2032|  2.09k|            fCurLine++;
 2033|  2.09k|            curCh = chLF;
 2034|  2.09k|        }
 2035|   147k|        break;
 2036|  30.9M|    default:
  ------------------
  |  Branch (2036:5): [True: 30.9M, False: 10.3M]
  ------------------
 2037|  30.9M|        fCurCol++;
 2038|  41.3M|    }
 2039|  41.3M|}

_ZNK11xercesc_3_29XMLReader10isNameCharEDs:
  477|  73.9M|{
  478|  73.9M|    return ((fgCharCharsTable[toCheck] & gNameCharMask) != 0);
  479|  73.9M|}
_ZNK11xercesc_3_29XMLReader15isFirstNameCharEDs:
  493|  35.6M|{
  494|  35.6M|    return ((fgCharCharsTable[toCheck] & gFirstNameCharMask) != 0);
  495|  35.6M|}
_ZNK11xercesc_3_29XMLReader21isSpecialStartTagCharEDs:
  504|  22.4M|{
  505|  22.4M|    return ((fgCharCharsTable[toCheck] & gSpecialStartTagCharMask) != 0);
  506|  22.4M|}
_ZNK11xercesc_3_29XMLReader9isXMLCharEDs:
  509|   304M|{
  510|   304M|    return ((fgCharCharsTable[toCheck] & gXMLCharMask) != 0);
  511|   304M|}
_ZNK11xercesc_3_29XMLReader12isWhitespaceEDs:
  520|   290M|{
  521|   290M|    return ((fgCharCharsTable[toCheck] & gWhitespaceCharMask) != 0);
  522|   290M|}
_ZNK11xercesc_3_29XMLReader13isControlCharEDs:
  525|  1.08k|{
  526|  1.08k|    return ((fgCharCharsTable[toCheck] & gControlCharMask) != 0);
  527|  1.08k|}
_ZNK11xercesc_3_29XMLReader17charsLeftInBufferEv:
  533|  29.1M|{
  534|  29.1M|    return fCharsAvail - fCharIndex;
  535|  29.1M|}
_ZNK11xercesc_3_29XMLReader15getColumnNumberEv:
  542|  6.34k|{
  543|  6.34k|    return fCurCol;
  544|  6.34k|}
_ZNK11xercesc_3_29XMLReader14getEncodingStrEv:
  547|    674|{
  548|    674|    return fEncodingStr;
  549|    674|}
_ZNK11xercesc_3_29XMLReader13getLineNumberEv:
  552|  6.34k|{
  553|  6.34k|    return fCurLine;
  554|  6.34k|}
_ZNK11xercesc_3_29XMLReader13getNoMoreFlagEv:
  557|  18.5M|{
  558|  18.5M|    return fNoMore;
  559|  18.5M|}
_ZNK11xercesc_3_29XMLReader11getPublicIdEv:
  562|  5.50k|{
  563|  5.50k|    return fPublicId;
  564|  5.50k|}
_ZNK11xercesc_3_29XMLReader12getReaderNumEv:
  567|  70.0M|{
  568|  70.0M|    return fReaderNum;
  569|  70.0M|}
_ZNK11xercesc_3_29XMLReader11getSystemIdEv:
  582|  5.50k|{
  583|  5.50k|    return fSystemId;
  584|  5.50k|}
_ZNK11xercesc_3_29XMLReader13getThrowAtEndEv:
  587|   363k|{
  588|   363k|    return fThrowAtEnd;
  589|   363k|}
_ZNK11xercesc_3_29XMLReader7getTypeEv:
  592|  26.7k|{
  593|  26.7k|    return fType;
  594|  26.7k|}
_ZN11xercesc_3_29XMLReader12setReaderNumEm:
  600|   372k|{
  601|   372k|    fReaderNum = newNum;
  602|   372k|}
_ZN11xercesc_3_29XMLReader13setXMLVersionENS0_10XMLVersionE:
  610|   373k|{
  611|   373k|    fXMLVersion = version;
  612|   373k|    if (version == XMLV1_1) {
  ------------------
  |  Branch (612:9): [True: 1.63k, False: 371k]
  ------------------
  613|  1.63k|        fNEL = true;
  614|  1.63k|        fgCharCharsTable = XMLChar1_1::fgCharCharsTable1_1;
  615|  1.63k|    }
  616|   371k|    else {
  617|   371k|        fNEL = XMLChar1_0::enableNEL;
  618|   371k|        fgCharCharsTable = XMLChar1_0::fgCharCharsTable1_0;
  619|   371k|    }
  620|       |
  621|   373k|}
_ZN11xercesc_3_29XMLReader21movePlainContentCharsERNS_9XMLBufferE:
  636|  13.5M|{
  637|  13.5M|    const XMLSize_t chunkSize = fCharsAvail - fCharIndex;
  638|  13.5M|    const XMLCh* cursor = &fCharBuf[fCharIndex];
  639|  13.5M|    XMLSize_t count=0;
  640|   337M|    for(;count<chunkSize && (fgCharCharsTable[*cursor++] & gPlainContentCharMask) != 0;++count) /*noop*/ ;
  ------------------
  |  Branch (640:10): [True: 337M, False: 44.1k]
  |  Branch (640:29): [True: 324M, False: 13.4M]
  ------------------
  641|       |
  642|  13.5M|    if (count!=0)
  ------------------
  |  Branch (642:9): [True: 10.1M, False: 3.40M]
  ------------------
  643|  10.1M|    {
  644|  10.1M|        dest.append(&fCharBuf[fCharIndex], count);
  645|  10.1M|        fCharIndex += count;
  646|  10.1M|        fCurCol    += (XMLFileLoc)count;
  647|  10.1M|    }
  648|  13.5M|}
_ZN11xercesc_3_29XMLReader16getNextCharIfNotEDsRDs:
  655|  13.6M|{
  656|       |    //
  657|       |    //  See if there is at least a char in the buffer. Else, do the buffer
  658|       |    //  reload logic.
  659|       |    //
  660|  13.6M|    if (fCharIndex >= fCharsAvail)
  ------------------
  |  Branch (660:9): [True: 44.2k, False: 13.6M]
  ------------------
  661|  44.2k|    {
  662|       |        // If fNoMore is set, then we have nothing else to give
  663|  44.2k|        if (fNoMore)
  ------------------
  |  Branch (663:13): [True: 274, False: 43.9k]
  ------------------
  664|    274|            return false;
  665|       |
  666|       |        // Try to refresh
  667|  43.9k|        if (!refreshCharBuffer())
  ------------------
  |  Branch (667:13): [True: 35.5k, False: 8.34k]
  ------------------
  668|  35.5k|            return false;
  669|  43.9k|    }
  670|       |
  671|       |    // Check the next char
  672|  13.6M|    if (fCharBuf[fCharIndex] == chNotToGet)
  ------------------
  |  Branch (672:9): [True: 6.95M, False: 6.69M]
  ------------------
  673|  6.95M|        return false;
  674|       |
  675|       |    // Its not the one we want to skip so bump the index
  676|  6.69M|    chGotten = fCharBuf[fCharIndex++];
  677|       |
  678|       |    // Handle end of line normalization and line/col member maintenance.
  679|       |    //
  680|       |    // we can have end-of-line combinations with a leading
  681|       |    // chCR(xD), chLF(xA), chNEL(x85), or chLineSeparator(x2028)
  682|       |    //
  683|       |    // 0000000000001101 chCR
  684|       |    // 0000000000001010 chLF
  685|       |    // 0000000010000101 chNEL
  686|       |    // 0010000000101000 chLineSeparator
  687|       |    // -----------------------
  688|       |    // 1101111101010000 == ~(chCR|chLF|chNEL|chLineSeparator)
  689|       |    //
  690|       |    // if the result of the logical-& operation is
  691|       |    // true  : 'curCh' can not be chCR, chLF, chNEL or chLineSeparator
  692|       |    // false : 'curCh' can be chCR, chLF, chNEL or chLineSeparator
  693|       |    //
  694|  6.69M|    if ( chGotten & (XMLCh) ~(chCR|chLF|chNEL|chLineSeparator) )
  ------------------
  |  Branch (694:10): [True: 308k, False: 6.39M]
  ------------------
  695|   308k|    {
  696|   308k|        fCurCol++;
  697|   308k|    } else
  698|  6.39M|    {
  699|  6.39M|        handleEOL(chGotten, false);
  700|  6.39M|    }
  701|       |
  702|  6.69M|    return true;
  703|  13.6M|}
_ZN11xercesc_3_29XMLReader11getNextCharERDs:
  709|   373M|{
  710|       |    //
  711|       |    //  See if there is at least a char in the buffer. Else, do the buffer
  712|       |    //  reload logic.
  713|       |    //
  714|   373M|    if (fCharIndex >= fCharsAvail)
  ------------------
  |  Branch (714:9): [True: 189k, False: 373M]
  ------------------
  715|   189k|    {
  716|       |        // If fNoMore is set, then we have nothing else to give
  717|   189k|        if (fNoMore)
  ------------------
  |  Branch (717:13): [True: 652, False: 188k]
  ------------------
  718|    652|            return false;
  719|       |
  720|       |        // Try to refresh
  721|   188k|        if (!refreshCharBuffer())
  ------------------
  |  Branch (721:13): [True: 162k, False: 26.4k]
  ------------------
  722|   162k|            return false;
  723|   188k|    }
  724|       |
  725|   373M|    chGotten = fCharBuf[fCharIndex++];
  726|       |
  727|       |    // Handle end of line normalization and line/col member maintenance.
  728|       |    //
  729|       |    // we can have end-of-line combinations with a leading
  730|       |    // chCR(xD), chLF(xA), chNEL(x85), or chLineSeparator(x2028)
  731|       |    //
  732|       |    // 0000000000001101 chCR
  733|       |    // 0000000000001010 chLF
  734|       |    // 0000000010000101 chNEL
  735|       |    // 0010000000101000 chLineSeparator
  736|       |    // -----------------------
  737|       |    // 1101111101010000 == ~(chCR|chLF|chNEL|chLineSeparator)
  738|       |    //
  739|       |    // if the result of the logical-& operation is
  740|       |    // true  : 'curCh' can not be chCR, chLF, chNEL or chLineSeparator
  741|       |    // false : 'curCh' can be chCR, chLF, chNEL or chLineSeparator
  742|       |    //
  743|   373M|    if ( chGotten & (XMLCh) ~(chCR|chLF|chNEL|chLineSeparator) )
  ------------------
  |  Branch (743:10): [True: 344M, False: 29.3M]
  ------------------
  744|   344M|    {
  745|   344M|        fCurCol++;
  746|   344M|    } else
  747|  29.3M|    {
  748|  29.3M|        handleEOL(chGotten, false);
  749|  29.3M|    }
  750|       |
  751|   373M|    return true;
  752|   373M|}
_ZN11xercesc_3_29XMLReader12peekNextCharERDs:
  759|  69.9M|{
  760|       |    //
  761|       |    //  If there is something still in the buffer, get it. Else do the reload
  762|       |    //  scenario.
  763|       |    //
  764|  69.9M|    if (fCharIndex >= fCharsAvail)
  ------------------
  |  Branch (764:9): [True: 211k, False: 69.6M]
  ------------------
  765|   211k|    {
  766|       |        // Try to refresh the buffer
  767|   211k|        if (!refreshCharBuffer())
  ------------------
  |  Branch (767:13): [True: 200k, False: 10.3k]
  ------------------
  768|   200k|        {
  769|   200k|            chGotten = chNull;
  770|   200k|            return false;
  771|   200k|        }
  772|   211k|    }
  773|       |
  774|  69.7M|    chGotten = fCharBuf[fCharIndex];
  775|       |
  776|       |    //
  777|       |    //  Even though we are only peeking, we have to act the same as the
  778|       |    //  normal char get method in regards to newline normalization, though
  779|       |    //  its not as complicated as the actual character getting method's.
  780|       |    //
  781|  69.7M|    if ((chGotten == chCR || (fNEL && (chGotten == chNEL || chGotten == chLineSeparator)))
  ------------------
  |  Branch (781:10): [True: 8.18k, False: 69.7M]
  |  Branch (781:31): [True: 26.4k, False: 69.6M]
  |  Branch (781:40): [True: 605, False: 25.8k]
  |  Branch (781:61): [True: 980, False: 24.8k]
  ------------------
  782|  69.7M|        && (fSource == Source_External))
  ------------------
  |  Branch (782:12): [True: 8.93k, False: 798]
  ------------------
  783|  8.93k|        chGotten = chLF;
  784|       |
  785|  69.7M|    return true;
  786|  69.9M|}

_ZN11xercesc_3_214XMLInitializer20initializeXMLScannerEv:
   56|      1|{
   57|      1|    gMsgLoader = XMLPlatformUtils::loadMsgSet(XMLUni::fgXMLErrDomain);
   58|       |
   59|      1|    if (!gMsgLoader)
  ------------------
  |  Branch (59:9): [True: 0, False: 1]
  ------------------
   60|      0|      XMLPlatformUtils::panic(PanicHandler::Panic_CantLoadMsgDomain);
   61|       |
   62|      1|    sScannerMutex = new XMLMutex(XMLPlatformUtils::fgMemoryManager);
   63|      1|}
_ZN11xercesc_3_210XMLScannerC2EPNS_12XMLValidatorEPNS_15GrammarResolverEPNS_13MemoryManagerE:
   86|  7.12k|    : fBufferSize(1024 * 1024)
   87|  7.12k|    , fLowWaterMark (100)
   88|  7.12k|    , fStandardUriConformant(false)
   89|  7.12k|    , fCalculateSrcOfs(false)
   90|  7.12k|    , fDoNamespaces(false)
   91|  7.12k|    , fExitOnFirstFatal(true)
   92|  7.12k|    , fValidationConstraintFatal(false)
   93|  7.12k|    , fInException(false)
   94|  7.12k|    , fStandalone(false)
   95|  7.12k|    , fHasNoDTD(true)
   96|  7.12k|    , fValidate(false)
   97|  7.12k|    , fValidatorFromUser(false)
   98|  7.12k|    , fDoSchema(false)
   99|  7.12k|    , fSchemaFullChecking(false)
  100|  7.12k|    , fIdentityConstraintChecking(true)
  101|  7.12k|    , fToCacheGrammar(false)
  102|  7.12k|    , fUseCachedGrammar(false)
  103|  7.12k|    , fDisallowDTD(false)
  104|  7.12k|    , fLoadExternalDTD(true)
  105|  7.12k|    , fLoadSchema(true)
  106|  7.12k|    , fNormalizeData(true)
  107|  7.12k|    , fGenerateSyntheticAnnotations(false)
  108|  7.12k|    , fValidateAnnotations(false)
  109|  7.12k|    , fIgnoreCachedDTD(false)
  110|  7.12k|    , fIgnoreAnnotations(false)
  111|  7.12k|    , fDisableDefaultEntityResolution(false)
  112|  7.12k|    , fSkipDTDValidation(false)
  113|  7.12k|    , fHandleMultipleImports(false)
  114|  7.12k|    , fErrorCount(0)
  115|  7.12k|    , fEntityExpansionLimit(0)
  116|  7.12k|    , fEntityExpansionCount(0)
  117|  7.12k|    , fEmptyNamespaceId(0)
  118|  7.12k|    , fUnknownNamespaceId(0)
  119|  7.12k|    , fXMLNamespaceId(0)
  120|  7.12k|    , fXMLNSNamespaceId(0)
  121|  7.12k|    , fSchemaNamespaceId(0)
  122|  7.12k|    , fUIntPool(0)
  123|  7.12k|    , fUIntPoolRow(0)
  124|  7.12k|    , fUIntPoolCol(0)
  125|  7.12k|    , fUIntPoolRowTotal(2)
  126|  7.12k|    , fScannerId(0)
  127|  7.12k|    , fSequenceId(0)
  128|  7.12k|    , fAttrList(0)
  129|  7.12k|    , fAttrDupChkRegistry(0)
  130|  7.12k|    , fDocHandler(0)
  131|  7.12k|    , fDocTypeHandler(0)
  132|  7.12k|    , fEntityHandler(0)
  133|  7.12k|    , fErrorReporter(0)
  134|  7.12k|    , fErrorHandler(0)
  135|  7.12k|    , fPSVIHandler(0)
  136|  7.12k|    , fValidationContext(0)
  137|  7.12k|    , fEntityDeclPoolRetrieved(false)
  138|  7.12k|    , fReaderMgr(manager)
  139|  7.12k|    , fValidator(valToAdopt)
  140|  7.12k|    , fValScheme(Val_Never)
  141|  7.12k|    , fGrammarResolver(grammarResolver)
  142|  7.12k|    , fGrammarPoolMemoryManager(grammarResolver->getGrammarPoolMemoryManager())
  143|  7.12k|    , fGrammar(0)
  144|  7.12k|    , fRootGrammar(0)
  145|  7.12k|    , fURIStringPool(0)
  146|  7.12k|    , fRootElemName(0)
  147|  7.12k|    , fExternalSchemaLocation(0)
  148|  7.12k|    , fExternalNoNamespaceSchemaLocation(0)
  149|  7.12k|    , fSecurityManager(0)
  150|  7.12k|    , fXMLVersion(XMLReader::XMLV1_0)
  151|  7.12k|    , fMemoryManager(manager)
  152|  7.12k|    , fBufMgr(manager)
  153|  7.12k|    , fAttNameBuf(1023, manager)
  154|  7.12k|    , fAttValueBuf(1023, manager)
  155|  7.12k|    , fCDataBuf(1023, manager)
  156|  7.12k|    , fQNameBuf(1023, manager)
  157|  7.12k|    , fPrefixBuf(1023, manager)
  158|  7.12k|    , fURIBuf(1023, manager)
  159|  7.12k|    , fWSNormalizeBuf(1023, manager)
  160|  7.12k|    , fElemStack(manager)
  161|  7.12k|{
  162|  7.12k|    CleanupType cleanup(this, &XMLScanner::cleanUp);
  163|       |
  164|  7.12k|    try
  165|  7.12k|    {
  166|  7.12k|        commonInit();
  167|  7.12k|    }
  168|  7.12k|    catch(const OutOfMemoryException&)
  169|  7.12k|    {
  170|       |        // Don't cleanup when out of memory, since executing the
  171|       |        // code can cause problems.
  172|      0|        cleanup.release();
  173|       |
  174|      0|        throw;
  175|      0|    }
  176|       |
  177|  7.12k|    cleanup.release();
  178|  7.12k|}
_ZN11xercesc_3_210XMLScannerD2Ev:
  283|  7.12k|{
  284|  7.12k|    cleanUp();
  285|  7.12k|}
_ZN11xercesc_3_210XMLScanner10commonInitEv:
  686|  7.12k|{
  687|       |    //  We have to do a little init that involves statics, so we have to
  688|       |    //  use the mutex to protect it.
  689|  7.12k|    {
  690|  7.12k|        XMLMutexLock lockInit(sScannerMutex);
  691|       |
  692|       |        // And assign ourselves the next available scanner id
  693|  7.12k|        fScannerId = ++gScannerId;
  694|  7.12k|    }
  695|       |
  696|       |    //  Create the attribute list, which is used to store attribute values
  697|       |    //  during start tag processing. Give it a reasonable initial size that
  698|       |    //  will serve for most folks, though it will grow as required.
  699|  7.12k|    fAttrList = new (fMemoryManager) RefVectorOf<XMLAttr>(32, true, fMemoryManager);
  700|       |
  701|       |    //  Create the id ref list. This is used to enforce XML 1.0 ID ref
  702|       |    //  semantics, i.e. all id refs must refer to elements that exist
  703|  7.12k|    fValidationContext = new (fMemoryManager) ValidationContextImpl(fMemoryManager);
  704|  7.12k|    fValidationContext->setElemStack(&fElemStack);
  705|  7.12k|    fValidationContext->setScanner(this);
  706|       |
  707|       |    //  Create the GrammarResolver
  708|       |    //fGrammarResolver = new GrammarResolver();
  709|       |
  710|       |    // create initial, 64-element, fUIntPool
  711|  7.12k|    fUIntPool = (unsigned int **)fMemoryManager->allocate(sizeof(unsigned int *) *fUIntPoolRowTotal);
  712|  7.12k|    memset(fUIntPool, 0, sizeof(unsigned int *) * fUIntPoolRowTotal);
  713|  7.12k|    fUIntPool[0] = (unsigned int *)fMemoryManager->allocate(sizeof(unsigned int) << 6);
  714|  7.12k|    memset(fUIntPool[0], 0, sizeof(unsigned int) << 6);
  715|       |
  716|       |    // Register self as handler for XMLBufferFull events on the CDATA buffer
  717|  7.12k|    fCDataBuf.setFullHandler(this, fBufferSize);
  718|       |
  719|  7.12k|   if (fValidator) {
  ------------------
  |  Branch (719:8): [True: 0, False: 7.12k]
  ------------------
  720|      0|       fValidatorFromUser = true;
  721|      0|       initValidator(fValidator);
  722|      0|   }
  723|  7.12k|}
_ZN11xercesc_3_210XMLScanner7cleanUpEv:
  726|  7.12k|{
  727|  7.12k|    delete fAttrList;
  728|  7.12k|    delete fAttrDupChkRegistry;
  729|  7.12k|    delete fValidationContext;
  730|  7.12k|    fMemoryManager->deallocate(fRootElemName);//delete [] fRootElemName;
  731|  7.12k|    fMemoryManager->deallocate(fExternalSchemaLocation);//delete [] fExternalSchemaLocation;
  732|  7.12k|    fMemoryManager->deallocate(fExternalNoNamespaceSchemaLocation);//delete [] fExternalNoNamespaceSchemaLocation;
  733|       |    // delete fUIntPool
  734|  7.12k|    if (fUIntPool)
  ------------------
  |  Branch (734:9): [True: 7.12k, False: 0]
  ------------------
  735|  7.12k|    {
  736|  14.2k|        for (unsigned int i=0; i<=fUIntPoolRow; i++)
  ------------------
  |  Branch (736:32): [True: 7.12k, False: 7.12k]
  ------------------
  737|  7.12k|        {
  738|  7.12k|            fMemoryManager->deallocate(fUIntPool[i]);
  739|  7.12k|        }
  740|  7.12k|        fMemoryManager->deallocate(fUIntPool);
  741|  7.12k|    }
  742|  7.12k|}
_ZN11xercesc_3_210XMLScanner13initValidatorEPNS_12XMLValidatorE:
  744|  14.2k|void XMLScanner::initValidator(XMLValidator* theValidator) {
  745|       |
  746|       |    //  Tell the validator about the stuff it needs to know in order to
  747|       |    //  do its work.
  748|  14.2k|    theValidator->setScannerInfo(this, &fReaderMgr, &fBufMgr);
  749|  14.2k|    theValidator->setErrorReporter(fErrorReporter);
  750|  14.2k|}
_ZN11xercesc_3_210XMLScanner27emitErrorWillThrowExceptionENS_7XMLErrs5CodesE:
  760|  35.8k|{
  761|  35.8k|    if (XMLErrs::isFatal(toEmit) && fExitOnFirstFatal && !fInException)
  ------------------
  |  Branch (761:9): [True: 5.82k, False: 30.0k]
  |  Branch (761:37): [True: 5.82k, False: 0]
  |  Branch (761:58): [True: 4.46k, False: 1.36k]
  ------------------
  762|  4.46k|        return true;
  763|  31.3k|    return false;
  764|  35.8k|}
_ZN11xercesc_3_210XMLScanner9emitErrorENS_7XMLErrs5CodesE:
  767|  2.81k|{
  768|       |    // Bump the error count if it is not a warning
  769|  2.81k|    if (XMLErrs::errorType(toEmit) != XMLErrorReporter::ErrType_Warning)
  ------------------
  |  Branch (769:9): [True: 2.81k, False: 0]
  ------------------
  770|  2.81k|        incrementErrorCount();
  771|       |
  772|  2.81k|    if (fErrorReporter)
  ------------------
  |  Branch (772:9): [True: 0, False: 2.81k]
  ------------------
  773|      0|    {
  774|       |        // Load the message into a local for display
  775|      0|        const XMLSize_t msgSize = 1023;
  776|      0|        XMLCh errText[msgSize + 1];
  777|       |
  778|      0|        if (!gMsgLoader->loadMsg(toEmit, errText, msgSize))
  ------------------
  |  Branch (778:13): [True: 0, False: 0]
  ------------------
  779|      0|        {
  780|       |                // <TBD> Probably should load a default msg here
  781|      0|        }
  782|       |
  783|       |        //  Create a LastExtEntityInfo structure and get the reader manager
  784|       |        //  to fill it in for us. This will give us the information about
  785|       |        //  the last reader on the stack that was an external entity of some
  786|       |        //  sort (i.e. it will ignore internal entities.
  787|      0|        ReaderMgr::LastExtEntityInfo lastInfo;
  788|      0|        fReaderMgr.getLastExtEntityInfo(lastInfo);
  789|       |
  790|      0|        fErrorReporter->error
  791|      0|        (
  792|      0|            toEmit
  793|      0|            , XMLUni::fgXMLErrDomain
  794|      0|            , XMLErrs::errorType(toEmit)
  795|      0|            , errText
  796|      0|            , lastInfo.systemId
  797|      0|            , lastInfo.publicId
  798|      0|            , lastInfo.lineNumber
  799|      0|            , lastInfo.colNumber
  800|      0|        );
  801|      0|    }
  802|       |
  803|       |    // Bail out if its fatal an we are to give up on the first fatal error
  804|  2.81k|    if (emitErrorWillThrowException(toEmit))
  ------------------
  |  Branch (804:9): [True: 2.81k, False: 0]
  ------------------
  805|  2.81k|        throw toEmit;
  806|  2.81k|}
_ZN11xercesc_3_210XMLScanner9emitErrorENS_7XMLErrs5CodesEPKDsS4_S4_S4_:
  813|  31.6k|{
  814|       |    // Bump the error count if it is not a warning
  815|  31.6k|    if (XMLErrs::errorType(toEmit) != XMLErrorReporter::ErrType_Warning)
  ------------------
  |  Branch (815:9): [True: 1.63k, False: 30.0k]
  ------------------
  816|  1.63k|        incrementErrorCount();
  817|       |
  818|  31.6k|    if (fErrorReporter)
  ------------------
  |  Branch (818:9): [True: 0, False: 31.6k]
  ------------------
  819|      0|    {
  820|       |        //  Load the message into alocal and replace any tokens found in
  821|       |        //  the text.
  822|      0|        const XMLSize_t maxChars = 2047;
  823|      0|        XMLCh errText[maxChars + 1];
  824|       |
  825|      0|        if (!gMsgLoader->loadMsg(toEmit, errText, maxChars, text1, text2, text3, text4, fMemoryManager))
  ------------------
  |  Branch (825:13): [True: 0, False: 0]
  ------------------
  826|      0|        {
  827|       |                // <TBD> Should probably load a default message here
  828|      0|        }
  829|       |
  830|       |        //  Create a LastExtEntityInfo structure and get the reader manager
  831|       |        //  to fill it in for us. This will give us the information about
  832|       |        //  the last reader on the stack that was an external entity of some
  833|       |        //  sort (i.e. it will ignore internal entities.
  834|      0|        ReaderMgr::LastExtEntityInfo lastInfo;
  835|      0|        fReaderMgr.getLastExtEntityInfo(lastInfo);
  836|       |
  837|      0|        fErrorReporter->error
  838|      0|        (
  839|      0|            toEmit
  840|      0|            , XMLUni::fgXMLErrDomain
  841|      0|            , XMLErrs::errorType(toEmit)
  842|      0|            , errText
  843|      0|            , lastInfo.systemId
  844|      0|            , lastInfo.publicId
  845|      0|            , lastInfo.lineNumber
  846|      0|            , lastInfo.colNumber
  847|      0|        );
  848|      0|    }
  849|       |
  850|       |    // Bail out if its fatal an we are to give up on the first fatal error
  851|  31.6k|    if (emitErrorWillThrowException(toEmit))
  ------------------
  |  Branch (851:9): [True: 1.63k, False: 30.0k]
  ------------------
  852|  1.63k|        throw toEmit;
  853|  31.6k|}
_ZN11xercesc_3_210XMLScanner9emitErrorENS_7XMLErrs5CodesENS_10XMLExcepts5CodesEPKDsS6_S6_S6_:
  908|  1.36k|{
  909|       |    // Bump the error count if it is not a warning
  910|  1.36k|    if (XMLErrs::errorType(toEmit) != XMLErrorReporter::ErrType_Warning)
  ------------------
  |  Branch (910:9): [True: 1.36k, False: 0]
  ------------------
  911|  1.36k|        incrementErrorCount();
  912|       |
  913|  1.36k|    if (fErrorReporter)
  ------------------
  |  Branch (913:9): [True: 0, False: 1.36k]
  ------------------
  914|      0|    {
  915|       |        //  Load the message into alocal and replace any tokens found in
  916|       |        //  the text.
  917|      0|        const XMLSize_t maxChars = 2047;
  918|      0|        XMLCh errText[maxChars + 1];
  919|       |
  920|      0|        if (!gMsgLoader->loadMsg(toEmit, errText, maxChars, text1, text2, text3, text4, fMemoryManager))
  ------------------
  |  Branch (920:13): [True: 0, False: 0]
  ------------------
  921|      0|        {
  922|       |                // <TBD> Should probably load a default message here
  923|      0|        }
  924|       |
  925|       |        //  Create a LastExtEntityInfo structure and get the reader manager
  926|       |        //  to fill it in for us. This will give us the information about
  927|       |        //  the last reader on the stack that was an external entity of some
  928|       |        //  sort (i.e. it will ignore internal entities.
  929|      0|        ReaderMgr::LastExtEntityInfo lastInfo;
  930|      0|        fReaderMgr.getLastExtEntityInfo(lastInfo);
  931|       |
  932|      0|        fErrorReporter->error
  933|      0|        (
  934|      0|            originalExceptCode
  935|      0|            , XMLUni::fgExceptDomain    //fgXMLErrDomain
  936|      0|            , XMLErrs::errorType(toEmit)
  937|      0|            , errText
  938|      0|            , lastInfo.systemId
  939|      0|            , lastInfo.publicId
  940|      0|            , lastInfo.lineNumber
  941|      0|            , lastInfo.colNumber
  942|      0|        );
  943|      0|    }
  944|       |
  945|       |    // Bail out if its fatal an we are to give up on the first fatal error
  946|  1.36k|    if (emitErrorWillThrowException(toEmit))
  ------------------
  |  Branch (946:9): [True: 0, False: 1.36k]
  ------------------
  947|      0|        throw toEmit;
  948|  1.36k|}
_ZN11xercesc_3_210XMLScanner17scanMiscellaneousEv:
 1005|  1.68k|{
 1006|       |    // Get a buffer for this work
 1007|  1.68k|    XMLBufBid bbCData(&fBufMgr);
 1008|       |
 1009|  2.99k|    while (true)
  ------------------
  |  Branch (1009:12): [Folded - Ignored]
  ------------------
 1010|  2.99k|    {
 1011|  2.99k|        try
 1012|  2.99k|        {
 1013|  2.99k|            const XMLCh nextCh = fReaderMgr.peekNextChar();
 1014|       |
 1015|       |            // Watch for end of file and break out
 1016|  2.99k|            if (!nextCh)
  ------------------
  |  Branch (1016:17): [True: 1.31k, False: 1.68k]
  ------------------
 1017|  1.31k|                break;
 1018|       |
 1019|  1.68k|            if (nextCh == chOpenAngle)
  ------------------
  |  Branch (1019:17): [True: 1.12k, False: 555]
  ------------------
 1020|  1.12k|            {
 1021|  1.12k|                if (checkXMLDecl(true))
  ------------------
  |  Branch (1021:21): [True: 1, False: 1.12k]
  ------------------
 1022|      1|                {
 1023|       |                    // Can't have an XML decl here
 1024|      1|                    emitError(XMLErrs::NotValidAfterContent);
 1025|      1|                    fReaderMgr.skipPastChar(chCloseAngle);
 1026|      1|                }
 1027|  1.12k|                else if (fReaderMgr.skippedString(XMLUni::fgPIString))
  ------------------
  |  Branch (1027:26): [True: 606, False: 518]
  ------------------
 1028|    606|                {
 1029|    606|                    scanPI();
 1030|    606|                }
 1031|    518|                 else if (fReaderMgr.skippedString(XMLUni::fgCommentString))
  ------------------
  |  Branch (1031:27): [True: 234, False: 284]
  ------------------
 1032|    234|                {
 1033|    234|                    scanComment();
 1034|    234|                }
 1035|    284|                else
 1036|    284|                {
 1037|       |                    // This can't be possible, so just give up
 1038|    284|                    emitError(XMLErrs::ExpectedCommentOrPI);
 1039|    284|                    fReaderMgr.skipPastChar(chCloseAngle);
 1040|    284|                }
 1041|  1.12k|            }
 1042|    555|            else if (fReaderMgr.getCurrentReader()->isWhitespace(nextCh))
  ------------------
  |  Branch (1042:22): [True: 470, False: 85]
  ------------------
 1043|    470|            {
 1044|       |                //  If we have a doc handler, then gather up the spaces and
 1045|       |                //  call back. Otherwise, just skip over whitespace.
 1046|    470|                if (fDocHandler)
  ------------------
  |  Branch (1046:21): [True: 0, False: 470]
  ------------------
 1047|      0|                {
 1048|      0|                    fReaderMgr.getSpaces(bbCData.getBuffer());
 1049|      0|                    fDocHandler->ignorableWhitespace
 1050|      0|                    (
 1051|      0|                        bbCData.getRawBuffer()
 1052|      0|                        , bbCData.getLen()
 1053|      0|                        , false
 1054|      0|                    );
 1055|      0|                }
 1056|    470|                else
 1057|    470|                {
 1058|    470|                    fReaderMgr.skipPastSpaces();
 1059|    470|                }
 1060|    470|            }
 1061|     85|            else
 1062|     85|            {
 1063|     85|                emitError(XMLErrs::ExpectedCommentOrPI);
 1064|     85|                fReaderMgr.skipPastChar(chCloseAngle);
 1065|     85|            }
 1066|  1.68k|        }
 1067|  2.99k|        catch(const EndOfEntityException&)
 1068|  2.99k|        {
 1069|       |            //  Some entity leaked out of the content part of the document. Issue
 1070|       |            //  a warning and keep going.
 1071|      0|            emitError(XMLErrs::EntityPropogated);
 1072|      0|        }
 1073|  2.99k|    }
 1074|  1.68k|}
_ZN11xercesc_3_210XMLScanner6scanPIEv:
 1080|  65.5k|{
 1081|  65.5k|    const XMLCh* namePtr = 0;
 1082|  65.5k|    const XMLCh* targetPtr = 0;
 1083|       |
 1084|       |    //  If there are any spaces here, then warn about it. If we aren't in
 1085|       |    //  'first error' mode, then we'll come back and can easily pick up
 1086|       |    //  again by just skipping them.
 1087|  65.5k|    if (fReaderMgr.lookingAtSpace())
  ------------------
  |  Branch (1087:9): [True: 1, False: 65.5k]
  ------------------
 1088|      1|    {
 1089|      1|        emitError(XMLErrs::PINameExpected);
 1090|      1|        fReaderMgr.skipPastSpaces();
 1091|      1|    }
 1092|       |
 1093|       |    // Get a buffer for the PI name and scan it in
 1094|  65.5k|    XMLBufBid bbName(&fBufMgr);
 1095|  65.5k|    if (!fReaderMgr.getName(bbName.getBuffer()))
  ------------------
  |  Branch (1095:9): [True: 9, False: 65.5k]
  ------------------
 1096|      9|    {
 1097|      9|        emitError(XMLErrs::PINameExpected);
 1098|      9|        fReaderMgr.skipPastChar(chCloseAngle);
 1099|      9|        return;
 1100|      9|    }
 1101|       |
 1102|       |    // Point the name pointer at the raw data
 1103|  65.5k|    namePtr = bbName.getRawBuffer();
 1104|       |
 1105|       |    // See if it is some form of 'xml' and emit a warning
 1106|       |    //if (!XMLString::compareIString(namePtr, XMLUni::fgXMLString))
 1107|  65.5k|    if (bbName.getLen() == 3 &&
  ------------------
  |  Branch (1107:9): [True: 62.8k, False: 2.76k]
  ------------------
 1108|  65.5k|        (((namePtr[0] == chLatin_x) || (namePtr[0] == chLatin_X)) &&
  ------------------
  |  Branch (1108:11): [True: 1.02k, False: 61.7k]
  |  Branch (1108:40): [True: 61.0k, False: 765]
  ------------------
 1109|  62.8k|         ((namePtr[1] == chLatin_m) || (namePtr[1] == chLatin_M)) &&
  ------------------
  |  Branch (1109:11): [True: 61.0k, False: 1.01k]
  |  Branch (1109:40): [True: 630, False: 388]
  ------------------
 1110|  62.8k|         ((namePtr[2] == chLatin_l) || (namePtr[2] == chLatin_L))))
  ------------------
  |  Branch (1110:11): [True: 3, False: 61.6k]
  |  Branch (1110:40): [True: 0, False: 61.6k]
  ------------------
 1111|      3|        emitError(XMLErrs::NoPIStartsWithXML);
 1112|       |
 1113|       |    // If namespaces are enabled, then no colons allowed
 1114|  65.5k|    if (fDoNamespaces)
  ------------------
  |  Branch (1114:9): [True: 0, False: 65.5k]
  ------------------
 1115|      0|    {
 1116|      0|        if (XMLString::indexOf(namePtr, chColon) != -1)
  ------------------
  |  Branch (1116:13): [True: 0, False: 0]
  ------------------
 1117|      0|            emitError(XMLErrs::ColonNotLegalWithNS);
 1118|      0|    }
 1119|       |
 1120|       |    //  If we don't hit a space next, then the PI has no target. If we do
 1121|       |    //  then get out the target. Get a buffer for it as well
 1122|  65.5k|    XMLBufBid bbTarget(&fBufMgr);
 1123|  65.5k|    if (fReaderMgr.skippedSpace())
  ------------------
  |  Branch (1123:9): [True: 63.3k, False: 2.26k]
  ------------------
 1124|  63.3k|    {
 1125|       |        // Skip any leading spaces
 1126|  63.3k|        fReaderMgr.skipPastSpaces();
 1127|       |
 1128|  63.3k|        bool gotLeadingSurrogate = false;
 1129|       |
 1130|       |        // It does have a target, so lets move on to deal with that.
 1131|  5.04M|        while (1)
  ------------------
  |  Branch (1131:16): [Folded - Ignored]
  ------------------
 1132|  5.04M|        {
 1133|  5.04M|            const XMLCh nextCh = fReaderMgr.getNextChar();
 1134|       |
 1135|       |            // Watch for an end of file, which is always bad here
 1136|  5.04M|            if (!nextCh)
  ------------------
  |  Branch (1136:17): [True: 67, False: 5.04M]
  ------------------
 1137|     67|            {
 1138|     67|                emitError(XMLErrs::UnterminatedPI);
 1139|     67|                ThrowXMLwithMemMgr(UnexpectedEOFException, XMLExcepts::Gen_UnexpectedEOF, fMemoryManager);
  ------------------
  |  |  264|     67|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
 1140|     67|            }
 1141|       |
 1142|       |            // Watch for potential terminating character
 1143|  5.04M|            if (nextCh == chQuestion)
  ------------------
  |  Branch (1143:17): [True: 78.0k, False: 4.96M]
  ------------------
 1144|  78.0k|            {
 1145|       |                // It must be followed by '>' to be a termination of the target
 1146|  78.0k|                if (fReaderMgr.skippedChar(chCloseAngle))
  ------------------
  |  Branch (1146:21): [True: 63.2k, False: 14.8k]
  ------------------
 1147|  63.2k|                    break;
 1148|  78.0k|            }
 1149|       |
 1150|       |            // Check for correct surrogate pairs
 1151|  4.98M|            if ((nextCh >= 0xD800) && (nextCh <= 0xDBFF))
  ------------------
  |  Branch (1151:17): [True: 62.8k, False: 4.91M]
  |  Branch (1151:39): [True: 598, False: 62.2k]
  ------------------
 1152|    598|            {
 1153|    598|                if (gotLeadingSurrogate)
  ------------------
  |  Branch (1153:21): [True: 1, False: 597]
  ------------------
 1154|      1|                    emitError(XMLErrs::Expected2ndSurrogateChar);
 1155|    597|                else
 1156|    597|                    gotLeadingSurrogate = true;
 1157|    598|            }
 1158|  4.98M|             else
 1159|  4.98M|            {
 1160|  4.98M|                if (gotLeadingSurrogate)
  ------------------
  |  Branch (1160:21): [True: 596, False: 4.98M]
  ------------------
 1161|    596|                {
 1162|    596|                    if ((nextCh < 0xDC00) || (nextCh > 0xDFFF))
  ------------------
  |  Branch (1162:25): [True: 2, False: 594]
  |  Branch (1162:46): [True: 2, False: 592]
  ------------------
 1163|      4|                        emitError(XMLErrs::Expected2ndSurrogateChar);
 1164|    596|                }
 1165|       |                // Its got to at least be a valid XML character
 1166|  4.98M|                else if (!fReaderMgr.getCurrentReader()->isXMLChar(nextCh)) {
  ------------------
  |  Branch (1166:26): [True: 19, False: 4.98M]
  ------------------
 1167|       |
 1168|     19|                    XMLCh tmpBuf[9];
 1169|     19|                    XMLString::binToText
 1170|     19|                    (
 1171|     19|                        nextCh
 1172|     19|                        , tmpBuf
 1173|     19|                        , 8
 1174|     19|                        , 16
 1175|     19|                        , fMemoryManager
 1176|     19|                    );
 1177|     19|                    emitError(XMLErrs::InvalidCharacter, tmpBuf);
 1178|     19|                }
 1179|       |
 1180|  4.98M|                gotLeadingSurrogate = false;
 1181|  4.98M|            }
 1182|       |
 1183|  4.98M|            bbTarget.append(nextCh);
 1184|  4.98M|        }
 1185|  63.3k|    }
 1186|  2.26k|    else
 1187|  2.26k|    {
 1188|       |        // No target, but make sure its terminated ok
 1189|  2.26k|        if (!fReaderMgr.skippedChar(chQuestion))
  ------------------
  |  Branch (1189:13): [True: 16, False: 2.25k]
  ------------------
 1190|     16|        {
 1191|     16|            emitError(XMLErrs::UnterminatedPI);
 1192|     16|            fReaderMgr.skipPastChar(chCloseAngle);
 1193|     16|            return;
 1194|     16|        }
 1195|       |
 1196|  2.25k|        if (!fReaderMgr.skippedChar(chCloseAngle))
  ------------------
  |  Branch (1196:13): [True: 6, False: 2.24k]
  ------------------
 1197|      6|        {
 1198|      6|            emitError(XMLErrs::UnterminatedPI);
 1199|      6|            fReaderMgr.skipPastChar(chCloseAngle);
 1200|      6|            return;
 1201|      6|        }
 1202|  2.25k|    }
 1203|       |
 1204|       |    // Point the target pointer at the raw data
 1205|  65.4k|    targetPtr = bbTarget.getRawBuffer();
 1206|       |
 1207|       |    // If we have a handler, then call it
 1208|  65.4k|    if (fDocHandler)
  ------------------
  |  Branch (1208:9): [True: 0, False: 65.4k]
  ------------------
 1209|      0|    {
 1210|      0|        fDocHandler->docPI
 1211|      0|        (
 1212|      0|            namePtr
 1213|      0|            , targetPtr
 1214|      0|       );
 1215|      0|    }
 1216|       |
 1217|       |    //mark PI is seen within the current element
 1218|  65.4k|    if (! fElemStack.isEmpty())
  ------------------
  |  Branch (1218:9): [True: 63.4k, False: 2.05k]
  ------------------
 1219|  63.4k|        fElemStack.setCommentOrPISeen();
 1220|       |
 1221|  65.4k|}
_ZN11xercesc_3_210XMLScanner10scanPrologEv:
 1230|  7.10k|{
 1231|  7.10k|    bool sawDocTypeDecl = false;
 1232|       |    // Get a buffer for whitespace processing
 1233|  7.10k|    XMLBufBid bbCData(&fBufMgr);
 1234|       |
 1235|       |    //  Loop through the prolog. If there is no content, this could go all
 1236|       |    //  the way to the end of the file.
 1237|  7.10k|    try
 1238|  7.10k|    {
 1239|  17.4k|        while (true)
  ------------------
  |  Branch (1239:16): [Folded - Ignored]
  ------------------
 1240|  14.0k|        {
 1241|  14.0k|            const XMLCh nextCh = fReaderMgr.peekNextChar();
 1242|       |
 1243|  14.0k|            if (nextCh == chOpenAngle)
  ------------------
  |  Branch (1243:17): [True: 12.5k, False: 1.52k]
  ------------------
 1244|  12.5k|            {
 1245|       |                //  Ok, it could be the xml decl, a comment, the doc type line,
 1246|       |                //  or the start of the root element.
 1247|  12.5k|                if (checkXMLDecl(true))
  ------------------
  |  Branch (1247:21): [True: 847, False: 11.6k]
  ------------------
 1248|    847|                {
 1249|       |                    // There shall be at lease --ONE-- space in between
 1250|       |                    // the tag '<?xml' and the VersionInfo.
 1251|       |                    //
 1252|       |                    //  If we are not at line 1, col 6, then the decl was not
 1253|       |                    //  the first text, so its invalid.
 1254|    847|                    const XMLReader* curReader = fReaderMgr.getCurrentReader();
 1255|    847|                    if ((curReader->getLineNumber() != 1)
  ------------------
  |  Branch (1255:25): [True: 1, False: 846]
  ------------------
 1256|    847|                    ||  (curReader->getColumnNumber() != 7))
  ------------------
  |  Branch (1256:25): [True: 1, False: 845]
  ------------------
 1257|      2|                    {
 1258|      2|                        emitError(XMLErrs::XMLDeclMustBeFirst);
 1259|      2|                    }
 1260|       |
 1261|    847|                    scanXMLDecl(Decl_XML);
 1262|    847|                }
 1263|  11.6k|                else if (fReaderMgr.skippedString(XMLUni::fgPIString))
  ------------------
  |  Branch (1263:26): [True: 1.52k, False: 10.1k]
  ------------------
 1264|  1.52k|                {
 1265|  1.52k|                    scanPI();
 1266|  1.52k|                }
 1267|  10.1k|                 else if (fReaderMgr.skippedString(XMLUni::fgCommentString))
  ------------------
  |  Branch (1267:27): [True: 372, False: 9.79k]
  ------------------
 1268|    372|                {
 1269|    372|                    scanComment();
 1270|    372|                }
 1271|  9.79k|                 else if (fReaderMgr.skippedString(XMLUni::fgDocTypeString))
  ------------------
  |  Branch (1271:27): [True: 6.05k, False: 3.74k]
  ------------------
 1272|  6.05k|                {
 1273|  6.05k|                    if (sawDocTypeDecl) {
  ------------------
  |  Branch (1273:25): [True: 0, False: 6.05k]
  ------------------
 1274|      0|                        emitError(XMLErrs::DuplicateDocTypeDecl);
 1275|      0|                    }
 1276|       |
 1277|  6.05k|                    const char* envvar = getenv("XERCES_DISABLE_DTD");
 1278|  6.05k|                    if (fDisallowDTD || (envvar && !strcmp(envvar, "1"))) {
  ------------------
  |  Branch (1278:25): [True: 0, False: 6.05k]
  |  Branch (1278:42): [True: 0, False: 6.05k]
  |  Branch (1278:52): [True: 0, False: 0]
  ------------------
 1279|      0|                    	emitError(XMLErrs::InvalidDocumentStructure);
 1280|      0|                    }
 1281|  6.05k|                    else {
 1282|  6.05k|                    	scanDocTypeDecl();
 1283|  6.05k|                    	sawDocTypeDecl = true;
 1284|  6.05k|                    }
 1285|       |
 1286|       |                    // if reusing grammar, this has been validated already in first scan
 1287|       |                    // skip for performance
 1288|  6.05k|                    if (fValidate && fGrammar && !fGrammar->getValidated()) {
  ------------------
  |  Branch (1288:25): [True: 3.58k, False: 2.46k]
  |  Branch (1288:38): [True: 3.58k, False: 0]
  |  Branch (1288:50): [True: 3.58k, False: 0]
  ------------------
 1289|       |                        //  validate the DTD scan so far
 1290|  3.58k|                        fValidator->preContentValidation(fUseCachedGrammar, true);
 1291|  3.58k|                    }
 1292|  6.05k|                }
 1293|  3.74k|                else
 1294|  3.74k|                {
 1295|       |                    // Assume its the start of the root element
 1296|  3.74k|                    return;
 1297|  3.74k|                }
 1298|  12.5k|            }
 1299|  1.52k|            else if (fReaderMgr.getCurrentReader()->isWhitespace(nextCh))
  ------------------
  |  Branch (1299:22): [True: 1.02k, False: 502]
  ------------------
 1300|  1.02k|            {
 1301|       |                //  If we have a document handler then gather up the
 1302|       |                //  whitespace and call back. Otherwise just skip over spaces.
 1303|  1.02k|                if (fDocHandler)
  ------------------
  |  Branch (1303:21): [True: 0, False: 1.02k]
  ------------------
 1304|      0|                {
 1305|      0|                    fReaderMgr.getSpaces(bbCData.getBuffer());
 1306|      0|                    fDocHandler->ignorableWhitespace
 1307|      0|                    (
 1308|      0|                        bbCData.getRawBuffer()
 1309|      0|                        , bbCData.getLen()
 1310|      0|                        , false
 1311|      0|                    );
 1312|      0|                }
 1313|  1.02k|                 else
 1314|  1.02k|                {
 1315|  1.02k|                    fReaderMgr.skipPastSpaces();
 1316|  1.02k|                }
 1317|  1.02k|            }
 1318|    502|             else
 1319|    502|            {
 1320|    502|                emitError(XMLErrs::InvalidDocumentStructure);
 1321|       |
 1322|       |                // Watch for end of file and break out
 1323|    502|                if (!nextCh)
  ------------------
  |  Branch (1323:21): [True: 0, False: 502]
  ------------------
 1324|      0|                    break;
 1325|    502|                else
 1326|    502|                    fReaderMgr.skipPastChar(chCloseAngle);
 1327|    502|            }
 1328|       |
 1329|  14.0k|        }
 1330|  7.10k|    }
 1331|  7.10k|    catch(const EndOfEntityException&)
 1332|  7.10k|    {
 1333|       |        //  We should never get an end of entity here. They should only
 1334|       |        //  occur within the doc type scanning method, and not leak out to
 1335|       |        //  here.
 1336|      0|        emitError
 1337|      0|        (
 1338|      0|            XMLErrs::UnexpectedEOE
 1339|      0|            , "in prolog"
 1340|      0|        );
 1341|      0|    }
 1342|  7.10k|}
_ZN11xercesc_3_210XMLScanner11scanXMLDeclENS0_9DeclTypesE:
 1360|    845|{
 1361|       |    // Get us some buffers to use
 1362|    845|    XMLBufBid bbVersion(&fBufMgr);
 1363|    845|    XMLBufBid bbEncoding(&fBufMgr);
 1364|    845|    XMLBufBid bbStand(&fBufMgr);
 1365|    845|    XMLBufBid bbDummy(&fBufMgr);
 1366|    845|    XMLBufBid bbName(&fBufMgr);
 1367|       |
 1368|       |    //  We use this little enum and array to keep up with what we found
 1369|       |    //  and what order we found them in. This lets us get them free form
 1370|       |    //  without too much overhead, but still know that they were in the
 1371|       |    //  wrong order.
 1372|    845|    enum Strings
 1373|    845|    {
 1374|    845|        VersionString
 1375|    845|        , EncodingString
 1376|    845|        , StandaloneString
 1377|    845|        , UnknownString
 1378|       |
 1379|    845|        , StringCount
 1380|    845|    };
 1381|    845|    int flags[StringCount] = { -1, -1, -1, -1 };
 1382|       |
 1383|       |    //  Also set up a list of buffers in the right order so that we know
 1384|       |    //  where to put stuff.
 1385|    845|    XMLBuffer* buffers[StringCount] ;
 1386|    845|    buffers[0] = &bbVersion.getBuffer();
 1387|    845|    buffers[1] = &bbEncoding.getBuffer();
 1388|    845|    buffers[2] = &bbStand.getBuffer();
 1389|    845|    buffers[3] = &bbDummy.getBuffer();
 1390|       |
 1391|    845|    int curCount = 0;
 1392|    845|    Strings curString;
 1393|    845|    XMLBuffer& nameBuf = bbName.getBuffer();
 1394|  2.36k|    while (true)
  ------------------
  |  Branch (1394:12): [Folded - Ignored]
  ------------------
 1395|  2.20k|    {
 1396|       |        // Skip any spaces
 1397|  2.20k|        bool skippedSomething;
 1398|  2.20k|        fReaderMgr.skipPastSpaces(skippedSomething, true);
 1399|       |
 1400|       |        // If we are looking at a question mark, then break out
 1401|  2.20k|        if (fReaderMgr.lookingAtChar(chQuestion))
  ------------------
  |  Branch (1401:13): [True: 676, False: 1.52k]
  ------------------
 1402|    676|            break;
 1403|       |
 1404|       |        // If this is not the first string, then we require the spaces
 1405|  1.52k|        if (!skippedSomething && curCount)
  ------------------
  |  Branch (1405:13): [True: 824, False: 702]
  |  Branch (1405:34): [True: 11, False: 813]
  ------------------
 1406|     11|            emitError(XMLErrs::ExpectedWhitespace);
 1407|       |
 1408|       |        //  Get characters up to the next whitespace or equal's sign.
 1409|  1.52k|        if (!scanUpToWSOr(nameBuf, chEqual))
  ------------------
  |  Branch (1409:13): [True: 2, False: 1.52k]
  ------------------
 1410|      2|            emitError(XMLErrs::ExpectedDeclString);
 1411|       |
 1412|       |        // See if it matches any of our expected strings
 1413|  1.52k|        if (XMLString::equals(nameBuf.getRawBuffer(), XMLUni::fgVersionString))
  ------------------
  |  Branch (1413:13): [True: 708, False: 818]
  ------------------
 1414|    708|            curString = VersionString;
 1415|    818|        else if (XMLString::equals(nameBuf.getRawBuffer(), XMLUni::fgEncodingString))
  ------------------
  |  Branch (1415:18): [True: 448, False: 370]
  ------------------
 1416|    448|            curString = EncodingString;
 1417|    370|        else if (XMLString::equals(nameBuf.getRawBuffer(), XMLUni::fgStandaloneString))
  ------------------
  |  Branch (1417:18): [True: 232, False: 138]
  ------------------
 1418|    232|            curString = StandaloneString;
 1419|    138|        else
 1420|    138|            curString = UnknownString;
 1421|       |
 1422|       |        //  If its an unknown string, then give that error. Else check to
 1423|       |        //  see if this one has been done already and give that error.
 1424|  1.52k|        if (curString == UnknownString)
  ------------------
  |  Branch (1424:13): [True: 114, False: 1.41k]
  ------------------
 1425|    114|            emitError(XMLErrs::ExpectedDeclString, nameBuf.getRawBuffer());
 1426|  1.41k|        else if (flags[curString] != -1)
  ------------------
  |  Branch (1426:18): [True: 4, False: 1.40k]
  ------------------
 1427|      4|            emitError(XMLErrs::DeclStringRep, nameBuf.getRawBuffer());
 1428|  1.40k|        else if (flags[curString] == -1)
  ------------------
  |  Branch (1428:18): [True: 1.38k, False: 24]
  ------------------
 1429|  1.38k|            flags[curString] = ++curCount;
 1430|       |
 1431|       |        //  Scan for an equal's sign. If we don't find it, issue an error
 1432|       |        //  but keep trying to go on.
 1433|  1.52k|        if (!scanEq(true))
  ------------------
  |  Branch (1433:13): [True: 0, False: 1.52k]
  ------------------
 1434|      0|            emitError(XMLErrs::ExpectedEqSign);
 1435|       |
 1436|       |        //  Get a quote string into the buffer for the string that we are
 1437|       |        //  currently working on.
 1438|  1.52k|        if (!getQuotedString(*buffers[curString]))
  ------------------
  |  Branch (1438:13): [True: 8, False: 1.51k]
  ------------------
 1439|      8|        {
 1440|      8|            emitError(XMLErrs::ExpectedQuotedString);
 1441|      8|            fReaderMgr.skipPastChar(chCloseAngle);
 1442|      8|            return;
 1443|      8|        }
 1444|       |
 1445|       |        // And validate the value according which one it was
 1446|  1.51k|        const XMLCh* rawValue = buffers[curString]->getRawBuffer();
 1447|  1.51k|        if (curString == VersionString)
  ------------------
  |  Branch (1447:13): [True: 705, False: 813]
  ------------------
 1448|    705|        {
 1449|    705|            if (XMLString::equals(rawValue, XMLUni::fgVersion1_1)) {
  ------------------
  |  Branch (1449:17): [True: 316, False: 389]
  ------------------
 1450|    316|                if (type == Decl_XML) {
  ------------------
  |  Branch (1450:21): [True: 316, False: 0]
  ------------------
 1451|    316|                    fXMLVersion = XMLReader::XMLV1_1;
 1452|    316|                    fReaderMgr.setXMLVersion(XMLReader::XMLV1_1);
 1453|    316|                }
 1454|      0|                else {
 1455|      0|                    if (fXMLVersion != XMLReader::XMLV1_1)
  ------------------
  |  Branch (1455:25): [True: 0, False: 0]
  ------------------
 1456|      0|                        emitError(XMLErrs::UnsupportedXMLVersion, rawValue);
 1457|      0|                }
 1458|    316|            }
 1459|    389|            else if (XMLString::equals(rawValue, XMLUni::fgVersion1_0)) {
  ------------------
  |  Branch (1459:22): [True: 21, False: 368]
  ------------------
 1460|     21|                if (type == Decl_XML) {
  ------------------
  |  Branch (1460:21): [True: 21, False: 0]
  ------------------
 1461|     21|                    fXMLVersion = XMLReader::XMLV1_0;
 1462|     21|                    fReaderMgr.setXMLVersion(XMLReader::XMLV1_0);
 1463|     21|                }
 1464|     21|            }
 1465|    368|            else if (XMLString::startsWith(rawValue, XMLUni::fgVersion1)) {
  ------------------
  |  Branch (1465:22): [True: 367, False: 1]
  ------------------
 1466|    367|                if (type == Decl_XML) {
  ------------------
  |  Branch (1466:21): [True: 367, False: 0]
  ------------------
 1467|    367|                    fXMLVersion = XMLReader::XMLV1_0;
 1468|    367|                    fReaderMgr.setXMLVersion(XMLReader::XMLV1_0);
 1469|    367|                }
 1470|    367|            }
 1471|      1|            else
 1472|      1|                emitError(XMLErrs::UnsupportedXMLVersion, rawValue);
 1473|    705|        }
 1474|    813|         else if (curString == EncodingString)
  ------------------
  |  Branch (1474:19): [True: 442, False: 371]
  ------------------
 1475|    442|        {
 1476|    442|            if (!XMLString::isValidEncName(rawValue))
  ------------------
  |  Branch (1476:17): [True: 17, False: 425]
  ------------------
 1477|     17|                emitError(XMLErrs::BadXMLEncoding, rawValue);
 1478|    442|        }
 1479|    371|         else if (curString == StandaloneString)
  ------------------
  |  Branch (1479:19): [True: 228, False: 143]
  ------------------
 1480|    228|        {
 1481|    228|            if (XMLString::equals(rawValue, XMLUni::fgYesString))
  ------------------
  |  Branch (1481:17): [True: 225, False: 3]
  ------------------
 1482|    225|                fStandalone = true;
 1483|      3|            else if (XMLString::equals(rawValue, XMLUni::fgNoString))
  ------------------
  |  Branch (1483:22): [True: 3, False: 0]
  ------------------
 1484|      3|                fStandalone = false;
 1485|      0|            else
 1486|      0|            {
 1487|      0|                emitError(XMLErrs::BadStandalone);
 1488|       |                //if (!XMLString::compareIString(rawValue, XMLUni::fgYesString))
 1489|       |                //else if (!XMLString::compareIString(rawValue, XMLUni::fgNoString))
 1490|      0|                if (buffers[curString]->getLen() == 3 &&
  ------------------
  |  Branch (1490:21): [True: 0, False: 0]
  ------------------
 1491|      0|                    (((rawValue[0] == chLatin_y) || (rawValue[0] == chLatin_Y)) &&
  ------------------
  |  Branch (1491:23): [True: 0, False: 0]
  |  Branch (1491:53): [True: 0, False: 0]
  ------------------
 1492|      0|                     ((rawValue[1] == chLatin_e) || (rawValue[1] == chLatin_E)) &&
  ------------------
  |  Branch (1492:23): [True: 0, False: 0]
  |  Branch (1492:53): [True: 0, False: 0]
  ------------------
 1493|      0|                     ((rawValue[2] == chLatin_s) || (rawValue[2] == chLatin_S))))
  ------------------
  |  Branch (1493:23): [True: 0, False: 0]
  |  Branch (1493:53): [True: 0, False: 0]
  ------------------
 1494|      0|                    fStandalone = true;
 1495|      0|                else if (buffers[curString]->getLen() == 2 &&
  ------------------
  |  Branch (1495:26): [True: 0, False: 0]
  ------------------
 1496|      0|                    (((rawValue[0] == chLatin_n) || (rawValue[0] == chLatin_N)) &&
  ------------------
  |  Branch (1496:23): [True: 0, False: 0]
  |  Branch (1496:53): [True: 0, False: 0]
  ------------------
 1497|      0|                     ((rawValue[1] == chLatin_o) || (rawValue[1] == chLatin_O))))
  ------------------
  |  Branch (1497:23): [True: 0, False: 0]
  |  Branch (1497:53): [True: 0, False: 0]
  ------------------
 1498|      0|                    fStandalone = false;
 1499|      0|            }
 1500|    228|        }
 1501|  1.51k|    }
 1502|       |
 1503|       |    //  Make sure that the strings present are in order. We don't care about
 1504|       |    //  which ones are present at this point, just that any there are in the
 1505|       |    //  right order.
 1506|    837|    int curTop = 0;
 1507|  2.18k|    for (int index = VersionString; index < StandaloneString; index++)
  ------------------
  |  Branch (1507:37): [True: 1.35k, False: 835]
  ------------------
 1508|  1.35k|    {
 1509|  1.35k|        if (flags[index] != -1)
  ------------------
  |  Branch (1509:13): [True: 1.07k, False: 273]
  ------------------
 1510|  1.07k|        {
 1511|  1.07k|            if (flags[index] !=  curTop + 1)
  ------------------
  |  Branch (1511:17): [True: 2, False: 1.07k]
  ------------------
 1512|      2|            {
 1513|      2|                emitError(XMLErrs::DeclStringsInWrongOrder);
 1514|      2|                break;
 1515|      2|            }
 1516|  1.07k|            curTop = flags[index];
 1517|  1.07k|        }
 1518|  1.35k|    }
 1519|       |
 1520|       |    //  If its an XML decl, the version must be present.
 1521|       |    //  If its a Text decl, then encoding must be present AND standalone must not be present.
 1522|    837|    if ((type == Decl_XML) && (flags[VersionString] == -1))
  ------------------
  |  Branch (1522:9): [True: 674, False: 163]
  |  Branch (1522:31): [True: 0, False: 674]
  ------------------
 1523|      0|        emitError(XMLErrs::XMLVersionRequired);
 1524|    837|    else if (type == Decl_Text) {
  ------------------
  |  Branch (1524:14): [True: 0, False: 837]
  ------------------
 1525|      0|        if (flags[StandaloneString] != -1)
  ------------------
  |  Branch (1525:13): [True: 0, False: 0]
  ------------------
 1526|      0|            emitError(XMLErrs::StandaloneNotLegal);
 1527|      0|        if (flags[EncodingString] == -1)
  ------------------
  |  Branch (1527:13): [True: 0, False: 0]
  ------------------
 1528|      0|            emitError(XMLErrs::EncodingRequired);
 1529|      0|    }
 1530|       |
 1531|    837|    if (!fReaderMgr.skippedChar(chQuestion))
  ------------------
  |  Branch (1531:9): [True: 0, False: 837]
  ------------------
 1532|      0|    {
 1533|      0|        emitError(XMLErrs::UnterminatedXMLDecl);
 1534|      0|        fReaderMgr.skipPastChar(chCloseAngle);
 1535|      0|    }
 1536|    837|     else if (!fReaderMgr.skippedChar(chCloseAngle))
  ------------------
  |  Branch (1536:15): [True: 0, False: 837]
  ------------------
 1537|      0|    {
 1538|      0|        emitError(XMLErrs::UnterminatedXMLDecl);
 1539|      0|        fReaderMgr.skipPastChar(chCloseAngle);
 1540|      0|    }
 1541|       |
 1542|       |    //  Do this before we possibly update the reader with the
 1543|       |    //  actual encoding string. Otherwise, we will pass the wrong thing
 1544|       |    //  for the last parameter!
 1545|    837|    const XMLCh* actualEnc = fReaderMgr.getCurrentEncodingStr();
 1546|       |
 1547|       |    //  Ok, we've now seen the real encoding string, if there was one, so
 1548|       |    //  lets call back on the current reader and tell it what the real
 1549|       |    //  encoding string was. If it fails, that's because it represents some
 1550|       |    //  sort of contradiction with the autosensed format, and it keeps the
 1551|       |    //  original encoding.
 1552|       |    //
 1553|       |    //  NOTE: This can fail for a number of reasons, such as a bogus encoding
 1554|       |    //  name or because its in flagrant contradiction of the auto-sensed
 1555|       |    //  format.
 1556|    837|    if (flags[EncodingString] != -1)
  ------------------
  |  Branch (1556:9): [True: 401, False: 436]
  ------------------
 1557|    401|    {
 1558|    401|        if (!fReaderMgr.getCurrentReader()->setEncoding(bbEncoding.getRawBuffer()))
  ------------------
  |  Branch (1558:13): [True: 10, False: 391]
  ------------------
 1559|     10|            emitError(XMLErrs::ContradictoryEncoding, bbEncoding.getRawBuffer());
 1560|    391|        else
 1561|    391|            actualEnc = bbEncoding.getRawBuffer();
 1562|    401|    }
 1563|       |
 1564|       |    //  If we have a document handler then call the XML Decl callback.
 1565|    837|    if (type == Decl_XML)
  ------------------
  |  Branch (1565:9): [True: 607, False: 230]
  ------------------
 1566|    607|    {
 1567|    607|        if (fDocHandler)
  ------------------
  |  Branch (1567:13): [True: 0, False: 607]
  ------------------
 1568|      0|            fDocHandler->XMLDecl
 1569|      0|            (
 1570|      0|                bbVersion.getRawBuffer()
 1571|      0|                , bbEncoding.getRawBuffer()
 1572|      0|                , bbStand.getRawBuffer()
 1573|      0|                , actualEnc
 1574|      0|            );
 1575|    607|    }
 1576|    230|    else if (type == Decl_Text)
  ------------------
  |  Branch (1576:14): [True: 0, False: 230]
  ------------------
 1577|      0|    {
 1578|      0|        if (fDocTypeHandler)
  ------------------
  |  Branch (1578:13): [True: 0, False: 0]
  ------------------
 1579|      0|            fDocTypeHandler->TextDecl
 1580|      0|            (
 1581|      0|                bbVersion.getRawBuffer()
 1582|      0|                , bbEncoding.getRawBuffer()
 1583|      0|            );
 1584|      0|    }
 1585|    837|}
_ZN11xercesc_3_210XMLScanner12checkXMLDeclEb:
 1617|   363k|bool XMLScanner::checkXMLDecl(bool startWithAngle) {
 1618|       |
 1619|       |    // [23] XMLDecl     ::= '<?xml' VersionInfo EncodingDecl? SDDecl? S? '?>'
 1620|       |    // [24] VersionInfo ::= S 'version' Eq ("'" VersionNum "'" | '"' VersionNum '"')
 1621|       |    //
 1622|       |    // [3]  S           ::= (#x20 | #x9 | #xD | #xA)+
 1623|   363k|    if (startWithAngle) {
  ------------------
  |  Branch (1623:9): [True: 358k, False: 4.41k]
  ------------------
 1624|   358k|        if (fReaderMgr.peekString(XMLUni::fgXMLDeclString)) {
  ------------------
  |  Branch (1624:13): [True: 1.08k, False: 357k]
  ------------------
 1625|  1.08k|            if (fReaderMgr.skippedString(XMLUni::fgXMLDeclStringSpace)
  ------------------
  |  Branch (1625:17): [True: 766, False: 318]
  ------------------
 1626|  1.08k|               || fReaderMgr.skippedString(XMLUni::fgXMLDeclStringHTab)
  ------------------
  |  Branch (1626:19): [True: 4, False: 314]
  ------------------
 1627|  1.08k|               || fReaderMgr.skippedString(XMLUni::fgXMLDeclStringLF)
  ------------------
  |  Branch (1627:19): [True: 54, False: 260]
  ------------------
 1628|  1.08k|               || fReaderMgr.skippedString(XMLUni::fgXMLDeclStringCR))
  ------------------
  |  Branch (1628:19): [True: 25, False: 235]
  ------------------
 1629|    849|            {
 1630|    849|                return true;
 1631|    849|            }
 1632|  1.08k|        }
 1633|   357k|        else if (fReaderMgr.skippedString(XMLUni::fgXMLDeclStringSpaceU)
  ------------------
  |  Branch (1633:18): [True: 3, False: 357k]
  ------------------
 1634|   357k|           || fReaderMgr.skippedString(XMLUni::fgXMLDeclStringHTabU)
  ------------------
  |  Branch (1634:15): [True: 0, False: 357k]
  ------------------
 1635|   357k|           || fReaderMgr.skippedString(XMLUni::fgXMLDeclStringLFU)
  ------------------
  |  Branch (1635:15): [True: 0, False: 357k]
  ------------------
 1636|   357k|           || fReaderMgr.skippedString(XMLUni::fgXMLDeclStringCRU))
  ------------------
  |  Branch (1636:15): [True: 0, False: 357k]
  ------------------
 1637|      0|        {
 1638|       |            //  Just in case, check for upper case. If found, issue
 1639|       |            //  an error, but keep going.
 1640|      0|            emitError(XMLErrs::XMLDeclMustBeLowerCase);
 1641|      0|            return true;
 1642|      0|        }
 1643|   358k|    }
 1644|  4.41k|    else {
 1645|  4.41k|        if (fReaderMgr.peekString(XMLUni::fgXMLString)) {
  ------------------
  |  Branch (1645:13): [True: 274, False: 4.13k]
  ------------------
 1646|    274|            if (fReaderMgr.skippedString(XMLUni::fgXMLStringSpace)
  ------------------
  |  Branch (1646:17): [True: 0, False: 274]
  ------------------
 1647|    274|               || fReaderMgr.skippedString(XMLUni::fgXMLStringHTab)
  ------------------
  |  Branch (1647:19): [True: 0, False: 274]
  ------------------
 1648|    274|               || fReaderMgr.skippedString(XMLUni::fgXMLStringLF)
  ------------------
  |  Branch (1648:19): [True: 0, False: 274]
  ------------------
 1649|    274|               || fReaderMgr.skippedString(XMLUni::fgXMLStringCR))
  ------------------
  |  Branch (1649:19): [True: 0, False: 274]
  ------------------
 1650|      0|            {
 1651|      0|                return true;
 1652|      0|            }
 1653|    274|        }
 1654|  4.13k|        else if (fReaderMgr.skippedString(XMLUni::fgXMLStringSpaceU)
  ------------------
  |  Branch (1654:18): [True: 0, False: 4.13k]
  ------------------
 1655|  4.13k|           || fReaderMgr.skippedString(XMLUni::fgXMLStringHTabU)
  ------------------
  |  Branch (1655:15): [True: 1, False: 4.13k]
  ------------------
 1656|  4.13k|           || fReaderMgr.skippedString(XMLUni::fgXMLStringLFU)
  ------------------
  |  Branch (1656:15): [True: 0, False: 4.13k]
  ------------------
 1657|  4.13k|           || fReaderMgr.skippedString(XMLUni::fgXMLStringCRU))
  ------------------
  |  Branch (1657:15): [True: 1, False: 4.13k]
  ------------------
 1658|      2|        {
 1659|       |            //  Just in case, check for upper case. If found, issue
 1660|       |            //  an error, but keep going.
 1661|      2|            emitError(XMLErrs::XMLDeclMustBeLowerCase);
 1662|      2|            return true;
 1663|      2|        }
 1664|  4.41k|    }
 1665|       |
 1666|   362k|    return false;
 1667|   363k|}
_ZN11xercesc_3_210XMLScanner16setURIStringPoolEPNS_13XMLStringPoolE:
 1806|  7.12k|{
 1807|  7.12k|    fURIStringPool = stringPool;
 1808|  7.12k|    fEmptyNamespaceId   = fURIStringPool->addOrFind(XMLUni::fgZeroLenString);
 1809|  7.12k|    fUnknownNamespaceId = fURIStringPool->addOrFind(XMLUni::fgUnknownURIName);
 1810|  7.12k|    fXMLNamespaceId     = fURIStringPool->addOrFind(XMLUni::fgXMLURIName);
 1811|  7.12k|    fXMLNSNamespaceId   = fURIStringPool->addOrFind(XMLUni::fgXMLNSURIName);
 1812|  7.12k|}
_ZN11xercesc_3_210XMLScanner16checkInternalDTDEbPKDsS2_:
 1832|  5.32k|{
 1833|  5.32k|    if (fToCacheGrammar)
  ------------------
  |  Branch (1833:9): [True: 0, False: 5.32k]
  ------------------
 1834|      0|        ThrowXMLwithMemMgr(RuntimeException, XMLExcepts::Val_CantHaveIntSS, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
 1835|       |
 1836|  5.32k|    if (fUseCachedGrammar && hasExtSubset && !fIgnoreCachedDTD)
  ------------------
  |  Branch (1836:9): [True: 0, False: 5.32k]
  |  Branch (1836:30): [True: 0, False: 0]
  |  Branch (1836:46): [True: 0, False: 0]
  ------------------
 1837|      0|    {
 1838|      0|        InputSource* sysIdSrc = resolveSystemId(sysId, pubId);
 1839|      0|        if (sysIdSrc) {
  ------------------
  |  Branch (1839:13): [True: 0, False: 0]
  ------------------
 1840|      0|            Janitor<InputSource> janSysIdSrc(sysIdSrc);
 1841|      0|            Grammar* grammar = fGrammarResolver->getGrammar(sysIdSrc->getSystemId());
 1842|       |
 1843|      0|            if (grammar && grammar->getGrammarType() == Grammar::DTDGrammarType)
  ------------------
  |  Branch (1843:17): [True: 0, False: 0]
  |  Branch (1843:28): [True: 0, False: 0]
  ------------------
 1844|      0|            {
 1845|      0|                ThrowXMLwithMemMgr(RuntimeException, XMLExcepts::Val_CantHaveIntSS, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
 1846|      0|            }
 1847|      0|        }
 1848|      0|    }
 1849|       |
 1850|  5.32k|}
_ZN11xercesc_3_210XMLScanner11checkIDRefsEv:
 1857|  1.65k|{
 1858|       |    //  Iterate the id ref list. If we find any entries here which are used
 1859|       |    //  but not declared, then that's an error.
 1860|  1.65k|    RefHashTableOfEnumerator<XMLRefInfo> refEnum(fValidationContext->getIdRefList(), false, fMemoryManager);
 1861|  2.76k|    while (refEnum.hasMoreElements())
  ------------------
  |  Branch (1861:12): [True: 1.10k, False: 1.65k]
  ------------------
 1862|  1.10k|    {
 1863|       |        // Get a ref to the current element
 1864|  1.10k|        const XMLRefInfo& curRef = refEnum.nextElement();
 1865|       |
 1866|       |        // If its used but not declared, then its an error
 1867|  1.10k|        if (!curRef.getDeclared() && curRef.getUsed() && fValidate)
  ------------------
  |  Branch (1867:13): [True: 1.08k, False: 19]
  |  Branch (1867:38): [True: 639, False: 448]
  |  Branch (1867:58): [True: 639, False: 0]
  ------------------
 1868|    639|            fValidator->emitError(XMLValid::IDNotDeclared, curRef.getRefName());
 1869|  1.10k|    }
 1870|  1.65k|}
_ZN11xercesc_3_210XMLScanner14senseNextTokenERm:
 1887|  24.6M|{
 1888|       |    //  Get the next character and use it to guesstimate what the next token
 1889|       |    //  is going to be. We turn on end of entity exceptions when we do this
 1890|       |    //  in order to catch the scenario where the current entity ended at
 1891|       |    //  the > of some markup.
 1892|  24.6M|    XMLCh nextCh=0;
 1893|       |
 1894|  24.6M|    XMLReader* curReader=fReaderMgr.getCurrentReader();
 1895|       |    // avoid setting up the ThrowEOEJanitor if we know that we have data in the current reader
 1896|  24.6M|    if(curReader && curReader->charsLeftInBuffer()>0)
  ------------------
  |  Branch (1896:8): [True: 24.6M, False: 0]
  |  Branch (1896:21): [True: 24.4M, False: 196k]
  ------------------
 1897|  24.4M|        nextCh = fReaderMgr.peekNextChar();
 1898|   196k|    else
 1899|   196k|    {
 1900|   196k|        ThrowEOEJanitor janMgr(&fReaderMgr, true);
 1901|   196k|        nextCh = fReaderMgr.peekNextChar();
 1902|   196k|    }
 1903|       |
 1904|       |    //  If it's not a '<' we must be in content (unless it's a EOF)
 1905|       |    //
 1906|       |    //  This includes entity references '&' of some sort. These must
 1907|       |    //  be character data because that's the only place a reference can
 1908|       |    //  occur in content.
 1909|  24.6M|    if (nextCh != chOpenAngle)
  ------------------
  |  Branch (1909:9): [True: 6.99M, False: 17.6M]
  ------------------
 1910|  6.99M|        return nextCh?Token_CharData:Token_EOF;
  ------------------
  |  Branch (1910:16): [True: 6.99M, False: 643]
  ------------------
 1911|       |
 1912|       |    //  Ok it had to have been a '<' character. So get it out of the reader
 1913|       |    //  and store the reader number where we saw it, passing it back to the
 1914|       |    //  caller.
 1915|  17.6M|    fReaderMgr.getNextChar();
 1916|  17.6M|    orgReader = fReaderMgr.getCurrentReaderNum();
 1917|       |
 1918|       |    //  Ok, so lets go through the things that it could be at this point which
 1919|       |    //  are all some form of markup.
 1920|  17.6M|    switch(fReaderMgr.peekNextChar())
  ------------------
  |  Branch (1920:12): [True: 17.2M, False: 430k]
  ------------------
 1921|  17.6M|    {
 1922|   158k|    case chForwardSlash:
  ------------------
  |  Branch (1922:5): [True: 158k, False: 17.4M]
  ------------------
 1923|   158k|        {
 1924|   158k|            fReaderMgr.getNextChar();
 1925|   158k|            return Token_EndTag;
 1926|      0|        }
 1927|   209k|    case chBang:
  ------------------
  |  Branch (1927:5): [True: 209k, False: 17.4M]
  ------------------
 1928|   209k|        {
 1929|   209k|            static const XMLCh gCDATAStr[] =
 1930|   209k|            {
 1931|   209k|                    chBang, chOpenSquare, chLatin_C, chLatin_D, chLatin_A
 1932|   209k|                ,   chLatin_T, chLatin_A, chNull
 1933|   209k|            };
 1934|       |
 1935|   209k|            static const XMLCh gCommentString[] =
 1936|   209k|            {
 1937|   209k|                chBang, chDash, chDash, chNull
 1938|   209k|            };
 1939|       |
 1940|   209k|            if (fReaderMgr.skippedString(gCDATAStr))
  ------------------
  |  Branch (1940:17): [True: 61.7k, False: 147k]
  ------------------
 1941|  61.7k|                return Token_CData;
 1942|       |
 1943|   147k|            if (fReaderMgr.skippedString(gCommentString))
  ------------------
  |  Branch (1943:17): [True: 147k, False: 30]
  ------------------
 1944|   147k|                return Token_Comment;
 1945|       |
 1946|     30|            emitError(XMLErrs::ExpectedCommentOrCDATA);
 1947|     30|            return Token_Unknown;
 1948|   147k|        }
 1949|  63.4k|    case chQuestion:
  ------------------
  |  Branch (1949:5): [True: 63.4k, False: 17.5M]
  ------------------
 1950|  63.4k|        {
 1951|       |            // It must be a PI
 1952|  63.4k|            fReaderMgr.getNextChar();
 1953|  63.4k|            return Token_PI;
 1954|   147k|        }
 1955|  17.6M|    }
 1956|       |    //  Assume its an element name, so return with a start tag token. If it
 1957|       |    //  turns out not to be, then it will fail when it cannot get a valid tag.
 1958|  17.0M|    return Token_StartTag;
 1959|  17.6M|}
_ZN11xercesc_3_210XMLScanner15getQuotedStringERNS_9XMLBufferE:
 1974|  1.38k|{
 1975|       |    // Reset the target buffer
 1976|  1.38k|    toFill.reset();
 1977|       |
 1978|       |    // Get the next char which must be a single or double quote
 1979|  1.38k|    XMLCh quoteCh;
 1980|  1.38k|    if (!fReaderMgr.skipIfQuote(quoteCh))
  ------------------
  |  Branch (1980:9): [True: 0, False: 1.38k]
  ------------------
 1981|      0|        return false;
 1982|       |
 1983|  1.38k|	XMLCh nextCh;
 1984|       |    // Get another char and see if it matches the starting quote char
 1985|   683k|    while ((nextCh=fReaderMgr.getNextChar())!=quoteCh)
  ------------------
  |  Branch (1985:12): [True: 681k, False: 1.37k]
  ------------------
 1986|   681k|    {
 1987|       |        //  We should never get either an end of file null char here. If we
 1988|       |        //  do, just fail. It will be handled more gracefully in the higher
 1989|       |        //  level code that called us.
 1990|   681k|        if (!nextCh)
  ------------------
  |  Branch (1990:13): [True: 8, False: 681k]
  ------------------
 1991|      8|            return false;
 1992|       |
 1993|       |        // Else add it to the buffer
 1994|   681k|        toFill.append(nextCh);
 1995|   681k|    }
 1996|  1.37k|    return true;
 1997|  1.38k|}
_ZN11xercesc_3_210XMLScanner11scanCharRefERDsS1_:
 2004|  8.77k|{
 2005|  8.77k|    bool gotOne = false;
 2006|  8.77k|    unsigned int value = 0;
 2007|       |
 2008|       |    //  Set the radix. Its supposed to be a lower case x if hex. But, in
 2009|       |    //  order to recover well, we check for an upper and put out an error
 2010|       |    //  for that.
 2011|  8.77k|    unsigned int radix = 10;
 2012|  8.77k|    if (fReaderMgr.skippedChar(chLatin_x))
  ------------------
  |  Branch (2012:9): [True: 4.27k, False: 4.50k]
  ------------------
 2013|  4.27k|    {
 2014|  4.27k|        radix = 16;
 2015|  4.27k|    }
 2016|  4.50k|    else if (fReaderMgr.skippedChar(chLatin_X))
  ------------------
  |  Branch (2016:14): [True: 0, False: 4.50k]
  ------------------
 2017|      0|    {
 2018|      0|        emitError(XMLErrs::HexRadixMustBeLowerCase);
 2019|      0|        radix = 16;
 2020|      0|    }
 2021|       |
 2022|  25.3k|    while (true)
  ------------------
  |  Branch (2022:12): [Folded - Ignored]
  ------------------
 2023|  25.3k|    {
 2024|  25.3k|        const XMLCh nextCh = fReaderMgr.peekNextChar();
 2025|       |
 2026|       |        // Watch for EOF
 2027|  25.3k|        if (!nextCh)
  ------------------
  |  Branch (2027:13): [True: 22, False: 25.2k]
  ------------------
 2028|     22|            ThrowXMLwithMemMgr(UnexpectedEOFException, XMLExcepts::Gen_UnexpectedEOF, fMemoryManager);
  ------------------
  |  |  264|     22|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
 2029|       |
 2030|       |        // Break out on the terminating semicolon
 2031|  25.2k|        if (nextCh == chSemiColon)
  ------------------
  |  Branch (2031:13): [True: 8.72k, False: 16.5k]
  ------------------
 2032|  8.72k|        {
 2033|  8.72k|            fReaderMgr.getNextChar();
 2034|  8.72k|            break;
 2035|  8.72k|        }
 2036|       |
 2037|       |        //  Convert this char to a binary value, or bail out if its not
 2038|       |        //  one.
 2039|  16.5k|        unsigned int nextVal;
 2040|  16.5k|        if ((nextCh >= chDigit_0) && (nextCh <= chDigit_9))
  ------------------
  |  Branch (2040:13): [True: 16.5k, False: 8]
  |  Branch (2040:38): [True: 5.14k, False: 11.4k]
  ------------------
 2041|  5.14k|            nextVal = (unsigned int)(nextCh - chDigit_0);
 2042|  11.4k|        else if ((nextCh >= chLatin_A) && (nextCh <= chLatin_F))
  ------------------
  |  Branch (2042:18): [True: 11.4k, False: 11]
  |  Branch (2042:43): [True: 9.01k, False: 2.39k]
  ------------------
 2043|  9.01k|            nextVal= (unsigned int)(10 + (nextCh - chLatin_A));
 2044|  2.40k|        else if ((nextCh >= chLatin_a) && (nextCh <= chLatin_f))
  ------------------
  |  Branch (2044:18): [True: 2.38k, False: 16]
  |  Branch (2044:43): [True: 2.38k, False: 5]
  ------------------
 2045|  2.38k|            nextVal = (unsigned int)(10 + (nextCh - chLatin_a));
 2046|     21|        else
 2047|     21|        {
 2048|       |            // Return a zero
 2049|     21|            toFill = 0;
 2050|       |
 2051|       |            //  If we got at least a sigit, then do an unterminated ref error.
 2052|       |            //  Else, do an expected a numerical ref thing.
 2053|     21|            if (gotOne)
  ------------------
  |  Branch (2053:17): [True: 11, False: 10]
  ------------------
 2054|     11|                emitError(XMLErrs::UnterminatedCharRef);
 2055|     10|            else
 2056|     10|                emitError(XMLErrs::ExpectedNumericalCharRef);
 2057|       |
 2058|       |            // Return failure
 2059|     21|            return false;
 2060|     21|        }
 2061|       |
 2062|       |        //  Make sure its valid for the radix. If not, then just eat the
 2063|       |        //  digit and go on after issueing an error. Else, update the
 2064|       |        //  running value with this new digit.
 2065|  16.5k|        if (nextVal >= radix)
  ------------------
  |  Branch (2065:13): [True: 3, False: 16.5k]
  ------------------
 2066|      3|        {
 2067|      3|            XMLCh tmpStr[2];
 2068|      3|            tmpStr[0] = nextCh;
 2069|      3|            tmpStr[1] = chNull;
 2070|      3|            emitError(XMLErrs::BadDigitForRadix, tmpStr);
 2071|      3|        }
 2072|  16.5k|        else
 2073|  16.5k|        {
 2074|  16.5k|            value = (value * radix) + nextVal;
 2075|       |            // Guard against overflow.
 2076|  16.5k|            if (value > 0x10FFFF) {
  ------------------
  |  Branch (2076:17): [True: 3, False: 16.5k]
  ------------------
 2077|       |                // Character reference was not in the valid range
 2078|      3|                emitError(XMLErrs::InvalidCharacterRef);
 2079|      3|                return false;
 2080|      3|            }
 2081|  16.5k|        }
 2082|       |
 2083|       |        // Indicate that we got at least one good digit
 2084|  16.5k|        gotOne = true;
 2085|       |
 2086|       |        // And eat the last char
 2087|  16.5k|        fReaderMgr.getNextChar();
 2088|  16.5k|    }
 2089|       |
 2090|       |    // Return the char (or chars)
 2091|       |    // And check if the character expanded is valid or not
 2092|  8.73k|    if (value >= 0x10000 && value <= 0x10FFFF)
  ------------------
  |  Branch (2092:9): [True: 1.82k, False: 6.90k]
  |  Branch (2092:29): [True: 1.82k, False: 0]
  ------------------
 2093|  1.82k|    {
 2094|  1.82k|        value -= 0x10000;
 2095|  1.82k|        toFill = XMLCh((value >> 10) + 0xD800);
 2096|  1.82k|        second = XMLCh((value & 0x3FF) + 0xDC00);
 2097|  1.82k|    }
 2098|  6.90k|    else if (value <= 0xFFFD)
  ------------------
  |  Branch (2098:14): [True: 6.90k, False: 3]
  ------------------
 2099|  6.90k|    {
 2100|  6.90k|        toFill = XMLCh(value);
 2101|  6.90k|        second = 0;
 2102|  6.90k|        if (!fReaderMgr.getCurrentReader()->isXMLChar(toFill) && !fReaderMgr.getCurrentReader()->isControlChar(toFill)) {
  ------------------
  |  Branch (2102:13): [True: 969, False: 5.93k]
  |  Branch (2102:66): [True: 4, False: 965]
  ------------------
 2103|       |            // Character reference was not in the valid range
 2104|      4|            emitError(XMLErrs::InvalidCharacterRef);
 2105|      4|            return false;
 2106|      4|        }
 2107|  6.90k|    }
 2108|      3|    else {
 2109|       |        // Character reference was not in the valid range
 2110|      3|        emitError(XMLErrs::InvalidCharacterRef);
 2111|      3|        return false;
 2112|      3|    }
 2113|       |
 2114|  8.72k|    return true;
 2115|  8.73k|}
_ZN11xercesc_3_210XMLScanner11scanCommentEv:
 2124|   147k|{
 2125|       |
 2126|   147k|    enum States
 2127|   147k|    {
 2128|   147k|        InText
 2129|   147k|        , OneDash
 2130|   147k|        , TwoDashes
 2131|   147k|    };
 2132|       |
 2133|       |    // Get a buffer for this
 2134|   147k|    XMLBufBid bbComment(&fBufMgr);
 2135|       |
 2136|       |    //  Get the comment text into a temp buffer. Be sure to use temp buffer
 2137|       |    //  two here, since its to be used for stuff that is potentially longer
 2138|       |    //  than just a name.
 2139|   147k|    States curState = InText;
 2140|   147k|    bool gotLeadingSurrogate = false;
 2141|  4.88M|    while (true)
  ------------------
  |  Branch (2141:12): [Folded - Ignored]
  ------------------
 2142|  4.88M|    {
 2143|       |        // Get the next character
 2144|  4.88M|        const XMLCh nextCh = fReaderMgr.getNextChar();
 2145|       |
 2146|       |        //  Watch for an end of file
 2147|  4.88M|        if (!nextCh)
  ------------------
  |  Branch (2147:13): [True: 58, False: 4.88M]
  ------------------
 2148|     58|        {
 2149|     58|            emitError(XMLErrs::UnterminatedComment);
 2150|     58|            ThrowXMLwithMemMgr(UnexpectedEOFException, XMLExcepts::Gen_UnexpectedEOF, fMemoryManager);
  ------------------
  |  |  264|     58|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
 2151|     58|        }
 2152|       |
 2153|       |        // Check for correct surrogate pairs
 2154|  4.88M|        if ((nextCh >= 0xD800) && (nextCh <= 0xDBFF))
  ------------------
  |  Branch (2154:13): [True: 1.59k, False: 4.88M]
  |  Branch (2154:35): [True: 603, False: 993]
  ------------------
 2155|    603|        {
 2156|    603|            if (gotLeadingSurrogate)
  ------------------
  |  Branch (2156:17): [True: 1, False: 602]
  ------------------
 2157|      1|                emitError(XMLErrs::Expected2ndSurrogateChar);
 2158|    602|            else
 2159|    602|                gotLeadingSurrogate = true;
 2160|    603|        }
 2161|  4.88M|        else
 2162|  4.88M|        {
 2163|  4.88M|            if (gotLeadingSurrogate)
  ------------------
  |  Branch (2163:17): [True: 601, False: 4.88M]
  ------------------
 2164|    601|            {
 2165|    601|                if ((nextCh < 0xDC00) || (nextCh > 0xDFFF))
  ------------------
  |  Branch (2165:21): [True: 2, False: 599]
  |  Branch (2165:42): [True: 0, False: 599]
  ------------------
 2166|      2|                    emitError(XMLErrs::Expected2ndSurrogateChar);
 2167|    601|            }
 2168|       |            // Its got to at least be a valid XML character
 2169|  4.88M|            else if (!fReaderMgr.getCurrentReader()->isXMLChar(nextCh)) {
  ------------------
  |  Branch (2169:22): [True: 2, False: 4.88M]
  ------------------
 2170|       |
 2171|      2|                XMLCh tmpBuf[9];
 2172|      2|                XMLString::binToText
 2173|      2|                (
 2174|      2|                    nextCh
 2175|      2|                    , tmpBuf
 2176|      2|                    , 8
 2177|      2|                    , 16
 2178|      2|                    , fMemoryManager
 2179|      2|                );
 2180|      2|                emitError(XMLErrs::InvalidCharacter, tmpBuf);
 2181|      2|            }
 2182|       |
 2183|  4.88M|            gotLeadingSurrogate = false;
 2184|  4.88M|        }
 2185|       |
 2186|  4.88M|        if (curState == InText)
  ------------------
  |  Branch (2186:13): [True: 3.64M, False: 1.23M]
  ------------------
 2187|  3.64M|        {
 2188|       |            // If its a dash, go to OneDash state. Otherwise take as text
 2189|  3.64M|            if (nextCh == chDash)
  ------------------
  |  Branch (2189:17): [True: 1.09M, False: 2.55M]
  ------------------
 2190|  1.09M|                curState = OneDash;
 2191|  2.55M|            else
 2192|  2.55M|                bbComment.append(nextCh);
 2193|  3.64M|        }
 2194|  1.23M|        else if (curState == OneDash)
  ------------------
  |  Branch (2194:18): [True: 1.09M, False: 147k]
  ------------------
 2195|  1.09M|        {
 2196|       |            //  If its another dash, then we change to the two dashes states.
 2197|       |            //  Otherwise, we have to put in the deficit dash and the new
 2198|       |            //  character and go back to InText.
 2199|  1.09M|            if (nextCh == chDash)
  ------------------
  |  Branch (2199:17): [True: 147k, False: 942k]
  ------------------
 2200|   147k|            {
 2201|   147k|                curState = TwoDashes;
 2202|   147k|            }
 2203|   942k|            else
 2204|   942k|            {
 2205|   942k|                bbComment.append(chDash);
 2206|   942k|                bbComment.append(nextCh);
 2207|   942k|                curState = InText;
 2208|   942k|            }
 2209|  1.09M|        }
 2210|   147k|        else if (curState == TwoDashes)
  ------------------
  |  Branch (2210:18): [True: 147k, False: 8]
  ------------------
 2211|   147k|        {
 2212|       |            // The next character must be the closing bracket
 2213|   147k|            if (nextCh != chCloseAngle)
  ------------------
  |  Branch (2213:17): [True: 2, False: 147k]
  ------------------
 2214|      2|            {
 2215|      2|                emitError(XMLErrs::IllegalSequenceInComment);
 2216|      2|                fReaderMgr.skipPastChar(chCloseAngle);
 2217|      2|                return;
 2218|      2|            }
 2219|   147k|            break;
 2220|   147k|        }
 2221|  4.88M|    }
 2222|       |
 2223|       |    // If we have an available handler, call back with the comment.
 2224|   147k|    if (fDocHandler)
  ------------------
  |  Branch (2224:9): [True: 0, False: 147k]
  ------------------
 2225|      0|    {
 2226|      0|        fDocHandler->docComment
 2227|      0|        (
 2228|      0|            bbComment.getRawBuffer()
 2229|      0|        );
 2230|      0|    }
 2231|       |
 2232|       |    //mark comment is seen within the current element
 2233|   147k|    if (! fElemStack.isEmpty())
  ------------------
  |  Branch (2233:9): [True: 147k, False: 552]
  ------------------
 2234|   147k|        fElemStack.setCommentOrPISeen();
 2235|       |
 2236|   147k|}
_ZN11xercesc_3_210XMLScanner6scanEqEb:
 2242|  5.45M|{
 2243|  5.45M|    if(inDecl)
  ------------------
  |  Branch (2243:8): [True: 1.38k, False: 5.45M]
  ------------------
 2244|  1.38k|    {
 2245|  1.38k|        bool skippedSomething;
 2246|  1.38k|        fReaderMgr.skipPastSpaces(skippedSomething, inDecl);
 2247|  1.38k|        if (fReaderMgr.skippedChar(chEqual))
  ------------------
  |  Branch (2247:13): [True: 1.38k, False: 1]
  ------------------
 2248|  1.38k|        {
 2249|  1.38k|            fReaderMgr.skipPastSpaces(skippedSomething, inDecl);
 2250|  1.38k|            return true;
 2251|  1.38k|        }
 2252|  1.38k|    }
 2253|  5.45M|    else
 2254|  5.45M|    {
 2255|  5.45M|        fReaderMgr.skipPastSpaces();
 2256|  5.45M|        if (fReaderMgr.skippedChar(chEqual))
  ------------------
  |  Branch (2256:13): [True: 5.45M, False: 28]
  ------------------
 2257|  5.45M|        {
 2258|  5.45M|            fReaderMgr.skipPastSpaces();
 2259|  5.45M|            return true;
 2260|  5.45M|        }
 2261|  5.45M|    }
 2262|     29|    return false;
 2263|  5.45M|}
_ZN11xercesc_3_210XMLScanner12scanUpToWSOrERNS_9XMLBufferEDs:
 2268|  1.51k|{
 2269|  1.51k|    fReaderMgr.getUpToCharOrWS(toFill, chEndChar);
 2270|  1.51k|    return toFill.getLen();
 2271|  1.51k|}
_ZN11xercesc_3_210XMLScanner13getNewUIntPtrEv:
 2274|    523|{
 2275|       |    // this method hands back a new pointer initialized to 0
 2276|    523|    unsigned int *retVal;
 2277|    523|    if(fUIntPoolCol < 64)
  ------------------
  |  Branch (2277:8): [True: 523, False: 0]
  ------------------
 2278|    523|    {
 2279|    523|        retVal = fUIntPool[fUIntPoolRow]+fUIntPoolCol;
 2280|    523|        fUIntPoolCol++;
 2281|    523|        return retVal;
 2282|    523|    }
 2283|       |    // time to grow the pool...
 2284|      0|    if(fUIntPoolRow+1 == fUIntPoolRowTotal)
  ------------------
  |  Branch (2284:8): [True: 0, False: 0]
  ------------------
 2285|      0|    {
 2286|       |        // and time to add some space for new rows:
 2287|      0|        fUIntPoolRowTotal <<= 1;
 2288|      0|        unsigned int **newArray = (unsigned int **)fMemoryManager->allocate(sizeof(unsigned int *) * fUIntPoolRowTotal );
 2289|      0|        memcpy(newArray, fUIntPool, (fUIntPoolRow+1) * sizeof(unsigned int *));
 2290|      0|        fMemoryManager->deallocate(fUIntPool);
 2291|      0|        fUIntPool = newArray;
 2292|       |        // need to 0 out new elements we won't need:
 2293|      0|        for (unsigned int i=fUIntPoolRow+2; i<fUIntPoolRowTotal; i++)
  ------------------
  |  Branch (2293:45): [True: 0, False: 0]
  ------------------
 2294|      0|            fUIntPool[i] = 0;
 2295|      0|    }
 2296|       |    // now to add a new row; we just made sure we have space
 2297|      0|    fUIntPoolRow++;
 2298|      0|    fUIntPool[fUIntPoolRow] = (unsigned int *)fMemoryManager->allocate(sizeof(unsigned int) << 6);
 2299|      0|    memset(fUIntPool[fUIntPoolRow], 0, sizeof(unsigned int) << 6);
 2300|       |    // point to next element
 2301|      0|    fUIntPoolCol = 1;
 2302|      0|    return fUIntPool[fUIntPoolRow];
 2303|    523|}
_ZN11xercesc_3_210XMLScanner13resetUIntPoolEv:
 2306|  7.10k|{
 2307|       |    // to reuse the unsigned int pool--and the hashtables that use it--
 2308|       |    // simply reinitialize everything to 0's
 2309|  14.2k|    for(unsigned int i = 0; i<= fUIntPoolRow; i++)
  ------------------
  |  Branch (2309:29): [True: 7.10k, False: 7.10k]
  ------------------
 2310|  7.10k|        memset(fUIntPool[i], 0, sizeof(unsigned int) << 6);
 2311|  7.10k|}

_ZN11xercesc_3_210XMLScanner19incrementErrorCountEv:
 1407|  30.5M|{
 1408|  30.5M|    ++fErrorCount;
 1409|  30.5M|}
_ZNK11xercesc_3_210XMLScanner28getValidationConstraintFatalEv:
  939|  30.5M|{
  940|  30.5M|    return fValidationConstraintFatal;
  941|  30.5M|}
_ZNK11xercesc_3_210XMLScanner16getMemoryManagerEv:
 1130|  5.50M|{
 1131|  5.50M|    return fMemoryManager;
 1132|  5.50M|}
_ZNK11xercesc_3_210XMLScanner15getDoNamespacesEv:
  889|  5.54M|{
  890|  5.54M|    return fDoNamespaces;
  891|  5.54M|}
_ZN11xercesc_3_210XMLScanner14getPSVIHandlerEv:
  929|  7.12k|{
  930|  7.12k|    return fPSVIHandler;
  931|  7.12k|}
_ZN11xercesc_3_210XMLScanner12getIDRefListEv:
  949|  2.50M|{
  950|  2.50M|    return fValidationContext->getIdRefList();
  951|  2.50M|}
_ZNK11xercesc_3_210XMLScanner13getStandaloneEv:
  985|  5.47M|{
  986|  5.47M|    return fStandalone;
  987|  5.47M|}
_ZNK11xercesc_3_210XMLScanner19getValidationSchemeEv:
  990|  64.1k|{
  991|  64.1k|    return fValScheme;
  992|  64.1k|}
_ZNK11xercesc_3_210XMLScanner19getEmptyNamespaceIdEv:
 1030|  28.9k|{
 1031|  28.9k|    return fEmptyNamespaceId;
 1032|  28.9k|}
_ZNK11xercesc_3_210XMLScanner11getHasNoDTDEv:
 1060|  19.4k|{
 1061|  19.4k|    return fHasNoDTD;
 1062|  19.4k|}
_ZNK11xercesc_3_210XMLScanner18getCalculateSrcOfsEv:
 1110|     59|{
 1111|     59|    return fCalculateSrcOfs;
 1112|     59|}
_ZNK11xercesc_3_210XMLScanner15getLowWaterMarkEv:
 1160|     59|{
 1161|     59|    return fLowWaterMark;
 1162|     59|}
_ZNK11xercesc_3_210XMLScanner33getDisableDefaultEntityResolutionEv:
 1175|     59|{
 1176|     59|    return fDisableDefaultEntityResolution;
 1177|     59|}
_ZN11xercesc_3_210XMLScanner19setValidationSchemeENS0_10ValSchemesE:
 1240|  7.12k|{
 1241|  7.12k|    fValScheme = newScheme;
 1242|       |
 1243|       |    // validation flag for Val_Auto is set to false by default,
 1244|       |    //   and will be turned to true if a grammar is seen
 1245|  7.12k|    if (fValScheme == Val_Always)
  ------------------
  |  Branch (1245:9): [True: 0, False: 7.12k]
  ------------------
 1246|      0|        fValidate = true;
 1247|  7.12k|    else
 1248|  7.12k|        fValidate = false;
 1249|  7.12k|}
_ZN11xercesc_3_210XMLScanner11setDoSchemaEb:
 1252|  7.12k|{
 1253|  7.12k|    fDoSchema = doSchema;
 1254|  7.12k|}
_ZN11xercesc_3_210XMLScanner15setDoNamespacesEb:
 1257|  7.12k|{
 1258|  7.12k|    fDoNamespaces = doNamespaces;
 1259|  7.12k|}
_ZN11xercesc_3_210XMLScanner31setValidationSchemaFullCheckingEb:
 1262|  7.12k|{
 1263|  7.12k|    fSchemaFullChecking = schemaFullChecking;
 1264|  7.12k|}
_ZN11xercesc_3_210XMLScanner11setHasNoDTDEb:
 1272|  13.3k|{
 1273|  13.3k|    fHasNoDTD = hasNoDTD;
 1274|  13.3k|}
_ZN11xercesc_3_210XMLScanner15setRootElemNameEPDs:
 1277|  6.05k|{
 1278|  6.05k|    fMemoryManager->deallocate(fRootElemName);//delete [] fRootElemName;
 1279|  6.05k|    fRootElemName = XMLString::replicate(rootElemName, fMemoryManager);
 1280|  6.05k|}
_ZN11xercesc_3_210XMLScanner24setHandleMultipleImportsEb:
 1399|  7.12k|{
 1400|  7.12k|    fHandleMultipleImports = newValue;
 1401|  7.12k|}
_ZN11xercesc_3_210XMLScanner22resetValidationContextEv:
 1412|  7.12k|{
 1413|  7.12k|    fValidationContext->clearIdRefList();
 1414|  7.12k|    fValidationContext->setEntityDeclPool(0);
 1415|  7.12k|    fEntityDeclPoolRetrieved = false;
 1416|  7.12k|}

_ZN11xercesc_3_218XMLScannerResolver17getDefaultScannerEPNS_12XMLValidatorEPNS_15GrammarResolverEPNS_13MemoryManagerE:
   41|  7.12k|{
   42|  7.12k|    return new (manager) IGXMLScanner(valToAdopt, grammarResolver, manager);
   43|  7.12k|}

_ZN11xercesc_3_213XSerializableD2Ev:
   37|  12.5M|    virtual ~XSerializable() {} ;
_ZN11xercesc_3_213XSerializableC2Ev:
   49|  8.27M|    XSerializable() {}
_ZN11xercesc_3_213XSerializableC2ERKS0_:
   50|  4.27M|    XSerializable(const XSerializable& ) {}             

_ZN11xercesc_3_213__AbortFilterC2Ev:
   66|      2|    __AbortFilter() {}

_ZN11xercesc_3_29SAXParserC2EPNS_12XMLValidatorEPNS_13MemoryManagerEPNS_14XMLGrammarPoolE:
   59|  7.12k|    fParseInProgress(false)
   60|  7.12k|    , fElemDepth(0)
   61|  7.12k|    , fAdvDHCount(0)
   62|  7.12k|    , fAdvDHListSize(32)
   63|  7.12k|    , fDocHandler(0)
   64|  7.12k|    , fDTDHandler(0)
   65|  7.12k|    , fEntityResolver(0)
   66|  7.12k|    , fXMLEntityResolver(0)
   67|  7.12k|    , fErrorHandler(0)
   68|  7.12k|    , fPSVIHandler(0)
   69|  7.12k|    , fAdvDHList(0)
   70|  7.12k|    , fScanner(0)
   71|  7.12k|    , fGrammarResolver(0)
   72|  7.12k|    , fURIStringPool(0)
   73|  7.12k|    , fValidator(valToAdopt)
   74|  7.12k|    , fMemoryManager(manager)
   75|  7.12k|    , fGrammarPool(gramPool)
   76|  7.12k|    , fElemQNameBuf(1023, manager)
   77|  7.12k|{
   78|  7.12k|    CleanupType cleanup(this, &SAXParser::cleanUp);
   79|       |
   80|  7.12k|    try
   81|  7.12k|    {
   82|  7.12k|        initialize();
   83|  7.12k|    }
   84|  7.12k|    catch(const OutOfMemoryException&)
   85|  7.12k|    {
   86|       |        // Don't cleanup when out of memory, since executing the
   87|       |        // code can cause problems.
   88|      0|        cleanup.release();
   89|       |
   90|      0|        throw;
   91|      0|    }
   92|       |
   93|  7.12k|    cleanup.release();
   94|  7.12k|}
_ZN11xercesc_3_29SAXParserD2Ev:
   98|  7.12k|{
   99|  7.12k|    cleanUp();
  100|  7.12k|}
_ZN11xercesc_3_29SAXParser10initializeEv:
  106|  7.12k|{
  107|       |    // Create grammar resolver and string pool to pass to scanner
  108|  7.12k|    fGrammarResolver = new (fMemoryManager) GrammarResolver(fGrammarPool, fMemoryManager);
  109|  7.12k|    fURIStringPool = fGrammarResolver->getStringPool();
  110|       |
  111|       |    // Create our scanner and tell it what validator to use
  112|  7.12k|    fScanner = XMLScannerResolver::getDefaultScanner(fValidator, fGrammarResolver, fMemoryManager);
  113|  7.12k|    fScanner->setURIStringPool(fURIStringPool);
  114|       |
  115|       |    // Create the initial advanced handler list array and zero it out
  116|  7.12k|    fAdvDHList = (XMLDocumentHandler**) fMemoryManager->allocate
  117|  7.12k|    (
  118|  7.12k|        fAdvDHListSize * sizeof(XMLDocumentHandler*)
  119|  7.12k|    );//new XMLDocumentHandler*[fAdvDHListSize];
  120|  7.12k|    memset(fAdvDHList, 0, sizeof(void*) * fAdvDHListSize);
  121|  7.12k|}
_ZN11xercesc_3_29SAXParser7cleanUpEv:
  124|  7.12k|{
  125|  7.12k|    fMemoryManager->deallocate(fAdvDHList);//delete [] fAdvDHList;
  126|  7.12k|    delete fScanner;
  127|  7.12k|    delete fGrammarResolver;
  128|       |    // grammar pool must do this
  129|       |    //delete fURIStringPool;
  130|       |
  131|  7.12k|    if (fValidator)
  ------------------
  |  Branch (131:9): [True: 0, False: 7.12k]
  ------------------
  132|      0|        delete fValidator;
  133|  7.12k|}
_ZN11xercesc_3_29SAXParser15setDoNamespacesEb:
  394|  7.12k|{
  395|  7.12k|    fScanner->setDoNamespaces(newState);
  396|  7.12k|}
_ZN11xercesc_3_29SAXParser19setValidationSchemeENS0_10ValSchemesE:
  421|  7.12k|{
  422|  7.12k|    if (newScheme == Val_Never)
  ------------------
  |  Branch (422:9): [True: 0, False: 7.12k]
  ------------------
  423|      0|        fScanner->setValidationScheme(XMLScanner::Val_Never);
  424|  7.12k|    else if (newScheme == Val_Always)
  ------------------
  |  Branch (424:14): [True: 0, False: 7.12k]
  ------------------
  425|      0|        fScanner->setValidationScheme(XMLScanner::Val_Always);
  426|  7.12k|    else
  427|  7.12k|        fScanner->setValidationScheme(XMLScanner::Val_Auto);
  428|  7.12k|}
_ZN11xercesc_3_29SAXParser11setDoSchemaEb:
  431|  7.12k|{
  432|  7.12k|    fScanner->setDoSchema(newState);
  433|  7.12k|}
_ZN11xercesc_3_29SAXParser31setValidationSchemaFullCheckingEb:
  436|  7.12k|{
  437|  7.12k|    fScanner->setValidationSchemaFullChecking(schemaFullChecking);
  438|  7.12k|}
_ZN11xercesc_3_29SAXParser24setHandleMultipleImportsEb:
  557|  7.12k|{
  558|  7.12k|    fScanner->setHandleMultipleImports(newValue);
  559|  7.12k|}
_ZN11xercesc_3_29SAXParser5parseERKNS_11InputSourceE:
  565|  7.12k|{
  566|       |    // Avoid multiple entrance
  567|  7.12k|    if (fParseInProgress)
  ------------------
  |  Branch (567:9): [True: 0, False: 7.12k]
  ------------------
  568|      0|        ThrowXMLwithMemMgr(IOException, XMLExcepts::Gen_ParseInProgress, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  569|       |
  570|  7.12k|    ResetInProgressType     resetInProgress(this, &SAXParser::resetInProgress);
  571|       |
  572|  7.12k|    try
  573|  7.12k|    {
  574|  7.12k|        fParseInProgress = true;
  575|  7.12k|        fScanner->scanDocument(source);
  576|  7.12k|    }
  577|  7.12k|    catch(const OutOfMemoryException&)
  578|  7.12k|    {
  579|      0|        resetInProgress.release();
  580|       |
  581|      0|        throw;
  582|      0|    }
  583|  7.12k|}
_ZN11xercesc_3_29SAXParser15resetInProgressEv:
 1341|  7.12k|{
 1342|  7.12k|    fParseInProgress = false;
 1343|  7.12k|}

_ZN11xercesc_3_213AttributeListC2Ev:
   90|  7.12k|    {
   91|  7.12k|    }
_ZN11xercesc_3_213AttributeListD2Ev:
   95|  7.12k|    {
   96|  7.12k|    }

_ZN11xercesc_3_211InputSourceD2Ev:
   35|  7.78k|{
   36|  7.78k|    fMemoryManager->deallocate(fEncoding);
   37|  7.78k|    fMemoryManager->deallocate(fPublicId);
   38|  7.78k|    fMemoryManager->deallocate(fSystemId);
   39|  7.78k|}
_ZN11xercesc_3_211InputSource11setSystemIdEPKDs:
   60|    663|{
   61|    663|    fMemoryManager->deallocate(fSystemId);
   62|    663|    fSystemId = XMLString::replicate(systemId, fMemoryManager);
   63|    663|}
_ZN11xercesc_3_211InputSourceC2EPNS_13MemoryManagerE:
   72|    663|    fMemoryManager(manager)
   73|    663|    , fEncoding(0)
   74|    663|    , fPublicId(0)
   75|    663|    , fSystemId(0)
   76|    663|    , fFatalErrorIfNotFound(true)
   77|    663|{
   78|    663|}
_ZN11xercesc_3_211InputSourceC2EPKcPNS_13MemoryManagerE:
  109|  7.12k|    fMemoryManager(manager)
  110|  7.12k|    , fEncoding(0)
  111|  7.12k|    , fPublicId(0)
  112|  7.12k|    , fSystemId(0)
  113|  7.12k|    , fFatalErrorIfNotFound(true)
  114|  7.12k|{
  115|  7.12k|    fSystemId = XMLString::transcode(systemId, fMemoryManager);
  116|  7.12k|}

_ZNK11xercesc_3_211InputSource11getEncodingEv:
  303|  7.14k|{
  304|  7.14k|    return fEncoding;
  305|  7.14k|}
_ZNK11xercesc_3_211InputSource11getPublicIdEv:
  308|  7.14k|{
  309|  7.14k|    return fPublicId;
  310|  7.14k|}
_ZNK11xercesc_3_211InputSource11getSystemIdEv:
  313|  7.72k|{
  314|  7.72k|    return fSystemId;
  315|  7.72k|}
_ZNK11xercesc_3_211InputSource16getMemoryManagerEv:
  323|  14.8k|{
  324|  14.8k|    return fMemoryManager;
  325|  14.8k|}

_ZN11xercesc_3_27LocatorC2Ev:
   62|  7.12k|    {
   63|  7.12k|    }
_ZN11xercesc_3_27LocatorD2Ev:
   67|  7.12k|    {
   68|  7.12k|    }

_ZN11xercesc_3_26ParserC2Ev:
   70|  7.12k|    {
   71|  7.12k|    }
_ZN11xercesc_3_26ParserD2Ev:
   74|  7.12k|    {
   75|  7.12k|    }

_ZN11xercesc_3_215BaseRefVectorOfINS_8ENameMapEEC2EmbPNS_13MemoryManagerE:
   34|      1|    fAdoptedElems(adoptElems)
   35|      1|    , fCurCount(0)
   36|      1|    , fMaxCount(maxElems)
   37|      1|    , fElemList(0)
   38|      1|    , fMemoryManager(manager)
   39|      1|{
   40|       |    // Allocate and initialize the array
   41|      1|    fElemList = (TElem**) fMemoryManager->allocate(maxElems * sizeof(TElem*));//new TElem*[maxElems];
   42|      9|    for (XMLSize_t index = 0; index < maxElems; index++)
  ------------------
  |  Branch (42:31): [True: 8, False: 1]
  ------------------
   43|      8|        fElemList[index] = 0;
   44|      1|}
_ZN11xercesc_3_215BaseRefVectorOfINS_8ENameMapEE12setElementAtEPS1_m:
   66|      8|{
   67|      8|    if (setAt >= fCurCount)
  ------------------
  |  Branch (67:9): [True: 0, False: 8]
  ------------------
   68|      0|        ThrowXMLwithMemMgr(ArrayIndexOutOfBoundsException, XMLExcepts::Vector_BadIndex, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
   69|       |
   70|      8|    if (fAdoptedElems)
  ------------------
  |  Branch (70:9): [True: 8, False: 0]
  ------------------
   71|      8|        delete fElemList[setAt];
   72|      8|    fElemList[setAt] = toSet;
   73|      8|}
_ZN11xercesc_3_215BaseRefVectorOfINS_8ENameMapEE9elementAtEm:
  248|   365k|{
  249|   365k|    if (getAt >= fCurCount)
  ------------------
  |  Branch (249:9): [True: 0, False: 365k]
  ------------------
  250|      0|        ThrowXMLwithMemMgr(ArrayIndexOutOfBoundsException, XMLExcepts::Vector_BadIndex, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  251|   365k|    return fElemList[getAt];
  252|   365k|}
_ZN11xercesc_3_215BaseRefVectorOfINS_8ENameMapEE10addElementEPS1_:
   57|      8|{
   58|      8|    ensureExtraCapacity(1);
   59|      8|    fElemList[fCurCount] = toAdd;
   60|      8|    fCurCount++;
   61|      8|}
_ZN11xercesc_3_215BaseRefVectorOfINS_8ENameMapEE19ensureExtraCapacityEm:
  265|      8|{
  266|      8|    XMLSize_t newMax = fCurCount + length;
  267|       |
  268|      8|    if (newMax <= fMaxCount)
  ------------------
  |  Branch (268:9): [True: 8, False: 0]
  ------------------
  269|      8|        return;
  270|       |
  271|       |	// Choose how much bigger based on the current size.
  272|       |	// This will grow half as much again.
  273|      0|    if (newMax < fMaxCount + fMaxCount/2)
  ------------------
  |  Branch (273:9): [True: 0, False: 0]
  ------------------
  274|      0|        newMax = fMaxCount + fMaxCount/2;
  275|       |
  276|       |    // Allocate the new array and copy over the existing stuff
  277|      0|    TElem** newList = (TElem**) fMemoryManager->allocate
  278|      0|    (
  279|      0|        newMax * sizeof(TElem*)
  280|      0|    );//new TElem*[newMax];
  281|      0|    XMLSize_t index = 0;
  282|      0|    for (; index < fCurCount; index++)
  ------------------
  |  Branch (282:12): [True: 0, False: 0]
  ------------------
  283|      0|        newList[index] = fElemList[index];
  284|       |
  285|       |    // Zero out the rest of them
  286|      0|    for (; index < newMax; index++)
  ------------------
  |  Branch (286:12): [True: 0, False: 0]
  ------------------
  287|      0|        newList[index] = 0;
  288|       |
  289|       |    // Clean up the old array and update our members
  290|      0|    fMemoryManager->deallocate(fElemList);//delete [] fElemList;
  291|      0|    fElemList = newList;
  292|      0|    fMaxCount = newMax;
  293|      0|}
_ZN11xercesc_3_215BaseRefVectorOfIDsEC2EmbPNS_13MemoryManagerE:
   34|      1|    fAdoptedElems(adoptElems)
   35|      1|    , fCurCount(0)
   36|      1|    , fMaxCount(maxElems)
   37|      1|    , fElemList(0)
   38|      1|    , fMemoryManager(manager)
   39|      1|{
   40|       |    // Allocate and initialize the array
   41|      1|    fElemList = (TElem**) fMemoryManager->allocate(maxElems * sizeof(TElem*));//new TElem*[maxElems];
   42|      5|    for (XMLSize_t index = 0; index < maxElems; index++)
  ------------------
  |  Branch (42:31): [True: 4, False: 1]
  ------------------
   43|      4|        fElemList[index] = 0;
   44|      1|}
_ZN11xercesc_3_215BaseRefVectorOfIDsED2Ev:
   49|      1|{
   50|      1|}
_ZN11xercesc_3_215BaseRefVectorOfIDsE10addElementEPDs:
   57|      1|{
   58|      1|    ensureExtraCapacity(1);
   59|      1|    fElemList[fCurCount] = toAdd;
   60|      1|    fCurCount++;
   61|      1|}
_ZN11xercesc_3_215BaseRefVectorOfIDsE19ensureExtraCapacityEm:
  265|      1|{
  266|      1|    XMLSize_t newMax = fCurCount + length;
  267|       |
  268|      1|    if (newMax <= fMaxCount)
  ------------------
  |  Branch (268:9): [True: 1, False: 0]
  ------------------
  269|      1|        return;
  270|       |
  271|       |	// Choose how much bigger based on the current size.
  272|       |	// This will grow half as much again.
  273|      0|    if (newMax < fMaxCount + fMaxCount/2)
  ------------------
  |  Branch (273:9): [True: 0, False: 0]
  ------------------
  274|      0|        newMax = fMaxCount + fMaxCount/2;
  275|       |
  276|       |    // Allocate the new array and copy over the existing stuff
  277|      0|    TElem** newList = (TElem**) fMemoryManager->allocate
  278|      0|    (
  279|      0|        newMax * sizeof(TElem*)
  280|      0|    );//new TElem*[newMax];
  281|      0|    XMLSize_t index = 0;
  282|      0|    for (; index < fCurCount; index++)
  ------------------
  |  Branch (282:12): [True: 0, False: 0]
  ------------------
  283|      0|        newList[index] = fElemList[index];
  284|       |
  285|       |    // Zero out the rest of them
  286|      0|    for (; index < newMax; index++)
  ------------------
  |  Branch (286:12): [True: 0, False: 0]
  ------------------
  287|      0|        newList[index] = 0;
  288|       |
  289|       |    // Clean up the old array and update our members
  290|      0|    fMemoryManager->deallocate(fElemList);//delete [] fElemList;
  291|      0|    fElemList = newList;
  292|      0|    fMaxCount = newMax;
  293|      0|}
_ZN11xercesc_3_215BaseRefVectorOfINS_23DOMImplementationSourceEEC2EmbPNS_13MemoryManagerE:
   34|      1|    fAdoptedElems(adoptElems)
   35|      1|    , fCurCount(0)
   36|      1|    , fMaxCount(maxElems)
   37|      1|    , fElemList(0)
   38|      1|    , fMemoryManager(manager)
   39|      1|{
   40|       |    // Allocate and initialize the array
   41|      1|    fElemList = (TElem**) fMemoryManager->allocate(maxElems * sizeof(TElem*));//new TElem*[maxElems];
   42|      4|    for (XMLSize_t index = 0; index < maxElems; index++)
  ------------------
  |  Branch (42:31): [True: 3, False: 1]
  ------------------
   43|      3|        fElemList[index] = 0;
   44|      1|}
_ZNK11xercesc_3_215BaseRefVectorOfINS_23DOMImplementationSourceEE4sizeEv:
  255|      2|{
  256|      2|    return fCurCount;
  257|      2|}
_ZN11xercesc_3_215BaseRefVectorOfINS_23DOMImplementationSourceEE10addElementEPS1_:
   57|      1|{
   58|      1|    ensureExtraCapacity(1);
   59|      1|    fElemList[fCurCount] = toAdd;
   60|      1|    fCurCount++;
   61|      1|}
_ZN11xercesc_3_215BaseRefVectorOfINS_23DOMImplementationSourceEE19ensureExtraCapacityEm:
  265|      1|{
  266|      1|    XMLSize_t newMax = fCurCount + length;
  267|       |
  268|      1|    if (newMax <= fMaxCount)
  ------------------
  |  Branch (268:9): [True: 1, False: 0]
  ------------------
  269|      1|        return;
  270|       |
  271|       |	// Choose how much bigger based on the current size.
  272|       |	// This will grow half as much again.
  273|      0|    if (newMax < fMaxCount + fMaxCount/2)
  ------------------
  |  Branch (273:9): [True: 0, False: 0]
  ------------------
  274|      0|        newMax = fMaxCount + fMaxCount/2;
  275|       |
  276|       |    // Allocate the new array and copy over the existing stuff
  277|      0|    TElem** newList = (TElem**) fMemoryManager->allocate
  278|      0|    (
  279|      0|        newMax * sizeof(TElem*)
  280|      0|    );//new TElem*[newMax];
  281|      0|    XMLSize_t index = 0;
  282|      0|    for (; index < fCurCount; index++)
  ------------------
  |  Branch (282:12): [True: 0, False: 0]
  ------------------
  283|      0|        newList[index] = fElemList[index];
  284|       |
  285|       |    // Zero out the rest of them
  286|      0|    for (; index < newMax; index++)
  ------------------
  |  Branch (286:12): [True: 0, False: 0]
  ------------------
  287|      0|        newList[index] = 0;
  288|       |
  289|       |    // Clean up the old array and update our members
  290|      0|    fMemoryManager->deallocate(fElemList);//delete [] fElemList;
  291|      0|    fElemList = newList;
  292|      0|    fMaxCount = newMax;
  293|      0|}
_ZN11xercesc_3_215BaseRefVectorOfINS_23DOMImplementationSourceEE9elementAtEm:
  248|      1|{
  249|      1|    if (getAt >= fCurCount)
  ------------------
  |  Branch (249:9): [True: 0, False: 1]
  ------------------
  250|      0|        ThrowXMLwithMemMgr(ArrayIndexOutOfBoundsException, XMLExcepts::Vector_BadIndex, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  251|      1|    return fElemList[getAt];
  252|      1|}
_ZN11xercesc_3_215BaseRefVectorOfINS_7XMLAttrEEC2EmbPNS_13MemoryManagerE:
   34|  7.12k|    fAdoptedElems(adoptElems)
   35|  7.12k|    , fCurCount(0)
   36|  7.12k|    , fMaxCount(maxElems)
   37|  7.12k|    , fElemList(0)
   38|  7.12k|    , fMemoryManager(manager)
   39|  7.12k|{
   40|       |    // Allocate and initialize the array
   41|  7.12k|    fElemList = (TElem**) fMemoryManager->allocate(maxElems * sizeof(TElem*));//new TElem*[maxElems];
   42|   235k|    for (XMLSize_t index = 0; index < maxElems; index++)
  ------------------
  |  Branch (42:31): [True: 228k, False: 7.12k]
  ------------------
   43|   228k|        fElemList[index] = 0;
   44|  7.12k|}
_ZN11xercesc_3_215BaseRefVectorOfINS_7XMLAttrEED2Ev:
   49|  7.12k|{
   50|  7.12k|}
_ZN11xercesc_3_215BaseRefVectorOfINS_7XMLAttrEE10addElementEPS1_:
   57|  2.61k|{
   58|  2.61k|    ensureExtraCapacity(1);
   59|  2.61k|    fElemList[fCurCount] = toAdd;
   60|  2.61k|    fCurCount++;
   61|  2.61k|}
_ZN11xercesc_3_215BaseRefVectorOfINS_7XMLAttrEE19ensureExtraCapacityEm:
  265|  2.61k|{
  266|  2.61k|    XMLSize_t newMax = fCurCount + length;
  267|       |
  268|  2.61k|    if (newMax <= fMaxCount)
  ------------------
  |  Branch (268:9): [True: 2.60k, False: 13]
  ------------------
  269|  2.60k|        return;
  270|       |
  271|       |	// Choose how much bigger based on the current size.
  272|       |	// This will grow half as much again.
  273|     13|    if (newMax < fMaxCount + fMaxCount/2)
  ------------------
  |  Branch (273:9): [True: 13, False: 0]
  ------------------
  274|     13|        newMax = fMaxCount + fMaxCount/2;
  275|       |
  276|       |    // Allocate the new array and copy over the existing stuff
  277|     13|    TElem** newList = (TElem**) fMemoryManager->allocate
  278|     13|    (
  279|     13|        newMax * sizeof(TElem*)
  280|     13|    );//new TElem*[newMax];
  281|     13|    XMLSize_t index = 0;
  282|    533|    for (; index < fCurCount; index++)
  ------------------
  |  Branch (282:12): [True: 520, False: 13]
  ------------------
  283|    520|        newList[index] = fElemList[index];
  284|       |
  285|       |    // Zero out the rest of them
  286|    273|    for (; index < newMax; index++)
  ------------------
  |  Branch (286:12): [True: 260, False: 13]
  ------------------
  287|    260|        newList[index] = 0;
  288|       |
  289|       |    // Clean up the old array and update our members
  290|     13|    fMemoryManager->deallocate(fElemList);//delete [] fElemList;
  291|     13|    fElemList = newList;
  292|     13|    fMaxCount = newMax;
  293|     13|}
_ZN11xercesc_3_215BaseRefVectorOfINS_9XMLReaderEED2Ev:
   49|  7.10k|{
   50|  7.10k|}
_ZN11xercesc_3_215BaseRefVectorOfINS_9XMLReaderEE17removeAllElementsEv:
  129|  7.10k|{
  130|  7.24k|    for (XMLSize_t index = 0; index < fCurCount; index++)
  ------------------
  |  Branch (130:31): [True: 134, False: 7.10k]
  ------------------
  131|    134|    {
  132|    134|        if (fAdoptedElems)
  ------------------
  |  Branch (132:13): [True: 134, False: 0]
  ------------------
  133|    134|          delete fElemList[index];
  134|       |
  135|       |        // Keep unused elements zero for sanity's sake
  136|    134|        fElemList[index] = 0;
  137|    134|    }
  138|  7.10k|    fCurCount = 0;
  139|  7.10k|}
_ZN11xercesc_3_215BaseRefVectorOfINS_13XMLEntityDeclEED2Ev:
   49|  7.10k|{
   50|  7.10k|}
_ZN11xercesc_3_215BaseRefVectorOfINS_13XMLEntityDeclEE17removeAllElementsEv:
  129|  7.10k|{
  130|  7.24k|    for (XMLSize_t index = 0; index < fCurCount; index++)
  ------------------
  |  Branch (130:31): [True: 134, False: 7.10k]
  ------------------
  131|    134|    {
  132|    134|        if (fAdoptedElems)
  ------------------
  |  Branch (132:13): [True: 0, False: 134]
  ------------------
  133|      0|          delete fElemList[index];
  134|       |
  135|       |        // Keep unused elements zero for sanity's sake
  136|    134|        fElemList[index] = 0;
  137|    134|    }
  138|  7.10k|    fCurCount = 0;
  139|  7.10k|}
_ZNK11xercesc_3_215BaseRefVectorOfINS_9XMLReaderEE4sizeEv:
  255|   742k|{
  256|   742k|    return fCurCount;
  257|   742k|}
_ZN11xercesc_3_215BaseRefVectorOfINS_9XMLReaderEE15orphanElementAtEm:
  100|   365k|{
  101|   365k|    if (orphanAt >= fCurCount)
  ------------------
  |  Branch (101:9): [True: 0, False: 365k]
  ------------------
  102|      0|        ThrowXMLwithMemMgr(ArrayIndexOutOfBoundsException, XMLExcepts::Vector_BadIndex, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  103|       |
  104|       |    // Get the element we are going to orphan
  105|   365k|    TElem* retVal = fElemList[orphanAt];
  106|       |
  107|       |    // Optimize if its the last element
  108|   365k|    if (orphanAt == fCurCount-1)
  ------------------
  |  Branch (108:9): [True: 365k, False: 0]
  ------------------
  109|   365k|    {
  110|   365k|        fElemList[orphanAt] = 0;
  111|   365k|        fCurCount--;
  112|   365k|        return retVal;
  113|   365k|    }
  114|       |
  115|       |    // Copy down every element above orphan point
  116|      0|    for (XMLSize_t index = orphanAt; index < fCurCount-1; index++)
  ------------------
  |  Branch (116:38): [True: 0, False: 0]
  ------------------
  117|      0|        fElemList[index] = fElemList[index+1];
  118|       |
  119|       |    // Keep unused elements zero for sanity's sake
  120|      0|    fElemList[fCurCount-1] = 0;
  121|       |
  122|       |    // And bump down count
  123|      0|    fCurCount--;
  124|       |
  125|      0|    return retVal;
  126|   365k|}
_ZNK11xercesc_3_215BaseRefVectorOfINS_13XMLEntityDeclEE4sizeEv:
  255|  1.05M|{
  256|  1.05M|    return fCurCount;
  257|  1.05M|}
_ZN11xercesc_3_215BaseRefVectorOfINS_13XMLEntityDeclEE15orphanElementAtEm:
  100|   365k|{
  101|   365k|    if (orphanAt >= fCurCount)
  ------------------
  |  Branch (101:9): [True: 0, False: 365k]
  ------------------
  102|      0|        ThrowXMLwithMemMgr(ArrayIndexOutOfBoundsException, XMLExcepts::Vector_BadIndex, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  103|       |
  104|       |    // Get the element we are going to orphan
  105|   365k|    TElem* retVal = fElemList[orphanAt];
  106|       |
  107|       |    // Optimize if its the last element
  108|   365k|    if (orphanAt == fCurCount-1)
  ------------------
  |  Branch (108:9): [True: 365k, False: 0]
  ------------------
  109|   365k|    {
  110|   365k|        fElemList[orphanAt] = 0;
  111|   365k|        fCurCount--;
  112|   365k|        return retVal;
  113|   365k|    }
  114|       |
  115|       |    // Copy down every element above orphan point
  116|      0|    for (XMLSize_t index = orphanAt; index < fCurCount-1; index++)
  ------------------
  |  Branch (116:38): [True: 0, False: 0]
  ------------------
  117|      0|        fElemList[index] = fElemList[index+1];
  118|       |
  119|       |    // Keep unused elements zero for sanity's sake
  120|      0|    fElemList[fCurCount-1] = 0;
  121|       |
  122|       |    // And bump down count
  123|      0|    fCurCount--;
  124|       |
  125|      0|    return retVal;
  126|   365k|}
_ZNK11xercesc_3_215BaseRefVectorOfINS_13XMLEntityDeclEE9elementAtEm:
  240|   323k|{
  241|   323k|    if (getAt >= fCurCount)
  ------------------
  |  Branch (241:9): [True: 0, False: 323k]
  ------------------
  242|      0|        ThrowXMLwithMemMgr(ArrayIndexOutOfBoundsException, XMLExcepts::Vector_BadIndex, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  243|   323k|    return fElemList[getAt];
  244|   323k|}
_ZN11xercesc_3_215BaseRefVectorOfINS_9XMLReaderEEC2EmbPNS_13MemoryManagerE:
   34|  7.10k|    fAdoptedElems(adoptElems)
   35|  7.10k|    , fCurCount(0)
   36|  7.10k|    , fMaxCount(maxElems)
   37|  7.10k|    , fElemList(0)
   38|  7.10k|    , fMemoryManager(manager)
   39|  7.10k|{
   40|       |    // Allocate and initialize the array
   41|  7.10k|    fElemList = (TElem**) fMemoryManager->allocate(maxElems * sizeof(TElem*));//new TElem*[maxElems];
   42|   120k|    for (XMLSize_t index = 0; index < maxElems; index++)
  ------------------
  |  Branch (42:31): [True: 113k, False: 7.10k]
  ------------------
   43|   113k|        fElemList[index] = 0;
   44|  7.10k|}
_ZN11xercesc_3_215BaseRefVectorOfINS_13XMLEntityDeclEEC2EmbPNS_13MemoryManagerE:
   34|  7.10k|    fAdoptedElems(adoptElems)
   35|  7.10k|    , fCurCount(0)
   36|  7.10k|    , fMaxCount(maxElems)
   37|  7.10k|    , fElemList(0)
   38|  7.10k|    , fMemoryManager(manager)
   39|  7.10k|{
   40|       |    // Allocate and initialize the array
   41|  7.10k|    fElemList = (TElem**) fMemoryManager->allocate(maxElems * sizeof(TElem*));//new TElem*[maxElems];
   42|   120k|    for (XMLSize_t index = 0; index < maxElems; index++)
  ------------------
  |  Branch (42:31): [True: 113k, False: 7.10k]
  ------------------
   43|   113k|        fElemList[index] = 0;
   44|  7.10k|}
_ZN11xercesc_3_215BaseRefVectorOfINS_9XMLReaderEE10addElementEPS1_:
   57|   365k|{
   58|   365k|    ensureExtraCapacity(1);
   59|   365k|    fElemList[fCurCount] = toAdd;
   60|   365k|    fCurCount++;
   61|   365k|}
_ZN11xercesc_3_215BaseRefVectorOfINS_9XMLReaderEE19ensureExtraCapacityEm:
  265|   365k|{
  266|   365k|    XMLSize_t newMax = fCurCount + length;
  267|       |
  268|   365k|    if (newMax <= fMaxCount)
  ------------------
  |  Branch (268:9): [True: 365k, False: 0]
  ------------------
  269|   365k|        return;
  270|       |
  271|       |	// Choose how much bigger based on the current size.
  272|       |	// This will grow half as much again.
  273|      0|    if (newMax < fMaxCount + fMaxCount/2)
  ------------------
  |  Branch (273:9): [True: 0, False: 0]
  ------------------
  274|      0|        newMax = fMaxCount + fMaxCount/2;
  275|       |
  276|       |    // Allocate the new array and copy over the existing stuff
  277|      0|    TElem** newList = (TElem**) fMemoryManager->allocate
  278|      0|    (
  279|      0|        newMax * sizeof(TElem*)
  280|      0|    );//new TElem*[newMax];
  281|      0|    XMLSize_t index = 0;
  282|      0|    for (; index < fCurCount; index++)
  ------------------
  |  Branch (282:12): [True: 0, False: 0]
  ------------------
  283|      0|        newList[index] = fElemList[index];
  284|       |
  285|       |    // Zero out the rest of them
  286|      0|    for (; index < newMax; index++)
  ------------------
  |  Branch (286:12): [True: 0, False: 0]
  ------------------
  287|      0|        newList[index] = 0;
  288|       |
  289|       |    // Clean up the old array and update our members
  290|      0|    fMemoryManager->deallocate(fElemList);//delete [] fElemList;
  291|      0|    fElemList = newList;
  292|      0|    fMaxCount = newMax;
  293|      0|}
_ZN11xercesc_3_215BaseRefVectorOfINS_13XMLEntityDeclEE10addElementEPS1_:
   57|   365k|{
   58|   365k|    ensureExtraCapacity(1);
   59|   365k|    fElemList[fCurCount] = toAdd;
   60|   365k|    fCurCount++;
   61|   365k|}
_ZN11xercesc_3_215BaseRefVectorOfINS_13XMLEntityDeclEE19ensureExtraCapacityEm:
  265|   365k|{
  266|   365k|    XMLSize_t newMax = fCurCount + length;
  267|       |
  268|   365k|    if (newMax <= fMaxCount)
  ------------------
  |  Branch (268:9): [True: 365k, False: 0]
  ------------------
  269|   365k|        return;
  270|       |
  271|       |	// Choose how much bigger based on the current size.
  272|       |	// This will grow half as much again.
  273|      0|    if (newMax < fMaxCount + fMaxCount/2)
  ------------------
  |  Branch (273:9): [True: 0, False: 0]
  ------------------
  274|      0|        newMax = fMaxCount + fMaxCount/2;
  275|       |
  276|       |    // Allocate the new array and copy over the existing stuff
  277|      0|    TElem** newList = (TElem**) fMemoryManager->allocate
  278|      0|    (
  279|      0|        newMax * sizeof(TElem*)
  280|      0|    );//new TElem*[newMax];
  281|      0|    XMLSize_t index = 0;
  282|      0|    for (; index < fCurCount; index++)
  ------------------
  |  Branch (282:12): [True: 0, False: 0]
  ------------------
  283|      0|        newList[index] = fElemList[index];
  284|       |
  285|       |    // Zero out the rest of them
  286|      0|    for (; index < newMax; index++)
  ------------------
  |  Branch (286:12): [True: 0, False: 0]
  ------------------
  287|      0|        newList[index] = 0;
  288|       |
  289|       |    // Clean up the old array and update our members
  290|      0|    fMemoryManager->deallocate(fElemList);//delete [] fElemList;
  291|      0|    fElemList = newList;
  292|      0|    fMaxCount = newMax;
  293|      0|}
_ZNK11xercesc_3_215BaseRefVectorOfINS_9XMLReaderEE9elementAtEm:
  240|    583|{
  241|    583|    if (getAt >= fCurCount)
  ------------------
  |  Branch (241:9): [True: 0, False: 583]
  ------------------
  242|      0|        ThrowXMLwithMemMgr(ArrayIndexOutOfBoundsException, XMLExcepts::Vector_BadIndex, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  243|    583|    return fElemList[getAt];
  244|    583|}
_ZNK11xercesc_3_215BaseRefVectorOfINS_5TokenEE4sizeEv:
  255|     23|{
  256|     23|    return fCurCount;
  257|     23|}
_ZN11xercesc_3_215BaseRefVectorOfINS_5TokenEE9elementAtEm:
  248|     32|{
  249|     32|    if (getAt >= fCurCount)
  ------------------
  |  Branch (249:9): [True: 0, False: 32]
  ------------------
  250|      0|        ThrowXMLwithMemMgr(ArrayIndexOutOfBoundsException, XMLExcepts::Vector_BadIndex, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  251|     32|    return fElemList[getAt];
  252|     32|}
_ZN11xercesc_3_215BaseRefVectorOfINS_5TokenEEC2EmbPNS_13MemoryManagerE:
   34|     11|    fAdoptedElems(adoptElems)
   35|     11|    , fCurCount(0)
   36|     11|    , fMaxCount(maxElems)
   37|     11|    , fElemList(0)
   38|     11|    , fMemoryManager(manager)
   39|     11|{
   40|       |    // Allocate and initialize the array
   41|     11|    fElemList = (TElem**) fMemoryManager->allocate(maxElems * sizeof(TElem*));//new TElem*[maxElems];
   42|    139|    for (XMLSize_t index = 0; index < maxElems; index++)
  ------------------
  |  Branch (42:31): [True: 128, False: 11]
  ------------------
   43|    128|        fElemList[index] = 0;
   44|     11|}
_ZN11xercesc_3_215BaseRefVectorOfINS_5TokenEE10addElementEPS1_:
   57|    331|{
   58|    331|    ensureExtraCapacity(1);
   59|    331|    fElemList[fCurCount] = toAdd;
   60|    331|    fCurCount++;
   61|    331|}
_ZN11xercesc_3_215BaseRefVectorOfINS_5TokenEE19ensureExtraCapacityEm:
  265|    331|{
  266|    331|    XMLSize_t newMax = fCurCount + length;
  267|       |
  268|    331|    if (newMax <= fMaxCount)
  ------------------
  |  Branch (268:9): [True: 323, False: 8]
  ------------------
  269|    323|        return;
  270|       |
  271|       |	// Choose how much bigger based on the current size.
  272|       |	// This will grow half as much again.
  273|      8|    if (newMax < fMaxCount + fMaxCount/2)
  ------------------
  |  Branch (273:9): [True: 8, False: 0]
  ------------------
  274|      8|        newMax = fMaxCount + fMaxCount/2;
  275|       |
  276|       |    // Allocate the new array and copy over the existing stuff
  277|      8|    TElem** newList = (TElem**) fMemoryManager->allocate
  278|      8|    (
  279|      8|        newMax * sizeof(TElem*)
  280|      8|    );//new TElem*[newMax];
  281|      8|    XMLSize_t index = 0;
  282|    792|    for (; index < fCurCount; index++)
  ------------------
  |  Branch (282:12): [True: 784, False: 8]
  ------------------
  283|    784|        newList[index] = fElemList[index];
  284|       |
  285|       |    // Zero out the rest of them
  286|    398|    for (; index < newMax; index++)
  ------------------
  |  Branch (286:12): [True: 390, False: 8]
  ------------------
  287|    390|        newList[index] = 0;
  288|       |
  289|       |    // Clean up the old array and update our members
  290|      8|    fMemoryManager->deallocate(fElemList);//delete [] fElemList;
  291|      8|    fElemList = newList;
  292|      8|    fMaxCount = newMax;
  293|      8|}
_ZNK11xercesc_3_215BaseRefVectorOfINS_7XMLAttrEE4sizeEv:
  255|  17.0M|{
  256|  17.0M|    return fCurCount;
  257|  17.0M|}
_ZN11xercesc_3_215BaseRefVectorOfINS_2OpEEC2EmbPNS_13MemoryManagerE:
   34|      5|    fAdoptedElems(adoptElems)
   35|      5|    , fCurCount(0)
   36|      5|    , fMaxCount(maxElems)
   37|      5|    , fElemList(0)
   38|      5|    , fMemoryManager(manager)
   39|      5|{
   40|       |    // Allocate and initialize the array
   41|      5|    fElemList = (TElem**) fMemoryManager->allocate(maxElems * sizeof(TElem*));//new TElem*[maxElems];
   42|     71|    for (XMLSize_t index = 0; index < maxElems; index++)
  ------------------
  |  Branch (42:31): [True: 66, False: 5]
  ------------------
   43|     66|        fElemList[index] = 0;
   44|      5|}
_ZNK11xercesc_3_215BaseRefVectorOfINS_2OpEE4sizeEv:
  255|     16|{
  256|     16|    return fCurCount;
  257|     16|}
_ZN11xercesc_3_215BaseRefVectorOfINS_2OpEE9elementAtEm:
  248|     27|{
  249|     27|    if (getAt >= fCurCount)
  ------------------
  |  Branch (249:9): [True: 0, False: 27]
  ------------------
  250|      0|        ThrowXMLwithMemMgr(ArrayIndexOutOfBoundsException, XMLExcepts::Vector_BadIndex, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  251|     27|    return fElemList[getAt];
  252|     27|}
_ZN11xercesc_3_215BaseRefVectorOfINS_2OpEE10addElementEPS1_:
   57|     74|{
   58|     74|    ensureExtraCapacity(1);
   59|     74|    fElemList[fCurCount] = toAdd;
   60|     74|    fCurCount++;
   61|     74|}
_ZN11xercesc_3_215BaseRefVectorOfINS_2OpEE19ensureExtraCapacityEm:
  265|     74|{
  266|     74|    XMLSize_t newMax = fCurCount + length;
  267|       |
  268|     74|    if (newMax <= fMaxCount)
  ------------------
  |  Branch (268:9): [True: 70, False: 4]
  ------------------
  269|     70|        return;
  270|       |
  271|       |	// Choose how much bigger based on the current size.
  272|       |	// This will grow half as much again.
  273|      4|    if (newMax < fMaxCount + fMaxCount/2)
  ------------------
  |  Branch (273:9): [True: 4, False: 0]
  ------------------
  274|      4|        newMax = fMaxCount + fMaxCount/2;
  275|       |
  276|       |    // Allocate the new array and copy over the existing stuff
  277|      4|    TElem** newList = (TElem**) fMemoryManager->allocate
  278|      4|    (
  279|      4|        newMax * sizeof(TElem*)
  280|      4|    );//new TElem*[newMax];
  281|      4|    XMLSize_t index = 0;
  282|     84|    for (; index < fCurCount; index++)
  ------------------
  |  Branch (282:12): [True: 80, False: 4]
  ------------------
  283|     80|        newList[index] = fElemList[index];
  284|       |
  285|       |    // Zero out the rest of them
  286|     44|    for (; index < newMax; index++)
  ------------------
  |  Branch (286:12): [True: 40, False: 4]
  ------------------
  287|     40|        newList[index] = 0;
  288|       |
  289|       |    // Clean up the old array and update our members
  290|      4|    fMemoryManager->deallocate(fElemList);//delete [] fElemList;
  291|      4|    fElemList = newList;
  292|      4|    fMaxCount = newMax;
  293|      4|}
_ZN11xercesc_3_215BaseRefVectorOfINS_20PSVIAttributeStorageEEC2EmbPNS_13MemoryManagerE:
   34|  7.12k|    fAdoptedElems(adoptElems)
   35|  7.12k|    , fCurCount(0)
   36|  7.12k|    , fMaxCount(maxElems)
   37|  7.12k|    , fElemList(0)
   38|  7.12k|    , fMemoryManager(manager)
   39|  7.12k|{
   40|       |    // Allocate and initialize the array
   41|  7.12k|    fElemList = (TElem**) fMemoryManager->allocate(maxElems * sizeof(TElem*));//new TElem*[maxElems];
   42|  78.3k|    for (XMLSize_t index = 0; index < maxElems; index++)
  ------------------
  |  Branch (42:31): [True: 71.2k, False: 7.12k]
  ------------------
   43|  71.2k|        fElemList[index] = 0;
   44|  7.12k|}
_ZN11xercesc_3_215BaseRefVectorOfINS_20PSVIAttributeStorageEED2Ev:
   49|  7.12k|{
   50|  7.12k|}
_ZN11xercesc_3_215BaseRefVectorOfINS_7XMLAttrEE9elementAtEm:
  248|  6.73M|{
  249|  6.73M|    if (getAt >= fCurCount)
  ------------------
  |  Branch (249:9): [True: 0, False: 6.73M]
  ------------------
  250|      0|        ThrowXMLwithMemMgr(ArrayIndexOutOfBoundsException, XMLExcepts::Vector_BadIndex, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  251|  6.73M|    return fElemList[getAt];
  252|  6.73M|}
_ZN11xercesc_3_215BaseRefVectorOfINS_12KVStringPairEEC2EmbPNS_13MemoryManagerE:
   34|  7.12k|    fAdoptedElems(adoptElems)
   35|  7.12k|    , fCurCount(0)
   36|  7.12k|    , fMaxCount(maxElems)
   37|  7.12k|    , fElemList(0)
   38|  7.12k|    , fMemoryManager(manager)
   39|  7.12k|{
   40|       |    // Allocate and initialize the array
   41|  7.12k|    fElemList = (TElem**) fMemoryManager->allocate(maxElems * sizeof(TElem*));//new TElem*[maxElems];
   42|   235k|    for (XMLSize_t index = 0; index < maxElems; index++)
  ------------------
  |  Branch (42:31): [True: 228k, False: 7.12k]
  ------------------
   43|   228k|        fElemList[index] = 0;
   44|  7.12k|}
_ZN11xercesc_3_215BaseRefVectorOfINS_12KVStringPairEED2Ev:
   49|  7.12k|{
   50|  7.12k|}
_ZN11xercesc_3_215BaseRefVectorOfINS_14RefHashTableOfINS_10ValueStoreENS_9PtrHasherEEEE17removeAllElementsEv:
  129|  7.12k|{
  130|  7.12k|    for (XMLSize_t index = 0; index < fCurCount; index++)
  ------------------
  |  Branch (130:31): [True: 0, False: 7.12k]
  ------------------
  131|      0|    {
  132|      0|        if (fAdoptedElems)
  ------------------
  |  Branch (132:13): [True: 0, False: 0]
  ------------------
  133|      0|          delete fElemList[index];
  134|       |
  135|       |        // Keep unused elements zero for sanity's sake
  136|      0|        fElemList[index] = 0;
  137|      0|    }
  138|  7.12k|    fCurCount = 0;
  139|  7.12k|}
_ZN11xercesc_3_215BaseRefVectorOfINS_14RefHashTableOfINS_10ValueStoreENS_9PtrHasherEEEED2Ev:
   49|  7.12k|{
   50|  7.12k|}
_ZN11xercesc_3_215BaseRefVectorOfINS_10ValueStoreEEC2EmbPNS_13MemoryManagerE:
   34|  7.12k|    fAdoptedElems(adoptElems)
   35|  7.12k|    , fCurCount(0)
   36|  7.12k|    , fMaxCount(maxElems)
   37|  7.12k|    , fElemList(0)
   38|  7.12k|    , fMemoryManager(manager)
   39|  7.12k|{
   40|       |    // Allocate and initialize the array
   41|  7.12k|    fElemList = (TElem**) fMemoryManager->allocate(maxElems * sizeof(TElem*));//new TElem*[maxElems];
   42|  64.1k|    for (XMLSize_t index = 0; index < maxElems; index++)
  ------------------
  |  Branch (42:31): [True: 57.0k, False: 7.12k]
  ------------------
   43|  57.0k|        fElemList[index] = 0;
   44|  7.12k|}
_ZN11xercesc_3_215BaseRefVectorOfINS_10ValueStoreEED2Ev:
   49|  7.12k|{
   50|  7.12k|}
_ZN11xercesc_3_215BaseRefVectorOfINS_10ValueStoreEE17removeAllElementsEv:
  129|  7.12k|{
  130|  7.12k|    for (XMLSize_t index = 0; index < fCurCount; index++)
  ------------------
  |  Branch (130:31): [True: 0, False: 7.12k]
  ------------------
  131|      0|    {
  132|      0|        if (fAdoptedElems)
  ------------------
  |  Branch (132:13): [True: 0, False: 0]
  ------------------
  133|      0|          delete fElemList[index];
  134|       |
  135|       |        // Keep unused elements zero for sanity's sake
  136|      0|        fElemList[index] = 0;
  137|      0|    }
  138|  7.12k|    fCurCount = 0;
  139|  7.12k|}
_ZN11xercesc_3_215BaseRefVectorOfINS_14RefHashTableOfINS_10ValueStoreENS_9PtrHasherEEEEC2EmbPNS_13MemoryManagerE:
   34|  7.12k|    fAdoptedElems(adoptElems)
   35|  7.12k|    , fCurCount(0)
   36|  7.12k|    , fMaxCount(maxElems)
   37|  7.12k|    , fElemList(0)
   38|  7.12k|    , fMemoryManager(manager)
   39|  7.12k|{
   40|       |    // Allocate and initialize the array
   41|  7.12k|    fElemList = (TElem**) fMemoryManager->allocate(maxElems * sizeof(TElem*));//new TElem*[maxElems];
   42|  64.1k|    for (XMLSize_t index = 0; index < maxElems; index++)
  ------------------
  |  Branch (42:31): [True: 57.0k, False: 7.12k]
  ------------------
   43|  57.0k|        fElemList[index] = 0;
   44|  7.12k|}
_ZN11xercesc_3_215BaseRefVectorOfINS_12XPathMatcherEEC2EmbPNS_13MemoryManagerE:
   34|  7.12k|    fAdoptedElems(adoptElems)
   35|  7.12k|    , fCurCount(0)
   36|  7.12k|    , fMaxCount(maxElems)
   37|  7.12k|    , fElemList(0)
   38|  7.12k|    , fMemoryManager(manager)
   39|  7.12k|{
   40|       |    // Allocate and initialize the array
   41|  7.12k|    fElemList = (TElem**) fMemoryManager->allocate(maxElems * sizeof(TElem*));//new TElem*[maxElems];
   42|  64.1k|    for (XMLSize_t index = 0; index < maxElems; index++)
  ------------------
  |  Branch (42:31): [True: 57.0k, False: 7.12k]
  ------------------
   43|  57.0k|        fElemList[index] = 0;
   44|  7.12k|}
_ZN11xercesc_3_215BaseRefVectorOfINS_12XPathMatcherEED2Ev:
   49|  7.12k|{
   50|  7.12k|}
_ZN11xercesc_3_215BaseRefVectorOfINS_12XPathMatcherEE17removeAllElementsEv:
  129|  7.12k|{
  130|  7.12k|    for (XMLSize_t index = 0; index < fCurCount; index++)
  ------------------
  |  Branch (130:31): [True: 0, False: 7.12k]
  ------------------
  131|      0|    {
  132|      0|        if (fAdoptedElems)
  ------------------
  |  Branch (132:13): [True: 0, False: 0]
  ------------------
  133|      0|          delete fElemList[index];
  134|       |
  135|       |        // Keep unused elements zero for sanity's sake
  136|      0|        fElemList[index] = 0;
  137|      0|    }
  138|  7.12k|    fCurCount = 0;
  139|  7.12k|}

_ZN11xercesc_3_218BinFileInputStreamC2EPKDsPNS_13MemoryManagerE:
   40|    373|    fSource(XMLPlatformUtils::openFile(fileName, manager))
   41|    373|  , fMemoryManager(manager)
   42|    373|{
   43|    373|}
_ZN11xercesc_3_218BinFileInputStreamD2Ev:
   62|    278|{
   63|    278|    if (getIsOpen())
  ------------------
  |  Branch (63:9): [True: 17, False: 261]
  ------------------
   64|     17|    {
   65|     17|        try
   66|     17|        {
   67|     17|            XMLPlatformUtils::closeFile(fSource, fMemoryManager);
   68|     17|        }
   69|     17|        catch (...)
   70|     17|        {
   71|       |            // There is nothing we can do about it here.
   72|      0|        }
   73|     17|    }
   74|    278|}
_ZN11xercesc_3_218BinFileInputStream9readBytesEPhm:
  106|     17|{
  107|       |    //
  108|       |    //  Read up to the maximum bytes requested. We return the number
  109|       |    //  actually read.
  110|       |    //
  111|     17|    return XMLPlatformUtils::readFileBuffer(fSource, maxToRead, toFill, fMemoryManager);
  112|     17|}

_ZNK11xercesc_3_218BinFileInputStream9getIsOpenEv:
  101|    556|{
  102|    556|    return (fSource != (FileHandle) XERCES_Invalid_File_Handle);
  ------------------
  |  |   31|    556|#define XERCES_Invalid_File_Handle 0
  ------------------
  103|    556|}

_ZN11xercesc_3_214BinInputStreamD2Ev:
   34|   372k|{
   35|   372k|}
_ZN11xercesc_3_214BinInputStreamC2Ev:
   42|   372k|{
   43|   372k|}
_ZNK11xercesc_3_214BinInputStream11getEncodingEv:
   49|  7.14k|{
   50|  7.14k|    return 0;
   51|  7.14k|}

_ZN11xercesc_3_217BinMemInputStreamC2EPKhmNS0_7BufOptsEPNS_13MemoryManagerE:
   39|   372k|    fBuffer(0)
   40|   372k|    , fBufOpt(bufOpt)
   41|   372k|    , fCapacity(capacity)
   42|   372k|    , fCurIndex(0)
   43|   372k|    , fMemoryManager(manager)
   44|   372k|{
   45|       |    // According to the buffer option, do the right thing
   46|   372k|    if (fBufOpt == BufOpt_Copy)
  ------------------
  |  Branch (46:9): [True: 7.12k, False: 365k]
  ------------------
   47|  7.12k|    {
   48|  7.12k|        XMLByte* tmpBuf = (XMLByte*) fMemoryManager->allocate
   49|  7.12k|        (
   50|  7.12k|            fCapacity * sizeof(XMLByte)
   51|  7.12k|        );//new XMLByte[fCapacity];
   52|  7.12k|        memcpy(tmpBuf, initData, capacity);
   53|  7.12k|        fBuffer = tmpBuf;
   54|  7.12k|    }
   55|   365k|     else
   56|   365k|    {
   57|   365k|        fBuffer = initData;
   58|   365k|    }
   59|   372k|}
_ZN11xercesc_3_217BinMemInputStreamD2Ev:
   62|   372k|{
   63|       |    //
   64|       |    //  If we adopted or copied the buffer, then clean it up. We have to
   65|       |    //  cast off the const'ness in that case in order to delete it.
   66|       |    //
   67|   372k|    if ((fBufOpt == BufOpt_Adopt) || (fBufOpt == BufOpt_Copy))
  ------------------
  |  Branch (67:9): [True: 0, False: 372k]
  |  Branch (67:38): [True: 7.12k, False: 365k]
  ------------------
   68|  7.12k|        fMemoryManager->deallocate(const_cast<XMLByte*>(fBuffer));//delete [] (XMLByte*)fBuffer;
   69|   372k|}
_ZN11xercesc_3_217BinMemInputStream9readBytesEPhm:
   77|   799k|{
   78|       |    //
   79|       |    //  Figure out how much we can really read. Its the smaller of the
   80|       |    //  amount available and the amount asked for.
   81|       |    //
   82|   799k|    const XMLSize_t available = (fCapacity - fCurIndex);
   83|   799k|    if (!available)
  ------------------
  |  Branch (83:9): [True: 421k, False: 378k]
  ------------------
   84|   421k|        return 0;
   85|       |
   86|   378k|    const XMLSize_t actualToRead = available < maxToRead ? available : maxToRead;
  ------------------
  |  Branch (86:36): [True: 371k, False: 6.69k]
  ------------------
   87|       |
   88|   378k|    memcpy(toFill, &fBuffer[fCurIndex], actualToRead);
   89|   378k|    fCurIndex += actualToRead;
   90|   378k|    return actualToRead;
   91|   799k|}

_ZN11xercesc_3_26BitOps9swapBytesEt:
   36|  1.51M|    {
   37|       |        //The mask is required to overcome a compiler error on solaris
   38|  1.51M|        return XMLCh(((toSwap >> 8) | (toSwap << 8)) & 0xFFFF);
   39|  1.51M|    }
_ZN11xercesc_3_26BitOps9swapBytesEj:
   42|  1.18M|    {
   43|  1.18M|        return
   44|  1.18M|        (
   45|  1.18M|            (toSwap >> 24)
   46|  1.18M|            | (toSwap << 24)
   47|  1.18M|            | ((toSwap & 0xFF00) << 8)
   48|  1.18M|            | ((toSwap & 0xFF0000) >> 8)
   49|  1.18M|        );
   50|  1.18M|    }

_ZN11xercesc_3_219DefaultPanicHandlerC2Ev:
   46|      1|    DefaultPanicHandler(){};

_ZN11xercesc_3_214XMLInitializer27initializeEncodingValidatorEv:
   34|      1|{
   35|      1|    EncodingValidator::fInstance = new EncodingValidator();
   36|      1|}
_ZN11xercesc_3_217EncodingValidatorC2Ev:
   48|      1|    fEncodingRegistry(0)
   49|      1|{
   50|      1|    initializeRegistry();
   51|      1|}
_ZN11xercesc_3_217EncodingValidator18initializeRegistryEv:
   74|      1|void EncodingValidator::initializeRegistry() {
   75|       |
   76|      1|    fEncodingRegistry = new ValueHashTableOf<bool>(109);
   77|       |
   78|    792|    for (unsigned int i=0; i < gEncodingArraySize; i++) {
  ------------------
  |  Branch (78:28): [True: 791, False: 1]
  ------------------
   79|    791|        fEncodingRegistry->put(const_cast<void *>(reinterpret_cast<const void *>(gEncodingArray[i])), true);
   80|    791|    }
   81|      1|}

_ZN11xercesc_3_212PosixFileMgrC2Ev:
   47|      1|{
   48|      1|}
_ZN11xercesc_3_212PosixFileMgr8fileOpenEPKDsbPNS_13MemoryManagerE:
   58|    373|{
   59|    373|    const char* tmpFileName = XMLString::transcode(path, manager);
   60|    373|    ArrayJanitor<char> janText((char*)tmpFileName, manager);
   61|    373|    return fileOpen(tmpFileName, toWrite, manager);
   62|    373|}
_ZN11xercesc_3_212PosixFileMgr8fileOpenEPKcbPNS_13MemoryManagerE:
   67|    278|{
   68|    278|    const char* perms = (toWrite) ? "wb" : "rb";
  ------------------
  |  Branch (68:25): [True: 0, False: 278]
  ------------------
   69|    278|    FileHandle result = (FileHandle)fopen(path , perms);
   70|    278|    return result;
   71|    278|}
_ZN11xercesc_3_212PosixFileMgr9fileCloseEPvPNS_13MemoryManagerE:
   83|     17|{
   84|     17|    if (!f)
  ------------------
  |  Branch (84:9): [True: 0, False: 17]
  ------------------
   85|      0|        ThrowXMLwithMemMgr(XMLPlatformUtilsException, XMLExcepts::CPtr_PointerIsZero, manager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
   86|       |
   87|     17|    if (fclose((FILE*)f))
  ------------------
  |  Branch (87:9): [True: 0, False: 17]
  ------------------
   88|      0|        ThrowXMLwithMemMgr(XMLPlatformUtilsException,
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
   89|     17|                 XMLExcepts::File_CouldNotCloseFile, manager);
   90|     17|}
_ZN11xercesc_3_212PosixFileMgr8fileReadEPvmPhPNS_13MemoryManagerE:
  150|     17|{
  151|     17|    if (!f || !buffer)
  ------------------
  |  Branch (151:9): [True: 0, False: 17]
  |  Branch (151:15): [True: 0, False: 17]
  ------------------
  152|      0|        ThrowXMLwithMemMgr(XMLPlatformUtilsException, XMLExcepts::CPtr_PointerIsZero, manager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  153|       |		
  154|     17|    XMLSize_t bytesRead = 0;
  155|     17|    if (byteCount > 0)
  ------------------
  |  Branch (155:9): [True: 17, False: 0]
  ------------------
  156|     17|    {
  157|     17|        bytesRead = fread((void*)buffer, 1, byteCount, (FILE*)f);
  158|       |
  159|     17|        if (ferror((FILE*)f))
  ------------------
  |  Branch (159:13): [True: 17, False: 0]
  ------------------
  160|     17|            ThrowXMLwithMemMgr(XMLPlatformUtilsException, XMLExcepts::File_CouldNotReadFromFile, manager);
  ------------------
  |  |  264|     17|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  161|     17|    }
  162|       |	
  163|      0|    return bytesRead;
  164|     17|}
_ZN11xercesc_3_212PosixFileMgr10isRelativeEPKDsPNS_13MemoryManagerE:
  243|    318|{
  244|       |    // Check for pathological case of empty path
  245|    318|    if (!toCheck || !toCheck[0])
  ------------------
  |  Branch (245:9): [True: 0, False: 318]
  |  Branch (245:21): [True: 3, False: 315]
  ------------------
  246|      3|        return false;
  247|       |
  248|       |    //
  249|       |    //  If it starts with a slash, then it cannot be relative.
  250|       |    //
  251|    315|    return toCheck[0] != chForwardSlash;
  252|    318|}

_ZN11xercesc_3_211FlagJanitorIbEC2EPbb:
   36|  5.32k|:   fValPtr(valPtr)
   37|  5.32k|{
   38|       |    // Store the pointer, save the org value, and store the new value    
   39|  5.32k|    if (fValPtr)
  ------------------
  |  Branch (39:9): [True: 5.32k, False: 0]
  ------------------
   40|  5.32k|    {
   41|  5.32k|        fOldVal = *fValPtr;
   42|  5.32k|        *fValPtr = newVal;
   43|  5.32k|    }
   44|  5.32k|}
_ZN11xercesc_3_211FlagJanitorIbED2Ev:
   47|  5.32k|{
   48|       |    // Restore the old value
   49|  5.32k|    if (fValPtr)
  ------------------
  |  Branch (49:9): [True: 5.32k, False: 0]
  ------------------
   50|  5.32k|        *fValPtr = fOldVal;
   51|  5.32k|}

_ZN11xercesc_3_214Hash2KeysSetOfINS_12StringHasherEE9removeAllEv:
  238|  5.45M|{
  239|  5.45M|    if(isEmpty())
  ------------------
  |  Branch (239:8): [True: 4.24M, False: 1.21M]
  ------------------
  240|  4.24M|        return;
  241|       |
  242|  9.69M|    for (XMLSize_t buckInd = 0; buckInd < fHashModulus; buckInd++)
  ------------------
  |  Branch (242:33): [True: 8.48M, False: 1.21M]
  ------------------
  243|  8.48M|    {
  244|  8.48M|        if(fBucketList[buckInd]!=0)
  ------------------
  |  Branch (244:12): [True: 1.21M, False: 7.26M]
  ------------------
  245|  1.21M|        {
  246|       |            // Advance to the end of the chain, and connect it to the list of
  247|       |            // available blocks
  248|  1.21M|            Hash2KeysSetBucketElem* curElem = fBucketList[buckInd];
  249|  1.21M|            while (curElem->fNext)
  ------------------
  |  Branch (249:20): [True: 917, False: 1.21M]
  ------------------
  250|    917|                curElem = curElem->fNext;
  251|  1.21M|            curElem->fNext=fAvailable;
  252|  1.21M|            fAvailable=fBucketList[buckInd];
  253|  1.21M|            fBucketList[buckInd] = 0;
  254|  1.21M|        }
  255|  8.48M|    }
  256|  1.21M|    fCount=0;
  257|  1.21M|}
_ZNK11xercesc_3_214Hash2KeysSetOfINS_12StringHasherEE7isEmptyEv:
  130|  5.46M|{
  131|  5.46M|    return (fCount==0);
  132|  5.46M|}
_ZN11xercesc_3_214Hash2KeysSetOfINS_12StringHasherEE15putIfNotPresentEPKvi:
  319|  1.21M|{
  320|       |    // First see if the key exists already
  321|  1.21M|    XMLSize_t hashVal;
  322|  1.21M|    Hash2KeysSetBucketElem* newBucket = findBucketElem(key1, key2, hashVal);
  323|       |
  324|       |    //
  325|       |    //  If so,then update its value. If not, then we need to add it to
  326|       |    //  the right bucket
  327|       |    //
  328|  1.21M|    if (newBucket)
  ------------------
  |  Branch (328:9): [True: 3, False: 1.21M]
  ------------------
  329|      3|        return false;
  330|       |
  331|       |    // Apply 4 load factor to find threshold.
  332|  1.21M|    XMLSize_t threshold = fHashModulus * 4;
  333|       |
  334|       |    // If we've grown too big, expand the table and rehash.
  335|  1.21M|    if (fCount >= threshold)
  ------------------
  |  Branch (335:9): [True: 14, False: 1.21M]
  ------------------
  336|     14|        rehash();
  337|       |
  338|  1.21M|    if(fAvailable==0)
  ------------------
  |  Branch (338:8): [True: 1.14k, False: 1.21M]
  ------------------
  339|  1.14k|        newBucket = (Hash2KeysSetBucketElem*)fMemoryManager->allocate(sizeof(Hash2KeysSetBucketElem));
  340|  1.21M|    else
  341|  1.21M|    {
  342|  1.21M|        newBucket = fAvailable;
  343|  1.21M|        fAvailable = fAvailable->fNext;
  344|  1.21M|    }
  345|  1.21M|    newBucket->fKey1 = key1;
  346|  1.21M|    newBucket->fKey2 = key2;
  347|  1.21M|    newBucket->fNext = fBucketList[hashVal];
  348|  1.21M|    fBucketList[hashVal] = newBucket;
  349|  1.21M|    fCount++;
  350|  1.21M|    return true;
  351|  1.21M|}
_ZN11xercesc_3_214Hash2KeysSetOfINS_12StringHasherEE14findBucketElemEPKviRm:
  360|  1.21M|{
  361|       |    // Hash the key
  362|  1.21M|    hashVal = fHasher.getHashVal(key1, fHashModulus);
  363|  1.21M|    assert(hashVal < fHashModulus);
  364|       |
  365|       |    // Search that bucket for the key
  366|  1.21M|    Hash2KeysSetBucketElem* curElem = fBucketList[hashVal];
  367|  1.21M|    while (curElem)
  ------------------
  |  Branch (367:12): [True: 2.46k, False: 1.21M]
  ------------------
  368|  2.46k|    {
  369|  2.46k|        if((key2==curElem->fKey2) && (fHasher.equals(key1, curElem->fKey1)))
  ------------------
  |  Branch (369:12): [True: 2.46k, False: 0]
  |  Branch (369:38): [True: 3, False: 2.46k]
  ------------------
  370|      3|            return curElem;
  371|       |
  372|  2.46k|        curElem = curElem->fNext;
  373|  2.46k|    }
  374|  1.21M|    return 0;
  375|  1.21M|}
_ZN11xercesc_3_214Hash2KeysSetOfINS_12StringHasherEE6rehashEv:
  401|     14|{
  402|     14|    const XMLSize_t newMod = (fHashModulus * 8)+1;
  403|       |
  404|     14|    Hash2KeysSetBucketElem** newBucketList =
  405|     14|        (Hash2KeysSetBucketElem**) fMemoryManager->allocate
  406|     14|    (
  407|     14|        newMod * sizeof(Hash2KeysSetBucketElem*)
  408|     14|    );//new Hash2KeysSetBucketElem*[fHashModulus];
  409|       |
  410|       |    // Make sure the new bucket list is destroyed if an
  411|       |    // exception is thrown.
  412|     14|    ArrayJanitor<Hash2KeysSetBucketElem*>  guard(newBucketList, fMemoryManager);
  413|       |
  414|     14|    memset(newBucketList, 0, newMod * sizeof(newBucketList[0]));
  415|       |
  416|       |    // Rehash all existing entries.
  417|    112|    for (XMLSize_t index = 0; index < fHashModulus; index++)
  ------------------
  |  Branch (417:31): [True: 98, False: 14]
  ------------------
  418|     98|    {
  419|       |        // Get the bucket list head for this entry
  420|     98|        Hash2KeysSetBucketElem* curElem = fBucketList[index];
  421|    490|        while (curElem)
  ------------------
  |  Branch (421:16): [True: 392, False: 98]
  ------------------
  422|    392|        {
  423|       |            // Save the next element before we detach this one
  424|    392|            Hash2KeysSetBucketElem* nextElem = curElem->fNext;
  425|       |
  426|    392|            const XMLSize_t hashVal = fHasher.getHashVal(curElem->fKey1, newMod);
  427|    392|            assert(hashVal < newMod);
  428|       |
  429|    392|            Hash2KeysSetBucketElem* newHeadElem = newBucketList[hashVal];
  430|       |
  431|       |            // Insert at the start of this bucket's list.
  432|    392|            curElem->fNext = newHeadElem;
  433|    392|            newBucketList[hashVal] = curElem;
  434|       |
  435|    392|            curElem = nextElem;
  436|    392|        }
  437|     98|    }
  438|       |
  439|     14|    Hash2KeysSetBucketElem** const oldBucketList = fBucketList;
  440|       |
  441|       |    // Everything is OK at this point, so update the
  442|       |    // member variables.
  443|     14|    fBucketList = guard.release();
  444|     14|    fHashModulus = newMod;
  445|       |
  446|       |    // Delete the old bucket list.
  447|     14|    fMemoryManager->deallocate(oldBucketList);//delete[] oldBucketList;
  448|       |
  449|     14|}
_ZN11xercesc_3_214Hash2KeysSetOfINS_12StringHasherEEC2EmPNS_13MemoryManagerE:
   46|  7.12k|    : fMemoryManager(manager)
   47|  7.12k|    , fBucketList(0)
   48|  7.12k|    , fHashModulus(modulus)
   49|  7.12k|    , fCount(0)
   50|  7.12k|    , fAvailable(0)
   51|  7.12k|{
   52|  7.12k|    initialize(modulus);
   53|  7.12k|}
_ZN11xercesc_3_214Hash2KeysSetOfINS_12StringHasherEE10initializeEm:
   73|  7.12k|{
   74|  7.12k|    if (modulus == 0)
  ------------------
  |  Branch (74:9): [True: 0, False: 7.12k]
  ------------------
   75|      0|        ThrowXMLwithMemMgr(IllegalArgumentException, XMLExcepts::HshTbl_ZeroModulus, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
   76|       |
   77|       |    // Allocate the bucket list and zero them
   78|  7.12k|    fBucketList = (Hash2KeysSetBucketElem**) fMemoryManager->allocate
   79|  7.12k|    (
   80|  7.12k|        fHashModulus * sizeof(Hash2KeysSetBucketElem*)
   81|  7.12k|    ); //new Hash2KeysSetBucketElem*[fHashModulus];
   82|  7.12k|    memset(fBucketList, 0, sizeof(fBucketList[0]) * fHashModulus);
   83|  7.12k|}
_ZN11xercesc_3_214Hash2KeysSetOfINS_12StringHasherEED2Ev:
   87|  7.12k|{
   88|  7.12k|    Hash2KeysSetBucketElem* nextElem;
   89|  7.12k|    if(!isEmpty())
  ------------------
  |  Branch (89:8): [True: 218, False: 6.90k]
  ------------------
   90|    218|    {
   91|       |        // Clean up the buckets first
   92|  2.39k|        for (XMLSize_t buckInd = 0; buckInd < fHashModulus; buckInd++)
  ------------------
  |  Branch (92:37): [True: 2.17k, False: 218]
  ------------------
   93|  2.17k|        {
   94|       |            // Get the bucket list head for this entry
   95|  2.17k|            Hash2KeysSetBucketElem* curElem = fBucketList[buckInd];
   96|  2.95k|            while (curElem)
  ------------------
  |  Branch (96:20): [True: 775, False: 2.17k]
  ------------------
   97|    775|            {
   98|       |                // Save the next element before we hose this one
   99|    775|                nextElem = curElem->fNext;
  100|    775|                fMemoryManager->deallocate(curElem);
  101|    775|                curElem = nextElem;
  102|    775|            }
  103|       |
  104|       |            // Clean out this entry
  105|  2.17k|            fBucketList[buckInd] = 0;
  106|  2.17k|        }
  107|    218|    }
  108|       |    // Then delete the list of available blocks
  109|  7.12k|    Hash2KeysSetBucketElem* curElem = fAvailable;
  110|  7.49k|    while (curElem)
  ------------------
  |  Branch (110:12): [True: 365, False: 7.12k]
  ------------------
  111|    365|    {
  112|       |        // Save the next element before we hose this one
  113|    365|        nextElem = curElem->fNext;
  114|    365|        fMemoryManager->deallocate(curElem);
  115|    365|        curElem = nextElem;
  116|    365|    }
  117|  7.12k|    fAvailable = 0;
  118|       |
  119|       |    // Then delete the bucket list & hasher
  120|  7.12k|    fMemoryManager->deallocate(fBucketList); //delete [] fBucketList;
  121|  7.12k|    fBucketList = 0;
  122|  7.12k|}

_ZNK11xercesc_3_212StringHasher10getHashValEPKvm:
   45|  39.9M|  {
   46|  39.9M|    return XMLString::hash ((const XMLCh*)key, mod);
   47|  39.9M|  }
_ZNK11xercesc_3_212StringHasher6equalsEPKvS2_:
   58|  29.0M|  {
   59|  29.0M|    return XMLString::equals ((const XMLCh*)key1, (const XMLCh*)key2);
   60|  29.0M|  }
_ZNK11xercesc_3_29PtrHasher10getHashValEPKvm:
   75|  9.76M|  {
   76|  9.76M|    return ((XMLSize_t)key) % mod;
   77|  9.76M|  }
_ZNK11xercesc_3_29PtrHasher6equalsEPKvS2_:
   88|  9.74M|  {
   89|  9.74M|    return key1 == key2;
   90|  9.74M|  }

_ZN11xercesc_3_212ArrayJanitorIcEC2EPcPNS_13MemoryManagerE:
  113|  9.81k|    fData(toDelete)
  114|  9.81k|    , fMemoryManager(manager)
  115|  9.81k|{
  116|  9.81k|}
_ZN11xercesc_3_212ArrayJanitorIcED2Ev:
  120|  9.81k|{
  121|  9.81k|	reset();
  122|  9.81k|}
_ZN11xercesc_3_212ArrayJanitorIcE5resetEPc:
  162|  9.81k|{
  163|  9.81k|	if (fData) {
  ------------------
  |  Branch (163:6): [True: 639, False: 9.17k]
  ------------------
  164|       |
  165|    639|		if (fMemoryManager)
  ------------------
  |  Branch (165:7): [True: 639, False: 0]
  ------------------
  166|    639|            fMemoryManager->deallocate((void*)fData);
  167|      0|        else
  168|      0|            delete [] fData;
  169|    639|    }
  170|       |
  171|  9.81k|	fData = p;
  172|  9.81k|    fMemoryManager = 0;
  173|  9.81k|}
_ZN11xercesc_3_212ArrayJanitorIPNS_22RefHashTableBucketElemINS_12KVStringPairEEEEC2EPS4_PNS_13MemoryManagerE:
  113|      4|    fData(toDelete)
  114|      4|    , fMemoryManager(manager)
  115|      4|{
  116|      4|}
_ZN11xercesc_3_212ArrayJanitorIPNS_22RefHashTableBucketElemINS_12KVStringPairEEEE7releaseEv:
  153|      4|{
  154|      4|	T* p = fData;
  155|      4|	fData = 0;
  156|      4|	return p;
  157|      4|}
_ZN11xercesc_3_212ArrayJanitorIPNS_22RefHashTableBucketElemINS_12KVStringPairEEEED2Ev:
  120|      4|{
  121|      4|	reset();
  122|      4|}
_ZN11xercesc_3_212ArrayJanitorIPNS_22RefHashTableBucketElemINS_12KVStringPairEEEE5resetEPS4_:
  162|      4|{
  163|      4|	if (fData) {
  ------------------
  |  Branch (163:6): [True: 0, False: 4]
  ------------------
  164|       |
  165|      0|		if (fMemoryManager)
  ------------------
  |  Branch (165:7): [True: 0, False: 0]
  ------------------
  166|      0|            fMemoryManager->deallocate((void*)fData);
  167|      0|        else
  168|      0|            delete [] fData;
  169|      0|    }
  170|       |
  171|      4|	fData = p;
  172|      4|    fMemoryManager = 0;
  173|      4|}
_ZN11xercesc_3_212ArrayJanitorIPNS_24ValueHashTableBucketElemINS_7XSValue8DataTypeEEEEC2EPS5_PNS_13MemoryManagerE:
  113|      1|    fData(toDelete)
  114|      1|    , fMemoryManager(manager)
  115|      1|{
  116|      1|}
_ZN11xercesc_3_212ArrayJanitorIPNS_24ValueHashTableBucketElemINS_7XSValue8DataTypeEEEE7releaseEv:
  153|      1|{
  154|      1|	T* p = fData;
  155|      1|	fData = 0;
  156|      1|	return p;
  157|      1|}
_ZN11xercesc_3_212ArrayJanitorIPNS_24ValueHashTableBucketElemINS_7XSValue8DataTypeEEEED2Ev:
  120|      1|{
  121|      1|	reset();
  122|      1|}
_ZN11xercesc_3_212ArrayJanitorIPNS_24ValueHashTableBucketElemINS_7XSValue8DataTypeEEEE5resetEPS5_:
  162|      1|{
  163|      1|	if (fData) {
  ------------------
  |  Branch (163:6): [True: 0, False: 1]
  ------------------
  164|       |
  165|      0|		if (fMemoryManager)
  ------------------
  |  Branch (165:7): [True: 0, False: 0]
  ------------------
  166|      0|            fMemoryManager->deallocate((void*)fData);
  167|      0|        else
  168|      0|            delete [] fData;
  169|      0|    }
  170|       |
  171|      1|	fData = p;
  172|      1|    fMemoryManager = 0;
  173|      1|}
_ZN11xercesc_3_217JanitorMemFunCallINS_7XMLAttrEEC2EPS1_MS1_FvvE:
  198|  2.61k|    fObject(object),
  199|  2.61k|    fToCall(toCall)
  200|  2.61k|{
  201|  2.61k|}
_ZN11xercesc_3_217JanitorMemFunCallINS_7XMLAttrEED2Ev:
  205|  2.61k|{
  206|  2.61k|  reset ();
  207|  2.61k|}
_ZN11xercesc_3_217JanitorMemFunCallINS_7XMLAttrEE5resetEPS1_:
  240|  2.61k|{
  241|  2.61k|  if (fObject != 0 && fToCall != 0)
  ------------------
  |  Branch (241:7): [True: 0, False: 2.61k]
  |  Branch (241:23): [True: 0, False: 0]
  ------------------
  242|      0|    (fObject->*fToCall)();
  243|       |
  244|  2.61k|  fObject = p;
  245|  2.61k|}
_ZN11xercesc_3_217JanitorMemFunCallINS_7XMLAttrEE7releaseEv:
  232|  2.61k|{
  233|  2.61k|  T* p = fObject;
  234|  2.61k|  fObject = 0;
  235|  2.61k|  return p;
  236|  2.61k|}
_ZN11xercesc_3_27JanitorINS_14BinInputStreamEEC2EPS1_:
   36|  7.14k|    fData(toDelete)
   37|  7.14k|{
   38|  7.14k|}
_ZN11xercesc_3_27JanitorINS_14BinInputStreamEED2Ev:
   42|  7.14k|{
   43|  7.14k|    reset();
   44|  7.14k|}
_ZN11xercesc_3_27JanitorINS_14BinInputStreamEE5resetEPS1_:
   88|  7.14k|{
   89|  7.14k|    if (fData)
  ------------------
  |  Branch (89:9): [True: 35, False: 7.10k]
  ------------------
   90|     35|        delete fData;
   91|       |
   92|  7.14k|    fData = p;
   93|  7.14k|}
_ZN11xercesc_3_27JanitorINS_14BinInputStreamEE7releaseEv:
   80|  7.10k|{
   81|  7.10k|	T* p = fData;
   82|  7.10k|	fData = 0;
   83|  7.10k|	return p;
   84|  7.10k|}
_ZN11xercesc_3_27JanitorINS_11InputSourceEEC2EPS1_:
   36|  1.31k|    fData(toDelete)
   37|  1.31k|{
   38|  1.31k|}
_ZN11xercesc_3_27JanitorINS_11InputSourceEED2Ev:
   42|  1.31k|{
   43|  1.31k|    reset();
   44|  1.31k|}
_ZN11xercesc_3_27JanitorINS_11InputSourceEE5resetEPS1_:
   88|  1.54k|{
   89|  1.54k|    if (fData)
  ------------------
  |  Branch (89:9): [True: 663, False: 885]
  ------------------
   90|    663|        delete fData;
   91|       |
   92|  1.54k|    fData = p;
   93|  1.54k|}
_ZN11xercesc_3_27JanitorINS_11InputSourceEE6orphanEv:
   52|    261|{
   53|    261|   release();
   54|    261|}
_ZN11xercesc_3_27JanitorINS_11InputSourceEE7releaseEv:
   80|    261|{
   81|    261|	T* p = fData;
   82|    261|	fData = 0;
   83|    261|	return p;
   84|    261|}
_ZN11xercesc_3_217JanitorMemFunCallINS_10XMLScannerEEC2EPS1_MS1_FvvE:
  198|  7.12k|    fObject(object),
  199|  7.12k|    fToCall(toCall)
  200|  7.12k|{
  201|  7.12k|}
_ZN11xercesc_3_217JanitorMemFunCallINS_10XMLScannerEED2Ev:
  205|  7.12k|{
  206|  7.12k|  reset ();
  207|  7.12k|}
_ZN11xercesc_3_217JanitorMemFunCallINS_10XMLScannerEE5resetEPS1_:
  240|  7.12k|{
  241|  7.12k|  if (fObject != 0 && fToCall != 0)
  ------------------
  |  Branch (241:7): [True: 0, False: 7.12k]
  |  Branch (241:23): [True: 0, False: 0]
  ------------------
  242|      0|    (fObject->*fToCall)();
  243|       |
  244|  7.12k|  fObject = p;
  245|  7.12k|}
_ZN11xercesc_3_217JanitorMemFunCallINS_10XMLScannerEE7releaseEv:
  232|  7.12k|{
  233|  7.12k|  T* p = fObject;
  234|  7.12k|  fObject = 0;
  235|  7.12k|  return p;
  236|  7.12k|}
_ZN11xercesc_3_217JanitorMemFunCallINS_9ReaderMgrEEC2EPS1_MS1_FvvE:
  198|  7.12k|    fObject(object),
  199|  7.12k|    fToCall(toCall)
  200|  7.12k|{
  201|  7.12k|}
_ZN11xercesc_3_217JanitorMemFunCallINS_9ReaderMgrEED2Ev:
  205|  7.12k|{
  206|  7.12k|  reset ();
  207|  7.12k|}
_ZN11xercesc_3_217JanitorMemFunCallINS_9ReaderMgrEE5resetEPS1_:
  240|  7.12k|{
  241|  7.12k|  if (fObject != 0 && fToCall != 0)
  ------------------
  |  Branch (241:7): [True: 7.12k, False: 0]
  |  Branch (241:23): [True: 7.12k, False: 0]
  ------------------
  242|  7.12k|    (fObject->*fToCall)();
  243|       |
  244|  7.12k|  fObject = p;
  245|  7.12k|}
_ZN11xercesc_3_212ArrayJanitorIPNS_24ValueHashTableBucketElemIbEEEC2EPS3_PNS_13MemoryManagerE:
  113|      4|    fData(toDelete)
  114|      4|    , fMemoryManager(manager)
  115|      4|{
  116|      4|}
_ZN11xercesc_3_212ArrayJanitorIPNS_24ValueHashTableBucketElemIbEEE7releaseEv:
  153|      4|{
  154|      4|	T* p = fData;
  155|      4|	fData = 0;
  156|      4|	return p;
  157|      4|}
_ZN11xercesc_3_212ArrayJanitorIPNS_24ValueHashTableBucketElemIbEEED2Ev:
  120|      4|{
  121|      4|	reset();
  122|      4|}
_ZN11xercesc_3_212ArrayJanitorIPNS_24ValueHashTableBucketElemIbEEE5resetEPS3_:
  162|      4|{
  163|      4|	if (fData) {
  ------------------
  |  Branch (163:6): [True: 0, False: 4]
  ------------------
  164|       |
  165|      0|		if (fMemoryManager)
  ------------------
  |  Branch (165:7): [True: 0, False: 0]
  ------------------
  166|      0|            fMemoryManager->deallocate((void*)fData);
  167|      0|        else
  168|      0|            delete [] fData;
  169|      0|    }
  170|       |
  171|      4|	fData = p;
  172|      4|    fMemoryManager = 0;
  173|      4|}
_ZN11xercesc_3_217JanitorMemFunCallINS_9SAXParserEEC2EPS1_MS1_FvvE:
  198|  14.2k|    fObject(object),
  199|  14.2k|    fToCall(toCall)
  200|  14.2k|{
  201|  14.2k|}
_ZN11xercesc_3_217JanitorMemFunCallINS_9SAXParserEED2Ev:
  205|  14.2k|{
  206|  14.2k|  reset ();
  207|  14.2k|}
_ZN11xercesc_3_217JanitorMemFunCallINS_9SAXParserEE5resetEPS1_:
  240|  14.2k|{
  241|  14.2k|  if (fObject != 0 && fToCall != 0)
  ------------------
  |  Branch (241:7): [True: 7.12k, False: 7.12k]
  |  Branch (241:23): [True: 7.12k, False: 0]
  ------------------
  242|  7.12k|    (fObject->*fToCall)();
  243|       |
  244|  14.2k|  fObject = p;
  245|  14.2k|}
_ZN11xercesc_3_217JanitorMemFunCallINS_9SAXParserEE7releaseEv:
  232|  7.12k|{
  233|  7.12k|  T* p = fObject;
  234|  7.12k|  fObject = 0;
  235|  7.12k|  return p;
  236|  7.12k|}
_ZN11xercesc_3_212ArrayJanitorIPNS_22RefHashTableBucketElemINS_15XMLNotationDeclEEEE5resetEPS4_:
  162|     10|{
  163|     10|	if (fData) {
  ------------------
  |  Branch (163:6): [True: 0, False: 10]
  ------------------
  164|       |
  165|      0|		if (fMemoryManager)
  ------------------
  |  Branch (165:7): [True: 0, False: 0]
  ------------------
  166|      0|            fMemoryManager->deallocate((void*)fData);
  167|      0|        else
  168|      0|            delete [] fData;
  169|      0|    }
  170|       |
  171|     10|	fData = p;
  172|     10|    fMemoryManager = 0;
  173|     10|}
_ZN11xercesc_3_212ArrayJanitorIPNS_22RefHashTableBucketElemINS_15XMLNotationDeclEEEE7releaseEv:
  153|     10|{
  154|     10|	T* p = fData;
  155|     10|	fData = 0;
  156|     10|	return p;
  157|     10|}
_ZN11xercesc_3_212ArrayJanitorIPNS_22RefHashTableBucketElemINS_17DatatypeValidatorEEEEC2EPS4_PNS_13MemoryManagerE:
  113|      2|    fData(toDelete)
  114|      2|    , fMemoryManager(manager)
  115|      2|{
  116|      2|}
_ZN11xercesc_3_212ArrayJanitorIPNS_22RefHashTableBucketElemINS_17DatatypeValidatorEEEE7releaseEv:
  153|      2|{
  154|      2|	T* p = fData;
  155|      2|	fData = 0;
  156|      2|	return p;
  157|      2|}
_ZN11xercesc_3_212ArrayJanitorIPNS_22RefHashTableBucketElemINS_17DatatypeValidatorEEEED2Ev:
  120|      2|{
  121|      2|	reset();
  122|      2|}
_ZN11xercesc_3_212ArrayJanitorIPNS_22RefHashTableBucketElemINS_17DatatypeValidatorEEEE5resetEPS4_:
  162|      2|{
  163|      2|	if (fData) {
  ------------------
  |  Branch (163:6): [True: 0, False: 2]
  ------------------
  164|       |
  165|      0|		if (fMemoryManager)
  ------------------
  |  Branch (165:7): [True: 0, False: 0]
  ------------------
  166|      0|            fMemoryManager->deallocate((void*)fData);
  167|      0|        else
  168|      0|            delete [] fData;
  169|      0|    }
  170|       |
  171|      2|	fData = p;
  172|      2|    fMemoryManager = 0;
  173|      2|}
_ZN11xercesc_3_212ArrayJanitorIPNS_22RefHashTableBucketElemINS_15XMLNotationDeclEEEEC2EPS4_PNS_13MemoryManagerE:
  113|     10|    fData(toDelete)
  114|     10|    , fMemoryManager(manager)
  115|     10|{
  116|     10|}
_ZN11xercesc_3_212ArrayJanitorIPNS_22RefHashTableBucketElemINS_15XMLNotationDeclEEEED2Ev:
  120|     10|{
  121|     10|	reset();
  122|     10|}
_ZN11xercesc_3_212ArrayJanitorIPNS_22RefHashTableBucketElemINS_13DTDEntityDeclEEEEC2EPS4_PNS_13MemoryManagerE:
  113|     16|    fData(toDelete)
  114|     16|    , fMemoryManager(manager)
  115|     16|{
  116|     16|}
_ZN11xercesc_3_212ArrayJanitorIPNS_22RefHashTableBucketElemINS_13DTDEntityDeclEEEE7releaseEv:
  153|     16|{
  154|     16|	T* p = fData;
  155|     16|	fData = 0;
  156|     16|	return p;
  157|     16|}
_ZN11xercesc_3_212ArrayJanitorIPNS_22RefHashTableBucketElemINS_13DTDEntityDeclEEEED2Ev:
  120|     16|{
  121|     16|	reset();
  122|     16|}
_ZN11xercesc_3_212ArrayJanitorIPNS_22RefHashTableBucketElemINS_13DTDEntityDeclEEEE5resetEPS4_:
  162|     16|{
  163|     16|	if (fData) {
  ------------------
  |  Branch (163:6): [True: 0, False: 16]
  ------------------
  164|       |
  165|      0|		if (fMemoryManager)
  ------------------
  |  Branch (165:7): [True: 0, False: 0]
  ------------------
  166|      0|            fMemoryManager->deallocate((void*)fData);
  167|      0|        else
  168|      0|            delete [] fData;
  169|      0|    }
  170|       |
  171|     16|	fData = p;
  172|     16|    fMemoryManager = 0;
  173|     16|}
_ZN11xercesc_3_212ArrayJanitorIPNS_22RefHashTableBucketElemINS_14DTDElementDeclEEEEC2EPS4_PNS_13MemoryManagerE:
  113|     78|    fData(toDelete)
  114|     78|    , fMemoryManager(manager)
  115|     78|{
  116|     78|}
_ZN11xercesc_3_212ArrayJanitorIPNS_22RefHashTableBucketElemINS_14DTDElementDeclEEEE7releaseEv:
  153|     78|{
  154|     78|	T* p = fData;
  155|     78|	fData = 0;
  156|     78|	return p;
  157|     78|}
_ZN11xercesc_3_212ArrayJanitorIPNS_22RefHashTableBucketElemINS_14DTDElementDeclEEEED2Ev:
  120|     78|{
  121|     78|	reset();
  122|     78|}
_ZN11xercesc_3_212ArrayJanitorIPNS_22RefHashTableBucketElemINS_14DTDElementDeclEEEE5resetEPS4_:
  162|     78|{
  163|     78|	if (fData) {
  ------------------
  |  Branch (163:6): [True: 0, False: 78]
  ------------------
  164|       |
  165|      0|		if (fMemoryManager)
  ------------------
  |  Branch (165:7): [True: 0, False: 0]
  ------------------
  166|      0|            fMemoryManager->deallocate((void*)fData);
  167|      0|        else
  168|      0|            delete [] fData;
  169|      0|    }
  170|       |
  171|     78|	fData = p;
  172|     78|    fMemoryManager = 0;
  173|     78|}
_ZN11xercesc_3_212ArrayJanitorIPNS_24ValueHashTableBucketElemItEEEC2EPS3_PNS_13MemoryManagerE:
  113|      2|    fData(toDelete)
  114|      2|    , fMemoryManager(manager)
  115|      2|{
  116|      2|}
_ZN11xercesc_3_212ArrayJanitorIPNS_24ValueHashTableBucketElemItEEE7releaseEv:
  153|      2|{
  154|      2|	T* p = fData;
  155|      2|	fData = 0;
  156|      2|	return p;
  157|      2|}
_ZN11xercesc_3_212ArrayJanitorIPNS_24ValueHashTableBucketElemItEEED2Ev:
  120|      2|{
  121|      2|	reset();
  122|      2|}
_ZN11xercesc_3_212ArrayJanitorIPNS_24ValueHashTableBucketElemItEEE5resetEPS3_:
  162|      2|{
  163|      2|	if (fData) {
  ------------------
  |  Branch (163:6): [True: 0, False: 2]
  ------------------
  164|       |
  165|      0|		if (fMemoryManager)
  ------------------
  |  Branch (165:7): [True: 0, False: 0]
  ------------------
  166|      0|            fMemoryManager->deallocate((void*)fData);
  167|      0|        else
  168|      0|            delete [] fData;
  169|      0|    }
  170|       |
  171|      2|	fData = p;
  172|      2|    fMemoryManager = 0;
  173|      2|}
_ZN11xercesc_3_212ArrayJanitorIDsEC2EPDs:
  105|  5.52M|    fData(toDelete)
  106|  5.52M|    , fMemoryManager(0)
  107|  5.52M|{
  108|  5.52M|}
_ZN11xercesc_3_212ArrayJanitorIDsEC2EPDsPNS_13MemoryManagerE:
  113|  15.3k|    fData(toDelete)
  114|  15.3k|    , fMemoryManager(manager)
  115|  15.3k|{
  116|  15.3k|}
_ZN11xercesc_3_212ArrayJanitorIDsED2Ev:
  120|  5.54M|{
  121|  5.54M|	reset();
  122|  5.54M|}
_ZNK11xercesc_3_212ArrayJanitorIDsE3getEv:
  146|  1.02k|{
  147|  1.02k|	return fData;
  148|  1.02k|}
_ZN11xercesc_3_212ArrayJanitorIDsE5resetEPDs:
  162|  5.54M|{
  163|  5.54M|	if (fData) {
  ------------------
  |  Branch (163:6): [True: 5.69k, False: 5.53M]
  ------------------
  164|       |
  165|  5.69k|		if (fMemoryManager)
  ------------------
  |  Branch (165:7): [True: 5.69k, False: 0]
  ------------------
  166|  5.69k|            fMemoryManager->deallocate((void*)fData);
  167|      0|        else
  168|      0|            delete [] fData;
  169|  5.69k|    }
  170|       |
  171|  5.54M|	fData = p;
  172|  5.54M|    fMemoryManager = 0;
  173|  5.54M|}
_ZN11xercesc_3_212ArrayJanitorIDsE5resetEPDsPNS_13MemoryManagerE:
  177|  1.02k|{
  178|  1.02k|	if (fData) {
  ------------------
  |  Branch (178:6): [True: 0, False: 1.02k]
  ------------------
  179|       |
  180|      0|		if (fMemoryManager)
  ------------------
  |  Branch (180:7): [True: 0, False: 0]
  ------------------
  181|      0|            fMemoryManager->deallocate((void*)fData);
  182|      0|        else
  183|      0|            delete [] fData;
  184|      0|    }
  185|       |
  186|  1.02k|	fData = p;
  187|  1.02k|    fMemoryManager = manager;
  188|  1.02k|}
_ZN11xercesc_3_217JanitorMemFunCallINS_5QNameEEC2EPS1_MS1_FvvE:
  198|  42.4k|    fObject(object),
  199|  42.4k|    fToCall(toCall)
  200|  42.4k|{
  201|  42.4k|}
_ZN11xercesc_3_217JanitorMemFunCallINS_5QNameEED2Ev:
  205|  42.4k|{
  206|  42.4k|  reset ();
  207|  42.4k|}
_ZN11xercesc_3_217JanitorMemFunCallINS_5QNameEE5resetEPS1_:
  240|  42.4k|{
  241|  42.4k|  if (fObject != 0 && fToCall != 0)
  ------------------
  |  Branch (241:7): [True: 0, False: 42.4k]
  |  Branch (241:23): [True: 0, False: 0]
  ------------------
  242|      0|    (fObject->*fToCall)();
  243|       |
  244|  42.4k|  fObject = p;
  245|  42.4k|}
_ZN11xercesc_3_217JanitorMemFunCallINS_5QNameEE7releaseEv:
  232|  42.4k|{
  233|  42.4k|  T* p = fObject;
  234|  42.4k|  fObject = 0;
  235|  42.4k|  return p;
  236|  42.4k|}
_ZN11xercesc_3_217JanitorMemFunCallINS_13RangeTokenMapEEC2EPS1_MS1_FvvE:
  198|      1|    fObject(object),
  199|      1|    fToCall(toCall)
  200|      1|{
  201|      1|}
_ZN11xercesc_3_217JanitorMemFunCallINS_13RangeTokenMapEED2Ev:
  205|      1|{
  206|      1|  reset ();
  207|      1|}
_ZN11xercesc_3_217JanitorMemFunCallINS_13RangeTokenMapEE5resetEPS1_:
  240|      1|{
  241|      1|  if (fObject != 0 && fToCall != 0)
  ------------------
  |  Branch (241:7): [True: 0, False: 1]
  |  Branch (241:23): [True: 0, False: 0]
  ------------------
  242|      0|    (fObject->*fToCall)();
  243|       |
  244|      1|  fObject = p;
  245|      1|}
_ZN11xercesc_3_217JanitorMemFunCallINS_13RangeTokenMapEE7releaseEv:
  232|      1|{
  233|      1|  T* p = fObject;
  234|      1|  fObject = 0;
  235|      1|  return p;
  236|      1|}
_ZN11xercesc_3_212ArrayJanitorIPNS_22RefHashTableBucketElemINS_17RangeTokenElemMapEEEEC2EPS4_PNS_13MemoryManagerE:
  113|      1|    fData(toDelete)
  114|      1|    , fMemoryManager(manager)
  115|      1|{
  116|      1|}
_ZN11xercesc_3_212ArrayJanitorIPNS_22RefHashTableBucketElemINS_17RangeTokenElemMapEEEE7releaseEv:
  153|      1|{
  154|      1|	T* p = fData;
  155|      1|	fData = 0;
  156|      1|	return p;
  157|      1|}
_ZN11xercesc_3_212ArrayJanitorIPNS_22RefHashTableBucketElemINS_17RangeTokenElemMapEEEED2Ev:
  120|      1|{
  121|      1|	reset();
  122|      1|}
_ZN11xercesc_3_212ArrayJanitorIPNS_22RefHashTableBucketElemINS_17RangeTokenElemMapEEEE5resetEPS4_:
  162|      1|{
  163|      1|	if (fData) {
  ------------------
  |  Branch (163:6): [True: 0, False: 1]
  ------------------
  164|       |
  165|      0|		if (fMemoryManager)
  ------------------
  |  Branch (165:7): [True: 0, False: 0]
  ------------------
  166|      0|            fMemoryManager->deallocate((void*)fData);
  167|      0|        else
  168|      0|            delete [] fData;
  169|      0|    }
  170|       |
  171|      1|	fData = p;
  172|      1|    fMemoryManager = 0;
  173|      1|}
_ZN11xercesc_3_217JanitorMemFunCallINS_17RegularExpressionEEC2EPS1_MS1_FvvE:
  198|      4|    fObject(object),
  199|      4|    fToCall(toCall)
  200|      4|{
  201|      4|}
_ZN11xercesc_3_217JanitorMemFunCallINS_17RegularExpressionEED2Ev:
  205|      4|{
  206|      4|  reset ();
  207|      4|}
_ZN11xercesc_3_217JanitorMemFunCallINS_17RegularExpressionEE5resetEPS1_:
  240|      4|{
  241|      4|  if (fObject != 0 && fToCall != 0)
  ------------------
  |  Branch (241:7): [True: 0, False: 4]
  |  Branch (241:23): [True: 0, False: 0]
  ------------------
  242|      0|    (fObject->*fToCall)();
  243|       |
  244|      4|  fObject = p;
  245|      4|}
_ZN11xercesc_3_217JanitorMemFunCallINS_17RegularExpressionEE7releaseEv:
  232|      4|{
  233|      4|  T* p = fObject;
  234|      4|  fObject = 0;
  235|      4|  return p;
  236|      4|}
_ZN11xercesc_3_27JanitorINS_10RegxParserEEC2EPS1_:
   36|      4|    fData(toDelete)
   37|      4|{
   38|      4|}
_ZN11xercesc_3_27JanitorINS_10RegxParserEED2Ev:
   42|      4|{
   43|      4|    reset();
   44|      4|}
_ZN11xercesc_3_27JanitorINS_10RegxParserEE5resetEPS1_:
   88|      4|{
   89|      4|    if (fData)
  ------------------
  |  Branch (89:9): [True: 4, False: 0]
  ------------------
   90|      4|        delete fData;
   91|       |
   92|      4|    fData = p;
   93|      4|}
_ZN11xercesc_3_27JanitorINS_12ValueStackOfINS_17RE_RuntimeContextEEEEC2EPS3_:
   36|    159|    fData(toDelete)
   37|    159|{
   38|    159|}
_ZN11xercesc_3_27JanitorINS_12ValueStackOfINS_17RE_RuntimeContextEEEED2Ev:
   42|    159|{
   43|    159|    reset();
   44|    159|}
_ZN11xercesc_3_27JanitorINS_12ValueStackOfINS_17RE_RuntimeContextEEEE5resetEPS3_:
   88|    159|{
   89|    159|    if (fData)
  ------------------
  |  Branch (89:9): [True: 0, False: 159]
  ------------------
   90|      0|        delete fData;
   91|       |
   92|    159|    fData = p;
   93|    159|}
_ZN11xercesc_3_212ArrayJanitorIiEC2EPiPNS_13MemoryManagerE:
  113|      1|    fData(toDelete)
  114|      1|    , fMemoryManager(manager)
  115|      1|{
  116|      1|}
_ZN11xercesc_3_212ArrayJanitorIiED2Ev:
  120|      1|{
  121|      1|	reset();
  122|      1|}
_ZN11xercesc_3_212ArrayJanitorIiE5resetEPi:
  162|      1|{
  163|      1|	if (fData) {
  ------------------
  |  Branch (163:6): [True: 1, False: 0]
  ------------------
  164|       |
  165|      1|		if (fMemoryManager)
  ------------------
  |  Branch (165:7): [True: 1, False: 0]
  ------------------
  166|      1|            fMemoryManager->deallocate((void*)fData);
  167|      0|        else
  168|      0|            delete [] fData;
  169|      1|    }
  170|       |
  171|      1|	fData = p;
  172|      1|    fMemoryManager = 0;
  173|      1|}
_ZN11xercesc_3_217JanitorMemFunCallINS_13XMLBigDecimalEEC2EPS1_MS1_FvvE:
  198|     32|    fObject(object),
  199|     32|    fToCall(toCall)
  200|     32|{
  201|     32|}
_ZN11xercesc_3_217JanitorMemFunCallINS_13XMLBigDecimalEED2Ev:
  205|     32|{
  206|     32|  reset ();
  207|     32|}
_ZN11xercesc_3_217JanitorMemFunCallINS_13XMLBigDecimalEE5resetEPS1_:
  240|     32|{
  241|     32|  if (fObject != 0 && fToCall != 0)
  ------------------
  |  Branch (241:7): [True: 0, False: 32]
  |  Branch (241:23): [True: 0, False: 0]
  ------------------
  242|      0|    (fObject->*fToCall)();
  243|       |
  244|     32|  fObject = p;
  245|     32|}
_ZN11xercesc_3_217JanitorMemFunCallINS_13XMLBigDecimalEE7releaseEv:
  232|     32|{
  233|     32|  T* p = fObject;
  234|     32|  fObject = 0;
  235|     32|  return p;
  236|     32|}
_ZN11xercesc_3_217JanitorMemFunCallINS_18XMLStringTokenizerEEC2EPS1_MS1_FvvE:
  198|      1|    fObject(object),
  199|      1|    fToCall(toCall)
  200|      1|{
  201|      1|}
_ZN11xercesc_3_217JanitorMemFunCallINS_18XMLStringTokenizerEED2Ev:
  205|      1|{
  206|      1|  reset ();
  207|      1|}
_ZN11xercesc_3_217JanitorMemFunCallINS_18XMLStringTokenizerEE5resetEPS1_:
  240|      1|{
  241|      1|  if (fObject != 0 && fToCall != 0)
  ------------------
  |  Branch (241:7): [True: 0, False: 1]
  |  Branch (241:23): [True: 0, False: 0]
  ------------------
  242|      0|    (fObject->*fToCall)();
  243|       |
  244|      1|  fObject = p;
  245|      1|}
_ZN11xercesc_3_217JanitorMemFunCallINS_18XMLStringTokenizerEE7releaseEv:
  232|      1|{
  233|      1|  T* p = fObject;
  234|      1|  fObject = 0;
  235|      1|  return p;
  236|      1|}
_ZN11xercesc_3_217JanitorMemFunCallINS_6XMLURLEEC2EPS1_MS1_FvvE:
  198|    443|    fObject(object),
  199|    443|    fToCall(toCall)
  200|    443|{
  201|    443|}
_ZN11xercesc_3_217JanitorMemFunCallINS_6XMLURLEED2Ev:
  205|    443|{
  206|    443|  reset ();
  207|    443|}
_ZN11xercesc_3_217JanitorMemFunCallINS_6XMLURLEE5resetEPS1_:
  240|    443|{
  241|    443|  if (fObject != 0 && fToCall != 0)
  ------------------
  |  Branch (241:7): [True: 0, False: 443]
  |  Branch (241:23): [True: 0, False: 0]
  ------------------
  242|      0|    (fObject->*fToCall)();
  243|       |
  244|    443|  fObject = p;
  245|    443|}
_ZN11xercesc_3_217JanitorMemFunCallINS_6XMLURLEE7releaseEv:
  232|    443|{
  233|    443|  T* p = fObject;
  234|    443|  fObject = 0;
  235|    443|  return p;
  236|    443|}
_ZN11xercesc_3_217JanitorMemFunCallINS_13XMLEntityDeclEEC2EPS1_MS1_FvvE:
  198|      5|    fObject(object),
  199|      5|    fToCall(toCall)
  200|      5|{
  201|      5|}
_ZN11xercesc_3_217JanitorMemFunCallINS_13XMLEntityDeclEED2Ev:
  205|      5|{
  206|      5|  reset ();
  207|      5|}
_ZN11xercesc_3_217JanitorMemFunCallINS_13XMLEntityDeclEE5resetEPS1_:
  240|      5|{
  241|      5|  if (fObject != 0 && fToCall != 0)
  ------------------
  |  Branch (241:7): [True: 0, False: 5]
  |  Branch (241:23): [True: 0, False: 0]
  ------------------
  242|      0|    (fObject->*fToCall)();
  243|       |
  244|      5|  fObject = p;
  245|      5|}
_ZN11xercesc_3_217JanitorMemFunCallINS_13XMLEntityDeclEE7releaseEv:
  232|      5|{
  233|      5|  T* p = fObject;
  234|      5|  fObject = 0;
  235|      5|  return p;
  236|      5|}
_ZN11xercesc_3_217JanitorMemFunCallINS_15XMLNotationDeclEEC2EPS1_MS1_FvvE:
  198|  1.88k|    fObject(object),
  199|  1.88k|    fToCall(toCall)
  200|  1.88k|{
  201|  1.88k|}
_ZN11xercesc_3_217JanitorMemFunCallINS_15XMLNotationDeclEED2Ev:
  205|  1.88k|{
  206|  1.88k|  reset ();
  207|  1.88k|}
_ZN11xercesc_3_217JanitorMemFunCallINS_15XMLNotationDeclEE5resetEPS1_:
  240|  1.88k|{
  241|  1.88k|  if (fObject != 0 && fToCall != 0)
  ------------------
  |  Branch (241:7): [True: 0, False: 1.88k]
  |  Branch (241:23): [True: 0, False: 0]
  ------------------
  242|      0|    (fObject->*fToCall)();
  243|       |
  244|  1.88k|  fObject = p;
  245|  1.88k|}
_ZN11xercesc_3_217JanitorMemFunCallINS_15XMLNotationDeclEE7releaseEv:
  232|  1.88k|{
  233|  1.88k|  T* p = fObject;
  234|  1.88k|  fObject = 0;
  235|  1.88k|  return p;
  236|  1.88k|}
_ZN11xercesc_3_212ArrayJanitorIPNS_22RefHashTableBucketElemINS_10XMLRefInfoEEEEC2EPS4_PNS_13MemoryManagerE:
  113|     63|    fData(toDelete)
  114|     63|    , fMemoryManager(manager)
  115|     63|{
  116|     63|}
_ZN11xercesc_3_212ArrayJanitorIPNS_22RefHashTableBucketElemINS_10XMLRefInfoEEEE7releaseEv:
  153|     63|{
  154|     63|	T* p = fData;
  155|     63|	fData = 0;
  156|     63|	return p;
  157|     63|}
_ZN11xercesc_3_212ArrayJanitorIPNS_22RefHashTableBucketElemINS_10XMLRefInfoEEEED2Ev:
  120|     63|{
  121|     63|	reset();
  122|     63|}
_ZN11xercesc_3_212ArrayJanitorIPNS_22RefHashTableBucketElemINS_10XMLRefInfoEEEE5resetEPS4_:
  162|     63|{
  163|     63|	if (fData) {
  ------------------
  |  Branch (163:6): [True: 0, False: 63]
  ------------------
  164|       |
  165|      0|		if (fMemoryManager)
  ------------------
  |  Branch (165:7): [True: 0, False: 0]
  ------------------
  166|      0|            fMemoryManager->deallocate((void*)fData);
  167|      0|        else
  168|      0|            delete [] fData;
  169|      0|    }
  170|       |
  171|     63|	fData = p;
  172|     63|    fMemoryManager = 0;
  173|     63|}
_ZN11xercesc_3_212ArrayJanitorIPNS_22RefHashTableBucketElemINS_9DTDAttDefEEEEC2EPS4_PNS_13MemoryManagerE:
  113|    429|    fData(toDelete)
  114|    429|    , fMemoryManager(manager)
  115|    429|{
  116|    429|}
_ZN11xercesc_3_212ArrayJanitorIPNS_22RefHashTableBucketElemINS_9DTDAttDefEEEE7releaseEv:
  153|    429|{
  154|    429|	T* p = fData;
  155|    429|	fData = 0;
  156|    429|	return p;
  157|    429|}
_ZN11xercesc_3_212ArrayJanitorIPNS_22RefHashTableBucketElemINS_9DTDAttDefEEEED2Ev:
  120|    429|{
  121|    429|	reset();
  122|    429|}
_ZN11xercesc_3_212ArrayJanitorIPNS_22RefHashTableBucketElemINS_9DTDAttDefEEEE5resetEPS4_:
  162|    429|{
  163|    429|	if (fData) {
  ------------------
  |  Branch (163:6): [True: 0, False: 429]
  ------------------
  164|       |
  165|      0|		if (fMemoryManager)
  ------------------
  |  Branch (165:7): [True: 0, False: 0]
  ------------------
  166|      0|            fMemoryManager->deallocate((void*)fData);
  167|      0|        else
  168|      0|            delete [] fData;
  169|      0|    }
  170|       |
  171|    429|	fData = p;
  172|    429|    fMemoryManager = 0;
  173|    429|}
_ZN11xercesc_3_212ArrayJanitorIPNS_22RefHashTableBucketElemINS_10XMLIntegerEEEEC2EPS4_PNS_13MemoryManagerE:
  113|    712|    fData(toDelete)
  114|    712|    , fMemoryManager(manager)
  115|    712|{
  116|    712|}
_ZN11xercesc_3_212ArrayJanitorIPNS_22RefHashTableBucketElemINS_10XMLIntegerEEEE7releaseEv:
  153|    712|{
  154|    712|	T* p = fData;
  155|    712|	fData = 0;
  156|    712|	return p;
  157|    712|}
_ZN11xercesc_3_212ArrayJanitorIPNS_22RefHashTableBucketElemINS_10XMLIntegerEEEED2Ev:
  120|    712|{
  121|    712|	reset();
  122|    712|}
_ZN11xercesc_3_212ArrayJanitorIPNS_22RefHashTableBucketElemINS_10XMLIntegerEEEE5resetEPS4_:
  162|    712|{
  163|    712|	if (fData) {
  ------------------
  |  Branch (163:6): [True: 0, False: 712]
  ------------------
  164|       |
  165|      0|		if (fMemoryManager)
  ------------------
  |  Branch (165:7): [True: 0, False: 0]
  ------------------
  166|      0|            fMemoryManager->deallocate((void*)fData);
  167|      0|        else
  168|      0|            delete [] fData;
  169|      0|    }
  170|       |
  171|    712|	fData = p;
  172|    712|    fMemoryManager = 0;
  173|    712|}
_ZN11xercesc_3_27JanitorINS_14DTDElementDeclEEC2EPS1_:
   36|  6.05k|    fData(toDelete)
   37|  6.05k|{
   38|  6.05k|}
_ZN11xercesc_3_27JanitorINS_14DTDElementDeclEED2Ev:
   42|  6.05k|{
   43|  6.05k|    reset();
   44|  6.05k|}
_ZN11xercesc_3_27JanitorINS_14DTDElementDeclEE5resetEPS1_:
   88|  6.05k|{
   89|  6.05k|    if (fData)
  ------------------
  |  Branch (89:9): [True: 0, False: 6.05k]
  ------------------
   90|      0|        delete fData;
   91|       |
   92|  6.05k|    fData = p;
   93|  6.05k|}
_ZN11xercesc_3_27JanitorINS_14DTDElementDeclEE7releaseEv:
   80|  6.05k|{
   81|  6.05k|	T* p = fData;
   82|  6.05k|	fData = 0;
   83|  6.05k|	return p;
   84|  6.05k|}
_ZN11xercesc_3_212ArrayJanitorIPNS_22Hash2KeysSetBucketElemEEC2EPS2_PNS_13MemoryManagerE:
  113|     14|    fData(toDelete)
  114|     14|    , fMemoryManager(manager)
  115|     14|{
  116|     14|}
_ZN11xercesc_3_212ArrayJanitorIPNS_22Hash2KeysSetBucketElemEE7releaseEv:
  153|     14|{
  154|     14|	T* p = fData;
  155|     14|	fData = 0;
  156|     14|	return p;
  157|     14|}
_ZN11xercesc_3_212ArrayJanitorIPNS_22Hash2KeysSetBucketElemEED2Ev:
  120|     14|{
  121|     14|	reset();
  122|     14|}
_ZN11xercesc_3_212ArrayJanitorIPNS_22Hash2KeysSetBucketElemEE5resetEPS2_:
  162|     14|{
  163|     14|	if (fData) {
  ------------------
  |  Branch (163:6): [True: 0, False: 14]
  ------------------
  164|       |
  165|      0|		if (fMemoryManager)
  ------------------
  |  Branch (165:7): [True: 0, False: 0]
  ------------------
  166|      0|            fMemoryManager->deallocate((void*)fData);
  167|      0|        else
  168|      0|            delete [] fData;
  169|      0|    }
  170|       |
  171|     14|	fData = p;
  172|     14|    fMemoryManager = 0;
  173|     14|}
_ZN11xercesc_3_217JanitorMemFunCallINS_12IGXMLScannerEEC2EPS1_MS1_FvvE:
  198|  7.12k|    fObject(object),
  199|  7.12k|    fToCall(toCall)
  200|  7.12k|{
  201|  7.12k|}
_ZN11xercesc_3_217JanitorMemFunCallINS_12IGXMLScannerEED2Ev:
  205|  7.12k|{
  206|  7.12k|  reset ();
  207|  7.12k|}
_ZN11xercesc_3_217JanitorMemFunCallINS_12IGXMLScannerEE5resetEPS1_:
  240|  7.12k|{
  241|  7.12k|  if (fObject != 0 && fToCall != 0)
  ------------------
  |  Branch (241:7): [True: 0, False: 7.12k]
  |  Branch (241:23): [True: 0, False: 0]
  ------------------
  242|      0|    (fObject->*fToCall)();
  243|       |
  244|  7.12k|  fObject = p;
  245|  7.12k|}
_ZN11xercesc_3_217JanitorMemFunCallINS_12IGXMLScannerEE7releaseEv:
  232|  7.12k|{
  233|  7.12k|  T* p = fObject;
  234|  7.12k|  fObject = 0;
  235|  7.12k|  return p;
  236|  7.12k|}
_ZN11xercesc_3_217JanitorMemFunCallINS_25IdentityConstraintHandlerEEC2EPS1_MS1_FvvE:
  198|  7.12k|    fObject(object),
  199|  7.12k|    fToCall(toCall)
  200|  7.12k|{
  201|  7.12k|}
_ZN11xercesc_3_217JanitorMemFunCallINS_25IdentityConstraintHandlerEED2Ev:
  205|  7.12k|{
  206|  7.12k|  reset ();
  207|  7.12k|}
_ZN11xercesc_3_217JanitorMemFunCallINS_25IdentityConstraintHandlerEE5resetEPS1_:
  240|  7.12k|{
  241|  7.12k|  if (fObject != 0 && fToCall != 0)
  ------------------
  |  Branch (241:7): [True: 0, False: 7.12k]
  |  Branch (241:23): [True: 0, False: 0]
  ------------------
  242|      0|    (fObject->*fToCall)();
  243|       |
  244|  7.12k|  fObject = p;
  245|  7.12k|}
_ZN11xercesc_3_217JanitorMemFunCallINS_25IdentityConstraintHandlerEE7releaseEv:
  232|  7.12k|{
  233|  7.12k|  T* p = fObject;
  234|  7.12k|  fObject = 0;
  235|  7.12k|  return p;
  236|  7.12k|}
_ZN11xercesc_3_217JanitorMemFunCallINS_15ValueStoreCacheEEC2EPS1_MS1_FvvE:
  198|  7.12k|    fObject(object),
  199|  7.12k|    fToCall(toCall)
  200|  7.12k|{
  201|  7.12k|}
_ZN11xercesc_3_217JanitorMemFunCallINS_15ValueStoreCacheEED2Ev:
  205|  7.12k|{
  206|  7.12k|  reset ();
  207|  7.12k|}
_ZN11xercesc_3_217JanitorMemFunCallINS_15ValueStoreCacheEE5resetEPS1_:
  240|  7.12k|{
  241|  7.12k|  if (fObject != 0 && fToCall != 0)
  ------------------
  |  Branch (241:7): [True: 0, False: 7.12k]
  |  Branch (241:23): [True: 0, False: 0]
  ------------------
  242|      0|    (fObject->*fToCall)();
  243|       |
  244|  7.12k|  fObject = p;
  245|  7.12k|}
_ZN11xercesc_3_217JanitorMemFunCallINS_15ValueStoreCacheEE7releaseEv:
  232|  7.12k|{
  233|  7.12k|  T* p = fObject;
  234|  7.12k|  fObject = 0;
  235|  7.12k|  return p;
  236|  7.12k|}
_ZN11xercesc_3_217JanitorMemFunCallINS_17XPathMatcherStackEEC2EPS1_MS1_FvvE:
  198|  7.12k|    fObject(object),
  199|  7.12k|    fToCall(toCall)
  200|  7.12k|{
  201|  7.12k|}
_ZN11xercesc_3_217JanitorMemFunCallINS_17XPathMatcherStackEED2Ev:
  205|  7.12k|{
  206|  7.12k|  reset ();
  207|  7.12k|}
_ZN11xercesc_3_217JanitorMemFunCallINS_17XPathMatcherStackEE5resetEPS1_:
  240|  7.12k|{
  241|  7.12k|  if (fObject != 0 && fToCall != 0)
  ------------------
  |  Branch (241:7): [True: 0, False: 7.12k]
  |  Branch (241:23): [True: 0, False: 0]
  ------------------
  242|      0|    (fObject->*fToCall)();
  243|       |
  244|  7.12k|  fObject = p;
  245|  7.12k|}
_ZN11xercesc_3_217JanitorMemFunCallINS_17XPathMatcherStackEE7releaseEv:
  232|  7.12k|{
  233|  7.12k|  T* p = fObject;
  234|  7.12k|  fObject = 0;
  235|  7.12k|  return p;
  236|  7.12k|}

_ZN11xercesc_3_212KVStringPairC2EPKDsS2_PNS_13MemoryManagerE:
   46|     26|:fKeyAllocSize(0)
   47|     26|,fValueAllocSize(0)
   48|     26|,fKey(0)
   49|     26|,fValue(0)
   50|     26|,fMemoryManager(manager)
   51|     26|{
   52|     26|   set(key, value);
   53|     26|}
_ZN11xercesc_3_212KVStringPairC2ERKS0_:
   85|     26|:XSerializable(toCopy)
   86|     26|,XMemory(toCopy)
   87|     26|,fKeyAllocSize(0)
   88|     26|,fValueAllocSize(0)
   89|     26|,fKey(0)
   90|     26|,fValue(0)
   91|     26|,fMemoryManager(toCopy.fMemoryManager)
   92|     26|{
   93|     26|   set(toCopy.fKey, toCopy.fValue);
   94|     26|}
_ZN11xercesc_3_212KVStringPairD2Ev:
   97|     26|{
   98|     26|    fMemoryManager->deallocate(fKey); //delete [] fKey;
   99|     26|    fMemoryManager->deallocate(fValue); //delete [] fValue;
  100|     26|}

_ZN11xercesc_3_212KVStringPair6getKeyEv:
  149|     26|{
  150|     26|    return fKey;
  151|     26|}
_ZN11xercesc_3_212KVStringPair8getValueEv:
  159|     26|{
  160|     26|    return fValue;
  161|     26|}
_ZN11xercesc_3_212KVStringPair6setKeyEPKDsm:
  178|     52|{
  179|     52|    if (newKeyLength >= fKeyAllocSize)
  ------------------
  |  Branch (179:9): [True: 52, False: 0]
  ------------------
  180|     52|    {
  181|     52|        fMemoryManager->deallocate(fKey); //delete [] fKey;
  182|     52|        fKey = 0;
  183|     52|        fKeyAllocSize = newKeyLength + 1;
  184|     52|        fKey = (XMLCh*) fMemoryManager->allocate(fKeyAllocSize * sizeof(XMLCh)); //new XMLCh[fKeyAllocSize];
  185|     52|    }
  186|       |
  187|     52|    memcpy(fKey, newKey, (newKeyLength+1) * sizeof(XMLCh)); // len+1 because of the 0 at the end
  188|     52|}
_ZN11xercesc_3_212KVStringPair8setValueEPKDsm:
  192|     52|{
  193|     52|    if (newValueLength >= fValueAllocSize)
  ------------------
  |  Branch (193:9): [True: 52, False: 0]
  ------------------
  194|     52|    {
  195|     52|        fMemoryManager->deallocate(fValue); //delete [] fValue;
  196|     52|        fValue = 0;
  197|     52|        fValueAllocSize = newValueLength + 1;
  198|     52|        fValue = (XMLCh*) fMemoryManager->allocate(fValueAllocSize * sizeof(XMLCh)); //new XMLCh[fValueAllocSize];
  199|     52|    }
  200|       |
  201|     52|    memcpy(fValue, newValue, (newValueLength+1) * sizeof(XMLCh)); // len+1 because of the 0 at the end
  202|     52|}
_ZN11xercesc_3_212KVStringPair3setEPKDsS2_:
  206|     52|{
  207|     52|    setKey(newKey, XMLString::stringLen(newKey));
  208|     52|    setValue(newValue, XMLString::stringLen(newValue));
  209|     52|}

_ZN11xercesc_3_214InMemMsgLoaderC2EPKDs:
   40|      8|:fMsgDomain(0)
   41|      8|{
   42|      8|    if (!XMLString::equals(msgDomain, XMLUni::fgXMLErrDomain)
  ------------------
  |  Branch (42:9): [True: 4, False: 4]
  ------------------
   43|      8|    &&  !XMLString::equals(msgDomain, XMLUni::fgExceptDomain)
  ------------------
  |  Branch (43:9): [True: 3, False: 1]
  ------------------
   44|      8|    &&  !XMLString::equals(msgDomain, XMLUni::fgXMLDOMMsgDomain)
  ------------------
  |  Branch (44:9): [True: 2, False: 1]
  ------------------
   45|      8|    &&  !XMLString::equals(msgDomain, XMLUni::fgValidityDomain))
  ------------------
  |  Branch (45:9): [True: 0, False: 2]
  ------------------
   46|      0|    {
   47|      0|        XMLPlatformUtils::panic(PanicHandler::Panic_UnknownMsgDomain);
   48|      0|    }
   49|       |
   50|      8|    fMsgDomain = XMLString::replicate(msgDomain, XMLPlatformUtils::fgMemoryManager);
   51|      8|}
_ZN11xercesc_3_214InMemMsgLoader7loadMsgEjPDsm:
   65|  1.36k|{
   66|       |    //
   67|       |    //  Just use the id to map into the correct array of messages. Then
   68|       |    //  copy that to the caller's buffer.
   69|       |    //
   70|       |    //  NOTE:   The source text is in little endian form. So, if we are a
   71|       |    //          big endian machine, flip them in the process.
   72|       |    //
   73|  1.36k|    XMLCh* endPtr = toFill + maxChars;
   74|  1.36k|    XMLCh* outPtr = toFill;
   75|  1.36k|    const XMLCh* srcPtr = 0;
   76|       |
   77|  1.36k|    if (XMLString::equals(fMsgDomain, XMLUni::fgXMLErrDomain))
  ------------------
  |  Branch (77:9): [True: 0, False: 1.36k]
  ------------------
   78|      0|    {
   79|      0|        if ( msgToLoad > gXMLErrArraySize)
  ------------------
  |  Branch (79:14): [True: 0, False: 0]
  ------------------
   80|      0|            return false;
   81|      0|        else
   82|      0|            srcPtr = gXMLErrArray[msgToLoad - 1];
   83|      0|    }
   84|  1.36k|     else if (XMLString::equals(fMsgDomain, XMLUni::fgExceptDomain))
  ------------------
  |  Branch (84:15): [True: 1.36k, False: 0]
  ------------------
   85|  1.36k|    {
   86|  1.36k|         if ( msgToLoad > gXMLExceptArraySize)
  ------------------
  |  Branch (86:15): [True: 0, False: 1.36k]
  ------------------
   87|      0|            return false;
   88|  1.36k|         else
   89|  1.36k|             srcPtr = gXMLExceptArray[msgToLoad - 1];
   90|  1.36k|    }
   91|      0|     else if (XMLString::equals(fMsgDomain, XMLUni::fgValidityDomain))
  ------------------
  |  Branch (91:15): [True: 0, False: 0]
  ------------------
   92|      0|    {
   93|      0|         if ( msgToLoad > gXMLValidityArraySize)
  ------------------
  |  Branch (93:15): [True: 0, False: 0]
  ------------------
   94|      0|            return false;
   95|      0|         else
   96|      0|             srcPtr = gXMLValidityArray[msgToLoad - 1];
   97|      0|    }
   98|      0|     else if (XMLString::equals(fMsgDomain, XMLUni::fgXMLDOMMsgDomain))
  ------------------
  |  Branch (98:15): [True: 0, False: 0]
  ------------------
   99|      0|    {
  100|      0|         if ( msgToLoad > gXMLDOMMsgArraySize)
  ------------------
  |  Branch (100:15): [True: 0, False: 0]
  ------------------
  101|      0|            return false;
  102|      0|         else
  103|      0|             srcPtr = gXMLDOMMsgArray[msgToLoad - 1];
  104|      0|    } else {
  105|      0|	return false;
  106|      0|    }
  107|       |
  108|  44.9k|     while (*srcPtr && (outPtr < endPtr))
  ------------------
  |  Branch (108:13): [True: 43.6k, False: 1.36k]
  |  Branch (108:24): [True: 43.6k, False: 0]
  ------------------
  109|  43.6k|     {
  110|  43.6k|         *outPtr++ = *srcPtr++;
  111|  43.6k|     }
  112|  1.36k|     *outPtr = 0;
  113|       |
  114|  1.36k|     return true;
  115|  1.36k|}
_ZN11xercesc_3_214InMemMsgLoader7loadMsgEjPDsmPKDsS3_S3_S3_PNS_13MemoryManagerE:
  126|    677|{
  127|       |    // Call the other version to load up the message
  128|    677|    if (!loadMsg(msgToLoad, toFill, maxChars))
  ------------------
  |  Branch (128:9): [True: 0, False: 677]
  ------------------
  129|      0|        return false;
  130|       |
  131|       |    // And do the token replacement
  132|    677|    XMLString::replaceTokens(toFill, maxChars, repText1, repText2, repText3, repText4, manager);
  133|    677|    return true;
  134|    677|}
_ZN11xercesc_3_214InMemMsgLoader7loadMsgEjPDsmPKcS3_S3_S3_PNS_13MemoryManagerE:
  145|     52|{
  146|       |    //
  147|       |    //  Transcode the provided parameters and call the other version,
  148|       |    //  which will do the replacement work.
  149|       |    //
  150|     52|    XMLCh* tmp1 = 0;
  151|     52|    XMLCh* tmp2 = 0;
  152|     52|    XMLCh* tmp3 = 0;
  153|     52|    XMLCh* tmp4 = 0;
  154|       |    
  155|     52|    bool bRet = false;
  156|     52|    if (repText1)
  ------------------
  |  Branch (156:9): [True: 52, False: 0]
  ------------------
  157|     52|        tmp1 = XMLString::transcode(repText1, manager);
  158|     52|    if (repText2)
  ------------------
  |  Branch (158:9): [True: 52, False: 0]
  ------------------
  159|     52|        tmp2 = XMLString::transcode(repText2, manager);
  160|     52|    if (repText3)
  ------------------
  |  Branch (160:9): [True: 48, False: 4]
  ------------------
  161|     48|        tmp3 = XMLString::transcode(repText3, manager);
  162|     52|    if (repText4)
  ------------------
  |  Branch (162:9): [True: 0, False: 52]
  ------------------
  163|      0|        tmp4 = XMLString::transcode(repText4, manager);
  164|       |
  165|     52|    bRet = loadMsg(msgToLoad, toFill, maxChars, tmp1, tmp2, tmp3, tmp4, manager);
  166|       |
  167|     52|    if (tmp1)
  ------------------
  |  Branch (167:9): [True: 52, False: 0]
  ------------------
  168|     52|        manager->deallocate(tmp1);//delete [] tmp1;
  169|     52|    if (tmp2)
  ------------------
  |  Branch (169:9): [True: 52, False: 0]
  ------------------
  170|     52|        manager->deallocate(tmp2);//delete [] tmp2;
  171|     52|    if (tmp3)
  ------------------
  |  Branch (171:9): [True: 48, False: 4]
  ------------------
  172|     48|        manager->deallocate(tmp3);//delete [] tmp3;
  173|     52|    if (tmp4)
  ------------------
  |  Branch (173:9): [True: 0, False: 52]
  ------------------
  174|      0|        manager->deallocate(tmp4);//delete [] tmp4;
  175|       |
  176|     52|    return bRet;
  177|     52|}

_ZN11xercesc_3_211StdMutexMgrC2Ev:
   40|      1|{
   41|      1|}
_ZN11xercesc_3_211StdMutexMgr6createEPNS_13MemoryManagerE:
   51|     89|{
   52|     89|    StdMutexWrap* mutex = new (manager) StdMutexWrap;
   53|     89|    return (void*)(mutex);
   54|     89|}
_ZN11xercesc_3_211StdMutexMgr7destroyEPvPNS_13MemoryManagerE:
   59|     81|{
   60|     81|    StdMutexWrap* mutex = (StdMutexWrap*)(mtx);
   61|     81|    if (mutex != NULL)
  ------------------
  |  Branch (61:9): [True: 81, False: 0]
  ------------------
   62|     81|    {
   63|     81|        delete mutex;
   64|     81|    }
   65|     81|}
_ZN11xercesc_3_211StdMutexMgr4lockEPv:
   70|  23.5k|{
   71|  23.5k|    StdMutexWrap* mutex = (StdMutexWrap*)(mtx);
   72|  23.5k|    if (mutex != NULL)
  ------------------
  |  Branch (72:9): [True: 23.5k, False: 0]
  ------------------
   73|  23.5k|    {
   74|  23.5k|        mutex->m.lock();
   75|  23.5k|    }
   76|  23.5k|}
_ZN11xercesc_3_211StdMutexMgr6unlockEPv:
   81|  23.5k|{
   82|  23.5k|    StdMutexWrap* mutex = (StdMutexWrap*)(mtx);
   83|  23.5k|    if (mutex != NULL)
  ------------------
  |  Branch (83:9): [True: 23.5k, False: 0]
  ------------------
   84|  23.5k|    {
   85|  23.5k|        mutex->m.unlock();
   86|  23.5k|    }
   87|  23.5k|}

_ZN11xercesc_3_28XMLMutexC2EPNS_13MemoryManagerE:
   38|     89|    fHandle(0),
   39|     89|    fManager(manager)
   40|     89|{
   41|       |    // Ask the per-platform driver to make us a mutex
   42|     89|    fHandle = XMLPlatformUtils::makeMutex(manager);
   43|     89|}
_ZN11xercesc_3_28XMLMutexD2Ev:
   47|     81|{
   48|     81|    if (fHandle)
  ------------------
  |  Branch (48:9): [True: 81, False: 0]
  ------------------
   49|     81|    {
   50|     81|        XMLPlatformUtils::closeMutex(fHandle, fManager);
   51|     81|        fHandle = 0;
   52|     81|    }
   53|     81|}
_ZN11xercesc_3_28XMLMutex4lockEv:
   60|  23.5k|{
   61|  23.5k|    XMLPlatformUtils::lockMutex(fHandle);
   62|  23.5k|}
_ZN11xercesc_3_28XMLMutex6unlockEv:
   65|  23.5k|{
   66|  23.5k|    XMLPlatformUtils::unlockMutex(fHandle);
   67|  23.5k|}
_ZN11xercesc_3_212XMLMutexLockC2EPNS_8XMLMutexE:
   76|  23.5k|    fToLock(toLock)
   77|  23.5k|{
   78|  23.5k|    fToLock->lock();
   79|  23.5k|}
_ZN11xercesc_3_212XMLMutexLockD2Ev:
   83|  23.5k|{
   84|  23.5k|    fToLock->unlock();
   85|  23.5k|}

_ZN11xercesc_3_210NameIdPoolINS_15XMLNotationDeclEE8getByKeyEPKDs:
  107|  5.52k|{
  108|  5.52k|    if (fIdCounter == 0) return 0;
  ------------------
  |  Branch (108:9): [True: 597, False: 4.92k]
  ------------------
  109|  4.92k|    return fBucketList.get(key);
  110|  5.52k|}
_ZN11xercesc_3_210NameIdPoolINS_15XMLNotationDeclEE3putEPS1_:
  153|  1.88k|{
  154|       |    // First see if the key exists already. If so, its an error
  155|  1.88k|    if(containsKey(elemToAdopt->getKey()))
  ------------------
  |  Branch (155:8): [True: 0, False: 1.88k]
  ------------------
  156|      0|    {
  157|      0|        ThrowXMLwithMemMgr1
  ------------------
  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
  158|      0|        (
  159|      0|            IllegalArgumentException
  160|      0|            , XMLExcepts::Pool_ElemAlreadyExists
  161|      0|            , elemToAdopt->getKey()
  162|      0|            , fMemoryManager
  163|      0|        );
  164|      0|    }
  165|       |
  166|  1.88k|    fBucketList.put((void*)elemToAdopt->getKey(), elemToAdopt);
  167|       |
  168|       |    //
  169|       |    //  Give this new one the next available id and add to the pointer list.
  170|       |    //  Expand the list if that is now required.
  171|       |    //
  172|  1.88k|    if (fIdCounter + 1 == fIdPtrsCount)
  ------------------
  |  Branch (172:9): [True: 0, False: 1.88k]
  ------------------
  173|      0|    {
  174|       |        // Create a new count 1.5 times larger and allocate a new array
  175|      0|        XMLSize_t newCount = (XMLSize_t)(fIdPtrsCount * 1.5);
  176|      0|        TElem** newArray = (TElem**) fMemoryManager->allocate
  177|      0|        (
  178|      0|            newCount * sizeof(TElem*)
  179|      0|        ); //new TElem*[newCount];
  180|       |
  181|       |        // Copy over the old contents to the new array
  182|      0|        memcpy(newArray, fIdPtrs, fIdPtrsCount * sizeof(TElem*));
  183|       |
  184|       |        // Ok, toss the old array and store the new data
  185|      0|        fMemoryManager->deallocate(fIdPtrs); //delete [] fIdPtrs;
  186|      0|        fIdPtrs = newArray;
  187|      0|        fIdPtrsCount = newCount;
  188|      0|    }
  189|  1.88k|    const XMLSize_t retId = ++fIdCounter;
  190|  1.88k|    fIdPtrs[retId] = elemToAdopt;
  191|       |
  192|       |    // Set the id on the passed element
  193|  1.88k|    elemToAdopt->setId(retId);
  194|       |
  195|       |    // Return the id that we gave to this element
  196|  1.88k|    return retId;
  197|  1.88k|}
_ZNK11xercesc_3_210NameIdPoolINS_15XMLNotationDeclEE11containsKeyEPKDs:
   84|  1.88k|{
   85|  1.88k|    if (fIdCounter == 0) return false;
  ------------------
  |  Branch (85:9): [True: 191, False: 1.69k]
  ------------------
   86|  1.69k|    return fBucketList.containsKey(key);
   87|  1.88k|}
_ZN11xercesc_3_210NameIdPoolINS_14DTDElementDeclEE8getByKeyEPKDs:
  107|  24.5M|{
  108|  24.5M|    if (fIdCounter == 0) return 0;
  ------------------
  |  Branch (108:9): [True: 97.8k, False: 24.4M]
  ------------------
  109|  24.4M|    return fBucketList.get(key);
  110|  24.5M|}
_ZN11xercesc_3_210NameIdPoolINS_13DTDEntityDeclEE3putEPS1_:
  153|  5.44k|{
  154|       |    // First see if the key exists already. If so, its an error
  155|  5.44k|    if(containsKey(elemToAdopt->getKey()))
  ------------------
  |  Branch (155:8): [True: 0, False: 5.44k]
  ------------------
  156|      0|    {
  157|      0|        ThrowXMLwithMemMgr1
  ------------------
  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
  158|      0|        (
  159|      0|            IllegalArgumentException
  160|      0|            , XMLExcepts::Pool_ElemAlreadyExists
  161|      0|            , elemToAdopt->getKey()
  162|      0|            , fMemoryManager
  163|      0|        );
  164|      0|    }
  165|       |
  166|  5.44k|    fBucketList.put((void*)elemToAdopt->getKey(), elemToAdopt);
  167|       |
  168|       |    //
  169|       |    //  Give this new one the next available id and add to the pointer list.
  170|       |    //  Expand the list if that is now required.
  171|       |    //
  172|  5.44k|    if (fIdCounter + 1 == fIdPtrsCount)
  ------------------
  |  Branch (172:9): [True: 0, False: 5.44k]
  ------------------
  173|      0|    {
  174|       |        // Create a new count 1.5 times larger and allocate a new array
  175|      0|        XMLSize_t newCount = (XMLSize_t)(fIdPtrsCount * 1.5);
  176|      0|        TElem** newArray = (TElem**) fMemoryManager->allocate
  177|      0|        (
  178|      0|            newCount * sizeof(TElem*)
  179|      0|        ); //new TElem*[newCount];
  180|       |
  181|       |        // Copy over the old contents to the new array
  182|      0|        memcpy(newArray, fIdPtrs, fIdPtrsCount * sizeof(TElem*));
  183|       |
  184|       |        // Ok, toss the old array and store the new data
  185|      0|        fMemoryManager->deallocate(fIdPtrs); //delete [] fIdPtrs;
  186|      0|        fIdPtrs = newArray;
  187|      0|        fIdPtrsCount = newCount;
  188|      0|    }
  189|  5.44k|    const XMLSize_t retId = ++fIdCounter;
  190|  5.44k|    fIdPtrs[retId] = elemToAdopt;
  191|       |
  192|       |    // Set the id on the passed element
  193|  5.44k|    elemToAdopt->setId(retId);
  194|       |
  195|       |    // Return the id that we gave to this element
  196|  5.44k|    return retId;
  197|  5.44k|}
_ZNK11xercesc_3_210NameIdPoolINS_13DTDEntityDeclEE11containsKeyEPKDs:
   84|  5.44k|{
   85|  5.44k|    if (fIdCounter == 0) return false;
  ------------------
  |  Branch (85:9): [True: 2.12k, False: 3.32k]
  ------------------
   86|  3.32k|    return fBucketList.containsKey(key);
   87|  5.44k|}
_ZN11xercesc_3_210NameIdPoolINS_14DTDElementDeclEEC2EmmPNS_13MemoryManagerE:
   45|  14.2k|    fMemoryManager(manager)
   46|  14.2k|    , fIdPtrs(0)
   47|  14.2k|    , fIdPtrsCount(initSize)
   48|  14.2k|    , fIdCounter(0)
   49|  14.2k|    , fBucketList(hashModulus, manager)
   50|  14.2k|{
   51|  14.2k|    if (!hashModulus)
  ------------------
  |  Branch (51:9): [True: 0, False: 14.2k]
  ------------------
   52|      0|        ThrowXMLwithMemMgr(IllegalArgumentException, XMLExcepts::Pool_ZeroModulus, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
   53|       |
   54|       |    //
   55|       |    //  Allocate the initial id pointers array. We don't have to zero them
   56|       |    //  out since the fIdCounter value tells us which ones are valid. The
   57|       |    //  zeroth element is never used (and represents an invalid pool id.)
   58|       |    //
   59|  14.2k|    if (!fIdPtrsCount)
  ------------------
  |  Branch (59:9): [True: 0, False: 14.2k]
  ------------------
   60|      0|        fIdPtrsCount = 256;
   61|  14.2k|    fIdPtrs = (TElem**) fMemoryManager->allocate
   62|  14.2k|    (
   63|  14.2k|        fIdPtrsCount * sizeof(TElem*)
   64|  14.2k|    );
   65|  14.2k|    fIdPtrs[0] = 0;
   66|  14.2k|}
_ZN11xercesc_3_210NameIdPoolINS_14DTDElementDeclEE3putEPS1_:
  153|  37.0k|{
  154|       |    // First see if the key exists already. If so, its an error
  155|  37.0k|    if(containsKey(elemToAdopt->getKey()))
  ------------------
  |  Branch (155:8): [True: 0, False: 37.0k]
  ------------------
  156|      0|    {
  157|      0|        ThrowXMLwithMemMgr1
  ------------------
  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
  158|      0|        (
  159|      0|            IllegalArgumentException
  160|      0|            , XMLExcepts::Pool_ElemAlreadyExists
  161|      0|            , elemToAdopt->getKey()
  162|      0|            , fMemoryManager
  163|      0|        );
  164|      0|    }
  165|       |
  166|  37.0k|    fBucketList.put((void*)elemToAdopt->getKey(), elemToAdopt);
  167|       |
  168|       |    //
  169|       |    //  Give this new one the next available id and add to the pointer list.
  170|       |    //  Expand the list if that is now required.
  171|       |    //
  172|  37.0k|    if (fIdCounter + 1 == fIdPtrsCount)
  ------------------
  |  Branch (172:9): [True: 16, False: 36.9k]
  ------------------
  173|     16|    {
  174|       |        // Create a new count 1.5 times larger and allocate a new array
  175|     16|        XMLSize_t newCount = (XMLSize_t)(fIdPtrsCount * 1.5);
  176|     16|        TElem** newArray = (TElem**) fMemoryManager->allocate
  177|     16|        (
  178|     16|            newCount * sizeof(TElem*)
  179|     16|        ); //new TElem*[newCount];
  180|       |
  181|       |        // Copy over the old contents to the new array
  182|     16|        memcpy(newArray, fIdPtrs, fIdPtrsCount * sizeof(TElem*));
  183|       |
  184|       |        // Ok, toss the old array and store the new data
  185|     16|        fMemoryManager->deallocate(fIdPtrs); //delete [] fIdPtrs;
  186|     16|        fIdPtrs = newArray;
  187|     16|        fIdPtrsCount = newCount;
  188|     16|    }
  189|  37.0k|    const XMLSize_t retId = ++fIdCounter;
  190|  37.0k|    fIdPtrs[retId] = elemToAdopt;
  191|       |
  192|       |    // Set the id on the passed element
  193|  37.0k|    elemToAdopt->setId(retId);
  194|       |
  195|       |    // Return the id that we gave to this element
  196|  37.0k|    return retId;
  197|  37.0k|}
_ZNK11xercesc_3_210NameIdPoolINS_14DTDElementDeclEE11containsKeyEPKDs:
   84|  37.0k|{
   85|  37.0k|    if (fIdCounter == 0) return false;
  ------------------
  |  Branch (85:9): [True: 7.41k, False: 29.5k]
  ------------------
   86|  29.5k|    return fBucketList.containsKey(key);
   87|  37.0k|}
_ZN11xercesc_3_210NameIdPoolINS_13DTDEntityDeclEEC2EmmPNS_13MemoryManagerE:
   45|  13.1k|    fMemoryManager(manager)
   46|  13.1k|    , fIdPtrs(0)
   47|  13.1k|    , fIdPtrsCount(initSize)
   48|  13.1k|    , fIdCounter(0)
   49|  13.1k|    , fBucketList(hashModulus, manager)
   50|  13.1k|{
   51|  13.1k|    if (!hashModulus)
  ------------------
  |  Branch (51:9): [True: 0, False: 13.1k]
  ------------------
   52|      0|        ThrowXMLwithMemMgr(IllegalArgumentException, XMLExcepts::Pool_ZeroModulus, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
   53|       |
   54|       |    //
   55|       |    //  Allocate the initial id pointers array. We don't have to zero them
   56|       |    //  out since the fIdCounter value tells us which ones are valid. The
   57|       |    //  zeroth element is never used (and represents an invalid pool id.)
   58|       |    //
   59|  13.1k|    if (!fIdPtrsCount)
  ------------------
  |  Branch (59:9): [True: 0, False: 13.1k]
  ------------------
   60|      0|        fIdPtrsCount = 256;
   61|  13.1k|    fIdPtrs = (TElem**) fMemoryManager->allocate
   62|  13.1k|    (
   63|  13.1k|        fIdPtrsCount * sizeof(TElem*)
   64|  13.1k|    );
   65|  13.1k|    fIdPtrs[0] = 0;
   66|  13.1k|}
_ZN11xercesc_3_210NameIdPoolINS_13DTDEntityDeclEED2Ev:
   69|  13.1k|{
   70|       |    //
   71|       |    //  Delete the id pointers list. The stuff it points to will be cleaned
   72|       |    //  up when we clean the bucket lists.
   73|       |    //
   74|  13.1k|    fMemoryManager->deallocate(fIdPtrs); //delete [] fIdPtrs;
   75|  13.1k|}
_ZN11xercesc_3_210NameIdPoolINS_15XMLNotationDeclEEC2EmmPNS_13MemoryManagerE:
   45|  7.12k|    fMemoryManager(manager)
   46|  7.12k|    , fIdPtrs(0)
   47|  7.12k|    , fIdPtrsCount(initSize)
   48|  7.12k|    , fIdCounter(0)
   49|  7.12k|    , fBucketList(hashModulus, manager)
   50|  7.12k|{
   51|  7.12k|    if (!hashModulus)
  ------------------
  |  Branch (51:9): [True: 0, False: 7.12k]
  ------------------
   52|      0|        ThrowXMLwithMemMgr(IllegalArgumentException, XMLExcepts::Pool_ZeroModulus, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
   53|       |
   54|       |    //
   55|       |    //  Allocate the initial id pointers array. We don't have to zero them
   56|       |    //  out since the fIdCounter value tells us which ones are valid. The
   57|       |    //  zeroth element is never used (and represents an invalid pool id.)
   58|       |    //
   59|  7.12k|    if (!fIdPtrsCount)
  ------------------
  |  Branch (59:9): [True: 0, False: 7.12k]
  ------------------
   60|      0|        fIdPtrsCount = 256;
   61|  7.12k|    fIdPtrs = (TElem**) fMemoryManager->allocate
   62|  7.12k|    (
   63|  7.12k|        fIdPtrsCount * sizeof(TElem*)
   64|  7.12k|    );
   65|  7.12k|    fIdPtrs[0] = 0;
   66|  7.12k|}
_ZN11xercesc_3_210NameIdPoolINS_14DTDElementDeclEED2Ev:
   69|  14.2k|{
   70|       |    //
   71|       |    //  Delete the id pointers list. The stuff it points to will be cleaned
   72|       |    //  up when we clean the bucket lists.
   73|       |    //
   74|  14.2k|    fMemoryManager->deallocate(fIdPtrs); //delete [] fIdPtrs;
   75|  14.2k|}
_ZN11xercesc_3_210NameIdPoolINS_15XMLNotationDeclEED2Ev:
   69|  7.12k|{
   70|       |    //
   71|       |    //  Delete the id pointers list. The stuff it points to will be cleaned
   72|       |    //  up when we clean the bucket lists.
   73|       |    //
   74|  7.12k|    fMemoryManager->deallocate(fIdPtrs); //delete [] fIdPtrs;
   75|  7.12k|}
_ZN11xercesc_3_210NameIdPoolINS_14DTDElementDeclEE9removeAllEv:
   91|  7.10k|{
   92|  7.10k|    if (fIdCounter == 0) return;
  ------------------
  |  Branch (92:9): [True: 7.10k, False: 0]
  ------------------
   93|       |
   94|      0|    fBucketList.removeAll();
   95|       |
   96|       |    // Reset the id counter
   97|      0|    fIdCounter = 0;
   98|      0|}
_ZN11xercesc_3_220NameIdPoolEnumeratorINS_14DTDElementDeclEE5ResetEv:
  269|  3.58k|{
  270|       |    //
  271|       |    //  Find the next available bucket element in the pool. We use the id
  272|       |    //  array since its very easy to enumerator through by just maintaining
  273|       |    //  an index. If the id counter is zero, then its empty and we leave the
  274|       |    //  current index to zero.
  275|       |    //
  276|  3.58k|    fCurIndex = fToEnum->fIdCounter ? 1:0;
  ------------------
  |  Branch (276:17): [True: 3.58k, False: 0]
  ------------------
  277|  3.58k|}
_ZNK11xercesc_3_220NameIdPoolEnumeratorINS_14DTDElementDeclEE15hasMoreElementsEv:
  250|  30.2k|{
  251|       |    // If our index is zero or past the end, then we are done
  252|  30.2k|    if (!fCurIndex || (fCurIndex > fToEnum->fIdCounter))
  ------------------
  |  Branch (252:9): [True: 0, False: 30.2k]
  |  Branch (252:23): [True: 3.58k, False: 26.6k]
  ------------------
  253|  3.58k|        return false;
  254|  26.6k|    return true;
  255|  30.2k|}
_ZN11xercesc_3_220NameIdPoolEnumeratorINS_14DTDElementDeclEE11nextElementEv:
  258|  26.6k|{
  259|       |    // If our index is zero or past the end, then we are done
  260|  26.6k|    if (!fCurIndex || (fCurIndex > fToEnum->fIdCounter))
  ------------------
  |  Branch (260:9): [True: 0, False: 26.6k]
  |  Branch (260:23): [True: 0, False: 26.6k]
  ------------------
  261|      0|        ThrowXMLwithMemMgr(NoSuchElementException, XMLExcepts::Enum_NoMoreElements, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  262|       |
  263|       |    // Return the current element and bump the index
  264|  26.6k|    return *fToEnum->fIdPtrs[fCurIndex++];
  265|  26.6k|}
_ZN11xercesc_3_220NameIdPoolEnumeratorINS_13DTDEntityDeclEE5ResetEv:
  269|  3.58k|{
  270|       |    //
  271|       |    //  Find the next available bucket element in the pool. We use the id
  272|       |    //  array since its very easy to enumerator through by just maintaining
  273|       |    //  an index. If the id counter is zero, then its empty and we leave the
  274|       |    //  current index to zero.
  275|       |    //
  276|  3.58k|    fCurIndex = fToEnum->fIdCounter ? 1:0;
  ------------------
  |  Branch (276:17): [True: 777, False: 2.81k]
  ------------------
  277|  3.58k|}
_ZNK11xercesc_3_220NameIdPoolEnumeratorINS_13DTDEntityDeclEE15hasMoreElementsEv:
  250|  5.05k|{
  251|       |    // If our index is zero or past the end, then we are done
  252|  5.05k|    if (!fCurIndex || (fCurIndex > fToEnum->fIdCounter))
  ------------------
  |  Branch (252:9): [True: 2.81k, False: 2.24k]
  |  Branch (252:23): [True: 777, False: 1.46k]
  ------------------
  253|  3.58k|        return false;
  254|  1.46k|    return true;
  255|  5.05k|}
_ZN11xercesc_3_220NameIdPoolEnumeratorINS_13DTDEntityDeclEE11nextElementEv:
  258|  1.46k|{
  259|       |    // If our index is zero or past the end, then we are done
  260|  1.46k|    if (!fCurIndex || (fCurIndex > fToEnum->fIdCounter))
  ------------------
  |  Branch (260:9): [True: 0, False: 1.46k]
  |  Branch (260:23): [True: 0, False: 1.46k]
  ------------------
  261|      0|        ThrowXMLwithMemMgr(NoSuchElementException, XMLExcepts::Enum_NoMoreElements, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  262|       |
  263|       |    // Return the current element and bump the index
  264|  1.46k|    return *fToEnum->fIdPtrs[fCurIndex++];
  265|  1.46k|}
_ZN11xercesc_3_210NameIdPoolINS_13DTDEntityDeclEE8getByKeyEPKDs:
  107|  6.11M|{
  108|  6.11M|    if (fIdCounter == 0) return 0;
  ------------------
  |  Branch (108:9): [True: 11.3k, False: 6.10M]
  ------------------
  109|  6.10M|    return fBucketList.get(key);
  110|  6.11M|}
_ZN11xercesc_3_220NameIdPoolEnumeratorINS_14DTDElementDeclEEC2EPNS_10NameIdPoolIS1_EEPNS_13MemoryManagerE:
  207|  3.58k|    XMLEnumerator<TElem>()
  208|  3.58k|    , fCurIndex(0)
  209|  3.58k|    , fToEnum(toEnum)
  210|  3.58k|    , fMemoryManager(manager)
  211|  3.58k|{
  212|  3.58k|    Reset();
  213|  3.58k|}
_ZN11xercesc_3_220NameIdPoolEnumeratorINS_13DTDEntityDeclEEC2EPNS_10NameIdPoolIS1_EEPNS_13MemoryManagerE:
  207|  3.58k|    XMLEnumerator<TElem>()
  208|  3.58k|    , fCurIndex(0)
  209|  3.58k|    , fToEnum(toEnum)
  210|  3.58k|    , fMemoryManager(manager)
  211|  3.58k|{
  212|  3.58k|    Reset();
  213|  3.58k|}

_ZN11xercesc_3_224BinHTTPInputStreamCommonC2EPNS_13MemoryManagerE:
   46|    101|      : fBytesProcessed(0)
   47|    101|      , fBuffer(1023, manager)
   48|    101|	  , fBufferPos(0)
   49|    101|      , fContentType(0)
   50|    101|	  , fEncoding(0)
   51|    101|      , fMemoryManager(manager)
   52|    101|{
   53|    101|}
_ZN11xercesc_3_224BinHTTPInputStreamCommonD2Ev:
   57|    101|{
   58|    101|    if(fContentType) fMemoryManager->deallocate(fContentType);
  ------------------
  |  Branch (58:8): [True: 0, False: 101]
  ------------------
   59|    101|    if(fEncoding) fMemoryManager->deallocate(fEncoding);
  ------------------
  |  Branch (59:8): [True: 0, False: 101]
  ------------------
   60|    101|}

_ZN11xercesc_3_210CharBufferC2EmPNS_13MemoryManagerE:
   41|    199|        : fCapacity(capacity),
   42|    199|          fIndex(0),
   43|    199|          fMemoryManager(manager)
   44|    199|    {
   45|    199|        fBuffer = (char*)fMemoryManager->allocate((fCapacity + 1) * sizeof(char));
   46|    199|    }
_ZN11xercesc_3_210CharBufferD2Ev:
   49|    199|    {
   50|    199|        fMemoryManager->deallocate(fBuffer);
   51|    199|    }
_ZN11xercesc_3_210CharBuffer12getRawBufferEv:
   60|    170|    {
   61|    170|        fBuffer[fIndex] = 0;
   62|    170|        return fBuffer;
   63|    170|    }
_ZN11xercesc_3_210CharBuffer19appendDecimalNumberEj:
  102|    553|    {
  103|    553|        if(n >= 10) {
  ------------------
  |  Branch (103:12): [True: 455, False: 98]
  ------------------
  104|    455|		appendDecimalNumber(n / 10);
  105|    455|		n = n % 10;
  106|    455|	}
  107|       |
  108|    553|        if(fIndex + 1 >= fCapacity)
  ------------------
  |  Branch (108:12): [True: 39, False: 514]
  ------------------
  109|     39|            ensureCapacity(1);
  110|       |
  111|    553|        fBuffer[fIndex] = '0' + n;
  112|    553|        ++fIndex;
  113|    553|    }
_ZN11xercesc_3_210CharBuffer14ensureCapacityEm:
  129|     39|    {
  130|       |        // If we can't handle it, try doubling the buffer size.
  131|     39|        XMLSize_t newCap = (fIndex + extraNeeded) * 2;
  132|       |
  133|     39|        if(newCap > fCapacity)
  ------------------
  |  Branch (133:12): [True: 39, False: 0]
  ------------------
  134|     39|        {
  135|       |            // Allocate new buffer
  136|     39|            char* newBuf = (char*)fMemoryManager->allocate((newCap + 1) * sizeof(char));
  137|       |
  138|       |            // Copy over the old stuff
  139|     39|            memcpy(newBuf, fBuffer, fIndex * sizeof(char));
  140|       |
  141|       |            // Clean up old buffer and store new stuff
  142|     39|            fMemoryManager->deallocate(fBuffer);
  143|     39|            fBuffer = newBuf;
  144|     39|            fCapacity = newCap;
  145|     39|        }
  146|     39|    }

_ZN11xercesc_3_217SocketNetAccessorC2Ev:
   40|      1|{
   41|       |    // Do any one time initialization here.
   42|       |    // Nothing to do, in this case.
   43|      1|}
_ZN11xercesc_3_217SocketNetAccessor7makeNewERKNS_6XMLURLEPKNS_14XMLNetHTTPInfoE:
   53|    142|{
   54|    142|    XMLURL::Protocols  protocol = urlSource.getProtocol();
   55|    142|    switch(protocol)
   56|    142|    {
   57|    101|        case XMLURL::HTTP:
  ------------------
  |  Branch (57:9): [True: 101, False: 41]
  ------------------
   58|    101|        {
   59|    101|            UnixHTTPURLInputStream* retStrm =
   60|    101|                new (urlSource.getMemoryManager()) UnixHTTPURLInputStream(urlSource, httpInfo);
   61|    101|            return retStrm;            
   62|      0|        }
   63|       |
   64|       |        //
   65|       |        // These are the only protocols we support now. So throw and
   66|       |        // unsupported protocol exception for the others.
   67|       |        //
   68|     41|        default :
  ------------------
  |  Branch (68:9): [True: 41, False: 101]
  ------------------
   69|     41|            ThrowXMLwithMemMgr(MalformedURLException, XMLExcepts::URL_UnsupportedProto, urlSource.getMemoryManager());
  ------------------
  |  |  264|     41|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
   70|      0|            break;
   71|    142|    }
   72|      0|    return 0;
   73|    142|}

_ZN11xercesc_3_222UnixHTTPURLInputStreamC2ERKNS_6XMLURLEPKNS_14XMLNetHTTPInfoE:
   96|    101|    : BinHTTPInputStreamCommon(urlSource.getMemoryManager()),
   97|    101|      fSocket(0)
   98|    101|{
   99|       |    //
  100|       |    //  Convert the hostName to the platform's code page for gethostbyname and
  101|       |    //  inet_addr functions.
  102|       |    //
  103|       |
  104|    101|    MemoryManager *memoryManager = urlSource.getMemoryManager();
  105|       |
  106|    101|    const XMLCh*        hostName = urlSource.getHost();
  107|       |
  108|    101|    if (hostName == 0)
  ------------------
  |  Branch (108:9): [True: 0, False: 101]
  ------------------
  109|      0|      ThrowXMLwithMemMgr1(NetAccessorException,
  ------------------
  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
  110|    101|                          XMLExcepts::File_CouldNotOpenFile,
  111|    101|                          urlSource.getURLText(),
  112|    101|                          memoryManager);
  113|       |
  114|    101|    char*               hostNameAsCharStar = XMLString::transcode(hostName, memoryManager);
  115|    101|    ArrayJanitor<char>  janHostNameAsCharStar(hostNameAsCharStar, memoryManager);
  116|       |
  117|    101|    XMLURL url(urlSource);
  118|    101|    int redirectCount = 0;
  119|    101|    SocketJanitor janSock(0);
  120|       |
  121|    101|    do {
  122|       |        //
  123|       |        // Set up a socket.
  124|       |        //
  125|       |
  126|    101|#if HAVE_GETADDRINFO
  127|    101|        struct addrinfo hints, *res, *ai;
  128|       |
  129|    101|        CharBuffer portBuffer(10, memoryManager);
  130|    101|        portBuffer.appendDecimalNumber(url.getPortNum());
  131|       |
  132|    101|        memset(&hints, 0, sizeof(struct addrinfo));
  133|    101|        hints.ai_family = PF_UNSPEC;
  134|    101|        hints.ai_socktype = SOCK_STREAM;
  135|    101|        int n = getaddrinfo(hostNameAsCharStar,portBuffer.getRawBuffer(),&hints, &res);
  136|    101|        if(n != 0)
  ------------------
  |  Branch (136:12): [True: 72, False: 29]
  ------------------
  137|     72|        {
  138|     72|            hints.ai_flags = AI_NUMERICHOST;
  139|     72|            n = getaddrinfo(hostNameAsCharStar,portBuffer.getRawBuffer(),&hints, &res);
  140|     72|            if(n != 0)
  ------------------
  |  Branch (140:16): [True: 72, False: 0]
  ------------------
  141|     72|                ThrowXMLwithMemMgr1(NetAccessorException, XMLExcepts::NetAcc_TargetResolution, hostName, memoryManager);
  ------------------
  |  |  266|     72|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
  142|     72|        }
  143|     29|        janSock.reset();
  144|     29|        for (ai = res; ai != NULL; ai = ai->ai_next) {
  ------------------
  |  Branch (144:24): [True: 26, False: 3]
  ------------------
  145|       |            // Open a socket with the correct address family for this address.
  146|     26|            fSocket = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
  147|     26|            if (fSocket < 0)
  ------------------
  |  Branch (147:17): [True: 0, False: 26]
  ------------------
  148|      0|                continue;
  149|     26|            janSock.reset(&fSocket);
  150|     26|            if (connect(fSocket, ai->ai_addr, ai->ai_addrlen) < 0)
  ------------------
  |  Branch (150:17): [True: 26, False: 0]
  ------------------
  151|     26|            {
  152|     26|                freeaddrinfo(res);
  153|     26|                ThrowXMLwithMemMgr1(NetAccessorException,
  ------------------
  |  |  266|     26|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
  154|     26|                         XMLExcepts::NetAcc_ConnSocket, url.getURLText(), memoryManager);
  155|     26|            }
  156|      0|            break;
  157|     26|        }
  158|      3|        freeaddrinfo(res);
  159|      3|        if (fSocket < 0)
  ------------------
  |  Branch (159:13): [True: 0, False: 3]
  ------------------
  160|      0|        {
  161|      0|            ThrowXMLwithMemMgr1(NetAccessorException,
  ------------------
  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
  162|      0|                     XMLExcepts::NetAcc_CreateSocket, url.getURLText(), memoryManager);
  163|      0|        }
  164|       |#else
  165|       |        struct hostent *hostEntPtr = 0;
  166|       |        struct sockaddr_in sa;
  167|       |
  168|       |        // Use the hostName in the local code page ....
  169|       |        if((hostEntPtr = gethostbyname(hostNameAsCharStar)) == NULL)
  170|       |        {
  171|       |            unsigned long  numAddress = inet_addr(hostNameAsCharStar);
  172|       |            if ((hostEntPtr =
  173|       |                    gethostbyaddr((char *) &numAddress,
  174|       |                        sizeof(unsigned long), AF_INET)) == NULL)
  175|       |            {
  176|       |                ThrowXMLwithMemMgr1(NetAccessorException,
  177|       |                    XMLExcepts::NetAcc_TargetResolution, hostName, memoryManager);
  178|       |            }
  179|       |        }
  180|       |
  181|       |        memset(&sa, '\0', sizeof(sockaddr_in));  // iSeries fix ??
  182|       |        memcpy((void *) &sa.sin_addr,
  183|       |            (const void *) hostEntPtr->h_addr, hostEntPtr->h_length);
  184|       |        sa.sin_family = hostEntPtr->h_addrtype;
  185|       |        sa.sin_port = htons((unsigned short)url.getPortNum());
  186|       |
  187|       |        janSock.reset();
  188|       |        fSocket = socket(hostEntPtr->h_addrtype, SOCK_STREAM, 0);
  189|       |        if(fSocket < 0)
  190|       |        {
  191|       |            ThrowXMLwithMemMgr1(NetAccessorException,
  192|       |                XMLExcepts::NetAcc_CreateSocket, url.getURLText(), memoryManager);
  193|       |        }
  194|       |        janSock.reset(&fSocket);
  195|       |
  196|       |        if(connect(fSocket, (struct sockaddr *) &sa, sizeof(sa)) < 0)
  197|       |        {
  198|       |            ThrowXMLwithMemMgr1(NetAccessorException,
  199|       |                XMLExcepts::NetAcc_ConnSocket, url.getURLText(), memoryManager);
  200|       |        }
  201|       |#endif
  202|       |
  203|      3|        int status = sendRequest(url, httpInfo);
  204|       |
  205|      3|        if(status == 200) {
  ------------------
  |  Branch (205:12): [True: 0, False: 3]
  ------------------
  206|       |            // HTTP 200 OK response means we're done.
  207|      0|            break;
  208|      0|        }
  209|       |        // a 3xx response means there was an HTTP redirect
  210|      3|        else if(status >= 300 && status <= 307) {
  ------------------
  |  Branch (210:17): [True: 0, False: 3]
  |  Branch (210:34): [True: 0, False: 0]
  ------------------
  211|      0|            redirectCount++;
  212|       |
  213|      0|            XMLCh *newURLString = findHeader("Location");
  214|      0|            ArrayJanitor<XMLCh> janNewURLString(newURLString, memoryManager);
  215|       |
  216|      0|            if(newURLString == 0 || *newURLString == 0) {
  ------------------
  |  Branch (216:16): [True: 0, False: 0]
  |  Branch (216:37): [True: 0, False: 0]
  ------------------
  217|      0|                ThrowXMLwithMemMgr1(NetAccessorException, XMLExcepts::File_CouldNotOpenFile, url.getURLText(), memoryManager);
  ------------------
  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
  218|      0|            }
  219|       |
  220|      0|            XMLURL newURL(memoryManager);
  221|      0|            newURL.setURL(url, newURLString);
  222|      0|            if(newURL.getProtocol() != XMLURL::HTTP) {
  ------------------
  |  Branch (222:16): [True: 0, False: 0]
  ------------------
  223|      0|                ThrowXMLwithMemMgr1(NetAccessorException, XMLExcepts::File_CouldNotOpenFile, newURL.getURLText(), memoryManager);
  ------------------
  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
  224|      0|            }
  225|       |
  226|      0|            url = newURL;
  227|      0|            hostName = newURL.getHost();
  228|       |
  229|      0|            if (hostName == 0)
  ------------------
  |  Branch (229:17): [True: 0, False: 0]
  ------------------
  230|      0|              ThrowXMLwithMemMgr1(NetAccessorException,
  ------------------
  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
  231|      0|                                  XMLExcepts::File_CouldNotOpenFile,
  232|      0|                                  newURL.getURLText(),
  233|      0|                                  memoryManager);
  234|       |
  235|      0|            janHostNameAsCharStar.release();
  236|      0|            hostNameAsCharStar = XMLString::transcode(hostName, memoryManager);
  237|      0|            janHostNameAsCharStar.reset(hostNameAsCharStar, memoryManager);
  238|      0|        }
  239|      3|        else {
  240|       |            // Most likely a 404 Not Found error.
  241|      3|            ThrowXMLwithMemMgr1(NetAccessorException, XMLExcepts::File_CouldNotOpenFile, url.getURLText(), memoryManager);
  ------------------
  |  |  266|      3|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
  242|      3|        }
  243|      3|    } while(redirectCount < 6);
  ------------------
  |  Branch (243:13): [True: 0, False: 0]
  ------------------
  244|       |
  245|      0|    janSock.release();
  246|      0|}
_ZN11xercesc_3_213SocketJanitorC2EPi:
   61|     98|    SocketJanitor(int* toDelete) : fData(toDelete) {}
_ZN11xercesc_3_213SocketJanitor5resetEPi:
   68|    150|    {
   69|    150|        if(fData) {
  ------------------
  |  Branch (69:12): [True: 26, False: 124]
  ------------------
   70|     26|            shutdown(*fData, 2);
   71|     26|            close(*fData);
   72|     26|        }
   73|    150|        fData = p;
   74|    150|    }
_ZN11xercesc_3_213SocketJanitorD2Ev:
   62|     98|    ~SocketJanitor() { reset(); }

_ZN11xercesc_3_212PanicHandlerC2Ev:
   70|      1|    PanicHandler(){};

_ZN11xercesc_3_216XMLPlatformUtils10InitializeEPKcS2_PNS_12PanicHandlerEPNS_13MemoryManagerE:
  166|      1|{
  167|       |    //
  168|       |    //  Effects of overflow:
  169|       |    //  . resouce re-allocations
  170|       |    //  . consequently resource leaks
  171|       |    //  . potentially terminate() may never get executed
  172|       |    //
  173|       |    //  We got to prevent overflow from happening.
  174|       |    //  no error or exception
  175|       |    //
  176|      1|    if (gInitFlag == LONG_MAX)
  ------------------
  |  Branch (176:9): [True: 0, False: 1]
  ------------------
  177|      0|        return;
  178|       |
  179|       |    //
  180|       |    //  Make sure we haven't already been initialized. Note that this is not
  181|       |    //  thread safe and is not intended for that. Its more for those COM
  182|       |    //  like processes that cannot keep up with whether they have initialized
  183|       |    //  us yet or not.
  184|       |    //
  185|      1|    gInitFlag++;
  186|       |
  187|      1|    if (gInitFlag > 1)
  ------------------
  |  Branch (187:9): [True: 0, False: 1]
  ------------------
  188|      0|      return;
  189|       |
  190|       |    // Set pluggable memory manager
  191|      1|    if (!fgMemoryManager)
  ------------------
  |  Branch (191:9): [True: 1, False: 0]
  ------------------
  192|      1|    {
  193|      1|        if (memoryManager)
  ------------------
  |  Branch (193:13): [True: 0, False: 1]
  ------------------
  194|      0|        {
  195|      0|            fgMemoryManager = memoryManager;
  196|      0|            fgMemMgrAdopted = false;
  197|      0|        }
  198|      1|        else
  199|      1|        {
  200|      1|            fgMemoryManager = new MemoryManagerImpl();
  201|      1|        }
  202|      1|    }
  203|       |
  204|       |    /***
  205|       |     * Panic Handler:
  206|       |     *
  207|       |     ***/
  208|      1|    if (!panicHandler)
  ------------------
  |  Branch (208:9): [True: 1, False: 0]
  ------------------
  209|      1|    {
  210|      1|        fgDefaultPanicHandler = new DefaultPanicHandler();
  211|      1|    }
  212|      0|    else
  213|      0|    {
  214|      0|        fgUserPanicHandler = panicHandler;
  215|      0|    }
  216|       |
  217|       |
  218|       |    // Determine our endianness (with regard to a XMLCh 16-bit word)
  219|      1|    union {
  220|      1|    	XMLCh ch;
  221|      1|    	unsigned char ar[sizeof(XMLCh)];
  222|      1|    } endianTest;
  223|      1|    endianTest.ch = 1;
  224|      1|    fgXMLChBigEndian = (endianTest.ar[sizeof(XMLCh)-1] == 1);
  225|       |
  226|       |    // Determine if we can use SSE2 functions
  227|       |#if defined(XERCES_HAVE_CPUID_INTRINSIC)
  228|       |    int CPUInfo[4]={0};
  229|       |    __cpuid(CPUInfo, 1);
  230|       |    if(CPUInfo[3] & (1UL << 26))
  231|       |        fgSSE2ok = true;
  232|       |    else
  233|       |        fgSSE2ok = false;
  234|       |#elif defined(XERCES_HAVE_GETCPUID)
  235|       |    unsigned int eax, ebx, ecx, edx;
  236|      1|    if(!__get_cpuid (1, &eax, &ebx, &ecx, &edx) || (edx & (1UL << 26))==0)
  ------------------
  |  Branch (236:8): [True: 0, False: 1]
  |  Branch (236:52): [True: 0, False: 1]
  ------------------
  237|      0|        fgSSE2ok = false;
  238|      1|    else
  239|      1|        fgSSE2ok = true;
  240|       |#elif defined(XERCES_HAVE_SSE2_INTRINSIC)
  241|       |    // if we cannot find out at runtime, assume the define has it right
  242|       |    fgSSE2ok = true;
  243|       |#else
  244|       |    fgSSE2ok = false;
  245|       |#endif
  246|       |
  247|       |    // Initialize the platform-specific mutex and file mgrs
  248|      1|    fgMutexMgr		= makeMutexMgr(fgMemoryManager);
  249|      1|    fgFileMgr		= makeFileMgr(fgMemoryManager);
  250|       |
  251|       |
  252|       |    // Create the local sync mutex
  253|      1|    gSyncMutex = new XMLMutex(fgMemoryManager);
  254|       |
  255|       |    // Create the global "atomic operations" mutex.
  256|      1|    fgAtomicMutex = new XMLMutex(fgMemoryManager);
  257|       |
  258|       |    //
  259|       |    //  Ask the per-platform code to make the desired transcoding service for
  260|       |    //  us to use. This call cannot throw any exceptions or do anything that
  261|       |    //  cause any transcoding to happen. It should create the service and
  262|       |    //  return it or zero if it cannot.
  263|       |    //
  264|       |    //  This one also cannot use any utility services. It can only create a
  265|       |    //  transcoding service object and return it.
  266|       |    //
  267|       |    //  If we cannot make one, then we call panic to end the process.
  268|       |    //
  269|      1|    XMLInitializer::initializeTransService(); // TransService static data.
  270|       |
  271|      1|    fgTransService = makeTransService();
  272|       |
  273|      1|    if (!fgTransService)
  ------------------
  |  Branch (273:9): [True: 0, False: 1]
  ------------------
  274|      0|        panic(PanicHandler::Panic_NoTransService);
  275|       |
  276|       |    // Initialize the transcoder service
  277|      1|    fgTransService->initTransService();
  278|       |
  279|       |    //
  280|       |    //  Try to create a default local code page transcoder. This is the one
  281|       |    //  that will be used internally by the XMLString class. If we cannot
  282|       |    //  create one, then call the panic method.
  283|       |    //
  284|      1|    XMLLCPTranscoder* defXCode = XMLPlatformUtils::fgTransService->makeNewLCPTranscoder(fgMemoryManager);
  285|      1|    if (!defXCode)
  ------------------
  |  Branch (285:9): [True: 0, False: 1]
  ------------------
  286|      0|        panic(PanicHandler::Panic_NoDefTranscoder);
  287|      1|    XMLString::initString(defXCode, fgMemoryManager);
  288|       |
  289|       |    //
  290|       |    //  Now lets ask the per-platform code to give us an instance of the type
  291|       |    //  of network access implementation he wants to use. This can return
  292|       |    //  a zero pointer if this platform doesn't want to support this.
  293|       |    //
  294|      1|    fgNetAccessor = makeNetAccessor();
  295|       |
  296|       |    /***
  297|       |     * Message Loader:
  298|       |     *
  299|       |     *     Locale setting
  300|       |     *     nlsHome setting
  301|       |     ***/
  302|      1|    XMLMsgLoader::setLocale(locale);
  303|      1|    XMLMsgLoader::setNLSHome(nlsHome);
  304|       |
  305|       |    // Initialize static data.
  306|       |    //
  307|      1|    XMLInitializer::initializeStaticData();
  308|      1|}
_ZN11xercesc_3_216XMLPlatformUtils15makeNetAccessorEv:
  416|      1|{
  417|      1|	XMLNetAccessor* na = 0;
  418|       |
  419|       |#if defined (XERCES_USE_NETACCESSOR_CURL)
  420|       |		na = new CurlNetAccessor();
  421|       |#elif defined (XERCES_USE_NETACCESSOR_SOCKET)
  422|       |		na = new SocketNetAccessor();
  423|       |#elif defined (XERCES_USE_NETACCESSOR_CFURL)
  424|       |		na = new MacOSURLAccessCF();
  425|       |#elif defined (XERCES_USE_NETACCESSOR_WINSOCK)
  426|       |		na = new WinSockNetAccessor();
  427|       |#endif
  428|       |
  429|      1|	return na;
  430|      1|}
_ZN11xercesc_3_216XMLPlatformUtils11loadAMsgSetEPKDs:
  439|      8|{
  440|      8|    XMLMsgLoader* ms=0;
  441|       |
  442|      8|    try
  443|      8|    {
  444|       |	#if defined (XERCES_USE_MSGLOADER_ICU)
  445|       |		ms = new ICUMsgLoader(msgDomain);
  446|       |	#elif defined (XERCES_USE_MSGLOADER_ICONV)
  447|       |		ms = new MsgCatalogLoader(msgDomain);
  448|       |	#elif defined (XERCES_USE_MSGLOADER_INMEMORY)
  449|       |		ms = new InMemMsgLoader(msgDomain);
  450|       |	#else
  451|       |		#error No MsgLoader configured for platform! You must configure it.
  452|       |	#endif
  453|      8|    }
  454|      8|    catch(const OutOfMemoryException&)
  455|      8|    {
  456|      0|        throw;
  457|      0|    }
  458|      8|    catch(...)
  459|      8|    {
  460|      0|        panic(PanicHandler::Panic_CantLoadMsgDomain);
  461|      0|    }
  462|       |
  463|      8|    return ms;
  464|      8|}
_ZN11xercesc_3_216XMLPlatformUtils16makeTransServiceEv:
  475|      1|{
  476|      1|	XMLTransService* tc = 0;
  477|       |
  478|       |	#if defined   (XERCES_USE_TRANSCODER_ICU)
  479|       |		tc = new ICUTransService(fgMemoryManager);
  480|       |	#elif defined (XERCES_USE_TRANSCODER_GNUICONV)
  481|       |		tc = new IconvGNUTransService(fgMemoryManager);
  482|       |	#elif defined (XERCES_USE_TRANSCODER_ICONV)
  483|       |		tc = new IconvTransService(fgMemoryManager);
  484|       |	#elif defined (XERCES_USE_TRANSCODER_MACOSUNICODECONVERTER)
  485|       |		tc = new MacOSUnicodeConverter(fgMemoryManager);
  486|       |	#elif defined (XERCES_USE_TRANSCODER_WINDOWS)
  487|       |		tc = new Win32TransService(fgMemoryManager);
  488|       |	#else
  489|       |		#error No Transcoder configured for platform! You must configure it.
  490|       |	#endif
  491|       |
  492|      1|	return tc;
  493|      1|}
_ZN11xercesc_3_216XMLPlatformUtils11makeFileMgrEPNS_13MemoryManagerE:
  501|      1|{
  502|      1|	XMLFileMgr* mgr = NULL;
  503|       |
  504|      1|	#if XERCES_USE_FILEMGR_POSIX
  505|      1|		mgr = new (memmgr) PosixFileMgr;
  506|       |	#elif XERCES_USE_FILEMGR_WINDOWS
  507|       |		mgr = new (memmgr) WindowsFileMgr;
  508|       |	#else
  509|       |		#error No File Manager configured for platform! You must configure it.
  510|       |	#endif
  511|       |
  512|      1|	return mgr;
  513|      1|}
_ZN11xercesc_3_216XMLPlatformUtils8openFileEPKDsPNS_13MemoryManagerE:
  529|    373|{
  530|    373|    if (!fgFileMgr)
  ------------------
  |  Branch (530:9): [True: 0, False: 373]
  ------------------
  531|      0|		ThrowXMLwithMemMgr(XMLPlatformUtilsException, XMLExcepts::CPtr_PointerIsZero, memmgr);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  532|       |
  533|    373|	return fgFileMgr->fileOpen(fileName, false, memmgr);
  534|    373|}
_ZN11xercesc_3_216XMLPlatformUtils9closeFileEPvPNS_13MemoryManagerE:
  572|     17|{
  573|     17|    if (!fgFileMgr)
  ------------------
  |  Branch (573:9): [True: 0, False: 17]
  ------------------
  574|      0|		ThrowXMLwithMemMgr(XMLPlatformUtilsException, XMLExcepts::CPtr_PointerIsZero, memmgr);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  575|       |
  576|     17|	fgFileMgr->fileClose(theFile, memmgr);
  577|     17|}
_ZN11xercesc_3_216XMLPlatformUtils14readFileBufferEPvmPhPNS_13MemoryManagerE:
  616|     17|{
  617|     17|    if (!fgFileMgr)
  ------------------
  |  Branch (617:9): [True: 0, False: 17]
  ------------------
  618|      0|		ThrowXMLwithMemMgr(XMLPlatformUtilsException, XMLExcepts::CPtr_PointerIsZero, memmgr);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  619|       |
  620|     17|    return fgFileMgr->fileRead(theFile, toRead, toFill, memmgr);
  621|     17|}
_ZN11xercesc_3_216XMLPlatformUtils10isRelativeEPKDsPNS_13MemoryManagerE:
  661|    318|{
  662|    318|    if (!fgFileMgr)
  ------------------
  |  Branch (662:9): [True: 0, False: 318]
  ------------------
  663|      0|		ThrowXMLwithMemMgr(XMLPlatformUtilsException, XMLExcepts::CPtr_PointerIsZero, memmgr);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  664|       |
  665|    318|    return fgFileMgr->isRelative(toCheck, memmgr);
  666|    318|}
_ZN11xercesc_3_216XMLPlatformUtils12makeMutexMgrEPNS_13MemoryManagerE:
  722|      1|{
  723|      1|	XMLMutexMgr* mgr = NULL;
  724|       |
  725|       |	#if XERCES_USE_MUTEXMGR_NOTHREAD
  726|       |		mgr = new (memmgr) NoThreadMutexMgr;
  727|       |	#elif XERCES_USE_MUTEXMGR_STD
  728|       |		mgr = new (memmgr) StdMutexMgr;
  729|       |	#elif XERCES_USE_MUTEXMGR_POSIX
  730|       |		mgr = new (memmgr) PosixMutexMgr;
  731|       |	#elif XERCES_USE_MUTEXMGR_WINDOWS
  732|       |		mgr = new (memmgr) WindowsMutexMgr;
  733|       |	#else
  734|       |		#error No Mutex Manager configured for platform! You must configure it.
  735|       |	#endif
  736|       |
  737|      1|	return mgr;
  738|      1|}
_ZN11xercesc_3_216XMLPlatformUtils9makeMutexEPNS_13MemoryManagerE:
  742|     89|{
  743|     89|    if (!fgMutexMgr)
  ------------------
  |  Branch (743:9): [True: 0, False: 89]
  ------------------
  744|      0|		XMLPlatformUtils::panic(PanicHandler::Panic_MutexErr);
  745|       |
  746|     89|	return fgMutexMgr->create(memmgr);
  747|     89|}
_ZN11xercesc_3_216XMLPlatformUtils10closeMutexEPvPNS_13MemoryManagerE:
  751|     81|{
  752|     81|    if (!fgMutexMgr)
  ------------------
  |  Branch (752:9): [True: 0, False: 81]
  ------------------
  753|      0|		XMLPlatformUtils::panic(PanicHandler::Panic_MutexErr);
  754|       |
  755|     81|	fgMutexMgr->destroy(mtx, memmgr);
  756|     81|}
_ZN11xercesc_3_216XMLPlatformUtils9lockMutexEPv:
  760|  23.5k|{
  761|  23.5k|    if (!fgMutexMgr)
  ------------------
  |  Branch (761:9): [True: 0, False: 23.5k]
  ------------------
  762|      0|		XMLPlatformUtils::panic(PanicHandler::Panic_MutexErr);
  763|       |
  764|  23.5k|	fgMutexMgr->lock(mtx);
  765|  23.5k|}
_ZN11xercesc_3_216XMLPlatformUtils11unlockMutexEPv:
  769|  23.5k|{
  770|  23.5k|    if (!fgMutexMgr)
  ------------------
  |  Branch (770:9): [True: 0, False: 23.5k]
  ------------------
  771|      0|		XMLPlatformUtils::panic(PanicHandler::Panic_MutexErr);
  772|       |
  773|  23.5k|	fgMutexMgr->unlock(mtx);
  774|  23.5k|}
_ZN11xercesc_3_216XMLPlatformUtils10loadMsgSetEPKDs:
  780|      8|{
  781|       |    //
  782|       |    //  Ask the platform support to load up the correct type of message
  783|       |    //  loader for the indicated message set. We don't check here whether it
  784|       |    //  works or not. That's their decision.
  785|       |    //
  786|      8|    return loadAMsgSet(msgDomain);
  787|      8|}
_ZN11xercesc_3_216XMLPlatformUtils10weavePathsEPKDsS2_PNS_13MemoryManagerE:
  881|    169|{
  882|       |    // Create a buffer as large as both parts and empty it
  883|    169|    XMLCh* tmpBuf = (XMLCh*) manager->allocate
  884|    169|    (
  885|    169|        (XMLString::stringLen(basePath)
  886|    169|         + XMLString::stringLen(relativePath) + 2) * sizeof(XMLCh)
  887|    169|    );//new XMLCh[XMLString::stringLen(basePath) + XMLString::stringLen(relativePath) + 2];
  888|    169|    *tmpBuf = 0;
  889|       |
  890|       |    //
  891|       |    //  If we have no base path, then just take the relative path as is.
  892|       |    //
  893|    169|    if ((!basePath) || (!*basePath))
  ------------------
  |  Branch (893:9): [True: 0, False: 169]
  |  Branch (893:24): [True: 0, False: 169]
  ------------------
  894|      0|    {
  895|      0|        XMLString::copyString(tmpBuf, relativePath);
  896|      0|        return tmpBuf;
  897|      0|    }
  898|       |
  899|       |    //
  900|       |    // Remove anything after the last slash
  901|       |    //
  902|    169|    const XMLCh* basePtr = basePath + (XMLString::stringLen(basePath) - 1);
  903|  1.52k|    while ((basePtr >= basePath)  &&  ((isAnySlash(*basePtr) == false)))
  ------------------
  |  Branch (903:12): [True: 1.35k, False: 169]
  |  Branch (903:39): [True: 1.35k, False: 0]
  ------------------
  904|  1.35k|    {
  905|  1.35k|        basePtr--;
  906|  1.35k|    }
  907|       |
  908|       |    // There is no relevant base path, so just take the relative part
  909|    169|    if (basePtr < basePath)
  ------------------
  |  Branch (909:9): [True: 169, False: 0]
  ------------------
  910|    169|    {
  911|    169|        XMLString::copyString(tmpBuf, relativePath);
  912|    169|        return tmpBuf;
  913|    169|    }
  914|       |
  915|       |    //
  916|       |    // 1. concatenate the base and relative
  917|       |    // 2. remove all occurences of "/./"
  918|       |    // 3. remove all occurences of segment/../ where segment is not ../
  919|       |	//
  920|       |
  921|      0|    XMLString::subString(tmpBuf, basePath, 0, (basePtr - basePath + 1), manager);
  922|      0|    tmpBuf[basePtr - basePath + 1] = 0;
  923|      0|    if (relativePath)
  ------------------
  |  Branch (923:9): [True: 0, False: 0]
  ------------------
  924|      0|    {
  925|      0|        XMLString::catString(tmpBuf, relativePath);
  926|      0|    }
  927|       |
  928|      0|    removeDotSlash(tmpBuf, manager);
  929|       |
  930|      0|    removeDotDotSlash(tmpBuf, manager);
  931|       |
  932|      0|    return tmpBuf;
  933|       |
  934|    169|}
_ZN11xercesc_3_216XMLPlatformUtils14removeDotSlashEPDsPNS_13MemoryManagerE:
  945|    149|{
  946|    149|    if ((!path) || (!*path))
  ------------------
  |  Branch (946:9): [True: 0, False: 149]
  |  Branch (946:20): [True: 3, False: 146]
  ------------------
  947|      3|        return;
  948|       |
  949|    146|    XMLCh* srcPtr = XMLString::replicate(path, manager);
  950|    146|    XMLSize_t srcLen = XMLString::stringLen(srcPtr);
  951|    146|    ArrayJanitor<XMLCh>   janName(srcPtr, manager);
  952|    146|    XMLCh* tarPtr = path;
  953|       |
  954|  10.2M|    while (*srcPtr)
  ------------------
  |  Branch (954:12): [True: 10.2M, False: 146]
  ------------------
  955|  10.2M|    {
  956|  10.2M|        if ( 3 <= srcLen )
  ------------------
  |  Branch (956:14): [True: 10.2M, False: 146]
  ------------------
  957|  10.2M|        {
  958|  10.2M|            if ( (isAnySlash(*srcPtr))     &&
  ------------------
  |  Branch (958:18): [True: 5.15k, False: 10.2M]
  ------------------
  959|  10.2M|                (chPeriod == *(srcPtr+1)) &&
  ------------------
  |  Branch (959:17): [True: 1.64k, False: 3.51k]
  ------------------
  960|  10.2M|                (isAnySlash(*(srcPtr+2)))  )
  ------------------
  |  Branch (960:17): [True: 1.08k, False: 560]
  ------------------
  961|  1.08k|            {
  962|       |                // "\.\x" seen
  963|       |                // skip the first two, and start from the 3rd,
  964|       |                // since "\x" could be another "\."
  965|  1.08k|                srcPtr+=2;
  966|  1.08k|                srcLen-=2;
  967|  1.08k|            }
  968|  10.2M|            else
  969|  10.2M|            {
  970|  10.2M|                *tarPtr++ = *srcPtr++;  // eat the current char
  971|  10.2M|                srcLen--;
  972|  10.2M|            }
  973|  10.2M|        }
  974|    146|        else if ( 1 == srcLen )
  ------------------
  |  Branch (974:19): [True: 2, False: 144]
  ------------------
  975|      2|        {
  976|      2|            *tarPtr++ = *srcPtr++;
  977|      2|        }
  978|    144|        else if ( 2 == srcLen)
  ------------------
  |  Branch (978:19): [True: 144, False: 0]
  ------------------
  979|    144|        {
  980|    144|            *tarPtr++ = *srcPtr++;
  981|    144|            *tarPtr++ = *srcPtr++;
  982|    144|        }
  983|       |
  984|  10.2M|    }
  985|       |
  986|    146|    *tarPtr = 0;
  987|       |
  988|    146|    return;
  989|    149|}
_ZN11xercesc_3_216XMLPlatformUtils10isAnySlashEDs:
  671|  10.2M|{
  672|       |	// As far as we know, all supported Xerces
  673|       |	// platforms use at least a forward slash
  674|       |	// as a path delimiter. So we always check for
  675|       |	// that.
  676|       |	//
  677|       |	// If XERCES_PATH_DELIMITER_BACKSLASH evaluates to true,
  678|       |	// we also consider that as a slash.
  679|       |	//
  680|       |	// XERCES_PATH_DELIMITER_BACKSLASH may be set in config.h
  681|       |	// by configure, or elsewhere by platform-specific
  682|       |	// code.
  683|  10.2M|    return	(
  684|  10.2M|			false
  ------------------
  |  Branch (684:4): [Folded - Ignored]
  ------------------
  685|  10.2M|		 || chForwardSlash == c
  ------------------
  |  Branch (685:7): [True: 6.24k, False: 10.2M]
  ------------------
  686|       |	#if XERCES_PATH_DELIMITER_BACKSLASH
  687|       |		 || chBackSlash == c
  688|       |	#endif
  689|  10.2M|     		);
  690|  10.2M|}

_ZN11xercesc_3_216XMLPlatformUtils33alignPointerForNewBlockAllocationEm:
  801|  97.5M|{
  802|       |    //    Macro XML_PLATFORM_NEW_BLOCK_ALIGNMENT may be defined
  803|       |    //    as needed to dictate alignment requirements on a
  804|       |    //    per-architecture basis. In the absense of that we
  805|       |    //    take an educated guess.
  806|       |#ifdef XML_PLATFORM_NEW_BLOCK_ALIGNMENT
  807|       |    const XMLSize_t alignment = XML_PLATFORM_NEW_BLOCK_ALIGNMENT;
  808|       |#else
  809|  97.5M|    const XMLSize_t alignment = (sizeof(void*) >= sizeof(double)) ? sizeof(void*) : sizeof(double);
  ------------------
  |  Branch (809:33): [Folded - Ignored]
  ------------------
  810|  97.5M|#endif
  811|       |
  812|       |    //    Calculate current alignment of pointer
  813|  97.5M|    XMLSize_t current = ptrSize % alignment;
  814|       |
  815|       |    //    Adjust pointer alignment as needed
  816|  97.5M|    return (current == 0)
  ------------------
  |  Branch (816:12): [True: 97.5M, False: 0]
  ------------------
  817|  97.5M|         ? ptrSize
  818|  97.5M|         : (ptrSize + alignment - current);
  819|  97.5M|}

_ZN11xercesc_3_25QNameC2EPNS_13MemoryManagerE:
   32|  1.74M|:fPrefixBufSz(0)
   33|  1.74M|,fLocalPartBufSz(0)
   34|  1.74M|,fRawNameBufSz(0)
   35|  1.74M|,fURIId(0)
   36|  1.74M|,fPrefix(0)
   37|  1.74M|,fLocalPart(0)
   38|  1.74M|,fRawName(0)
   39|  1.74M|,fMemoryManager(manager)
   40|  1.74M|{
   41|  1.74M|}
_ZN11xercesc_3_25QNameC2EPKDsS2_jPNS_13MemoryManagerE:
   49|  5.30k|:fPrefixBufSz(0)
   50|  5.30k|,fLocalPartBufSz(0)
   51|  5.30k|,fRawNameBufSz(0)
   52|  5.30k|,fURIId(0)
   53|  5.30k|,fPrefix(0)
   54|  5.30k|,fLocalPart(0)
   55|  5.30k|,fRawName(0)
   56|  5.30k|,fMemoryManager(manager)
   57|  5.30k|{
   58|  5.30k|    CleanupType cleanup(this, &QName::cleanUp);
   59|       |
   60|  5.30k|    try
   61|  5.30k|    {
   62|       |        //
   63|       |        //  Just call the local setters to set up everything. Too much
   64|       |        //  work is required to replicate that functionality here.
   65|       |        //
   66|  5.30k|        setName(prefix, localPart, uriId);
   67|  5.30k|    }
   68|  5.30k|    catch(const OutOfMemoryException&)
   69|  5.30k|    {
   70|      0|        cleanup.release();
   71|       |
   72|      0|        throw;
   73|      0|    }
   74|       |
   75|  5.30k|    cleanup.release();
   76|  5.30k|}
_ZN11xercesc_3_25QNameC2EPKDsjPNS_13MemoryManagerE:
   81|  37.1k|:fPrefixBufSz(0)
   82|  37.1k|,fLocalPartBufSz(0)
   83|  37.1k|,fRawNameBufSz(0)
   84|  37.1k|,fURIId(0)
   85|  37.1k|,fPrefix(0)
   86|  37.1k|,fLocalPart(0)
   87|  37.1k|,fRawName(0)
   88|  37.1k|,fMemoryManager(manager)
   89|  37.1k|{
   90|  37.1k|    CleanupType cleanup(this, &QName::cleanUp);
   91|       |
   92|  37.1k|    try
   93|  37.1k|    {
   94|       |        //
   95|       |        //  Just call the local setters to set up everything. Too much
   96|       |        //  work is required to replicate that functionality here.
   97|       |        //
   98|  37.1k|        setName(rawName, uriId);
   99|  37.1k|    }
  100|  37.1k|    catch(const OutOfMemoryException&)
  101|  37.1k|    {
  102|      0|        cleanup.release();
  103|       |
  104|      0|        throw;
  105|      0|    }
  106|       |
  107|  37.1k|    cleanup.release();
  108|  37.1k|}
_ZN11xercesc_3_25QNameD2Ev:
  111|  6.06M|{
  112|  6.06M|	cleanUp();
  113|  6.06M|}
_ZN11xercesc_3_25QNameC2ERKS0_:
  119|  4.27M|:XSerializable(qname)
  120|  4.27M|,XMemory(qname)
  121|  4.27M|,fPrefixBufSz(0)
  122|  4.27M|,fLocalPartBufSz(0)
  123|  4.27M|,fRawNameBufSz(0)
  124|  4.27M|,fURIId(0)
  125|  4.27M|,fPrefix(0)
  126|  4.27M|,fLocalPart(0)
  127|  4.27M|,fRawName(0)
  128|  4.27M|,fMemoryManager(qname.fMemoryManager)
  129|  4.27M|{
  130|  4.27M|    XMLSize_t newLen;
  131|       |
  132|  4.27M|    newLen = XMLString::stringLen(qname.getLocalPart());
  133|  4.27M|    fLocalPartBufSz = newLen + 8;
  134|  4.27M|    fLocalPart = (XMLCh*) fMemoryManager->allocate
  135|  4.27M|    (
  136|  4.27M|        (fLocalPartBufSz + 1) * sizeof(XMLCh)
  137|  4.27M|    ); //new XMLCh[fLocalPartBufSz + 1];
  138|  4.27M|    XMLString::moveChars(fLocalPart, qname.getLocalPart(), newLen + 1);
  139|       |
  140|  4.27M|    newLen = XMLString::stringLen(qname.getPrefix());
  141|  4.27M|    fPrefixBufSz = newLen + 8;
  142|  4.27M|    fPrefix = (XMLCh*) fMemoryManager->allocate
  143|  4.27M|    (
  144|  4.27M|        (fPrefixBufSz + 1) * sizeof(XMLCh)
  145|  4.27M|    ); //new XMLCh[fPrefixBufSz + 1];
  146|  4.27M|    XMLString::moveChars(fPrefix, qname.getPrefix(), newLen + 1);
  147|       |
  148|  4.27M|    fURIId = qname.getURI();
  149|  4.27M|}
_ZNK11xercesc_3_25QName10getRawNameEv:
  155|  95.8M|{
  156|       |    //
  157|       |    //  If there is no buffer, or if there is but we've not faulted in the
  158|       |    //  value yet, then we have to do that now.
  159|       |    //
  160|  95.8M|    if (!fRawName || !*fRawName)
  ------------------
  |  Branch (160:9): [True: 94.9M, False: 934k]
  |  Branch (160:22): [True: 0, False: 934k]
  ------------------
  161|  94.9M|    {
  162|       |        //
  163|       |        //  If we have a prefix, then do the prefix:name version. Else, its
  164|       |        //  just the name.
  165|       |        //
  166|  94.9M|        if (*fPrefix)
  ------------------
  |  Branch (166:13): [True: 7.35k, False: 94.8M]
  ------------------
  167|  7.35k|        {
  168|       |            //
  169|       |            //  Calculate the worst case size buffer we will need. We use the
  170|       |            //  current high water marks of the prefix and name buffers, so it
  171|       |            //  might be a little wasteful of memory but we don't have to do
  172|       |            //  string len operations on the two strings.
  173|       |            //
  174|  7.35k|            const XMLSize_t neededLen = fPrefixBufSz + fLocalPartBufSz + 1;
  175|       |
  176|       |            //
  177|       |            //  If no buffer, or the current one is too small, then allocate one
  178|       |            //  and get rid of any old one.
  179|       |            //
  180|  7.35k|            if (!fRawName || (neededLen > fRawNameBufSz))
  ------------------
  |  Branch (180:17): [True: 7.35k, False: 0]
  |  Branch (180:30): [True: 0, False: 0]
  ------------------
  181|  7.35k|            {
  182|  7.35k|                fMemoryManager->deallocate(fRawName); //delete [] fRawName;
  183|       |
  184|  7.35k|                (const_cast<QName*>(this))->fRawName = 0;
  185|       |                // We have to cast off the const'ness to do this
  186|  7.35k|                (const_cast<QName*>(this))->fRawNameBufSz = neededLen;
  187|  7.35k|                (const_cast<QName*>(this))->fRawName = (XMLCh*) fMemoryManager->allocate
  188|  7.35k|                (
  189|  7.35k|                    (neededLen + 1) * sizeof(XMLCh)
  190|  7.35k|                ); //new XMLCh[neededLen + 1];
  191|       |
  192|       |                // Make sure its initially empty
  193|  7.35k|                *fRawName = 0;
  194|  7.35k|            }
  195|       |
  196|  7.35k|            const XMLSize_t prefixLen = XMLString::stringLen(fPrefix);
  197|       |
  198|  7.35k|            XMLString::moveChars(fRawName, fPrefix, prefixLen);
  199|  7.35k|            fRawName[prefixLen] = chColon;
  200|  7.35k|            XMLString::copyString(&fRawName[prefixLen+1], fLocalPart);
  201|  7.35k|        }
  202|  94.8M|         else
  203|  94.8M|        {
  204|  94.8M|            return fLocalPart;
  205|  94.8M|        }
  206|  94.9M|    }
  207|   941k|    return fRawName;
  208|  95.8M|}
_ZN11xercesc_3_25QName10getRawNameEv:
  211|  18.4M|{
  212|       |    //
  213|       |    //  If there is no buffer, or if there is but we've not faulted in the
  214|       |    //  value yet, then we have to do that now.
  215|       |    //
  216|  18.4M|    if (!fRawName || !*fRawName)
  ------------------
  |  Branch (216:9): [True: 18.2M, False: 139k]
  |  Branch (216:22): [True: 0, False: 139k]
  ------------------
  217|  18.2M|    {
  218|       |        //
  219|       |        //  If we have a prefix, then do the prefix:name version. Else, its
  220|       |        //  just the name.
  221|       |        //
  222|  18.2M|        if (*fPrefix)
  ------------------
  |  Branch (222:13): [True: 31, False: 18.2M]
  ------------------
  223|     31|        {
  224|       |            //
  225|       |            //  Calculate the worst case size buffer we will need. We use the
  226|       |            //  current high water marks of the prefix and name buffers, so it
  227|       |            //  might be a little wasteful of memory but we don't have to do
  228|       |            //  string len operations on the two strings.
  229|       |            //
  230|     31|            const XMLSize_t neededLen = fPrefixBufSz + fLocalPartBufSz + 1;
  231|       |
  232|       |            //
  233|       |            //  If no buffer, or the current one is too small, then allocate one
  234|       |            //  and get rid of any old one.
  235|       |            //
  236|     31|            if (!fRawName || (neededLen > fRawNameBufSz))
  ------------------
  |  Branch (236:17): [True: 31, False: 0]
  |  Branch (236:30): [True: 0, False: 0]
  ------------------
  237|     31|            {
  238|     31|                fMemoryManager->deallocate(fRawName); //delete [] fRawName;
  239|       |                
  240|     31|                fRawName = 0;
  241|       |                // We have to cast off the const'ness to do this
  242|     31|                (const_cast<QName*>(this))->fRawNameBufSz = neededLen;
  243|     31|                (const_cast<QName*>(this))->fRawName = (XMLCh*) fMemoryManager->allocate
  244|     31|                (
  245|     31|                    (neededLen + 1) * sizeof(XMLCh)
  246|     31|                ); //new XMLCh[neededLen + 1];
  247|       |
  248|       |                // Make sure its initially empty
  249|     31|                *fRawName = 0;
  250|     31|            }
  251|       |
  252|       |
  253|     31|            const XMLSize_t prefixLen = XMLString::stringLen(fPrefix);
  254|       |
  255|     31|            XMLString::moveChars(fRawName, fPrefix, prefixLen);
  256|     31|            fRawName[prefixLen] = chColon;
  257|     31|            XMLString::copyString(&fRawName[prefixLen+1], fLocalPart);
  258|     31|        }
  259|  18.2M|         else
  260|  18.2M|        {
  261|  18.2M|            return fLocalPart;
  262|  18.2M|        }
  263|  18.2M|    }
  264|   139k|    return fRawName;
  265|  18.4M|}
_ZN11xercesc_3_25QName7setNameEPKDsS2_j:
  273|  6.74M|{
  274|  6.74M|    setPrefix(prefix);
  275|  6.74M|    setLocalPart(localPart);
  276|       |
  277|       |    // And clean up any QName and leave it undone until/if asked for again
  278|  6.74M|    if (fRawName)
  ------------------
  |  Branch (278:9): [True: 0, False: 6.74M]
  ------------------
  279|      0|        *fRawName = 0;
  280|       |
  281|       |    // And finally store the URI id parameter
  282|  6.74M|    fURIId = uriId;
  283|  6.74M|}
_ZN11xercesc_3_25QName7setNameEPKDsj:
  287|  40.4k|{
  288|       |    //set the rawName
  289|  40.4k|    XMLSize_t newLen = XMLString::stringLen(rawName);
  290|       |    //find out the prefix and localPart from the rawName
  291|  40.4k|    const int colonInd = XMLString::indexOf(rawName, chColon);
  292|       |
  293|  40.4k|    if (colonInd >= 0)
  ------------------
  |  Branch (293:9): [True: 3.90k, False: 36.5k]
  ------------------
  294|  3.90k|    {
  295|  3.90k|        if (!fRawNameBufSz || (newLen > fRawNameBufSz))
  ------------------
  |  Branch (295:13): [True: 2.80k, False: 1.10k]
  |  Branch (295:31): [True: 115, False: 992]
  ------------------
  296|  2.91k|        {
  297|  2.91k|            fMemoryManager->deallocate(fRawName); //delete [] fRawName;
  298|  2.91k|            fRawName = 0;
  299|  2.91k|            fRawNameBufSz = newLen + 8;
  300|  2.91k|            fRawName = (XMLCh*) fMemoryManager->allocate
  301|  2.91k|            (
  302|  2.91k|                (fRawNameBufSz + 1) * sizeof(XMLCh)
  303|  2.91k|            ); //new XMLCh[fRawNameBufSz + 1];
  304|  2.91k|        }
  305|  3.90k|        XMLString::moveChars(fRawName, rawName, newLen + 1);
  306|  3.90k|        setNPrefix(rawName, colonInd);
  307|  3.90k|    }
  308|  36.5k|    else
  309|  36.5k|    {
  310|       |        // No colon, so we just have a name with no prefix
  311|  36.5k|        setNPrefix(XMLUni::fgZeroLenString, 0);
  312|       |
  313|       |        // And clean up any QName and leave it undone until/if asked for again
  314|  36.5k|        if (fRawName)
  ------------------
  |  Branch (314:13): [True: 697, False: 35.8k]
  ------------------
  315|    697|            *fRawName = 0;
  316|  36.5k|    }
  317|       |
  318|  40.4k|    setNLocalPart(&rawName[colonInd+1], newLen-colonInd-1);
  319|       |
  320|       |    // And finally store the URI id parameter
  321|  40.4k|    fURIId = uriId;
  322|  40.4k|}
_ZN11xercesc_3_25QName10setNPrefixEPKDsm:
  325|  6.80M|{
  326|  6.80M|    if (!fPrefixBufSz || (newLen > fPrefixBufSz))
  ------------------
  |  Branch (326:9): [True: 63.7k, False: 6.74M]
  |  Branch (326:26): [True: 104, False: 6.74M]
  ------------------
  327|  63.8k|    {
  328|  63.8k|        fMemoryManager->deallocate(fPrefix); //delete [] fPrefix;
  329|  63.8k|        fPrefix = 0;
  330|  63.8k|        fPrefixBufSz = newLen + 8;
  331|  63.8k|        fPrefix = (XMLCh*) fMemoryManager->allocate
  332|  63.8k|        (
  333|  63.8k|            (fPrefixBufSz + 1) * sizeof(XMLCh)
  334|  63.8k|        ); //new XMLCh[fPrefixBufSz + 1];
  335|  63.8k|    }
  336|  6.80M|    XMLString::moveChars(fPrefix, prefix, newLen);
  337|  6.80M|    fPrefix[newLen] = chNull;
  338|  6.80M|}
_ZN11xercesc_3_25QName13setNLocalPartEPKDsm:
  341|  6.80M|{
  342|  6.80M|    if (!fLocalPartBufSz || (newLen > fLocalPartBufSz))
  ------------------
  |  Branch (342:9): [True: 63.7k, False: 6.74M]
  |  Branch (342:29): [True: 342, False: 6.74M]
  ------------------
  343|  64.1k|    {
  344|  64.1k|        fMemoryManager->deallocate(fLocalPart); //delete [] fLocalPart;
  345|  64.1k|        fLocalPart = 0;
  346|  64.1k|        fLocalPartBufSz = newLen + 8;
  347|  64.1k|        fLocalPart = (XMLCh*) fMemoryManager->allocate
  348|  64.1k|        (
  349|  64.1k|            (fLocalPartBufSz + 1) * sizeof(XMLCh)
  350|  64.1k|        ); //new XMLCh[fLocalPartBufSz + 1];
  351|  64.1k|    }
  352|  6.80M|    XMLString::moveChars(fLocalPart, localPart, newLen);
  353|  6.80M|    fLocalPart[newLen] = chNull;
  354|  6.80M|}
_ZN11xercesc_3_25QName9setValuesERKS0_:
  357|  21.2k|{
  358|  21.2k|    setPrefix(qname.getPrefix());
  359|  21.2k|    setLocalPart(qname.getLocalPart());
  360|  21.2k|    setURI(qname.getURI());
  361|  21.2k|}
_ZN11xercesc_3_25QName7cleanUpEv:
  383|  6.06M|{
  384|  6.06M|    fMemoryManager->deallocate(fLocalPart); //delete [] fLocalPart;
  385|  6.06M|    fMemoryManager->deallocate(fPrefix); //delete [] fPrefix;
  386|  6.06M|    fMemoryManager->deallocate(fRawName); //delete [] fRawName;
  387|  6.06M|    fLocalPart = fPrefix = fRawName = 0;
  388|  6.06M|}

_ZNK11xercesc_3_25QName9getPrefixEv:
  168|  8.57M|{
  169|  8.57M|	return fPrefix;
  170|  8.57M|}
_ZNK11xercesc_3_25QName12getLocalPartEv:
  178|  8.57M|{
  179|  8.57M|	return fLocalPart;
  180|  8.57M|}
_ZN11xercesc_3_25QName12getLocalPartEv:
  183|  5.45M|{
  184|  5.45M|	return fLocalPart;
  185|  5.45M|}
_ZNK11xercesc_3_25QName6getURIEv:
  188|  6.81M|{
  189|  6.81M|	return fURIId;
  190|  6.81M|}
_ZN11xercesc_3_25QName6setURIEj:
  201|  21.2k|{
  202|  21.2k|    fURIId = uriId;
  203|  21.2k|}
_ZN11xercesc_3_25QName9setPrefixEPKDs:
  206|  6.76M|{
  207|  6.76M|    setNPrefix(prefix, XMLString::stringLen(prefix));
  208|  6.76M|}
_ZN11xercesc_3_25QName12setLocalPartEPKDs:
  211|  6.76M|{
  212|  6.76M|    setNLocalPart(localPart, XMLString::stringLen(localPart));
  213|  6.76M|}

_ZN11xercesc_3_216RefArrayVectorOfIDsEC2EmbPNS_13MemoryManagerE:
   34|      1|    : BaseRefVectorOf<TElem>(maxElems, adoptElems, manager)
   35|      1|{
   36|      1|}
_ZN11xercesc_3_216RefArrayVectorOfIDsED2Ev:
   40|      1|{
   41|      1|    if (this->fAdoptedElems)
  ------------------
  |  Branch (41:9): [True: 1, False: 0]
  ------------------
   42|      1|    {
   43|      2|        for (XMLSize_t index = 0; index < this->fCurCount; index++)
  ------------------
  |  Branch (43:35): [True: 1, False: 1]
  ------------------
   44|      1|            this->fMemoryManager->deallocate(this->fElemList[index]);//delete[] fElemList[index];
   45|      1|    }
   46|      1|    this->fMemoryManager->deallocate(this->fElemList);//delete [] fElemList;
   47|      1|}

_ZN11xercesc_3_229RefHash2KeysTableOfEnumeratorINS_12SchemaAttDefENS_12StringHasherEE8findNextEv:
  647|      1|{
  648|       |    //  Code to execute if we have to return only values with the primary key
  649|      1|    if(fLockPrimaryKey)
  ------------------
  |  Branch (649:8): [True: 0, False: 1]
  ------------------
  650|      0|    {
  651|      0|        if(!fCurElem)
  ------------------
  |  Branch (651:12): [True: 0, False: 0]
  ------------------
  652|      0|            fCurElem = fToEnum->fBucketList[fCurHash];
  653|      0|        else
  654|      0|            fCurElem = fCurElem->fNext;
  655|      0|        while (fCurElem && (!fToEnum->fHasher.equals(fLockPrimaryKey, fCurElem->fKey1)))
  ------------------
  |  Branch (655:16): [True: 0, False: 0]
  |  Branch (655:28): [True: 0, False: 0]
  ------------------
  656|      0|            fCurElem = fCurElem->fNext;
  657|       |        // if we didn't found it, make so hasMoreElements() returns false
  658|      0|        if(!fCurElem)
  ------------------
  |  Branch (658:12): [True: 0, False: 0]
  ------------------
  659|      0|            fCurHash = fToEnum->fHashModulus;
  660|      0|        return;
  661|      0|    }
  662|       |    //
  663|       |    //  If there is a current element, move to its next element. If this
  664|       |    //  hits the end of the bucket, the next block will handle the rest.
  665|       |    //
  666|      1|    if (fCurElem)
  ------------------
  |  Branch (666:9): [True: 0, False: 1]
  ------------------
  667|      0|        fCurElem = fCurElem->fNext;
  668|       |
  669|       |    //
  670|       |    //  If the current element is null, then we have to move up to the
  671|       |    //  next hash value. If that is the hash modulus, then we cannot
  672|       |    //  go further.
  673|       |    //
  674|      1|    if (!fCurElem)
  ------------------
  |  Branch (674:9): [True: 1, False: 0]
  ------------------
  675|      1|    {
  676|      1|        fCurHash++;
  677|      1|        if (fCurHash == fToEnum->fHashModulus)
  ------------------
  |  Branch (677:13): [True: 0, False: 1]
  ------------------
  678|      0|            return;
  679|       |
  680|       |        // Else find the next non-empty bucket
  681|     29|        while (fToEnum->fBucketList[fCurHash]==0)
  ------------------
  |  Branch (681:16): [True: 29, False: 0]
  ------------------
  682|     29|        {
  683|       |            // Bump to the next hash value. If we max out return
  684|     29|            fCurHash++;
  685|     29|            if (fCurHash == fToEnum->fHashModulus)
  ------------------
  |  Branch (685:17): [True: 1, False: 28]
  ------------------
  686|      1|                return;
  687|     29|        }
  688|      0|        fCurElem = fToEnum->fBucketList[fCurHash];
  689|      0|    }
  690|      1|}
_ZN11xercesc_3_219RefHash2KeysTableOfINS_12SchemaAttDefENS_12StringHasherEEC2EmbPNS_13MemoryManagerE:
   77|      1|    : fMemoryManager(manager)
   78|      1|    , fAdoptedElems(adoptElems)
   79|      1|    , fBucketList(0)
   80|      1|    , fHashModulus(modulus)
   81|      1|    , fCount(0)
   82|       |
   83|      1|{
   84|      1|    initialize(modulus);
   85|      1|}
_ZN11xercesc_3_219RefHash2KeysTableOfINS_12SchemaAttDefENS_12StringHasherEE10initializeEm:
  106|      1|{
  107|      1|    if (modulus == 0)
  ------------------
  |  Branch (107:9): [True: 0, False: 1]
  ------------------
  108|      0|        ThrowXMLwithMemMgr(IllegalArgumentException, XMLExcepts::HshTbl_ZeroModulus, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  109|       |
  110|       |    // Allocate the bucket list and zero them
  111|      1|    fBucketList = (RefHash2KeysTableBucketElem<TVal>**) fMemoryManager->allocate
  112|      1|    (
  113|      1|        fHashModulus * sizeof(RefHash2KeysTableBucketElem<TVal>*)
  114|      1|    ); //new RefHash2KeysTableBucketElem<TVal>*[fHashModulus];
  115|      1|    memset(fBucketList, 0, sizeof(fBucketList[0]) * fHashModulus);
  116|      1|}
_ZN11xercesc_3_229RefHash2KeysTableOfEnumeratorINS_12SchemaAttDefENS_12StringHasherEEC2EPNS_19RefHash2KeysTableOfIS1_S2_EEbPNS_13MemoryManagerE:
  545|      1|    : fAdopted(adopt), fCurElem(0), fCurHash((XMLSize_t)-1), fToEnum(toEnum)
  546|      1|    , fMemoryManager(manager)
  547|      1|    , fLockPrimaryKey(0)
  548|      1|{
  549|      1|    if (!toEnum)
  ------------------
  |  Branch (549:9): [True: 0, False: 1]
  ------------------
  550|      0|        ThrowXMLwithMemMgr(NullPointerException, XMLExcepts::CPtr_PointerIsZero, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  551|       |
  552|       |    //
  553|       |    //  Find the next available bucket element in the hash table. If it
  554|       |    //  comes back zero, that just means the table is empty.
  555|       |    //
  556|       |    //  Note that the -1 in the current hash tells it to start
  557|       |    //  from the beginning.
  558|       |    //
  559|      1|    findNext();
  560|      1|}
_ZN11xercesc_3_219RefHash2KeysTableOfINS_10SchemaInfoENS_12StringHasherEEC2EmPNS_13MemoryManagerE:
   46|  14.2k|    : fMemoryManager(manager)
   47|  14.2k|    , fAdoptedElems(true)
   48|  14.2k|    , fBucketList(0)
   49|  14.2k|    , fHashModulus(modulus)
   50|  14.2k|    , fCount(0)
   51|  14.2k|{
   52|  14.2k|    initialize(modulus);
   53|  14.2k|}
_ZN11xercesc_3_219RefHash2KeysTableOfINS_10SchemaInfoENS_12StringHasherEE10initializeEm:
  106|  14.2k|{
  107|  14.2k|    if (modulus == 0)
  ------------------
  |  Branch (107:9): [True: 0, False: 14.2k]
  ------------------
  108|      0|        ThrowXMLwithMemMgr(IllegalArgumentException, XMLExcepts::HshTbl_ZeroModulus, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  109|       |
  110|       |    // Allocate the bucket list and zero them
  111|  14.2k|    fBucketList = (RefHash2KeysTableBucketElem<TVal>**) fMemoryManager->allocate
  112|  14.2k|    (
  113|  14.2k|        fHashModulus * sizeof(RefHash2KeysTableBucketElem<TVal>*)
  114|  14.2k|    ); //new RefHash2KeysTableBucketElem<TVal>*[fHashModulus];
  115|  14.2k|    memset(fBucketList, 0, sizeof(fBucketList[0]) * fHashModulus);
  116|  14.2k|}
_ZN11xercesc_3_219RefHash2KeysTableOfINS_10SchemaInfoENS_12StringHasherEED2Ev:
  120|  14.2k|{
  121|  14.2k|    removeAll();
  122|       |
  123|       |    // Then delete the bucket list & hasher
  124|  14.2k|    fMemoryManager->deallocate(fBucketList); //delete [] fBucketList;
  125|  14.2k|    fBucketList = 0;
  126|  14.2k|}
_ZN11xercesc_3_219RefHash2KeysTableOfINS_10SchemaInfoENS_12StringHasherEE9removeAllEv:
  254|  21.3k|{
  255|  21.3k|    if(isEmpty())
  ------------------
  |  Branch (255:8): [True: 21.3k, False: 0]
  ------------------
  256|  21.3k|        return;
  257|       |
  258|       |    // Clean up the buckets first
  259|      0|    for (XMLSize_t buckInd = 0; buckInd < fHashModulus; buckInd++)
  ------------------
  |  Branch (259:33): [True: 0, False: 0]
  ------------------
  260|      0|    {
  261|       |        // Get the bucket list head for this entry
  262|      0|        RefHash2KeysTableBucketElem<TVal>* curElem = fBucketList[buckInd];
  263|      0|        RefHash2KeysTableBucketElem<TVal>* nextElem;
  264|      0|        while (curElem)
  ------------------
  |  Branch (264:16): [True: 0, False: 0]
  ------------------
  265|      0|        {
  266|       |            // Save the next element before we hose this one
  267|      0|            nextElem = curElem->fNext;
  268|       |
  269|       |            // If we adopted the data, then delete it too
  270|       |            //    (Note:  the userdata hash table instance has data type of void *.
  271|       |            //    This will generate compiler warnings here on some platforms, but they
  272|       |            //    can be ignored since fAdoptedElements is false.
  273|      0|            if (fAdoptedElems)
  ------------------
  |  Branch (273:17): [True: 0, False: 0]
  ------------------
  274|      0|                delete curElem->fData;
  275|       |
  276|       |            // Then delete the current element and move forward
  277|       |            // destructor is empty...
  278|       |            // curElem->~RefHash2KeysTableBucketElem();
  279|      0|            fMemoryManager->deallocate(curElem);
  280|      0|            curElem = nextElem;
  281|      0|        }
  282|       |
  283|       |        // Clean out this entry
  284|      0|        fBucketList[buckInd] = 0;
  285|      0|    }
  286|      0|    fCount=0;
  287|      0|}
_ZNK11xercesc_3_219RefHash2KeysTableOfINS_10SchemaInfoENS_12StringHasherEE7isEmptyEv:
  134|  21.3k|{
  135|  21.3k|    return (fCount==0);
  136|  21.3k|}
_ZN11xercesc_3_219RefHash2KeysTableOfINS_10ValueStoreENS_9PtrHasherEE9removeAllEv:
  254|  14.2k|{
  255|  14.2k|    if(isEmpty())
  ------------------
  |  Branch (255:8): [True: 14.2k, False: 0]
  ------------------
  256|  14.2k|        return;
  257|       |
  258|       |    // Clean up the buckets first
  259|      0|    for (XMLSize_t buckInd = 0; buckInd < fHashModulus; buckInd++)
  ------------------
  |  Branch (259:33): [True: 0, False: 0]
  ------------------
  260|      0|    {
  261|       |        // Get the bucket list head for this entry
  262|      0|        RefHash2KeysTableBucketElem<TVal>* curElem = fBucketList[buckInd];
  263|      0|        RefHash2KeysTableBucketElem<TVal>* nextElem;
  264|      0|        while (curElem)
  ------------------
  |  Branch (264:16): [True: 0, False: 0]
  ------------------
  265|      0|        {
  266|       |            // Save the next element before we hose this one
  267|      0|            nextElem = curElem->fNext;
  268|       |
  269|       |            // If we adopted the data, then delete it too
  270|       |            //    (Note:  the userdata hash table instance has data type of void *.
  271|       |            //    This will generate compiler warnings here on some platforms, but they
  272|       |            //    can be ignored since fAdoptedElements is false.
  273|      0|            if (fAdoptedElems)
  ------------------
  |  Branch (273:17): [True: 0, False: 0]
  ------------------
  274|      0|                delete curElem->fData;
  275|       |
  276|       |            // Then delete the current element and move forward
  277|       |            // destructor is empty...
  278|       |            // curElem->~RefHash2KeysTableBucketElem();
  279|      0|            fMemoryManager->deallocate(curElem);
  280|      0|            curElem = nextElem;
  281|      0|        }
  282|       |
  283|       |        // Clean out this entry
  284|      0|        fBucketList[buckInd] = 0;
  285|      0|    }
  286|      0|    fCount=0;
  287|      0|}
_ZNK11xercesc_3_219RefHash2KeysTableOfINS_10ValueStoreENS_9PtrHasherEE7isEmptyEv:
  134|  14.2k|{
  135|  14.2k|    return (fCount==0);
  136|  14.2k|}
_ZN11xercesc_3_219RefHash2KeysTableOfINS_10ValueStoreENS_9PtrHasherEED2Ev:
  120|  7.12k|{
  121|  7.12k|    removeAll();
  122|       |
  123|       |    // Then delete the bucket list & hasher
  124|  7.12k|    fMemoryManager->deallocate(fBucketList); //delete [] fBucketList;
  125|  7.12k|    fBucketList = 0;
  126|  7.12k|}
_ZN11xercesc_3_219RefHash2KeysTableOfINS_10ValueStoreENS_9PtrHasherEEC2EmbPNS_13MemoryManagerE:
   77|  7.12k|    : fMemoryManager(manager)
   78|  7.12k|    , fAdoptedElems(adoptElems)
   79|  7.12k|    , fBucketList(0)
   80|  7.12k|    , fHashModulus(modulus)
   81|  7.12k|    , fCount(0)
   82|       |
   83|  7.12k|{
   84|  7.12k|    initialize(modulus);
   85|  7.12k|}
_ZN11xercesc_3_219RefHash2KeysTableOfINS_10ValueStoreENS_9PtrHasherEE10initializeEm:
  106|  7.12k|{
  107|  7.12k|    if (modulus == 0)
  ------------------
  |  Branch (107:9): [True: 0, False: 7.12k]
  ------------------
  108|      0|        ThrowXMLwithMemMgr(IllegalArgumentException, XMLExcepts::HshTbl_ZeroModulus, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  109|       |
  110|       |    // Allocate the bucket list and zero them
  111|  7.12k|    fBucketList = (RefHash2KeysTableBucketElem<TVal>**) fMemoryManager->allocate
  112|  7.12k|    (
  113|  7.12k|        fHashModulus * sizeof(RefHash2KeysTableBucketElem<TVal>*)
  114|  7.12k|    ); //new RefHash2KeysTableBucketElem<TVal>*[fHashModulus];
  115|  7.12k|    memset(fBucketList, 0, sizeof(fBucketList[0]) * fHashModulus);
  116|  7.12k|}

_ZN11xercesc_3_218RefHash3KeysIdPoolINS_17SchemaElementDeclENS_12StringHasherEE9removeAllEv:
  203|  7.12k|{
  204|  7.12k|    if (fIdCounter == 0) return;
  ------------------
  |  Branch (204:9): [True: 7.12k, False: 0]
  ------------------
  205|       |
  206|       |    // Clean up the buckets first
  207|      0|    for (XMLSize_t buckInd = 0; buckInd < fHashModulus; buckInd++)
  ------------------
  |  Branch (207:33): [True: 0, False: 0]
  ------------------
  208|      0|    {
  209|       |        // Get the bucket list head for this entry
  210|      0|        RefHash3KeysTableBucketElem<TVal>* curElem = fBucketList[buckInd];
  211|      0|        RefHash3KeysTableBucketElem<TVal>* nextElem;
  212|      0|        while (curElem)
  ------------------
  |  Branch (212:16): [True: 0, False: 0]
  ------------------
  213|      0|        {
  214|       |            // Save the next element before we hose this one
  215|      0|            nextElem = curElem->fNext;
  216|       |
  217|       |            // If we adopted the data, then delete it too
  218|       |            //    (Note:  the userdata hash table instance has data type of void *.
  219|       |            //    This will generate compiler warnings here on some platforms, but they
  220|       |            //    can be ignored since fAdoptedElements is false.
  221|      0|            if (fAdoptedElems)
  ------------------
  |  Branch (221:17): [True: 0, False: 0]
  ------------------
  222|      0|                delete curElem->fData;
  223|       |
  224|       |            // Then delete the current element and move forward
  225|       |            // delete curElem;
  226|       |            // destructor is empty...
  227|       |            // curElem->~RefHash3KeysTableBucketElem();
  228|      0|            fMemoryManager->deallocate(curElem);
  229|      0|            curElem = nextElem;
  230|      0|        }
  231|       |
  232|       |        // Clean out this entry
  233|      0|        fBucketList[buckInd] = 0;
  234|      0|    }
  235|       |
  236|       |    // Reset the id counter
  237|      0|    fIdCounter = 0;
  238|      0|}
_ZN11xercesc_3_218RefHash3KeysIdPoolINS_17SchemaElementDeclENS_12StringHasherEE10initializeEm:
  152|  7.12k|{
  153|  7.12k|    if (modulus == 0)
  ------------------
  |  Branch (153:9): [True: 0, False: 7.12k]
  ------------------
  154|      0|        ThrowXMLwithMemMgr(IllegalArgumentException, XMLExcepts::HshTbl_ZeroModulus, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  155|       |
  156|       |    // Allocate the bucket list and zero them
  157|  7.12k|    fBucketList = (RefHash3KeysTableBucketElem<TVal>**) fMemoryManager->allocate
  158|  7.12k|    (
  159|  7.12k|        fHashModulus * sizeof(RefHash3KeysTableBucketElem<TVal>*)
  160|  7.12k|    ); //new RefHash3KeysTableBucketElem<TVal>*[fHashModulus];
  161|  7.12k|    memset(fBucketList, 0, sizeof(fBucketList[0]) * fHashModulus);
  162|  7.12k|}
_ZN11xercesc_3_218RefHash3KeysIdPoolINS_17SchemaElementDeclENS_12StringHasherEED2Ev:
  166|  7.12k|{
  167|  7.12k|    removeAll();
  168|       |
  169|       |    // Then delete the bucket list & hasher & id pointers list
  170|  7.12k|    fMemoryManager->deallocate(fIdPtrs); //delete [] fIdPtrs;
  171|  7.12k|    fIdPtrs = 0;
  172|  7.12k|    fMemoryManager->deallocate(fBucketList); //delete [] fBucketList;
  173|  7.12k|    fBucketList = 0;
  174|  7.12k|}
_ZN11xercesc_3_218RefHash3KeysIdPoolINS_17SchemaElementDeclENS_12StringHasherEEC2EmbmPNS_13MemoryManagerE:
  100|  7.12k|    : fMemoryManager(manager)
  101|  7.12k|    , fAdoptedElems(adoptElems)
  102|  7.12k|    , fBucketList(0)
  103|  7.12k|    , fHashModulus(modulus)
  104|  7.12k|    , fIdPtrs(0)
  105|  7.12k|    , fIdPtrsCount(initSize)
  106|  7.12k|    , fIdCounter(0)
  107|       |
  108|  7.12k|{
  109|  7.12k|    initialize(modulus);
  110|       |
  111|       |    //  Allocate the initial id pointers array. We don't have to zero them
  112|       |    //  out since the fIdCounter value tells us which ones are valid. The
  113|       |    //  zeroth element is never used (and represents an invalid pool id.)
  114|       |    //
  115|  7.12k|    if (!fIdPtrsCount)
  ------------------
  |  Branch (115:9): [True: 0, False: 7.12k]
  ------------------
  116|      0|        fIdPtrsCount = 256;
  117|  7.12k|    fIdPtrs = (TVal**) fMemoryManager->allocate(fIdPtrsCount * sizeof(TVal*)); //new TVal*[fIdPtrsCount];
  118|  7.12k|    fIdPtrs[0] = 0;
  119|  7.12k|}

_ZN11xercesc_3_214RefHashTableOfINS_8ENameMapENS_12StringHasherEEC2EmPNS_13MemoryManagerE:
   45|      1|    : fMemoryManager(manager)
   46|      1|    , fAdoptedElems(true)
   47|      1|    , fBucketList(0)
   48|      1|    , fHashModulus(modulus)
   49|      1|    , fInitialModulus(modulus)
   50|      1|    , fCount(0)
   51|      1|{
   52|      1|    initialize(modulus);
   53|      1|}
_ZN11xercesc_3_214RefHashTableOfINS_8ENameMapENS_12StringHasherEE10initializeEm:
  109|      1|{
  110|      1|    if (modulus == 0)
  ------------------
  |  Branch (110:9): [True: 0, False: 1]
  ------------------
  111|      0|        ThrowXMLwithMemMgr(IllegalArgumentException, XMLExcepts::HshTbl_ZeroModulus, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  112|       |
  113|       |    // Allocate the bucket list and zero them
  114|      1|    fBucketList = (RefHashTableBucketElem<TVal>**) fMemoryManager->allocate
  115|      1|    (
  116|      1|        fHashModulus * sizeof(RefHashTableBucketElem<TVal>*)
  117|      1|    );
  118|    104|    for (XMLSize_t index = 0; index < fHashModulus; index++)
  ------------------
  |  Branch (118:31): [True: 103, False: 1]
  ------------------
  119|    103|        fBucketList[index] = 0;
  120|      1|}
_ZN11xercesc_3_214RefHashTableOfINS_8ENameMapENS_12StringHasherEE3putEPvPS1_:
  396|     48|{
  397|       |    // Apply 0.75 load factor to find threshold.
  398|     48|    XMLSize_t threshold = fHashModulus * 3 / 4;
  399|       |
  400|       |    // If we've grown too big, expand the table and rehash.
  401|     48|    if (fCount >= threshold)
  ------------------
  |  Branch (401:9): [True: 0, False: 48]
  ------------------
  402|      0|        rehash();
  403|       |
  404|       |    // First see if the key exists already
  405|     48|    XMLSize_t hashVal;
  406|     48|    RefHashTableBucketElem<TVal>* newBucket = findBucketElem(key, hashVal);
  407|       |
  408|       |    //
  409|       |    //  If so,then update its value. If not, then we need to add it to
  410|       |    //  the right bucket
  411|       |    //
  412|     48|    if (newBucket)
  ------------------
  |  Branch (412:9): [True: 0, False: 48]
  ------------------
  413|      0|    {
  414|      0|        if (fAdoptedElems)
  ------------------
  |  Branch (414:13): [True: 0, False: 0]
  ------------------
  415|      0|            delete newBucket->fData;
  416|      0|        newBucket->fData = valueToAdopt;
  417|      0|        newBucket->fKey = key;
  418|      0|    }
  419|     48|    else
  420|     48|    {
  421|     48|        newBucket =
  422|     48|             new (fMemoryManager->allocate(sizeof(RefHashTableBucketElem<TVal>)))
  423|     48|             RefHashTableBucketElem<TVal>(key, valueToAdopt, fBucketList[hashVal]);
  424|     48|        fBucketList[hashVal] = newBucket;
  425|     48|        fCount++;
  426|     48|    }
  427|     48|}
_ZN11xercesc_3_214RefHashTableOfINS_8ENameMapENS_12StringHasherEE14findBucketElemEPKvRm:
  490|  7.02k|{
  491|       |    // Hash the key
  492|  7.02k|    hashVal = fHasher.getHashVal(key, fHashModulus);
  493|       |
  494|       |    // Search that bucket for the key
  495|  7.02k|    RefHashTableBucketElem<TVal>* curElem = fBucketList[hashVal];
  496|  7.06k|    while (curElem)
  ------------------
  |  Branch (496:12): [True: 6.88k, False: 183]
  ------------------
  497|  6.88k|    {
  498|  6.88k|        if (fHasher.equals(key, curElem->fKey))
  ------------------
  |  Branch (498:13): [True: 6.83k, False: 42]
  ------------------
  499|  6.83k|            return curElem;
  500|       |
  501|     42|        curElem = curElem->fNext;
  502|     42|    }
  503|    183|    return 0;
  504|  7.02k|}
_ZN11xercesc_3_214RefHashTableOfINS_8ENameMapENS_12StringHasherEE3getEPKv:
  349|  6.97k|{
  350|  6.97k|    XMLSize_t hashVal;
  351|  6.97k|    RefHashTableBucketElem<TVal>* findIt = findBucketElem(key, hashVal);
  352|  6.97k|    return findIt ? findIt->fData : 0;
  ------------------
  |  Branch (352:12): [True: 6.83k, False: 135]
  ------------------
  353|  6.97k|}
_ZN11xercesc_3_214RefHashTableOfINS_13XMLStringPool8PoolElemENS_12StringHasherEE3getEPKv:
  349|  57.1k|{
  350|  57.1k|    XMLSize_t hashVal;
  351|  57.1k|    RefHashTableBucketElem<TVal>* findIt = findBucketElem(key, hashVal);
  352|  57.1k|    return findIt ? findIt->fData : 0;
  ------------------
  |  Branch (352:12): [True: 146, False: 57.0k]
  ------------------
  353|  57.1k|}
_ZN11xercesc_3_214RefHashTableOfINS_13XMLStringPool8PoolElemENS_12StringHasherEE14findBucketElemEPKvRm:
  490|   114k|{
  491|       |    // Hash the key
  492|   114k|    hashVal = fHasher.getHashVal(key, fHashModulus);
  493|       |
  494|       |    // Search that bucket for the key
  495|   114k|    RefHashTableBucketElem<TVal>* curElem = fBucketList[hashVal];
  496|   114k|    while (curElem)
  ------------------
  |  Branch (496:12): [True: 146, False: 114k]
  ------------------
  497|    146|    {
  498|    146|        if (fHasher.equals(key, curElem->fKey))
  ------------------
  |  Branch (498:13): [True: 146, False: 0]
  ------------------
  499|    146|            return curElem;
  500|       |
  501|      0|        curElem = curElem->fNext;
  502|      0|    }
  503|   114k|    return 0;
  504|   114k|}
_ZN11xercesc_3_214RefHashTableOfINS_12KVStringPairENS_12StringHasherEE10initializeEm:
  109|     20|{
  110|     20|    if (modulus == 0)
  ------------------
  |  Branch (110:9): [True: 0, False: 20]
  ------------------
  111|      0|        ThrowXMLwithMemMgr(IllegalArgumentException, XMLExcepts::HshTbl_ZeroModulus, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  112|       |
  113|       |    // Allocate the bucket list and zero them
  114|     20|    fBucketList = (RefHashTableBucketElem<TVal>**) fMemoryManager->allocate
  115|     20|    (
  116|     20|        fHashModulus * sizeof(RefHashTableBucketElem<TVal>*)
  117|     20|    );
  118|     65|    for (XMLSize_t index = 0; index < fHashModulus; index++)
  ------------------
  |  Branch (118:31): [True: 45, False: 20]
  ------------------
  119|     45|        fBucketList[index] = 0;
  120|     20|}
_ZN11xercesc_3_214RefHashTableOfINS_12KVStringPairENS_12StringHasherEE3getEPKv:
  349|    136|{
  350|    136|    XMLSize_t hashVal;
  351|    136|    RefHashTableBucketElem<TVal>* findIt = findBucketElem(key, hashVal);
  352|    136|    return findIt ? findIt->fData : 0;
  ------------------
  |  Branch (352:12): [True: 15, False: 121]
  ------------------
  353|    136|}
_ZN11xercesc_3_214RefHashTableOfINS_12KVStringPairENS_12StringHasherEE14findBucketElemEPKvRm:
  490|    162|{
  491|       |    // Hash the key
  492|    162|    hashVal = fHasher.getHashVal(key, fHashModulus);
  493|       |
  494|       |    // Search that bucket for the key
  495|    162|    RefHashTableBucketElem<TVal>* curElem = fBucketList[hashVal];
  496|    210|    while (curElem)
  ------------------
  |  Branch (496:12): [True: 63, False: 147]
  ------------------
  497|     63|    {
  498|     63|        if (fHasher.equals(key, curElem->fKey))
  ------------------
  |  Branch (498:13): [True: 15, False: 48]
  ------------------
  499|     15|            return curElem;
  500|       |
  501|     48|        curElem = curElem->fNext;
  502|     48|    }
  503|    147|    return 0;
  504|    162|}
_ZN11xercesc_3_224RefHashTableOfEnumeratorINS_12KVStringPairENS_12StringHasherEEC2EPNS_14RefHashTableOfIS1_S2_EEbPNS_13MemoryManagerE:
  533|     20|    : fAdopted(adopt), fCurElem(0), fCurHash((XMLSize_t)-1), fToEnum(toEnum)
  534|     20|    , fMemoryManager(manager)
  535|     20|{
  536|     20|    if (!toEnum)
  ------------------
  |  Branch (536:9): [True: 0, False: 20]
  ------------------
  537|      0|        ThrowXMLwithMemMgr(NullPointerException, XMLExcepts::CPtr_PointerIsZero, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  538|       |
  539|       |    //
  540|       |    //  Find the next available bucket element in the hash table. If it
  541|       |    //  comes back zero, that just means the table is empty.
  542|       |    //
  543|       |    //  Note that the -1 in the current hash tells it to start
  544|       |    //  from the beginning.
  545|       |    //
  546|     20|    findNext();
  547|     20|}
_ZN11xercesc_3_224RefHashTableOfEnumeratorINS_12KVStringPairENS_12StringHasherEE8findNextEv:
  632|     46|{
  633|       |    //
  634|       |    //  If there is a current element, move to its next element. If this
  635|       |    //  hits the end of the bucket, the next block will handle the rest.
  636|       |    //
  637|     46|    if (fCurElem)
  ------------------
  |  Branch (637:9): [True: 26, False: 20]
  ------------------
  638|     26|        fCurElem = fCurElem->fNext;
  639|       |
  640|       |    //
  641|       |    //  If the current element is null, then we have to move up to the
  642|       |    //  next hash value. If that is the hash modulus, then we cannot
  643|       |    //  go further.
  644|       |    //
  645|     46|    if (!fCurElem)
  ------------------
  |  Branch (645:9): [True: 45, False: 1]
  ------------------
  646|     45|    {
  647|     45|        fCurHash++;
  648|     45|        if (fCurHash == fToEnum->fHashModulus)
  ------------------
  |  Branch (648:13): [True: 7, False: 38]
  ------------------
  649|      7|            return;
  650|       |
  651|       |        // Else find the next non-empty bucket
  652|     57|        while (fToEnum->fBucketList[fCurHash]==0)
  ------------------
  |  Branch (652:16): [True: 32, False: 25]
  ------------------
  653|     32|        {
  654|       |            // Bump to the next hash value. If we max out return
  655|     32|            fCurHash++;
  656|     32|            if (fCurHash == fToEnum->fHashModulus)
  ------------------
  |  Branch (656:17): [True: 13, False: 19]
  ------------------
  657|     13|                return;
  658|     32|        }
  659|     25|        fCurElem = fToEnum->fBucketList[fCurHash];
  660|     25|    }
  661|     46|}
_ZN11xercesc_3_224RefHashTableOfEnumeratorINS_12KVStringPairENS_12StringHasherEED2Ev:
  551|     20|{
  552|     20|    if (fAdopted)
  ------------------
  |  Branch (552:9): [True: 0, False: 20]
  ------------------
  553|      0|        delete fToEnum;
  554|     20|}
_ZNK11xercesc_3_224RefHashTableOfEnumeratorINS_12KVStringPairENS_12StringHasherEE15hasMoreElementsEv:
  573|     72|{
  574|       |    //
  575|       |    //  If our current has is at the max and there are no more elements
  576|       |    //  in the current bucket, then no more elements.
  577|       |    //
  578|     72|    if (!fCurElem && (fCurHash == fToEnum->fHashModulus))
  ------------------
  |  Branch (578:9): [True: 20, False: 52]
  |  Branch (578:22): [True: 20, False: 0]
  ------------------
  579|     20|        return false;
  580|     52|    return true;
  581|     72|}
_ZN11xercesc_3_224RefHashTableOfEnumeratorINS_12KVStringPairENS_12StringHasherEE11nextElementEv:
  585|     26|{
  586|       |    // Make sure we have an element to return
  587|     26|    if (!hasMoreElements())
  ------------------
  |  Branch (587:9): [True: 0, False: 26]
  ------------------
  588|      0|        ThrowXMLwithMemMgr(NoSuchElementException, XMLExcepts::Enum_NoMoreElements, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  589|       |
  590|       |    //
  591|       |    //  Save the current element, then move up to the next one for the
  592|       |    //  next time around.
  593|       |    //
  594|     26|    RefHashTableBucketElem<TVal>* saveElem = fCurElem;
  595|     26|    findNext();
  596|       |
  597|     26|    return *saveElem->fData;
  598|     26|}
_ZN11xercesc_3_214RefHashTableOfINS_12KVStringPairENS_12StringHasherEE3putEPvPS1_:
  396|     26|{
  397|       |    // Apply 0.75 load factor to find threshold.
  398|     26|    XMLSize_t threshold = fHashModulus * 3 / 4;
  399|       |
  400|       |    // If we've grown too big, expand the table and rehash.
  401|     26|    if (fCount >= threshold)
  ------------------
  |  Branch (401:9): [True: 4, False: 22]
  ------------------
  402|      4|        rehash();
  403|       |
  404|       |    // First see if the key exists already
  405|     26|    XMLSize_t hashVal;
  406|     26|    RefHashTableBucketElem<TVal>* newBucket = findBucketElem(key, hashVal);
  407|       |
  408|       |    //
  409|       |    //  If so,then update its value. If not, then we need to add it to
  410|       |    //  the right bucket
  411|       |    //
  412|     26|    if (newBucket)
  ------------------
  |  Branch (412:9): [True: 0, False: 26]
  ------------------
  413|      0|    {
  414|      0|        if (fAdoptedElems)
  ------------------
  |  Branch (414:13): [True: 0, False: 0]
  ------------------
  415|      0|            delete newBucket->fData;
  416|      0|        newBucket->fData = valueToAdopt;
  417|      0|        newBucket->fKey = key;
  418|      0|    }
  419|     26|    else
  420|     26|    {
  421|     26|        newBucket =
  422|     26|             new (fMemoryManager->allocate(sizeof(RefHashTableBucketElem<TVal>)))
  423|     26|             RefHashTableBucketElem<TVal>(key, valueToAdopt, fBucketList[hashVal]);
  424|     26|        fBucketList[hashVal] = newBucket;
  425|     26|        fCount++;
  426|     26|    }
  427|     26|}
_ZN11xercesc_3_214RefHashTableOfINS_12KVStringPairENS_12StringHasherEE6rehashEv:
  436|      4|{
  437|      4|    const XMLSize_t newMod = (fHashModulus * 2) + 1;
  438|       |
  439|      4|    RefHashTableBucketElem<TVal>** newBucketList =
  440|      4|        (RefHashTableBucketElem<TVal>**) fMemoryManager->allocate
  441|      4|    (
  442|      4|        newMod * sizeof(RefHashTableBucketElem<TVal>*)
  443|      4|    );
  444|       |
  445|       |    // Make sure the new bucket list is destroyed if an
  446|       |    // exception is thrown.
  447|      4|    ArrayJanitor<RefHashTableBucketElem<TVal>*>  guard(newBucketList, fMemoryManager);
  448|       |
  449|      4|    memset(newBucketList, 0, newMod * sizeof(newBucketList[0]));
  450|       |
  451|       |
  452|       |    // Rehash all existing entries.
  453|     12|    for (XMLSize_t index = 0; index < fHashModulus; index++)
  ------------------
  |  Branch (453:31): [True: 8, False: 4]
  ------------------
  454|      8|    {
  455|       |        // Get the bucket list head for this entry
  456|      8|        RefHashTableBucketElem<TVal>* curElem = fBucketList[index];
  457|       |
  458|     12|        while (curElem)
  ------------------
  |  Branch (458:16): [True: 4, False: 8]
  ------------------
  459|      4|        {
  460|       |            // Save the next element before we detach this one
  461|      4|            RefHashTableBucketElem<TVal>* const nextElem = curElem->fNext;
  462|       |
  463|      4|            const XMLSize_t hashVal = fHasher.getHashVal(curElem->fKey, newMod);
  464|       |
  465|      4|            RefHashTableBucketElem<TVal>* const newHeadElem = newBucketList[hashVal];
  466|       |
  467|       |            // Insert at the start of this bucket's list.
  468|      4|            curElem->fNext = newHeadElem;
  469|      4|            newBucketList[hashVal] = curElem;
  470|       |
  471|      4|            curElem = nextElem;
  472|      4|        }
  473|      8|    }
  474|       |
  475|      4|    RefHashTableBucketElem<TVal>** const oldBucketList = fBucketList;
  476|       |
  477|       |    // Everything is OK at this point, so update the
  478|       |    // member variables.
  479|      4|    fBucketList = guard.release();
  480|      4|    fHashModulus = newMod;
  481|       |
  482|       |    // Delete the old bucket list.
  483|      4|    fMemoryManager->deallocate(oldBucketList);//delete[] oldBucketList;
  484|       |
  485|      4|}
_ZN11xercesc_3_224RefHashTableOfEnumeratorINS_10XMLRefInfoENS_12StringHasherEEC2EPNS_14RefHashTableOfIS1_S2_EEbPNS_13MemoryManagerE:
  533|  1.65k|    : fAdopted(adopt), fCurElem(0), fCurHash((XMLSize_t)-1), fToEnum(toEnum)
  534|  1.65k|    , fMemoryManager(manager)
  535|  1.65k|{
  536|  1.65k|    if (!toEnum)
  ------------------
  |  Branch (536:9): [True: 0, False: 1.65k]
  ------------------
  537|      0|        ThrowXMLwithMemMgr(NullPointerException, XMLExcepts::CPtr_PointerIsZero, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  538|       |
  539|       |    //
  540|       |    //  Find the next available bucket element in the hash table. If it
  541|       |    //  comes back zero, that just means the table is empty.
  542|       |    //
  543|       |    //  Note that the -1 in the current hash tells it to start
  544|       |    //  from the beginning.
  545|       |    //
  546|  1.65k|    findNext();
  547|  1.65k|}
_ZN11xercesc_3_224RefHashTableOfEnumeratorINS_10XMLRefInfoENS_12StringHasherEE8findNextEv:
  632|  2.76k|{
  633|       |    //
  634|       |    //  If there is a current element, move to its next element. If this
  635|       |    //  hits the end of the bucket, the next block will handle the rest.
  636|       |    //
  637|  2.76k|    if (fCurElem)
  ------------------
  |  Branch (637:9): [True: 1.10k, False: 1.65k]
  ------------------
  638|  1.10k|        fCurElem = fCurElem->fNext;
  639|       |
  640|       |    //
  641|       |    //  If the current element is null, then we have to move up to the
  642|       |    //  next hash value. If that is the hash modulus, then we cannot
  643|       |    //  go further.
  644|       |    //
  645|  2.76k|    if (!fCurElem)
  ------------------
  |  Branch (645:9): [True: 2.57k, False: 191]
  ------------------
  646|  2.57k|    {
  647|  2.57k|        fCurHash++;
  648|  2.57k|        if (fCurHash == fToEnum->fHashModulus)
  ------------------
  |  Branch (648:13): [True: 3, False: 2.56k]
  ------------------
  649|      3|            return;
  650|       |
  651|       |        // Else find the next non-empty bucket
  652|   181k|        while (fToEnum->fBucketList[fCurHash]==0)
  ------------------
  |  Branch (652:16): [True: 180k, False: 915]
  ------------------
  653|   180k|        {
  654|       |            // Bump to the next hash value. If we max out return
  655|   180k|            fCurHash++;
  656|   180k|            if (fCurHash == fToEnum->fHashModulus)
  ------------------
  |  Branch (656:17): [True: 1.65k, False: 178k]
  ------------------
  657|  1.65k|                return;
  658|   180k|        }
  659|    915|        fCurElem = fToEnum->fBucketList[fCurHash];
  660|    915|    }
  661|  2.76k|}
_ZN11xercesc_3_224RefHashTableOfEnumeratorINS_10XMLRefInfoENS_12StringHasherEED2Ev:
  551|  1.65k|{
  552|  1.65k|    if (fAdopted)
  ------------------
  |  Branch (552:9): [True: 0, False: 1.65k]
  ------------------
  553|      0|        delete fToEnum;
  554|  1.65k|}
_ZN11xercesc_3_214RefHashTableOfINS_10XMLRefInfoENS_12StringHasherEED2Ev:
  124|  7.12k|{
  125|  7.12k|    cleanup();
  126|  7.12k|}
_ZN11xercesc_3_214RefHashTableOfINS_10XMLRefInfoENS_12StringHasherEE7cleanupEv:
  302|  7.12k|{
  303|  7.12k|    removeAll();
  304|       |
  305|       |    // Then delete the bucket list & hasher
  306|  7.12k|    fMemoryManager->deallocate(fBucketList);
  307|  7.12k|    fBucketList = 0;
  308|  7.12k|}
_ZN11xercesc_3_214RefHashTableOfINS_10XMLRefInfoENS_12StringHasherEE9removeAllEv:
  203|  14.2k|{
  204|  14.2k|    if(isEmpty())
  ------------------
  |  Branch (204:8): [True: 13.8k, False: 360]
  ------------------
  205|  13.8k|        return;
  206|       |
  207|       |    // Clean up the buckets first
  208|  50.7k|    for (XMLSize_t buckInd = 0; buckInd < fHashModulus; buckInd++)
  ------------------
  |  Branch (208:33): [True: 50.3k, False: 360]
  ------------------
  209|  50.3k|    {
  210|       |        // Get the bucket list head for this entry
  211|  50.3k|        RefHashTableBucketElem<TVal>* curElem = fBucketList[buckInd];
  212|  50.3k|        RefHashTableBucketElem<TVal>* nextElem;
  213|  58.4k|        while (curElem)
  ------------------
  |  Branch (213:16): [True: 8.08k, False: 50.3k]
  ------------------
  214|  8.08k|        {
  215|       |            // Save the next element before we hose this one
  216|  8.08k|            nextElem = curElem->fNext;
  217|       |
  218|       |            // If we adopted the data, then delete it too
  219|       |            //    (Note:  the userdata hash table instance has data type of void *.
  220|       |            //    This will generate compiler warnings here on some platforms, but they
  221|       |            //    can be ignored since fAdoptedElements is false.
  222|  8.08k|            if (fAdoptedElems)
  ------------------
  |  Branch (222:17): [True: 8.08k, False: 0]
  ------------------
  223|  8.08k|                delete curElem->fData;
  224|       |
  225|       |            // Then delete the current element and move forward
  226|       |             // delete curElem;
  227|       |            // destructor doesn't do anything...
  228|       |            // curElem->~RefHashTableBucketElem();
  229|  8.08k|            fMemoryManager->deallocate(curElem);
  230|  8.08k|            curElem = nextElem;
  231|  8.08k|        }
  232|       |
  233|       |        // Clean out this entry
  234|  50.3k|        fBucketList[buckInd] = 0;
  235|  50.3k|    }
  236|       |
  237|    360|    fCount = 0;
  238|    360|}
_ZNK11xercesc_3_214RefHashTableOfINS_10XMLRefInfoENS_12StringHasherEE7isEmptyEv:
  134|  14.2k|{
  135|  14.2k|    return fCount==0;
  136|  14.2k|}
_ZNK11xercesc_3_224RefHashTableOfEnumeratorINS_10XMLRefInfoENS_12StringHasherEE15hasMoreElementsEv:
  573|  3.86k|{
  574|       |    //
  575|       |    //  If our current has is at the max and there are no more elements
  576|       |    //  in the current bucket, then no more elements.
  577|       |    //
  578|  3.86k|    if (!fCurElem && (fCurHash == fToEnum->fHashModulus))
  ------------------
  |  Branch (578:9): [True: 1.65k, False: 2.21k]
  |  Branch (578:22): [True: 1.65k, False: 0]
  ------------------
  579|  1.65k|        return false;
  580|  2.21k|    return true;
  581|  3.86k|}
_ZN11xercesc_3_224RefHashTableOfEnumeratorINS_10XMLRefInfoENS_12StringHasherEE11nextElementEv:
  585|  1.10k|{
  586|       |    // Make sure we have an element to return
  587|  1.10k|    if (!hasMoreElements())
  ------------------
  |  Branch (587:9): [True: 0, False: 1.10k]
  ------------------
  588|      0|        ThrowXMLwithMemMgr(NoSuchElementException, XMLExcepts::Enum_NoMoreElements, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  589|       |
  590|       |    //
  591|       |    //  Save the current element, then move up to the next one for the
  592|       |    //  next time around.
  593|       |    //
  594|  1.10k|    RefHashTableBucketElem<TVal>* saveElem = fCurElem;
  595|  1.10k|    findNext();
  596|       |
  597|  1.10k|    return *saveElem->fData;
  598|  1.10k|}
_ZNK11xercesc_3_214RefHashTableOfINS_17DatatypeValidatorENS_12StringHasherEE11containsKeyEPKv:
  140|     42|{
  141|     42|    XMLSize_t hashVal;
  142|     42|    const RefHashTableBucketElem<TVal>* findIt = findBucketElem(key, hashVal);
  143|     42|    return (findIt != 0);
  144|     42|}
_ZNK11xercesc_3_214RefHashTableOfINS_17DatatypeValidatorENS_12StringHasherEE14findBucketElemEPKvRm:
  509|     42|{
  510|       |    // Hash the key
  511|     42|    hashVal = fHasher.getHashVal(key, fHashModulus);
  512|       |
  513|       |    // Search that bucket for the key
  514|     42|    const RefHashTableBucketElem<TVal>* curElem = fBucketList[hashVal];
  515|     49|    while (curElem)
  ------------------
  |  Branch (515:12): [True: 49, False: 0]
  ------------------
  516|     49|    {
  517|     49|        if (fHasher.equals(key, curElem->fKey))
  ------------------
  |  Branch (517:13): [True: 42, False: 7]
  ------------------
  518|     42|            return curElem;
  519|       |
  520|      7|        curElem = curElem->fNext;
  521|      7|    }
  522|      0|    return 0;
  523|     42|}
_ZN11xercesc_3_214RefHashTableOfINS_17DatatypeValidatorENS_12StringHasherEE3getEPKv:
  349|     42|{
  350|     42|    XMLSize_t hashVal;
  351|     42|    RefHashTableBucketElem<TVal>* findIt = findBucketElem(key, hashVal);
  352|     42|    return findIt ? findIt->fData : 0;
  ------------------
  |  Branch (352:12): [True: 42, False: 0]
  ------------------
  353|     42|}
_ZN11xercesc_3_214RefHashTableOfINS_17DatatypeValidatorENS_12StringHasherEE14findBucketElemEPKvRm:
  490|     87|{
  491|       |    // Hash the key
  492|     87|    hashVal = fHasher.getHashVal(key, fHashModulus);
  493|       |
  494|       |    // Search that bucket for the key
  495|     87|    RefHashTableBucketElem<TVal>* curElem = fBucketList[hashVal];
  496|    119|    while (curElem)
  ------------------
  |  Branch (496:12): [True: 74, False: 45]
  ------------------
  497|     74|    {
  498|     74|        if (fHasher.equals(key, curElem->fKey))
  ------------------
  |  Branch (498:13): [True: 42, False: 32]
  ------------------
  499|     42|            return curElem;
  500|       |
  501|     32|        curElem = curElem->fNext;
  502|     32|    }
  503|     45|    return 0;
  504|     87|}
_ZN11xercesc_3_214RefHashTableOfINS_7GrammarENS_12StringHasherEEC2EmbPNS_13MemoryManagerE:
   78|  21.3k|    : fMemoryManager(manager)
   79|  21.3k|    , fAdoptedElems(adoptElems)
   80|  21.3k|    , fBucketList(0)
   81|  21.3k|    , fHashModulus(modulus)
   82|  21.3k|    , fInitialModulus(modulus)
   83|  21.3k|    , fCount(0)
   84|       |
   85|  21.3k|{
   86|  21.3k|    initialize(modulus);
   87|  21.3k|}
_ZN11xercesc_3_214RefHashTableOfINS_7GrammarENS_12StringHasherEE10initializeEm:
  109|  21.3k|{
  110|  21.3k|    if (modulus == 0)
  ------------------
  |  Branch (110:9): [True: 0, False: 21.3k]
  ------------------
  111|      0|        ThrowXMLwithMemMgr(IllegalArgumentException, XMLExcepts::HshTbl_ZeroModulus, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  112|       |
  113|       |    // Allocate the bucket list and zero them
  114|  21.3k|    fBucketList = (RefHashTableBucketElem<TVal>**) fMemoryManager->allocate
  115|  21.3k|    (
  116|  21.3k|        fHashModulus * sizeof(RefHashTableBucketElem<TVal>*)
  117|  21.3k|    );
  118|   641k|    for (XMLSize_t index = 0; index < fHashModulus; index++)
  ------------------
  |  Branch (118:31): [True: 619k, False: 21.3k]
  ------------------
  119|   619k|        fBucketList[index] = 0;
  120|  21.3k|}
_ZN11xercesc_3_214RefHashTableOfINS_7GrammarENS_12StringHasherEED2Ev:
  124|  21.3k|{
  125|  21.3k|    cleanup();
  126|  21.3k|}
_ZN11xercesc_3_214RefHashTableOfINS_7GrammarENS_12StringHasherEE7cleanupEv:
  302|  21.3k|{
  303|  21.3k|    removeAll();
  304|       |
  305|       |    // Then delete the bucket list & hasher
  306|  21.3k|    fMemoryManager->deallocate(fBucketList);
  307|  21.3k|    fBucketList = 0;
  308|  21.3k|}
_ZN11xercesc_3_214RefHashTableOfINS_7GrammarENS_12StringHasherEE3getEPKv:
  349|  13.1k|{
  350|  13.1k|    XMLSize_t hashVal;
  351|  13.1k|    RefHashTableBucketElem<TVal>* findIt = findBucketElem(key, hashVal);
  352|  13.1k|    return findIt ? findIt->fData : 0;
  ------------------
  |  Branch (352:12): [True: 6.05k, False: 7.12k]
  ------------------
  353|  13.1k|}
_ZN11xercesc_3_214RefHashTableOfINS_7GrammarENS_12StringHasherEE14findBucketElemEPKvRm:
  490|  20.3k|{
  491|       |    // Hash the key
  492|  20.3k|    hashVal = fHasher.getHashVal(key, fHashModulus);
  493|       |
  494|       |    // Search that bucket for the key
  495|  20.3k|    RefHashTableBucketElem<TVal>* curElem = fBucketList[hashVal];
  496|  20.3k|    while (curElem)
  ------------------
  |  Branch (496:12): [True: 6.05k, False: 14.2k]
  ------------------
  497|  6.05k|    {
  498|  6.05k|        if (fHasher.equals(key, curElem->fKey))
  ------------------
  |  Branch (498:13): [True: 6.05k, False: 0]
  ------------------
  499|  6.05k|            return curElem;
  500|       |
  501|      0|        curElem = curElem->fNext;
  502|      0|    }
  503|  14.2k|    return 0;
  504|  20.3k|}
_ZN11xercesc_3_214RefHashTableOfINS_7GrammarENS_12StringHasherEE3putEPvPS1_:
  396|  7.12k|{
  397|       |    // Apply 0.75 load factor to find threshold.
  398|  7.12k|    XMLSize_t threshold = fHashModulus * 3 / 4;
  399|       |
  400|       |    // If we've grown too big, expand the table and rehash.
  401|  7.12k|    if (fCount >= threshold)
  ------------------
  |  Branch (401:9): [True: 0, False: 7.12k]
  ------------------
  402|      0|        rehash();
  403|       |
  404|       |    // First see if the key exists already
  405|  7.12k|    XMLSize_t hashVal;
  406|  7.12k|    RefHashTableBucketElem<TVal>* newBucket = findBucketElem(key, hashVal);
  407|       |
  408|       |    //
  409|       |    //  If so,then update its value. If not, then we need to add it to
  410|       |    //  the right bucket
  411|       |    //
  412|  7.12k|    if (newBucket)
  ------------------
  |  Branch (412:9): [True: 0, False: 7.12k]
  ------------------
  413|      0|    {
  414|      0|        if (fAdoptedElems)
  ------------------
  |  Branch (414:13): [True: 0, False: 0]
  ------------------
  415|      0|            delete newBucket->fData;
  416|      0|        newBucket->fData = valueToAdopt;
  417|      0|        newBucket->fKey = key;
  418|      0|    }
  419|  7.12k|    else
  420|  7.12k|    {
  421|  7.12k|        newBucket =
  422|  7.12k|             new (fMemoryManager->allocate(sizeof(RefHashTableBucketElem<TVal>)))
  423|  7.12k|             RefHashTableBucketElem<TVal>(key, valueToAdopt, fBucketList[hashVal]);
  424|  7.12k|        fBucketList[hashVal] = newBucket;
  425|  7.12k|        fCount++;
  426|  7.12k|    }
  427|  7.12k|}
_ZN11xercesc_3_214RefHashTableOfINS_7GrammarENS_12StringHasherEE9removeAllEv:
  203|  28.5k|{
  204|  28.5k|    if(isEmpty())
  ------------------
  |  Branch (204:8): [True: 21.3k, False: 7.12k]
  ------------------
  205|  21.3k|        return;
  206|       |
  207|       |    // Clean up the buckets first
  208|   213k|    for (XMLSize_t buckInd = 0; buckInd < fHashModulus; buckInd++)
  ------------------
  |  Branch (208:33): [True: 206k, False: 7.12k]
  ------------------
  209|   206k|    {
  210|       |        // Get the bucket list head for this entry
  211|   206k|        RefHashTableBucketElem<TVal>* curElem = fBucketList[buckInd];
  212|   206k|        RefHashTableBucketElem<TVal>* nextElem;
  213|   213k|        while (curElem)
  ------------------
  |  Branch (213:16): [True: 7.12k, False: 206k]
  ------------------
  214|  7.12k|        {
  215|       |            // Save the next element before we hose this one
  216|  7.12k|            nextElem = curElem->fNext;
  217|       |
  218|       |            // If we adopted the data, then delete it too
  219|       |            //    (Note:  the userdata hash table instance has data type of void *.
  220|       |            //    This will generate compiler warnings here on some platforms, but they
  221|       |            //    can be ignored since fAdoptedElements is false.
  222|  7.12k|            if (fAdoptedElems)
  ------------------
  |  Branch (222:17): [True: 7.12k, False: 0]
  ------------------
  223|  7.12k|                delete curElem->fData;
  224|       |
  225|       |            // Then delete the current element and move forward
  226|       |             // delete curElem;
  227|       |            // destructor doesn't do anything...
  228|       |            // curElem->~RefHashTableBucketElem();
  229|  7.12k|            fMemoryManager->deallocate(curElem);
  230|  7.12k|            curElem = nextElem;
  231|  7.12k|        }
  232|       |
  233|       |        // Clean out this entry
  234|   206k|        fBucketList[buckInd] = 0;
  235|   206k|    }
  236|       |
  237|  7.12k|    fCount = 0;
  238|  7.12k|}
_ZNK11xercesc_3_214RefHashTableOfINS_7GrammarENS_12StringHasherEE7isEmptyEv:
  134|  28.5k|{
  135|  28.5k|    return fCount==0;
  136|  28.5k|}
_ZN11xercesc_3_214RefHashTableOfINS_15XMLNotationDeclENS_12StringHasherEE3getEPKv:
  349|  4.92k|{
  350|  4.92k|    XMLSize_t hashVal;
  351|  4.92k|    RefHashTableBucketElem<TVal>* findIt = findBucketElem(key, hashVal);
  352|  4.92k|    return findIt ? findIt->fData : 0;
  ------------------
  |  Branch (352:12): [True: 1.25k, False: 3.67k]
  ------------------
  353|  4.92k|}
_ZN11xercesc_3_214RefHashTableOfINS_15XMLNotationDeclENS_12StringHasherEE14findBucketElemEPKvRm:
  490|  6.81k|{
  491|       |    // Hash the key
  492|  6.81k|    hashVal = fHasher.getHashVal(key, fHashModulus);
  493|       |
  494|       |    // Search that bucket for the key
  495|  6.81k|    RefHashTableBucketElem<TVal>* curElem = fBucketList[hashVal];
  496|  9.21k|    while (curElem)
  ------------------
  |  Branch (496:12): [True: 3.65k, False: 5.56k]
  ------------------
  497|  3.65k|    {
  498|  3.65k|        if (fHasher.equals(key, curElem->fKey))
  ------------------
  |  Branch (498:13): [True: 1.25k, False: 2.40k]
  ------------------
  499|  1.25k|            return curElem;
  500|       |
  501|  2.40k|        curElem = curElem->fNext;
  502|  2.40k|    }
  503|  5.56k|    return 0;
  504|  6.81k|}
_ZNK11xercesc_3_214RefHashTableOfINS_15XMLNotationDeclENS_12StringHasherEE11containsKeyEPKv:
  140|  1.69k|{
  141|  1.69k|    XMLSize_t hashVal;
  142|  1.69k|    const RefHashTableBucketElem<TVal>* findIt = findBucketElem(key, hashVal);
  143|  1.69k|    return (findIt != 0);
  144|  1.69k|}
_ZNK11xercesc_3_214RefHashTableOfINS_15XMLNotationDeclENS_12StringHasherEE14findBucketElemEPKvRm:
  509|  1.69k|{
  510|       |    // Hash the key
  511|  1.69k|    hashVal = fHasher.getHashVal(key, fHashModulus);
  512|       |
  513|       |    // Search that bucket for the key
  514|  1.69k|    const RefHashTableBucketElem<TVal>* curElem = fBucketList[hashVal];
  515|  2.58k|    while (curElem)
  ------------------
  |  Branch (515:12): [True: 886, False: 1.69k]
  ------------------
  516|    886|    {
  517|    886|        if (fHasher.equals(key, curElem->fKey))
  ------------------
  |  Branch (517:13): [True: 0, False: 886]
  ------------------
  518|      0|            return curElem;
  519|       |
  520|    886|        curElem = curElem->fNext;
  521|    886|    }
  522|  1.69k|    return 0;
  523|  1.69k|}
_ZN11xercesc_3_214RefHashTableOfINS_15XMLNotationDeclENS_12StringHasherEE3putEPvPS1_:
  396|  1.88k|{
  397|       |    // Apply 0.75 load factor to find threshold.
  398|  1.88k|    XMLSize_t threshold = fHashModulus * 3 / 4;
  399|       |
  400|       |    // If we've grown too big, expand the table and rehash.
  401|  1.88k|    if (fCount >= threshold)
  ------------------
  |  Branch (401:9): [True: 10, False: 1.87k]
  ------------------
  402|     10|        rehash();
  403|       |
  404|       |    // First see if the key exists already
  405|  1.88k|    XMLSize_t hashVal;
  406|  1.88k|    RefHashTableBucketElem<TVal>* newBucket = findBucketElem(key, hashVal);
  407|       |
  408|       |    //
  409|       |    //  If so,then update its value. If not, then we need to add it to
  410|       |    //  the right bucket
  411|       |    //
  412|  1.88k|    if (newBucket)
  ------------------
  |  Branch (412:9): [True: 0, False: 1.88k]
  ------------------
  413|      0|    {
  414|      0|        if (fAdoptedElems)
  ------------------
  |  Branch (414:13): [True: 0, False: 0]
  ------------------
  415|      0|            delete newBucket->fData;
  416|      0|        newBucket->fData = valueToAdopt;
  417|      0|        newBucket->fKey = key;
  418|      0|    }
  419|  1.88k|    else
  420|  1.88k|    {
  421|  1.88k|        newBucket =
  422|  1.88k|             new (fMemoryManager->allocate(sizeof(RefHashTableBucketElem<TVal>)))
  423|  1.88k|             RefHashTableBucketElem<TVal>(key, valueToAdopt, fBucketList[hashVal]);
  424|  1.88k|        fBucketList[hashVal] = newBucket;
  425|  1.88k|        fCount++;
  426|  1.88k|    }
  427|  1.88k|}
_ZN11xercesc_3_214RefHashTableOfINS_15XMLNotationDeclENS_12StringHasherEE6rehashEv:
  436|     10|{
  437|     10|    const XMLSize_t newMod = (fHashModulus * 2) + 1;
  438|       |
  439|     10|    RefHashTableBucketElem<TVal>** newBucketList =
  440|     10|        (RefHashTableBucketElem<TVal>**) fMemoryManager->allocate
  441|     10|    (
  442|     10|        newMod * sizeof(RefHashTableBucketElem<TVal>*)
  443|     10|    );
  444|       |
  445|       |    // Make sure the new bucket list is destroyed if an
  446|       |    // exception is thrown.
  447|     10|    ArrayJanitor<RefHashTableBucketElem<TVal>*>  guard(newBucketList, fMemoryManager);
  448|       |
  449|     10|    memset(newBucketList, 0, newMod * sizeof(newBucketList[0]));
  450|       |
  451|       |
  452|       |    // Rehash all existing entries.
  453|  1.10k|    for (XMLSize_t index = 0; index < fHashModulus; index++)
  ------------------
  |  Branch (453:31): [True: 1.09k, False: 10]
  ------------------
  454|  1.09k|    {
  455|       |        // Get the bucket list head for this entry
  456|  1.09k|        RefHashTableBucketElem<TVal>* curElem = fBucketList[index];
  457|       |
  458|  1.90k|        while (curElem)
  ------------------
  |  Branch (458:16): [True: 810, False: 1.09k]
  ------------------
  459|    810|        {
  460|       |            // Save the next element before we detach this one
  461|    810|            RefHashTableBucketElem<TVal>* const nextElem = curElem->fNext;
  462|       |
  463|    810|            const XMLSize_t hashVal = fHasher.getHashVal(curElem->fKey, newMod);
  464|       |
  465|    810|            RefHashTableBucketElem<TVal>* const newHeadElem = newBucketList[hashVal];
  466|       |
  467|       |            // Insert at the start of this bucket's list.
  468|    810|            curElem->fNext = newHeadElem;
  469|    810|            newBucketList[hashVal] = curElem;
  470|       |
  471|    810|            curElem = nextElem;
  472|    810|        }
  473|  1.09k|    }
  474|       |
  475|     10|    RefHashTableBucketElem<TVal>** const oldBucketList = fBucketList;
  476|       |
  477|       |    // Everything is OK at this point, so update the
  478|       |    // member variables.
  479|     10|    fBucketList = guard.release();
  480|     10|    fHashModulus = newMod;
  481|       |
  482|       |    // Delete the old bucket list.
  483|     10|    fMemoryManager->deallocate(oldBucketList);//delete[] oldBucketList;
  484|       |
  485|     10|}
_ZN11xercesc_3_214RefHashTableOfINS_17DatatypeValidatorENS_12StringHasherEEC2EmPNS_13MemoryManagerE:
   45|      1|    : fMemoryManager(manager)
   46|      1|    , fAdoptedElems(true)
   47|      1|    , fBucketList(0)
   48|      1|    , fHashModulus(modulus)
   49|      1|    , fInitialModulus(modulus)
   50|      1|    , fCount(0)
   51|      1|{
   52|      1|    initialize(modulus);
   53|      1|}
_ZN11xercesc_3_214RefHashTableOfINS_17DatatypeValidatorENS_12StringHasherEE10initializeEm:
  109|      1|{
  110|      1|    if (modulus == 0)
  ------------------
  |  Branch (110:9): [True: 0, False: 1]
  ------------------
  111|      0|        ThrowXMLwithMemMgr(IllegalArgumentException, XMLExcepts::HshTbl_ZeroModulus, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  112|       |
  113|       |    // Allocate the bucket list and zero them
  114|      1|    fBucketList = (RefHashTableBucketElem<TVal>**) fMemoryManager->allocate
  115|      1|    (
  116|      1|        fHashModulus * sizeof(RefHashTableBucketElem<TVal>*)
  117|      1|    );
  118|     30|    for (XMLSize_t index = 0; index < fHashModulus; index++)
  ------------------
  |  Branch (118:31): [True: 29, False: 1]
  ------------------
  119|     29|        fBucketList[index] = 0;
  120|      1|}
_ZN11xercesc_3_214RefHashTableOfINS_17DatatypeValidatorENS_12StringHasherEE3putEPvPS1_:
  396|     45|{
  397|       |    // Apply 0.75 load factor to find threshold.
  398|     45|    XMLSize_t threshold = fHashModulus * 3 / 4;
  399|       |
  400|       |    // If we've grown too big, expand the table and rehash.
  401|     45|    if (fCount >= threshold)
  ------------------
  |  Branch (401:9): [True: 2, False: 43]
  ------------------
  402|      2|        rehash();
  403|       |
  404|       |    // First see if the key exists already
  405|     45|    XMLSize_t hashVal;
  406|     45|    RefHashTableBucketElem<TVal>* newBucket = findBucketElem(key, hashVal);
  407|       |
  408|       |    //
  409|       |    //  If so,then update its value. If not, then we need to add it to
  410|       |    //  the right bucket
  411|       |    //
  412|     45|    if (newBucket)
  ------------------
  |  Branch (412:9): [True: 0, False: 45]
  ------------------
  413|      0|    {
  414|      0|        if (fAdoptedElems)
  ------------------
  |  Branch (414:13): [True: 0, False: 0]
  ------------------
  415|      0|            delete newBucket->fData;
  416|      0|        newBucket->fData = valueToAdopt;
  417|      0|        newBucket->fKey = key;
  418|      0|    }
  419|     45|    else
  420|     45|    {
  421|     45|        newBucket =
  422|     45|             new (fMemoryManager->allocate(sizeof(RefHashTableBucketElem<TVal>)))
  423|     45|             RefHashTableBucketElem<TVal>(key, valueToAdopt, fBucketList[hashVal]);
  424|     45|        fBucketList[hashVal] = newBucket;
  425|     45|        fCount++;
  426|     45|    }
  427|     45|}
_ZN11xercesc_3_214RefHashTableOfINS_17DatatypeValidatorENS_12StringHasherEE6rehashEv:
  436|      2|{
  437|      2|    const XMLSize_t newMod = (fHashModulus * 2) + 1;
  438|       |
  439|      2|    RefHashTableBucketElem<TVal>** newBucketList =
  440|      2|        (RefHashTableBucketElem<TVal>**) fMemoryManager->allocate
  441|      2|    (
  442|      2|        newMod * sizeof(RefHashTableBucketElem<TVal>*)
  443|      2|    );
  444|       |
  445|       |    // Make sure the new bucket list is destroyed if an
  446|       |    // exception is thrown.
  447|      2|    ArrayJanitor<RefHashTableBucketElem<TVal>*>  guard(newBucketList, fMemoryManager);
  448|       |
  449|      2|    memset(newBucketList, 0, newMod * sizeof(newBucketList[0]));
  450|       |
  451|       |
  452|       |    // Rehash all existing entries.
  453|     90|    for (XMLSize_t index = 0; index < fHashModulus; index++)
  ------------------
  |  Branch (453:31): [True: 88, False: 2]
  ------------------
  454|     88|    {
  455|       |        // Get the bucket list head for this entry
  456|     88|        RefHashTableBucketElem<TVal>* curElem = fBucketList[index];
  457|       |
  458|    153|        while (curElem)
  ------------------
  |  Branch (458:16): [True: 65, False: 88]
  ------------------
  459|     65|        {
  460|       |            // Save the next element before we detach this one
  461|     65|            RefHashTableBucketElem<TVal>* const nextElem = curElem->fNext;
  462|       |
  463|     65|            const XMLSize_t hashVal = fHasher.getHashVal(curElem->fKey, newMod);
  464|       |
  465|     65|            RefHashTableBucketElem<TVal>* const newHeadElem = newBucketList[hashVal];
  466|       |
  467|       |            // Insert at the start of this bucket's list.
  468|     65|            curElem->fNext = newHeadElem;
  469|     65|            newBucketList[hashVal] = curElem;
  470|       |
  471|     65|            curElem = nextElem;
  472|     65|        }
  473|     88|    }
  474|       |
  475|      2|    RefHashTableBucketElem<TVal>** const oldBucketList = fBucketList;
  476|       |
  477|       |    // Everything is OK at this point, so update the
  478|       |    // member variables.
  479|      2|    fBucketList = guard.release();
  480|      2|    fHashModulus = newMod;
  481|       |
  482|       |    // Delete the old bucket list.
  483|      2|    fMemoryManager->deallocate(oldBucketList);//delete[] oldBucketList;
  484|       |
  485|      2|}
_ZN11xercesc_3_214RefHashTableOfINS_12KVStringPairENS_12StringHasherEEC2EmPNS_13MemoryManagerE:
   45|     20|    : fMemoryManager(manager)
   46|     20|    , fAdoptedElems(true)
   47|     20|    , fBucketList(0)
   48|     20|    , fHashModulus(modulus)
   49|     20|    , fInitialModulus(modulus)
   50|     20|    , fCount(0)
   51|     20|{
   52|     20|    initialize(modulus);
   53|     20|}
_ZN11xercesc_3_214RefHashTableOfINS_14XMLCanRepGroupENS_9PtrHasherEEC2EmbPNS_13MemoryManagerE:
   78|      1|    : fMemoryManager(manager)
   79|      1|    , fAdoptedElems(adoptElems)
   80|      1|    , fBucketList(0)
   81|      1|    , fHashModulus(modulus)
   82|      1|    , fInitialModulus(modulus)
   83|      1|    , fCount(0)
   84|       |
   85|      1|{
   86|      1|    initialize(modulus);
   87|      1|}
_ZN11xercesc_3_214RefHashTableOfINS_14XMLCanRepGroupENS_9PtrHasherEE10initializeEm:
  109|      1|{
  110|      1|    if (modulus == 0)
  ------------------
  |  Branch (110:9): [True: 0, False: 1]
  ------------------
  111|      0|        ThrowXMLwithMemMgr(IllegalArgumentException, XMLExcepts::HshTbl_ZeroModulus, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  112|       |
  113|       |    // Allocate the bucket list and zero them
  114|      1|    fBucketList = (RefHashTableBucketElem<TVal>**) fMemoryManager->allocate
  115|      1|    (
  116|      1|        fHashModulus * sizeof(RefHashTableBucketElem<TVal>*)
  117|      1|    );
  118|     30|    for (XMLSize_t index = 0; index < fHashModulus; index++)
  ------------------
  |  Branch (118:31): [True: 29, False: 1]
  ------------------
  119|     29|        fBucketList[index] = 0;
  120|      1|}
_ZN11xercesc_3_214RefHashTableOfINS_14XMLCanRepGroupENS_9PtrHasherEE3putEPvPS1_:
  396|     14|{
  397|       |    // Apply 0.75 load factor to find threshold.
  398|     14|    XMLSize_t threshold = fHashModulus * 3 / 4;
  399|       |
  400|       |    // If we've grown too big, expand the table and rehash.
  401|     14|    if (fCount >= threshold)
  ------------------
  |  Branch (401:9): [True: 0, False: 14]
  ------------------
  402|      0|        rehash();
  403|       |
  404|       |    // First see if the key exists already
  405|     14|    XMLSize_t hashVal;
  406|     14|    RefHashTableBucketElem<TVal>* newBucket = findBucketElem(key, hashVal);
  407|       |
  408|       |    //
  409|       |    //  If so,then update its value. If not, then we need to add it to
  410|       |    //  the right bucket
  411|       |    //
  412|     14|    if (newBucket)
  ------------------
  |  Branch (412:9): [True: 0, False: 14]
  ------------------
  413|      0|    {
  414|      0|        if (fAdoptedElems)
  ------------------
  |  Branch (414:13): [True: 0, False: 0]
  ------------------
  415|      0|            delete newBucket->fData;
  416|      0|        newBucket->fData = valueToAdopt;
  417|      0|        newBucket->fKey = key;
  418|      0|    }
  419|     14|    else
  420|     14|    {
  421|     14|        newBucket =
  422|     14|             new (fMemoryManager->allocate(sizeof(RefHashTableBucketElem<TVal>)))
  423|     14|             RefHashTableBucketElem<TVal>(key, valueToAdopt, fBucketList[hashVal]);
  424|     14|        fBucketList[hashVal] = newBucket;
  425|     14|        fCount++;
  426|     14|    }
  427|     14|}
_ZN11xercesc_3_214RefHashTableOfINS_14XMLCanRepGroupENS_9PtrHasherEE14findBucketElemEPKvRm:
  490|     14|{
  491|       |    // Hash the key
  492|     14|    hashVal = fHasher.getHashVal(key, fHashModulus);
  493|       |
  494|       |    // Search that bucket for the key
  495|     14|    RefHashTableBucketElem<TVal>* curElem = fBucketList[hashVal];
  496|     16|    while (curElem)
  ------------------
  |  Branch (496:12): [True: 2, False: 14]
  ------------------
  497|      2|    {
  498|      2|        if (fHasher.equals(key, curElem->fKey))
  ------------------
  |  Branch (498:13): [True: 0, False: 2]
  ------------------
  499|      0|            return curElem;
  500|       |
  501|      2|        curElem = curElem->fNext;
  502|      2|    }
  503|     14|    return 0;
  504|     14|}
_ZN11xercesc_3_214RefHashTableOfINS_14DTDElementDeclENS_12StringHasherEE3getEPKv:
  349|  24.4M|{
  350|  24.4M|    XMLSize_t hashVal;
  351|  24.4M|    RefHashTableBucketElem<TVal>* findIt = findBucketElem(key, hashVal);
  352|  24.4M|    return findIt ? findIt->fData : 0;
  ------------------
  |  Branch (352:12): [True: 20.1M, False: 4.26M]
  ------------------
  353|  24.4M|}
_ZN11xercesc_3_214RefHashTableOfINS_14DTDElementDeclENS_12StringHasherEE14findBucketElemEPKvRm:
  490|  24.4M|{
  491|       |    // Hash the key
  492|  24.4M|    hashVal = fHasher.getHashVal(key, fHashModulus);
  493|       |
  494|       |    // Search that bucket for the key
  495|  24.4M|    RefHashTableBucketElem<TVal>* curElem = fBucketList[hashVal];
  496|  25.7M|    while (curElem)
  ------------------
  |  Branch (496:12): [True: 21.4M, False: 4.30M]
  ------------------
  497|  21.4M|    {
  498|  21.4M|        if (fHasher.equals(key, curElem->fKey))
  ------------------
  |  Branch (498:13): [True: 20.1M, False: 1.31M]
  ------------------
  499|  20.1M|            return curElem;
  500|       |
  501|  1.31M|        curElem = curElem->fNext;
  502|  1.31M|    }
  503|  4.30M|    return 0;
  504|  24.4M|}
_ZNK11xercesc_3_214RefHashTableOfINS_13DTDEntityDeclENS_12StringHasherEE11containsKeyEPKv:
  140|  3.32k|{
  141|  3.32k|    XMLSize_t hashVal;
  142|  3.32k|    const RefHashTableBucketElem<TVal>* findIt = findBucketElem(key, hashVal);
  143|  3.32k|    return (findIt != 0);
  144|  3.32k|}
_ZNK11xercesc_3_214RefHashTableOfINS_13DTDEntityDeclENS_12StringHasherEE14findBucketElemEPKvRm:
  509|  3.32k|{
  510|       |    // Hash the key
  511|  3.32k|    hashVal = fHasher.getHashVal(key, fHashModulus);
  512|       |
  513|       |    // Search that bucket for the key
  514|  3.32k|    const RefHashTableBucketElem<TVal>* curElem = fBucketList[hashVal];
  515|  4.63k|    while (curElem)
  ------------------
  |  Branch (515:12): [True: 1.31k, False: 3.32k]
  ------------------
  516|  1.31k|    {
  517|  1.31k|        if (fHasher.equals(key, curElem->fKey))
  ------------------
  |  Branch (517:13): [True: 0, False: 1.31k]
  ------------------
  518|      0|            return curElem;
  519|       |
  520|  1.31k|        curElem = curElem->fNext;
  521|  1.31k|    }
  522|  3.32k|    return 0;
  523|  3.32k|}
_ZN11xercesc_3_214RefHashTableOfINS_13DTDEntityDeclENS_12StringHasherEE3putEPvPS1_:
  396|  5.44k|{
  397|       |    // Apply 0.75 load factor to find threshold.
  398|  5.44k|    XMLSize_t threshold = fHashModulus * 3 / 4;
  399|       |
  400|       |    // If we've grown too big, expand the table and rehash.
  401|  5.44k|    if (fCount >= threshold)
  ------------------
  |  Branch (401:9): [True: 16, False: 5.42k]
  ------------------
  402|     16|        rehash();
  403|       |
  404|       |    // First see if the key exists already
  405|  5.44k|    XMLSize_t hashVal;
  406|  5.44k|    RefHashTableBucketElem<TVal>* newBucket = findBucketElem(key, hashVal);
  407|       |
  408|       |    //
  409|       |    //  If so,then update its value. If not, then we need to add it to
  410|       |    //  the right bucket
  411|       |    //
  412|  5.44k|    if (newBucket)
  ------------------
  |  Branch (412:9): [True: 0, False: 5.44k]
  ------------------
  413|      0|    {
  414|      0|        if (fAdoptedElems)
  ------------------
  |  Branch (414:13): [True: 0, False: 0]
  ------------------
  415|      0|            delete newBucket->fData;
  416|      0|        newBucket->fData = valueToAdopt;
  417|      0|        newBucket->fKey = key;
  418|      0|    }
  419|  5.44k|    else
  420|  5.44k|    {
  421|  5.44k|        newBucket =
  422|  5.44k|             new (fMemoryManager->allocate(sizeof(RefHashTableBucketElem<TVal>)))
  423|  5.44k|             RefHashTableBucketElem<TVal>(key, valueToAdopt, fBucketList[hashVal]);
  424|  5.44k|        fBucketList[hashVal] = newBucket;
  425|  5.44k|        fCount++;
  426|  5.44k|    }
  427|  5.44k|}
_ZN11xercesc_3_214RefHashTableOfINS_13DTDEntityDeclENS_12StringHasherEE6rehashEv:
  436|     16|{
  437|     16|    const XMLSize_t newMod = (fHashModulus * 2) + 1;
  438|       |
  439|     16|    RefHashTableBucketElem<TVal>** newBucketList =
  440|     16|        (RefHashTableBucketElem<TVal>**) fMemoryManager->allocate
  441|     16|    (
  442|     16|        newMod * sizeof(RefHashTableBucketElem<TVal>*)
  443|     16|    );
  444|       |
  445|       |    // Make sure the new bucket list is destroyed if an
  446|       |    // exception is thrown.
  447|     16|    ArrayJanitor<RefHashTableBucketElem<TVal>*>  guard(newBucketList, fMemoryManager);
  448|       |
  449|     16|    memset(newBucketList, 0, newMod * sizeof(newBucketList[0]));
  450|       |
  451|       |
  452|       |    // Rehash all existing entries.
  453|  1.76k|    for (XMLSize_t index = 0; index < fHashModulus; index++)
  ------------------
  |  Branch (453:31): [True: 1.74k, False: 16]
  ------------------
  454|  1.74k|    {
  455|       |        // Get the bucket list head for this entry
  456|  1.74k|        RefHashTableBucketElem<TVal>* curElem = fBucketList[index];
  457|       |
  458|  3.04k|        while (curElem)
  ------------------
  |  Branch (458:16): [True: 1.29k, False: 1.74k]
  ------------------
  459|  1.29k|        {
  460|       |            // Save the next element before we detach this one
  461|  1.29k|            RefHashTableBucketElem<TVal>* const nextElem = curElem->fNext;
  462|       |
  463|  1.29k|            const XMLSize_t hashVal = fHasher.getHashVal(curElem->fKey, newMod);
  464|       |
  465|  1.29k|            RefHashTableBucketElem<TVal>* const newHeadElem = newBucketList[hashVal];
  466|       |
  467|       |            // Insert at the start of this bucket's list.
  468|  1.29k|            curElem->fNext = newHeadElem;
  469|  1.29k|            newBucketList[hashVal] = curElem;
  470|       |
  471|  1.29k|            curElem = nextElem;
  472|  1.29k|        }
  473|  1.74k|    }
  474|       |
  475|     16|    RefHashTableBucketElem<TVal>** const oldBucketList = fBucketList;
  476|       |
  477|       |    // Everything is OK at this point, so update the
  478|       |    // member variables.
  479|     16|    fBucketList = guard.release();
  480|     16|    fHashModulus = newMod;
  481|       |
  482|       |    // Delete the old bucket list.
  483|     16|    fMemoryManager->deallocate(oldBucketList);//delete[] oldBucketList;
  484|       |
  485|     16|}
_ZN11xercesc_3_214RefHashTableOfINS_13DTDEntityDeclENS_12StringHasherEE14findBucketElemEPKvRm:
  490|  6.10M|{
  491|       |    // Hash the key
  492|  6.10M|    hashVal = fHasher.getHashVal(key, fHashModulus);
  493|       |
  494|       |    // Search that bucket for the key
  495|  6.10M|    RefHashTableBucketElem<TVal>* curElem = fBucketList[hashVal];
  496|  6.13M|    while (curElem)
  ------------------
  |  Branch (496:12): [True: 482k, False: 5.64M]
  ------------------
  497|   482k|    {
  498|   482k|        if (fHasher.equals(key, curElem->fKey))
  ------------------
  |  Branch (498:13): [True: 460k, False: 22.1k]
  ------------------
  499|   460k|            return curElem;
  500|       |
  501|  22.1k|        curElem = curElem->fNext;
  502|  22.1k|    }
  503|  5.64M|    return 0;
  504|  6.10M|}
_ZN11xercesc_3_214RefHashTableOfINS_14DTDElementDeclENS_12StringHasherEEC2EmPNS_13MemoryManagerE:
   45|  14.2k|    : fMemoryManager(manager)
   46|  14.2k|    , fAdoptedElems(true)
   47|  14.2k|    , fBucketList(0)
   48|  14.2k|    , fHashModulus(modulus)
   49|  14.2k|    , fInitialModulus(modulus)
   50|  14.2k|    , fCount(0)
   51|  14.2k|{
   52|  14.2k|    initialize(modulus);
   53|  14.2k|}
_ZN11xercesc_3_214RefHashTableOfINS_14DTDElementDeclENS_12StringHasherEE10initializeEm:
  109|  14.2k|{
  110|  14.2k|    if (modulus == 0)
  ------------------
  |  Branch (110:9): [True: 0, False: 14.2k]
  ------------------
  111|      0|        ThrowXMLwithMemMgr(IllegalArgumentException, XMLExcepts::HshTbl_ZeroModulus, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  112|       |
  113|       |    // Allocate the bucket list and zero them
  114|  14.2k|    fBucketList = (RefHashTableBucketElem<TVal>**) fMemoryManager->allocate
  115|  14.2k|    (
  116|  14.2k|        fHashModulus * sizeof(RefHashTableBucketElem<TVal>*)
  117|  14.2k|    );
  118|   997k|    for (XMLSize_t index = 0; index < fHashModulus; index++)
  ------------------
  |  Branch (118:31): [True: 983k, False: 14.2k]
  ------------------
  119|   983k|        fBucketList[index] = 0;
  120|  14.2k|}
_ZN11xercesc_3_214RefHashTableOfINS_14DTDElementDeclENS_12StringHasherEED2Ev:
  124|  14.2k|{
  125|  14.2k|    cleanup();
  126|  14.2k|}
_ZN11xercesc_3_214RefHashTableOfINS_14DTDElementDeclENS_12StringHasherEE7cleanupEv:
  302|  14.2k|{
  303|  14.2k|    removeAll();
  304|       |
  305|       |    // Then delete the bucket list & hasher
  306|  14.2k|    fMemoryManager->deallocate(fBucketList);
  307|  14.2k|    fBucketList = 0;
  308|  14.2k|}
_ZN11xercesc_3_214RefHashTableOfINS_14DTDElementDeclENS_12StringHasherEE9removeAllEv:
  203|  14.2k|{
  204|  14.2k|    if(isEmpty())
  ------------------
  |  Branch (204:8): [True: 6.83k, False: 7.41k]
  ------------------
  205|  6.83k|        return;
  206|       |
  207|       |    // Clean up the buckets first
  208|   712k|    for (XMLSize_t buckInd = 0; buckInd < fHashModulus; buckInd++)
  ------------------
  |  Branch (208:33): [True: 704k, False: 7.41k]
  ------------------
  209|   704k|    {
  210|       |        // Get the bucket list head for this entry
  211|   704k|        RefHashTableBucketElem<TVal>* curElem = fBucketList[buckInd];
  212|   704k|        RefHashTableBucketElem<TVal>* nextElem;
  213|   741k|        while (curElem)
  ------------------
  |  Branch (213:16): [True: 37.0k, False: 704k]
  ------------------
  214|  37.0k|        {
  215|       |            // Save the next element before we hose this one
  216|  37.0k|            nextElem = curElem->fNext;
  217|       |
  218|       |            // If we adopted the data, then delete it too
  219|       |            //    (Note:  the userdata hash table instance has data type of void *.
  220|       |            //    This will generate compiler warnings here on some platforms, but they
  221|       |            //    can be ignored since fAdoptedElements is false.
  222|  37.0k|            if (fAdoptedElems)
  ------------------
  |  Branch (222:17): [True: 37.0k, False: 0]
  ------------------
  223|  37.0k|                delete curElem->fData;
  224|       |
  225|       |            // Then delete the current element and move forward
  226|       |             // delete curElem;
  227|       |            // destructor doesn't do anything...
  228|       |            // curElem->~RefHashTableBucketElem();
  229|  37.0k|            fMemoryManager->deallocate(curElem);
  230|  37.0k|            curElem = nextElem;
  231|  37.0k|        }
  232|       |
  233|       |        // Clean out this entry
  234|   704k|        fBucketList[buckInd] = 0;
  235|   704k|    }
  236|       |
  237|  7.41k|    fCount = 0;
  238|  7.41k|}
_ZNK11xercesc_3_214RefHashTableOfINS_14DTDElementDeclENS_12StringHasherEE7isEmptyEv:
  134|  14.2k|{
  135|  14.2k|    return fCount==0;
  136|  14.2k|}
_ZNK11xercesc_3_214RefHashTableOfINS_14DTDElementDeclENS_12StringHasherEE11containsKeyEPKv:
  140|  29.5k|{
  141|  29.5k|    XMLSize_t hashVal;
  142|  29.5k|    const RefHashTableBucketElem<TVal>* findIt = findBucketElem(key, hashVal);
  143|  29.5k|    return (findIt != 0);
  144|  29.5k|}
_ZNK11xercesc_3_214RefHashTableOfINS_14DTDElementDeclENS_12StringHasherEE14findBucketElemEPKvRm:
  509|  29.5k|{
  510|       |    // Hash the key
  511|  29.5k|    hashVal = fHasher.getHashVal(key, fHashModulus);
  512|       |
  513|       |    // Search that bucket for the key
  514|  29.5k|    const RefHashTableBucketElem<TVal>* curElem = fBucketList[hashVal];
  515|  35.1k|    while (curElem)
  ------------------
  |  Branch (515:12): [True: 5.60k, False: 29.5k]
  ------------------
  516|  5.60k|    {
  517|  5.60k|        if (fHasher.equals(key, curElem->fKey))
  ------------------
  |  Branch (517:13): [True: 0, False: 5.60k]
  ------------------
  518|      0|            return curElem;
  519|       |
  520|  5.60k|        curElem = curElem->fNext;
  521|  5.60k|    }
  522|  29.5k|    return 0;
  523|  29.5k|}
_ZN11xercesc_3_214RefHashTableOfINS_14DTDElementDeclENS_12StringHasherEE3putEPvPS1_:
  396|  37.0k|{
  397|       |    // Apply 0.75 load factor to find threshold.
  398|  37.0k|    XMLSize_t threshold = fHashModulus * 3 / 4;
  399|       |
  400|       |    // If we've grown too big, expand the table and rehash.
  401|  37.0k|    if (fCount >= threshold)
  ------------------
  |  Branch (401:9): [True: 78, False: 36.9k]
  ------------------
  402|     78|        rehash();
  403|       |
  404|       |    // First see if the key exists already
  405|  37.0k|    XMLSize_t hashVal;
  406|  37.0k|    RefHashTableBucketElem<TVal>* newBucket = findBucketElem(key, hashVal);
  407|       |
  408|       |    //
  409|       |    //  If so,then update its value. If not, then we need to add it to
  410|       |    //  the right bucket
  411|       |    //
  412|  37.0k|    if (newBucket)
  ------------------
  |  Branch (412:9): [True: 0, False: 37.0k]
  ------------------
  413|      0|    {
  414|      0|        if (fAdoptedElems)
  ------------------
  |  Branch (414:13): [True: 0, False: 0]
  ------------------
  415|      0|            delete newBucket->fData;
  416|      0|        newBucket->fData = valueToAdopt;
  417|      0|        newBucket->fKey = key;
  418|      0|    }
  419|  37.0k|    else
  420|  37.0k|    {
  421|  37.0k|        newBucket =
  422|  37.0k|             new (fMemoryManager->allocate(sizeof(RefHashTableBucketElem<TVal>)))
  423|  37.0k|             RefHashTableBucketElem<TVal>(key, valueToAdopt, fBucketList[hashVal]);
  424|  37.0k|        fBucketList[hashVal] = newBucket;
  425|  37.0k|        fCount++;
  426|  37.0k|    }
  427|  37.0k|}
_ZN11xercesc_3_214RefHashTableOfINS_14DTDElementDeclENS_12StringHasherEE6rehashEv:
  436|     78|{
  437|     78|    const XMLSize_t newMod = (fHashModulus * 2) + 1;
  438|       |
  439|     78|    RefHashTableBucketElem<TVal>** newBucketList =
  440|     78|        (RefHashTableBucketElem<TVal>**) fMemoryManager->allocate
  441|     78|    (
  442|     78|        newMod * sizeof(RefHashTableBucketElem<TVal>*)
  443|     78|    );
  444|       |
  445|       |    // Make sure the new bucket list is destroyed if an
  446|       |    // exception is thrown.
  447|     78|    ArrayJanitor<RefHashTableBucketElem<TVal>*>  guard(newBucketList, fMemoryManager);
  448|       |
  449|     78|    memset(newBucketList, 0, newMod * sizeof(newBucketList[0]));
  450|       |
  451|       |
  452|       |    // Rehash all existing entries.
  453|  5.94k|    for (XMLSize_t index = 0; index < fHashModulus; index++)
  ------------------
  |  Branch (453:31): [True: 5.86k, False: 78]
  ------------------
  454|  5.86k|    {
  455|       |        // Get the bucket list head for this entry
  456|  5.86k|        RefHashTableBucketElem<TVal>* curElem = fBucketList[index];
  457|       |
  458|  10.2k|        while (curElem)
  ------------------
  |  Branch (458:16): [True: 4.34k, False: 5.86k]
  ------------------
  459|  4.34k|        {
  460|       |            // Save the next element before we detach this one
  461|  4.34k|            RefHashTableBucketElem<TVal>* const nextElem = curElem->fNext;
  462|       |
  463|  4.34k|            const XMLSize_t hashVal = fHasher.getHashVal(curElem->fKey, newMod);
  464|       |
  465|  4.34k|            RefHashTableBucketElem<TVal>* const newHeadElem = newBucketList[hashVal];
  466|       |
  467|       |            // Insert at the start of this bucket's list.
  468|  4.34k|            curElem->fNext = newHeadElem;
  469|  4.34k|            newBucketList[hashVal] = curElem;
  470|       |
  471|  4.34k|            curElem = nextElem;
  472|  4.34k|        }
  473|  5.86k|    }
  474|       |
  475|     78|    RefHashTableBucketElem<TVal>** const oldBucketList = fBucketList;
  476|       |
  477|       |    // Everything is OK at this point, so update the
  478|       |    // member variables.
  479|     78|    fBucketList = guard.release();
  480|     78|    fHashModulus = newMod;
  481|       |
  482|       |    // Delete the old bucket list.
  483|     78|    fMemoryManager->deallocate(oldBucketList);//delete[] oldBucketList;
  484|       |
  485|     78|}
_ZN11xercesc_3_214RefHashTableOfINS_13DTDEntityDeclENS_12StringHasherEEC2EmPNS_13MemoryManagerE:
   45|  13.1k|    : fMemoryManager(manager)
   46|  13.1k|    , fAdoptedElems(true)
   47|  13.1k|    , fBucketList(0)
   48|  13.1k|    , fHashModulus(modulus)
   49|  13.1k|    , fInitialModulus(modulus)
   50|  13.1k|    , fCount(0)
   51|  13.1k|{
   52|  13.1k|    initialize(modulus);
   53|  13.1k|}
_ZN11xercesc_3_214RefHashTableOfINS_13DTDEntityDeclENS_12StringHasherEE10initializeEm:
  109|  13.1k|{
  110|  13.1k|    if (modulus == 0)
  ------------------
  |  Branch (110:9): [True: 0, False: 13.1k]
  ------------------
  111|      0|        ThrowXMLwithMemMgr(IllegalArgumentException, XMLExcepts::HshTbl_ZeroModulus, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  112|       |
  113|       |    // Allocate the bucket list and zero them
  114|  13.1k|    fBucketList = (RefHashTableBucketElem<TVal>**) fMemoryManager->allocate
  115|  13.1k|    (
  116|  13.1k|        fHashModulus * sizeof(RefHashTableBucketElem<TVal>*)
  117|  13.1k|    );
  118|  1.44M|    for (XMLSize_t index = 0; index < fHashModulus; index++)
  ------------------
  |  Branch (118:31): [True: 1.43M, False: 13.1k]
  ------------------
  119|  1.43M|        fBucketList[index] = 0;
  120|  13.1k|}
_ZN11xercesc_3_214RefHashTableOfINS_13DTDEntityDeclENS_12StringHasherEED2Ev:
  124|  13.1k|{
  125|  13.1k|    cleanup();
  126|  13.1k|}
_ZN11xercesc_3_214RefHashTableOfINS_13DTDEntityDeclENS_12StringHasherEE7cleanupEv:
  302|  13.1k|{
  303|  13.1k|    removeAll();
  304|       |
  305|       |    // Then delete the bucket list & hasher
  306|  13.1k|    fMemoryManager->deallocate(fBucketList);
  307|  13.1k|    fBucketList = 0;
  308|  13.1k|}
_ZN11xercesc_3_214RefHashTableOfINS_13DTDEntityDeclENS_12StringHasherEE9removeAllEv:
  203|  13.1k|{
  204|  13.1k|    if(isEmpty())
  ------------------
  |  Branch (204:8): [True: 11.0k, False: 2.12k]
  ------------------
  205|  11.0k|        return;
  206|       |
  207|       |    // Clean up the buckets first
  208|   234k|    for (XMLSize_t buckInd = 0; buckInd < fHashModulus; buckInd++)
  ------------------
  |  Branch (208:33): [True: 232k, False: 2.12k]
  ------------------
  209|   232k|    {
  210|       |        // Get the bucket list head for this entry
  211|   232k|        RefHashTableBucketElem<TVal>* curElem = fBucketList[buckInd];
  212|   232k|        RefHashTableBucketElem<TVal>* nextElem;
  213|   238k|        while (curElem)
  ------------------
  |  Branch (213:16): [True: 5.43k, False: 232k]
  ------------------
  214|  5.43k|        {
  215|       |            // Save the next element before we hose this one
  216|  5.43k|            nextElem = curElem->fNext;
  217|       |
  218|       |            // If we adopted the data, then delete it too
  219|       |            //    (Note:  the userdata hash table instance has data type of void *.
  220|       |            //    This will generate compiler warnings here on some platforms, but they
  221|       |            //    can be ignored since fAdoptedElements is false.
  222|  5.43k|            if (fAdoptedElems)
  ------------------
  |  Branch (222:17): [True: 5.43k, False: 0]
  ------------------
  223|  5.43k|                delete curElem->fData;
  224|       |
  225|       |            // Then delete the current element and move forward
  226|       |             // delete curElem;
  227|       |            // destructor doesn't do anything...
  228|       |            // curElem->~RefHashTableBucketElem();
  229|  5.43k|            fMemoryManager->deallocate(curElem);
  230|  5.43k|            curElem = nextElem;
  231|  5.43k|        }
  232|       |
  233|       |        // Clean out this entry
  234|   232k|        fBucketList[buckInd] = 0;
  235|   232k|    }
  236|       |
  237|  2.12k|    fCount = 0;
  238|  2.12k|}
_ZNK11xercesc_3_214RefHashTableOfINS_13DTDEntityDeclENS_12StringHasherEE7isEmptyEv:
  134|  13.1k|{
  135|  13.1k|    return fCount==0;
  136|  13.1k|}
_ZN11xercesc_3_214RefHashTableOfINS_15XMLNotationDeclENS_12StringHasherEEC2EmPNS_13MemoryManagerE:
   45|  7.12k|    : fMemoryManager(manager)
   46|  7.12k|    , fAdoptedElems(true)
   47|  7.12k|    , fBucketList(0)
   48|  7.12k|    , fHashModulus(modulus)
   49|  7.12k|    , fInitialModulus(modulus)
   50|  7.12k|    , fCount(0)
   51|  7.12k|{
   52|  7.12k|    initialize(modulus);
   53|  7.12k|}
_ZN11xercesc_3_214RefHashTableOfINS_15XMLNotationDeclENS_12StringHasherEE10initializeEm:
  109|  7.12k|{
  110|  7.12k|    if (modulus == 0)
  ------------------
  |  Branch (110:9): [True: 0, False: 7.12k]
  ------------------
  111|      0|        ThrowXMLwithMemMgr(IllegalArgumentException, XMLExcepts::HshTbl_ZeroModulus, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  112|       |
  113|       |    // Allocate the bucket list and zero them
  114|  7.12k|    fBucketList = (RefHashTableBucketElem<TVal>**) fMemoryManager->allocate
  115|  7.12k|    (
  116|  7.12k|        fHashModulus * sizeof(RefHashTableBucketElem<TVal>*)
  117|  7.12k|    );
  118|   783k|    for (XMLSize_t index = 0; index < fHashModulus; index++)
  ------------------
  |  Branch (118:31): [True: 776k, False: 7.12k]
  ------------------
  119|   776k|        fBucketList[index] = 0;
  120|  7.12k|}
_ZN11xercesc_3_214RefHashTableOfINS_15XMLNotationDeclENS_12StringHasherEED2Ev:
  124|  7.12k|{
  125|  7.12k|    cleanup();
  126|  7.12k|}
_ZN11xercesc_3_214RefHashTableOfINS_15XMLNotationDeclENS_12StringHasherEE7cleanupEv:
  302|  7.12k|{
  303|  7.12k|    removeAll();
  304|       |
  305|       |    // Then delete the bucket list & hasher
  306|  7.12k|    fMemoryManager->deallocate(fBucketList);
  307|  7.12k|    fBucketList = 0;
  308|  7.12k|}
_ZN11xercesc_3_214RefHashTableOfINS_15XMLNotationDeclENS_12StringHasherEE9removeAllEv:
  203|  7.12k|{
  204|  7.12k|    if(isEmpty())
  ------------------
  |  Branch (204:8): [True: 6.93k, False: 191]
  ------------------
  205|  6.93k|        return;
  206|       |
  207|       |    // Clean up the buckets first
  208|  22.1k|    for (XMLSize_t buckInd = 0; buckInd < fHashModulus; buckInd++)
  ------------------
  |  Branch (208:33): [True: 21.9k, False: 191]
  ------------------
  209|  21.9k|    {
  210|       |        // Get the bucket list head for this entry
  211|  21.9k|        RefHashTableBucketElem<TVal>* curElem = fBucketList[buckInd];
  212|  21.9k|        RefHashTableBucketElem<TVal>* nextElem;
  213|  23.8k|        while (curElem)
  ------------------
  |  Branch (213:16): [True: 1.88k, False: 21.9k]
  ------------------
  214|  1.88k|        {
  215|       |            // Save the next element before we hose this one
  216|  1.88k|            nextElem = curElem->fNext;
  217|       |
  218|       |            // If we adopted the data, then delete it too
  219|       |            //    (Note:  the userdata hash table instance has data type of void *.
  220|       |            //    This will generate compiler warnings here on some platforms, but they
  221|       |            //    can be ignored since fAdoptedElements is false.
  222|  1.88k|            if (fAdoptedElems)
  ------------------
  |  Branch (222:17): [True: 1.88k, False: 0]
  ------------------
  223|  1.88k|                delete curElem->fData;
  224|       |
  225|       |            // Then delete the current element and move forward
  226|       |             // delete curElem;
  227|       |            // destructor doesn't do anything...
  228|       |            // curElem->~RefHashTableBucketElem();
  229|  1.88k|            fMemoryManager->deallocate(curElem);
  230|  1.88k|            curElem = nextElem;
  231|  1.88k|        }
  232|       |
  233|       |        // Clean out this entry
  234|  21.9k|        fBucketList[buckInd] = 0;
  235|  21.9k|    }
  236|       |
  237|    191|    fCount = 0;
  238|    191|}
_ZNK11xercesc_3_214RefHashTableOfINS_15XMLNotationDeclENS_12StringHasherEE7isEmptyEv:
  134|  7.12k|{
  135|  7.12k|    return fCount==0;
  136|  7.12k|}
_ZN11xercesc_3_214RefHashTableOfINS_13DTDEntityDeclENS_12StringHasherEE3getEPKv:
  349|  6.10M|{
  350|  6.10M|    XMLSize_t hashVal;
  351|  6.10M|    RefHashTableBucketElem<TVal>* findIt = findBucketElem(key, hashVal);
  352|  6.10M|    return findIt ? findIt->fData : 0;
  ------------------
  |  Branch (352:12): [True: 460k, False: 5.64M]
  ------------------
  353|  6.10M|}
_ZN11xercesc_3_214RefHashTableOfINS_17RangeTokenElemMapENS_12StringHasherEEC2EmPNS_13MemoryManagerE:
   45|      1|    : fMemoryManager(manager)
   46|      1|    , fAdoptedElems(true)
   47|      1|    , fBucketList(0)
   48|      1|    , fHashModulus(modulus)
   49|      1|    , fInitialModulus(modulus)
   50|      1|    , fCount(0)
   51|      1|{
   52|      1|    initialize(modulus);
   53|      1|}
_ZN11xercesc_3_214RefHashTableOfINS_17RangeTokenElemMapENS_12StringHasherEE10initializeEm:
  109|      1|{
  110|      1|    if (modulus == 0)
  ------------------
  |  Branch (110:9): [True: 0, False: 1]
  ------------------
  111|      0|        ThrowXMLwithMemMgr(IllegalArgumentException, XMLExcepts::HshTbl_ZeroModulus, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  112|       |
  113|       |    // Allocate the bucket list and zero them
  114|      1|    fBucketList = (RefHashTableBucketElem<TVal>**) fMemoryManager->allocate
  115|      1|    (
  116|      1|        fHashModulus * sizeof(RefHashTableBucketElem<TVal>*)
  117|      1|    );
  118|    110|    for (XMLSize_t index = 0; index < fHashModulus; index++)
  ------------------
  |  Branch (118:31): [True: 109, False: 1]
  ------------------
  119|    109|        fBucketList[index] = 0;
  120|      1|}
_ZN11xercesc_3_214RefHashTableOfINS_12RangeFactoryENS_12StringHasherEEC2EmPNS_13MemoryManagerE:
   45|      1|    : fMemoryManager(manager)
   46|      1|    , fAdoptedElems(true)
   47|      1|    , fBucketList(0)
   48|      1|    , fHashModulus(modulus)
   49|      1|    , fInitialModulus(modulus)
   50|      1|    , fCount(0)
   51|      1|{
   52|      1|    initialize(modulus);
   53|      1|}
_ZN11xercesc_3_214RefHashTableOfINS_12RangeFactoryENS_12StringHasherEE10initializeEm:
  109|      1|{
  110|      1|    if (modulus == 0)
  ------------------
  |  Branch (110:9): [True: 0, False: 1]
  ------------------
  111|      0|        ThrowXMLwithMemMgr(IllegalArgumentException, XMLExcepts::HshTbl_ZeroModulus, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  112|       |
  113|       |    // Allocate the bucket list and zero them
  114|      1|    fBucketList = (RefHashTableBucketElem<TVal>**) fMemoryManager->allocate
  115|      1|    (
  116|      1|        fHashModulus * sizeof(RefHashTableBucketElem<TVal>*)
  117|      1|    );
  118|     30|    for (XMLSize_t index = 0; index < fHashModulus; index++)
  ------------------
  |  Branch (118:31): [True: 29, False: 1]
  ------------------
  119|     29|        fBucketList[index] = 0;
  120|      1|}
_ZNK11xercesc_3_214RefHashTableOfINS_17RangeTokenElemMapENS_12StringHasherEE11containsKeyEPKv:
  140|    436|{
  141|    436|    XMLSize_t hashVal;
  142|    436|    const RefHashTableBucketElem<TVal>* findIt = findBucketElem(key, hashVal);
  143|    436|    return (findIt != 0);
  144|    436|}
_ZNK11xercesc_3_214RefHashTableOfINS_17RangeTokenElemMapENS_12StringHasherEE14findBucketElemEPKvRm:
  509|    436|{
  510|       |    // Hash the key
  511|    436|    hashVal = fHasher.getHashVal(key, fHashModulus);
  512|       |
  513|       |    // Search that bucket for the key
  514|    436|    const RefHashTableBucketElem<TVal>* curElem = fBucketList[hashVal];
  515|    574|    while (curElem)
  ------------------
  |  Branch (515:12): [True: 428, False: 146]
  ------------------
  516|    428|    {
  517|    428|        if (fHasher.equals(key, curElem->fKey))
  ------------------
  |  Branch (517:13): [True: 290, False: 138]
  ------------------
  518|    290|            return curElem;
  519|       |
  520|    138|        curElem = curElem->fNext;
  521|    138|    }
  522|    146|    return 0;
  523|    436|}
_ZN11xercesc_3_214RefHashTableOfINS_17RangeTokenElemMapENS_12StringHasherEE3getEPKv:
  349|    290|{
  350|    290|    XMLSize_t hashVal;
  351|    290|    RefHashTableBucketElem<TVal>* findIt = findBucketElem(key, hashVal);
  352|    290|    return findIt ? findIt->fData : 0;
  ------------------
  |  Branch (352:12): [True: 290, False: 0]
  ------------------
  353|    290|}
_ZN11xercesc_3_214RefHashTableOfINS_17RangeTokenElemMapENS_12StringHasherEE14findBucketElemEPKvRm:
  490|    436|{
  491|       |    // Hash the key
  492|    436|    hashVal = fHasher.getHashVal(key, fHashModulus);
  493|       |
  494|       |    // Search that bucket for the key
  495|    436|    RefHashTableBucketElem<TVal>* curElem = fBucketList[hashVal];
  496|    574|    while (curElem)
  ------------------
  |  Branch (496:12): [True: 428, False: 146]
  ------------------
  497|    428|    {
  498|    428|        if (fHasher.equals(key, curElem->fKey))
  ------------------
  |  Branch (498:13): [True: 290, False: 138]
  ------------------
  499|    290|            return curElem;
  500|       |
  501|    138|        curElem = curElem->fNext;
  502|    138|    }
  503|    146|    return 0;
  504|    436|}
_ZN11xercesc_3_214RefHashTableOfINS_12RangeFactoryENS_12StringHasherEE3getEPKv:
  349|      4|{
  350|      4|    XMLSize_t hashVal;
  351|      4|    RefHashTableBucketElem<TVal>* findIt = findBucketElem(key, hashVal);
  352|      4|    return findIt ? findIt->fData : 0;
  ------------------
  |  Branch (352:12): [True: 4, False: 0]
  ------------------
  353|      4|}
_ZN11xercesc_3_214RefHashTableOfINS_12RangeFactoryENS_12StringHasherEE14findBucketElemEPKvRm:
  490|      8|{
  491|       |    // Hash the key
  492|      8|    hashVal = fHasher.getHashVal(key, fHashModulus);
  493|       |
  494|       |    // Search that bucket for the key
  495|      8|    RefHashTableBucketElem<TVal>* curElem = fBucketList[hashVal];
  496|     10|    while (curElem)
  ------------------
  |  Branch (496:12): [True: 6, False: 4]
  ------------------
  497|      6|    {
  498|      6|        if (fHasher.equals(key, curElem->fKey))
  ------------------
  |  Branch (498:13): [True: 4, False: 2]
  ------------------
  499|      4|            return curElem;
  500|       |
  501|      2|        curElem = curElem->fNext;
  502|      2|    }
  503|      4|    return 0;
  504|      8|}
_ZN11xercesc_3_214RefHashTableOfINS_12RangeFactoryENS_12StringHasherEE3putEPvPS1_:
  396|      4|{
  397|       |    // Apply 0.75 load factor to find threshold.
  398|      4|    XMLSize_t threshold = fHashModulus * 3 / 4;
  399|       |
  400|       |    // If we've grown too big, expand the table and rehash.
  401|      4|    if (fCount >= threshold)
  ------------------
  |  Branch (401:9): [True: 0, False: 4]
  ------------------
  402|      0|        rehash();
  403|       |
  404|       |    // First see if the key exists already
  405|      4|    XMLSize_t hashVal;
  406|      4|    RefHashTableBucketElem<TVal>* newBucket = findBucketElem(key, hashVal);
  407|       |
  408|       |    //
  409|       |    //  If so,then update its value. If not, then we need to add it to
  410|       |    //  the right bucket
  411|       |    //
  412|      4|    if (newBucket)
  ------------------
  |  Branch (412:9): [True: 0, False: 4]
  ------------------
  413|      0|    {
  414|      0|        if (fAdoptedElems)
  ------------------
  |  Branch (414:13): [True: 0, False: 0]
  ------------------
  415|      0|            delete newBucket->fData;
  416|      0|        newBucket->fData = valueToAdopt;
  417|      0|        newBucket->fKey = key;
  418|      0|    }
  419|      4|    else
  420|      4|    {
  421|      4|        newBucket =
  422|      4|             new (fMemoryManager->allocate(sizeof(RefHashTableBucketElem<TVal>)))
  423|      4|             RefHashTableBucketElem<TVal>(key, valueToAdopt, fBucketList[hashVal]);
  424|      4|        fBucketList[hashVal] = newBucket;
  425|      4|        fCount++;
  426|      4|    }
  427|      4|}
_ZN11xercesc_3_214RefHashTableOfINS_17RangeTokenElemMapENS_12StringHasherEE3putEPvPS1_:
  396|    146|{
  397|       |    // Apply 0.75 load factor to find threshold.
  398|    146|    XMLSize_t threshold = fHashModulus * 3 / 4;
  399|       |
  400|       |    // If we've grown too big, expand the table and rehash.
  401|    146|    if (fCount >= threshold)
  ------------------
  |  Branch (401:9): [True: 1, False: 145]
  ------------------
  402|      1|        rehash();
  403|       |
  404|       |    // First see if the key exists already
  405|    146|    XMLSize_t hashVal;
  406|    146|    RefHashTableBucketElem<TVal>* newBucket = findBucketElem(key, hashVal);
  407|       |
  408|       |    //
  409|       |    //  If so,then update its value. If not, then we need to add it to
  410|       |    //  the right bucket
  411|       |    //
  412|    146|    if (newBucket)
  ------------------
  |  Branch (412:9): [True: 0, False: 146]
  ------------------
  413|      0|    {
  414|      0|        if (fAdoptedElems)
  ------------------
  |  Branch (414:13): [True: 0, False: 0]
  ------------------
  415|      0|            delete newBucket->fData;
  416|      0|        newBucket->fData = valueToAdopt;
  417|      0|        newBucket->fKey = key;
  418|      0|    }
  419|    146|    else
  420|    146|    {
  421|    146|        newBucket =
  422|    146|             new (fMemoryManager->allocate(sizeof(RefHashTableBucketElem<TVal>)))
  423|    146|             RefHashTableBucketElem<TVal>(key, valueToAdopt, fBucketList[hashVal]);
  424|    146|        fBucketList[hashVal] = newBucket;
  425|    146|        fCount++;
  426|    146|    }
  427|    146|}
_ZN11xercesc_3_214RefHashTableOfINS_17RangeTokenElemMapENS_12StringHasherEE6rehashEv:
  436|      1|{
  437|      1|    const XMLSize_t newMod = (fHashModulus * 2) + 1;
  438|       |
  439|      1|    RefHashTableBucketElem<TVal>** newBucketList =
  440|      1|        (RefHashTableBucketElem<TVal>**) fMemoryManager->allocate
  441|      1|    (
  442|      1|        newMod * sizeof(RefHashTableBucketElem<TVal>*)
  443|      1|    );
  444|       |
  445|       |    // Make sure the new bucket list is destroyed if an
  446|       |    // exception is thrown.
  447|      1|    ArrayJanitor<RefHashTableBucketElem<TVal>*>  guard(newBucketList, fMemoryManager);
  448|       |
  449|      1|    memset(newBucketList, 0, newMod * sizeof(newBucketList[0]));
  450|       |
  451|       |
  452|       |    // Rehash all existing entries.
  453|    110|    for (XMLSize_t index = 0; index < fHashModulus; index++)
  ------------------
  |  Branch (453:31): [True: 109, False: 1]
  ------------------
  454|    109|    {
  455|       |        // Get the bucket list head for this entry
  456|    109|        RefHashTableBucketElem<TVal>* curElem = fBucketList[index];
  457|       |
  458|    190|        while (curElem)
  ------------------
  |  Branch (458:16): [True: 81, False: 109]
  ------------------
  459|     81|        {
  460|       |            // Save the next element before we detach this one
  461|     81|            RefHashTableBucketElem<TVal>* const nextElem = curElem->fNext;
  462|       |
  463|     81|            const XMLSize_t hashVal = fHasher.getHashVal(curElem->fKey, newMod);
  464|       |
  465|     81|            RefHashTableBucketElem<TVal>* const newHeadElem = newBucketList[hashVal];
  466|       |
  467|       |            // Insert at the start of this bucket's list.
  468|     81|            curElem->fNext = newHeadElem;
  469|     81|            newBucketList[hashVal] = curElem;
  470|       |
  471|     81|            curElem = nextElem;
  472|     81|        }
  473|    109|    }
  474|       |
  475|      1|    RefHashTableBucketElem<TVal>** const oldBucketList = fBucketList;
  476|       |
  477|       |    // Everything is OK at this point, so update the
  478|       |    // member variables.
  479|      1|    fBucketList = guard.release();
  480|      1|    fHashModulus = newMod;
  481|       |
  482|       |    // Delete the old bucket list.
  483|      1|    fMemoryManager->deallocate(oldBucketList);//delete[] oldBucketList;
  484|       |
  485|      1|}
_ZN11xercesc_3_214RefHashTableOfINS_13XMLStringPool8PoolElemENS_12StringHasherEEC2EmbPNS_13MemoryManagerE:
   78|  14.2k|    : fMemoryManager(manager)
   79|  14.2k|    , fAdoptedElems(adoptElems)
   80|  14.2k|    , fBucketList(0)
   81|  14.2k|    , fHashModulus(modulus)
   82|  14.2k|    , fInitialModulus(modulus)
   83|  14.2k|    , fCount(0)
   84|       |
   85|  14.2k|{
   86|  14.2k|    initialize(modulus);
   87|  14.2k|}
_ZN11xercesc_3_214RefHashTableOfINS_13XMLStringPool8PoolElemENS_12StringHasherEE10initializeEm:
  109|  14.2k|{
  110|  14.2k|    if (modulus == 0)
  ------------------
  |  Branch (110:9): [True: 0, False: 14.2k]
  ------------------
  111|      0|        ThrowXMLwithMemMgr(IllegalArgumentException, XMLExcepts::HshTbl_ZeroModulus, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  112|       |
  113|       |    // Allocate the bucket list and zero them
  114|  14.2k|    fBucketList = (RefHashTableBucketElem<TVal>**) fMemoryManager->allocate
  115|  14.2k|    (
  116|  14.2k|        fHashModulus * sizeof(RefHashTableBucketElem<TVal>*)
  117|  14.2k|    );
  118|  1.56M|    for (XMLSize_t index = 0; index < fHashModulus; index++)
  ------------------
  |  Branch (118:31): [True: 1.55M, False: 14.2k]
  ------------------
  119|  1.55M|        fBucketList[index] = 0;
  120|  14.2k|}
_ZN11xercesc_3_214RefHashTableOfINS_13XMLStringPool8PoolElemENS_12StringHasherEED2Ev:
  124|  14.2k|{
  125|  14.2k|    cleanup();
  126|  14.2k|}
_ZN11xercesc_3_214RefHashTableOfINS_13XMLStringPool8PoolElemENS_12StringHasherEE7cleanupEv:
  302|  14.2k|{
  303|  14.2k|    removeAll();
  304|       |
  305|       |    // Then delete the bucket list & hasher
  306|  14.2k|    fMemoryManager->deallocate(fBucketList);
  307|  14.2k|    fBucketList = 0;
  308|  14.2k|}
_ZN11xercesc_3_214RefHashTableOfINS_13XMLStringPool8PoolElemENS_12StringHasherEE9removeAllEv:
  203|  14.2k|{
  204|  14.2k|    if(isEmpty())
  ------------------
  |  Branch (204:8): [True: 0, False: 14.2k]
  ------------------
  205|      0|        return;
  206|       |
  207|       |    // Clean up the buckets first
  208|  1.56M|    for (XMLSize_t buckInd = 0; buckInd < fHashModulus; buckInd++)
  ------------------
  |  Branch (208:33): [True: 1.55M, False: 14.2k]
  ------------------
  209|  1.55M|    {
  210|       |        // Get the bucket list head for this entry
  211|  1.55M|        RefHashTableBucketElem<TVal>* curElem = fBucketList[buckInd];
  212|  1.55M|        RefHashTableBucketElem<TVal>* nextElem;
  213|  1.61M|        while (curElem)
  ------------------
  |  Branch (213:16): [True: 57.0k, False: 1.55M]
  ------------------
  214|  57.0k|        {
  215|       |            // Save the next element before we hose this one
  216|  57.0k|            nextElem = curElem->fNext;
  217|       |
  218|       |            // If we adopted the data, then delete it too
  219|       |            //    (Note:  the userdata hash table instance has data type of void *.
  220|       |            //    This will generate compiler warnings here on some platforms, but they
  221|       |            //    can be ignored since fAdoptedElements is false.
  222|  57.0k|            if (fAdoptedElems)
  ------------------
  |  Branch (222:17): [True: 0, False: 57.0k]
  ------------------
  223|      0|                delete curElem->fData;
  224|       |
  225|       |            // Then delete the current element and move forward
  226|       |             // delete curElem;
  227|       |            // destructor doesn't do anything...
  228|       |            // curElem->~RefHashTableBucketElem();
  229|  57.0k|            fMemoryManager->deallocate(curElem);
  230|  57.0k|            curElem = nextElem;
  231|  57.0k|        }
  232|       |
  233|       |        // Clean out this entry
  234|  1.55M|        fBucketList[buckInd] = 0;
  235|  1.55M|    }
  236|       |
  237|  14.2k|    fCount = 0;
  238|  14.2k|}
_ZNK11xercesc_3_214RefHashTableOfINS_13XMLStringPool8PoolElemENS_12StringHasherEE7isEmptyEv:
  134|  14.2k|{
  135|  14.2k|    return fCount==0;
  136|  14.2k|}
_ZN11xercesc_3_214RefHashTableOfINS_13XMLStringPool8PoolElemENS_12StringHasherEE3putEPvPS2_:
  396|  57.0k|{
  397|       |    // Apply 0.75 load factor to find threshold.
  398|  57.0k|    XMLSize_t threshold = fHashModulus * 3 / 4;
  399|       |
  400|       |    // If we've grown too big, expand the table and rehash.
  401|  57.0k|    if (fCount >= threshold)
  ------------------
  |  Branch (401:9): [True: 0, False: 57.0k]
  ------------------
  402|      0|        rehash();
  403|       |
  404|       |    // First see if the key exists already
  405|  57.0k|    XMLSize_t hashVal;
  406|  57.0k|    RefHashTableBucketElem<TVal>* newBucket = findBucketElem(key, hashVal);
  407|       |
  408|       |    //
  409|       |    //  If so,then update its value. If not, then we need to add it to
  410|       |    //  the right bucket
  411|       |    //
  412|  57.0k|    if (newBucket)
  ------------------
  |  Branch (412:9): [True: 0, False: 57.0k]
  ------------------
  413|      0|    {
  414|      0|        if (fAdoptedElems)
  ------------------
  |  Branch (414:13): [True: 0, False: 0]
  ------------------
  415|      0|            delete newBucket->fData;
  416|      0|        newBucket->fData = valueToAdopt;
  417|      0|        newBucket->fKey = key;
  418|      0|    }
  419|  57.0k|    else
  420|  57.0k|    {
  421|  57.0k|        newBucket =
  422|  57.0k|             new (fMemoryManager->allocate(sizeof(RefHashTableBucketElem<TVal>)))
  423|  57.0k|             RefHashTableBucketElem<TVal>(key, valueToAdopt, fBucketList[hashVal]);
  424|  57.0k|        fBucketList[hashVal] = newBucket;
  425|  57.0k|        fCount++;
  426|  57.0k|    }
  427|  57.0k|}
_ZN11xercesc_3_214RefHashTableOfINS_10XMLRefInfoENS_12StringHasherEEC2EmPNS_13MemoryManagerE:
   45|  7.12k|    : fMemoryManager(manager)
   46|  7.12k|    , fAdoptedElems(true)
   47|  7.12k|    , fBucketList(0)
   48|  7.12k|    , fHashModulus(modulus)
   49|  7.12k|    , fInitialModulus(modulus)
   50|  7.12k|    , fCount(0)
   51|  7.12k|{
   52|  7.12k|    initialize(modulus);
   53|  7.12k|}
_ZN11xercesc_3_214RefHashTableOfINS_10XMLRefInfoENS_12StringHasherEE10initializeEm:
  109|  7.12k|{
  110|  7.12k|    if (modulus == 0)
  ------------------
  |  Branch (110:9): [True: 0, False: 7.12k]
  ------------------
  111|      0|        ThrowXMLwithMemMgr(IllegalArgumentException, XMLExcepts::HshTbl_ZeroModulus, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  112|       |
  113|       |    // Allocate the bucket list and zero them
  114|  7.12k|    fBucketList = (RefHashTableBucketElem<TVal>**) fMemoryManager->allocate
  115|  7.12k|    (
  116|  7.12k|        fHashModulus * sizeof(RefHashTableBucketElem<TVal>*)
  117|  7.12k|    );
  118|   783k|    for (XMLSize_t index = 0; index < fHashModulus; index++)
  ------------------
  |  Branch (118:31): [True: 776k, False: 7.12k]
  ------------------
  119|   776k|        fBucketList[index] = 0;
  120|  7.12k|}
_ZN11xercesc_3_214RefHashTableOfINS_10XMLRefInfoENS_12StringHasherEE3getEPKv:
  349|  2.49M|{
  350|  2.49M|    XMLSize_t hashVal;
  351|  2.49M|    RefHashTableBucketElem<TVal>* findIt = findBucketElem(key, hashVal);
  352|  2.49M|    return findIt ? findIt->fData : 0;
  ------------------
  |  Branch (352:12): [True: 2.48M, False: 8.08k]
  ------------------
  353|  2.49M|}
_ZN11xercesc_3_214RefHashTableOfINS_10XMLRefInfoENS_12StringHasherEE14findBucketElemEPKvRm:
  490|  2.50M|{
  491|       |    // Hash the key
  492|  2.50M|    hashVal = fHasher.getHashVal(key, fHashModulus);
  493|       |
  494|       |    // Search that bucket for the key
  495|  2.50M|    RefHashTableBucketElem<TVal>* curElem = fBucketList[hashVal];
  496|  2.50M|    while (curElem)
  ------------------
  |  Branch (496:12): [True: 2.49M, False: 16.1k]
  ------------------
  497|  2.49M|    {
  498|  2.49M|        if (fHasher.equals(key, curElem->fKey))
  ------------------
  |  Branch (498:13): [True: 2.48M, False: 7.68k]
  ------------------
  499|  2.48M|            return curElem;
  500|       |
  501|  7.68k|        curElem = curElem->fNext;
  502|  7.68k|    }
  503|  16.1k|    return 0;
  504|  2.50M|}
_ZN11xercesc_3_214RefHashTableOfINS_10XMLRefInfoENS_12StringHasherEE3putEPvPS1_:
  396|  8.08k|{
  397|       |    // Apply 0.75 load factor to find threshold.
  398|  8.08k|    XMLSize_t threshold = fHashModulus * 3 / 4;
  399|       |
  400|       |    // If we've grown too big, expand the table and rehash.
  401|  8.08k|    if (fCount >= threshold)
  ------------------
  |  Branch (401:9): [True: 63, False: 8.02k]
  ------------------
  402|     63|        rehash();
  403|       |
  404|       |    // First see if the key exists already
  405|  8.08k|    XMLSize_t hashVal;
  406|  8.08k|    RefHashTableBucketElem<TVal>* newBucket = findBucketElem(key, hashVal);
  407|       |
  408|       |    //
  409|       |    //  If so,then update its value. If not, then we need to add it to
  410|       |    //  the right bucket
  411|       |    //
  412|  8.08k|    if (newBucket)
  ------------------
  |  Branch (412:9): [True: 0, False: 8.08k]
  ------------------
  413|      0|    {
  414|      0|        if (fAdoptedElems)
  ------------------
  |  Branch (414:13): [True: 0, False: 0]
  ------------------
  415|      0|            delete newBucket->fData;
  416|      0|        newBucket->fData = valueToAdopt;
  417|      0|        newBucket->fKey = key;
  418|      0|    }
  419|  8.08k|    else
  420|  8.08k|    {
  421|  8.08k|        newBucket =
  422|  8.08k|             new (fMemoryManager->allocate(sizeof(RefHashTableBucketElem<TVal>)))
  423|  8.08k|             RefHashTableBucketElem<TVal>(key, valueToAdopt, fBucketList[hashVal]);
  424|  8.08k|        fBucketList[hashVal] = newBucket;
  425|  8.08k|        fCount++;
  426|  8.08k|    }
  427|  8.08k|}
_ZN11xercesc_3_214RefHashTableOfINS_10XMLRefInfoENS_12StringHasherEE6rehashEv:
  436|     63|{
  437|     63|    const XMLSize_t newMod = (fHashModulus * 2) + 1;
  438|       |
  439|     63|    RefHashTableBucketElem<TVal>** newBucketList =
  440|     63|        (RefHashTableBucketElem<TVal>**) fMemoryManager->allocate
  441|     63|    (
  442|     63|        newMod * sizeof(RefHashTableBucketElem<TVal>*)
  443|     63|    );
  444|       |
  445|       |    // Make sure the new bucket list is destroyed if an
  446|       |    // exception is thrown.
  447|     63|    ArrayJanitor<RefHashTableBucketElem<TVal>*>  guard(newBucketList, fMemoryManager);
  448|       |
  449|     63|    memset(newBucketList, 0, newMod * sizeof(newBucketList[0]));
  450|       |
  451|       |
  452|       |    // Rehash all existing entries.
  453|  11.1k|    for (XMLSize_t index = 0; index < fHashModulus; index++)
  ------------------
  |  Branch (453:31): [True: 11.0k, False: 63]
  ------------------
  454|  11.0k|    {
  455|       |        // Get the bucket list head for this entry
  456|  11.0k|        RefHashTableBucketElem<TVal>* curElem = fBucketList[index];
  457|       |
  458|  19.2k|        while (curElem)
  ------------------
  |  Branch (458:16): [True: 8.25k, False: 11.0k]
  ------------------
  459|  8.25k|        {
  460|       |            // Save the next element before we detach this one
  461|  8.25k|            RefHashTableBucketElem<TVal>* const nextElem = curElem->fNext;
  462|       |
  463|  8.25k|            const XMLSize_t hashVal = fHasher.getHashVal(curElem->fKey, newMod);
  464|       |
  465|  8.25k|            RefHashTableBucketElem<TVal>* const newHeadElem = newBucketList[hashVal];
  466|       |
  467|       |            // Insert at the start of this bucket's list.
  468|  8.25k|            curElem->fNext = newHeadElem;
  469|  8.25k|            newBucketList[hashVal] = curElem;
  470|       |
  471|  8.25k|            curElem = nextElem;
  472|  8.25k|        }
  473|  11.0k|    }
  474|       |
  475|     63|    RefHashTableBucketElem<TVal>** const oldBucketList = fBucketList;
  476|       |
  477|       |    // Everything is OK at this point, so update the
  478|       |    // member variables.
  479|     63|    fBucketList = guard.release();
  480|     63|    fHashModulus = newMod;
  481|       |
  482|       |    // Delete the old bucket list.
  483|     63|    fMemoryManager->deallocate(oldBucketList);//delete[] oldBucketList;
  484|       |
  485|     63|}
_ZN11xercesc_3_214RefHashTableOfIjNS_9PtrHasherEE9removeAllEv:
  203|  7.12k|{
  204|  7.12k|    if(isEmpty())
  ------------------
  |  Branch (204:8): [True: 6.64k, False: 484]
  ------------------
  205|  6.64k|        return;
  206|       |
  207|       |    // Clean up the buckets first
  208|  63.8k|    for (XMLSize_t buckInd = 0; buckInd < fHashModulus; buckInd++)
  ------------------
  |  Branch (208:33): [True: 63.4k, False: 484]
  ------------------
  209|  63.4k|    {
  210|       |        // Get the bucket list head for this entry
  211|  63.4k|        RefHashTableBucketElem<TVal>* curElem = fBucketList[buckInd];
  212|  63.4k|        RefHashTableBucketElem<TVal>* nextElem;
  213|  63.9k|        while (curElem)
  ------------------
  |  Branch (213:16): [True: 523, False: 63.4k]
  ------------------
  214|    523|        {
  215|       |            // Save the next element before we hose this one
  216|    523|            nextElem = curElem->fNext;
  217|       |
  218|       |            // If we adopted the data, then delete it too
  219|       |            //    (Note:  the userdata hash table instance has data type of void *.
  220|       |            //    This will generate compiler warnings here on some platforms, but they
  221|       |            //    can be ignored since fAdoptedElements is false.
  222|    523|            if (fAdoptedElems)
  ------------------
  |  Branch (222:17): [True: 0, False: 523]
  ------------------
  223|      0|                delete curElem->fData;
  224|       |
  225|       |            // Then delete the current element and move forward
  226|       |             // delete curElem;
  227|       |            // destructor doesn't do anything...
  228|       |            // curElem->~RefHashTableBucketElem();
  229|    523|            fMemoryManager->deallocate(curElem);
  230|    523|            curElem = nextElem;
  231|    523|        }
  232|       |
  233|       |        // Clean out this entry
  234|  63.4k|        fBucketList[buckInd] = 0;
  235|  63.4k|    }
  236|       |
  237|    484|    fCount = 0;
  238|    484|}
_ZNK11xercesc_3_214RefHashTableOfIjNS_9PtrHasherEE7isEmptyEv:
  134|  7.12k|{
  135|  7.12k|    return fCount==0;
  136|  7.12k|}
_ZN11xercesc_3_224RefHashTableOfEnumeratorINS_9DTDAttDefENS_12StringHasherEEC2EPNS_14RefHashTableOfIS1_S2_EEbPNS_13MemoryManagerE:
  533|  27.6k|    : fAdopted(adopt), fCurElem(0), fCurHash((XMLSize_t)-1), fToEnum(toEnum)
  534|  27.6k|    , fMemoryManager(manager)
  535|  27.6k|{
  536|  27.6k|    if (!toEnum)
  ------------------
  |  Branch (536:9): [True: 0, False: 27.6k]
  ------------------
  537|      0|        ThrowXMLwithMemMgr(NullPointerException, XMLExcepts::CPtr_PointerIsZero, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  538|       |
  539|       |    //
  540|       |    //  Find the next available bucket element in the hash table. If it
  541|       |    //  comes back zero, that just means the table is empty.
  542|       |    //
  543|       |    //  Note that the -1 in the current hash tells it to start
  544|       |    //  from the beginning.
  545|       |    //
  546|  27.6k|    findNext();
  547|  27.6k|}
_ZN11xercesc_3_224RefHashTableOfEnumeratorINS_9DTDAttDefENS_12StringHasherEE8findNextEv:
  632|  27.6k|{
  633|       |    //
  634|       |    //  If there is a current element, move to its next element. If this
  635|       |    //  hits the end of the bucket, the next block will handle the rest.
  636|       |    //
  637|  27.6k|    if (fCurElem)
  ------------------
  |  Branch (637:9): [True: 0, False: 27.6k]
  ------------------
  638|      0|        fCurElem = fCurElem->fNext;
  639|       |
  640|       |    //
  641|       |    //  If the current element is null, then we have to move up to the
  642|       |    //  next hash value. If that is the hash modulus, then we cannot
  643|       |    //  go further.
  644|       |    //
  645|  27.6k|    if (!fCurElem)
  ------------------
  |  Branch (645:9): [True: 27.6k, False: 0]
  ------------------
  646|  27.6k|    {
  647|  27.6k|        fCurHash++;
  648|  27.6k|        if (fCurHash == fToEnum->fHashModulus)
  ------------------
  |  Branch (648:13): [True: 0, False: 27.6k]
  ------------------
  649|      0|            return;
  650|       |
  651|       |        // Else find the next non-empty bucket
  652|   766k|        while (fToEnum->fBucketList[fCurHash]==0)
  ------------------
  |  Branch (652:16): [True: 764k, False: 2.10k]
  ------------------
  653|   764k|        {
  654|       |            // Bump to the next hash value. If we max out return
  655|   764k|            fCurHash++;
  656|   764k|            if (fCurHash == fToEnum->fHashModulus)
  ------------------
  |  Branch (656:17): [True: 25.5k, False: 739k]
  ------------------
  657|  25.5k|                return;
  658|   764k|        }
  659|  2.10k|        fCurElem = fToEnum->fBucketList[fCurHash];
  660|  2.10k|    }
  661|  27.6k|}
_ZN11xercesc_3_224RefHashTableOfEnumeratorINS_9DTDAttDefENS_12StringHasherEED2Ev:
  551|  27.6k|{
  552|  27.6k|    if (fAdopted)
  ------------------
  |  Branch (552:9): [True: 0, False: 27.6k]
  ------------------
  553|      0|        delete fToEnum;
  554|  27.6k|}
_ZN11xercesc_3_214RefHashTableOfINS_9DTDAttDefENS_12StringHasherEED2Ev:
  124|  27.6k|{
  125|  27.6k|    cleanup();
  126|  27.6k|}
_ZN11xercesc_3_214RefHashTableOfINS_9DTDAttDefENS_12StringHasherEE7cleanupEv:
  302|  27.6k|{
  303|  27.6k|    removeAll();
  304|       |
  305|       |    // Then delete the bucket list & hasher
  306|  27.6k|    fMemoryManager->deallocate(fBucketList);
  307|  27.6k|    fBucketList = 0;
  308|  27.6k|}
_ZN11xercesc_3_214RefHashTableOfINS_9DTDAttDefENS_12StringHasherEE9removeAllEv:
  203|  27.6k|{
  204|  27.6k|    if(isEmpty())
  ------------------
  |  Branch (204:8): [True: 25.5k, False: 2.10k]
  ------------------
  205|  25.5k|        return;
  206|       |
  207|       |    // Clean up the buckets first
  208|  77.1k|    for (XMLSize_t buckInd = 0; buckInd < fHashModulus; buckInd++)
  ------------------
  |  Branch (208:33): [True: 74.9k, False: 2.10k]
  ------------------
  209|  74.9k|    {
  210|       |        // Get the bucket list head for this entry
  211|  74.9k|        RefHashTableBucketElem<TVal>* curElem = fBucketList[buckInd];
  212|  74.9k|        RefHashTableBucketElem<TVal>* nextElem;
  213|  89.1k|        while (curElem)
  ------------------
  |  Branch (213:16): [True: 14.1k, False: 74.9k]
  ------------------
  214|  14.1k|        {
  215|       |            // Save the next element before we hose this one
  216|  14.1k|            nextElem = curElem->fNext;
  217|       |
  218|       |            // If we adopted the data, then delete it too
  219|       |            //    (Note:  the userdata hash table instance has data type of void *.
  220|       |            //    This will generate compiler warnings here on some platforms, but they
  221|       |            //    can be ignored since fAdoptedElements is false.
  222|  14.1k|            if (fAdoptedElems)
  ------------------
  |  Branch (222:17): [True: 14.1k, False: 0]
  ------------------
  223|  14.1k|                delete curElem->fData;
  224|       |
  225|       |            // Then delete the current element and move forward
  226|       |             // delete curElem;
  227|       |            // destructor doesn't do anything...
  228|       |            // curElem->~RefHashTableBucketElem();
  229|  14.1k|            fMemoryManager->deallocate(curElem);
  230|  14.1k|            curElem = nextElem;
  231|  14.1k|        }
  232|       |
  233|       |        // Clean out this entry
  234|  74.9k|        fBucketList[buckInd] = 0;
  235|  74.9k|    }
  236|       |
  237|  2.10k|    fCount = 0;
  238|  2.10k|}
_ZNK11xercesc_3_214RefHashTableOfINS_9DTDAttDefENS_12StringHasherEE7isEmptyEv:
  134|  12.7M|{
  135|  12.7M|    return fCount==0;
  136|  12.7M|}
_ZN11xercesc_3_214RefHashTableOfINS_9DTDAttDefENS_12StringHasherEE3getEPKv:
  349|  5.46M|{
  350|  5.46M|    XMLSize_t hashVal;
  351|  5.46M|    RefHashTableBucketElem<TVal>* findIt = findBucketElem(key, hashVal);
  352|  5.46M|    return findIt ? findIt->fData : 0;
  ------------------
  |  Branch (352:12): [True: 4.24M, False: 1.22M]
  ------------------
  353|  5.46M|}
_ZN11xercesc_3_214RefHashTableOfINS_9DTDAttDefENS_12StringHasherEE14findBucketElemEPKvRm:
  490|  5.48M|{
  491|       |    // Hash the key
  492|  5.48M|    hashVal = fHasher.getHashVal(key, fHashModulus);
  493|       |
  494|       |    // Search that bucket for the key
  495|  5.48M|    RefHashTableBucketElem<TVal>* curElem = fBucketList[hashVal];
  496|  5.84M|    while (curElem)
  ------------------
  |  Branch (496:12): [True: 4.60M, False: 1.23M]
  ------------------
  497|  4.60M|    {
  498|  4.60M|        if (fHasher.equals(key, curElem->fKey))
  ------------------
  |  Branch (498:13): [True: 4.24M, False: 360k]
  ------------------
  499|  4.24M|            return curElem;
  500|       |
  501|   360k|        curElem = curElem->fNext;
  502|   360k|    }
  503|  1.23M|    return 0;
  504|  5.48M|}
_ZN11xercesc_3_214RefHashTableOfINS_9DTDAttDefENS_12StringHasherEEC2EmbPNS_13MemoryManagerE:
   78|  27.6k|    : fMemoryManager(manager)
   79|  27.6k|    , fAdoptedElems(adoptElems)
   80|  27.6k|    , fBucketList(0)
   81|  27.6k|    , fHashModulus(modulus)
   82|  27.6k|    , fInitialModulus(modulus)
   83|  27.6k|    , fCount(0)
   84|       |
   85|  27.6k|{
   86|  27.6k|    initialize(modulus);
   87|  27.6k|}
_ZN11xercesc_3_214RefHashTableOfINS_9DTDAttDefENS_12StringHasherEE10initializeEm:
  109|  27.6k|{
  110|  27.6k|    if (modulus == 0)
  ------------------
  |  Branch (110:9): [True: 0, False: 27.6k]
  ------------------
  111|      0|        ThrowXMLwithMemMgr(IllegalArgumentException, XMLExcepts::HshTbl_ZeroModulus, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  112|       |
  113|       |    // Allocate the bucket list and zero them
  114|  27.6k|    fBucketList = (RefHashTableBucketElem<TVal>**) fMemoryManager->allocate
  115|  27.6k|    (
  116|  27.6k|        fHashModulus * sizeof(RefHashTableBucketElem<TVal>*)
  117|  27.6k|    );
  118|   828k|    for (XMLSize_t index = 0; index < fHashModulus; index++)
  ------------------
  |  Branch (118:31): [True: 800k, False: 27.6k]
  ------------------
  119|   800k|        fBucketList[index] = 0;
  120|  27.6k|}
_ZN11xercesc_3_214RefHashTableOfINS_9DTDAttDefENS_12StringHasherEE3putEPvPS1_:
  396|  14.1k|{
  397|       |    // Apply 0.75 load factor to find threshold.
  398|  14.1k|    XMLSize_t threshold = fHashModulus * 3 / 4;
  399|       |
  400|       |    // If we've grown too big, expand the table and rehash.
  401|  14.1k|    if (fCount >= threshold)
  ------------------
  |  Branch (401:9): [True: 429, False: 13.7k]
  ------------------
  402|    429|        rehash();
  403|       |
  404|       |    // First see if the key exists already
  405|  14.1k|    XMLSize_t hashVal;
  406|  14.1k|    RefHashTableBucketElem<TVal>* newBucket = findBucketElem(key, hashVal);
  407|       |
  408|       |    //
  409|       |    //  If so,then update its value. If not, then we need to add it to
  410|       |    //  the right bucket
  411|       |    //
  412|  14.1k|    if (newBucket)
  ------------------
  |  Branch (412:9): [True: 0, False: 14.1k]
  ------------------
  413|      0|    {
  414|      0|        if (fAdoptedElems)
  ------------------
  |  Branch (414:13): [True: 0, False: 0]
  ------------------
  415|      0|            delete newBucket->fData;
  416|      0|        newBucket->fData = valueToAdopt;
  417|      0|        newBucket->fKey = key;
  418|      0|    }
  419|  14.1k|    else
  420|  14.1k|    {
  421|  14.1k|        newBucket =
  422|  14.1k|             new (fMemoryManager->allocate(sizeof(RefHashTableBucketElem<TVal>)))
  423|  14.1k|             RefHashTableBucketElem<TVal>(key, valueToAdopt, fBucketList[hashVal]);
  424|  14.1k|        fBucketList[hashVal] = newBucket;
  425|  14.1k|        fCount++;
  426|  14.1k|    }
  427|  14.1k|}
_ZN11xercesc_3_214RefHashTableOfINS_9DTDAttDefENS_12StringHasherEE6rehashEv:
  436|    429|{
  437|    429|    const XMLSize_t newMod = (fHashModulus * 2) + 1;
  438|       |
  439|    429|    RefHashTableBucketElem<TVal>** newBucketList =
  440|    429|        (RefHashTableBucketElem<TVal>**) fMemoryManager->allocate
  441|    429|    (
  442|    429|        newMod * sizeof(RefHashTableBucketElem<TVal>*)
  443|    429|    );
  444|       |
  445|       |    // Make sure the new bucket list is destroyed if an
  446|       |    // exception is thrown.
  447|    429|    ArrayJanitor<RefHashTableBucketElem<TVal>*>  guard(newBucketList, fMemoryManager);
  448|       |
  449|    429|    memset(newBucketList, 0, newMod * sizeof(newBucketList[0]));
  450|       |
  451|       |
  452|       |    // Rehash all existing entries.
  453|  13.8k|    for (XMLSize_t index = 0; index < fHashModulus; index++)
  ------------------
  |  Branch (453:31): [True: 13.4k, False: 429]
  ------------------
  454|  13.4k|    {
  455|       |        // Get the bucket list head for this entry
  456|  13.4k|        RefHashTableBucketElem<TVal>* curElem = fBucketList[index];
  457|       |
  458|  23.2k|        while (curElem)
  ------------------
  |  Branch (458:16): [True: 9.79k, False: 13.4k]
  ------------------
  459|  9.79k|        {
  460|       |            // Save the next element before we detach this one
  461|  9.79k|            RefHashTableBucketElem<TVal>* const nextElem = curElem->fNext;
  462|       |
  463|  9.79k|            const XMLSize_t hashVal = fHasher.getHashVal(curElem->fKey, newMod);
  464|       |
  465|  9.79k|            RefHashTableBucketElem<TVal>* const newHeadElem = newBucketList[hashVal];
  466|       |
  467|       |            // Insert at the start of this bucket's list.
  468|  9.79k|            curElem->fNext = newHeadElem;
  469|  9.79k|            newBucketList[hashVal] = curElem;
  470|       |
  471|  9.79k|            curElem = nextElem;
  472|  9.79k|        }
  473|  13.4k|    }
  474|       |
  475|    429|    RefHashTableBucketElem<TVal>** const oldBucketList = fBucketList;
  476|       |
  477|       |    // Everything is OK at this point, so update the
  478|       |    // member variables.
  479|    429|    fBucketList = guard.release();
  480|    429|    fHashModulus = newMod;
  481|       |
  482|       |    // Delete the old bucket list.
  483|    429|    fMemoryManager->deallocate(oldBucketList);//delete[] oldBucketList;
  484|       |
  485|    429|}
_ZN11xercesc_3_214RefHashTableOfINS_10XMLIntegerENS_16CMStateSetHasherEEC2EmbPNS_13MemoryManagerE:
   78|  1.47k|    : fMemoryManager(manager)
   79|  1.47k|    , fAdoptedElems(adoptElems)
   80|  1.47k|    , fBucketList(0)
   81|  1.47k|    , fHashModulus(modulus)
   82|  1.47k|    , fInitialModulus(modulus)
   83|  1.47k|    , fCount(0)
   84|       |
   85|  1.47k|{
   86|  1.47k|    initialize(modulus);
   87|  1.47k|}
_ZN11xercesc_3_214RefHashTableOfINS_10XMLIntegerENS_16CMStateSetHasherEE10initializeEm:
  109|  1.47k|{
  110|  1.47k|    if (modulus == 0)
  ------------------
  |  Branch (110:9): [True: 0, False: 1.47k]
  ------------------
  111|      0|        ThrowXMLwithMemMgr(IllegalArgumentException, XMLExcepts::HshTbl_ZeroModulus, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  112|       |
  113|       |    // Allocate the bucket list and zero them
  114|  1.47k|    fBucketList = (RefHashTableBucketElem<TVal>**) fMemoryManager->allocate
  115|  1.47k|    (
  116|  1.47k|        fHashModulus * sizeof(RefHashTableBucketElem<TVal>*)
  117|  1.47k|    );
  118|  6.99M|    for (XMLSize_t index = 0; index < fHashModulus; index++)
  ------------------
  |  Branch (118:31): [True: 6.99M, False: 1.47k]
  ------------------
  119|  6.99M|        fBucketList[index] = 0;
  120|  1.47k|}
_ZN11xercesc_3_214RefHashTableOfINS_10XMLIntegerENS_16CMStateSetHasherEE3getEPKv:
  349|  9.74M|{
  350|  9.74M|    XMLSize_t hashVal;
  351|  9.74M|    RefHashTableBucketElem<TVal>* findIt = findBucketElem(key, hashVal);
  352|  9.74M|    return findIt ? findIt->fData : 0;
  ------------------
  |  Branch (352:12): [True: 5.11M, False: 4.63M]
  ------------------
  353|  9.74M|}
_ZN11xercesc_3_214RefHashTableOfINS_10XMLIntegerENS_16CMStateSetHasherEE14findBucketElemEPKvRm:
  490|  14.3M|{
  491|       |    // Hash the key
  492|  14.3M|    hashVal = fHasher.getHashVal(key, fHashModulus);
  493|       |
  494|       |    // Search that bucket for the key
  495|  14.3M|    RefHashTableBucketElem<TVal>* curElem = fBucketList[hashVal];
  496|  34.2M|    while (curElem)
  ------------------
  |  Branch (496:12): [True: 24.9M, False: 9.26M]
  ------------------
  497|  24.9M|    {
  498|  24.9M|        if (fHasher.equals(key, curElem->fKey))
  ------------------
  |  Branch (498:13): [True: 5.11M, False: 19.8M]
  ------------------
  499|  5.11M|            return curElem;
  500|       |
  501|  19.8M|        curElem = curElem->fNext;
  502|  19.8M|    }
  503|  9.26M|    return 0;
  504|  14.3M|}
_ZN11xercesc_3_214RefHashTableOfINS_10XMLIntegerENS_16CMStateSetHasherEE3putEPvPS1_:
  396|  4.63M|{
  397|       |    // Apply 0.75 load factor to find threshold.
  398|  4.63M|    XMLSize_t threshold = fHashModulus * 3 / 4;
  399|       |
  400|       |    // If we've grown too big, expand the table and rehash.
  401|  4.63M|    if (fCount >= threshold)
  ------------------
  |  Branch (401:9): [True: 712, False: 4.63M]
  ------------------
  402|    712|        rehash();
  403|       |
  404|       |    // First see if the key exists already
  405|  4.63M|    XMLSize_t hashVal;
  406|  4.63M|    RefHashTableBucketElem<TVal>* newBucket = findBucketElem(key, hashVal);
  407|       |
  408|       |    //
  409|       |    //  If so,then update its value. If not, then we need to add it to
  410|       |    //  the right bucket
  411|       |    //
  412|  4.63M|    if (newBucket)
  ------------------
  |  Branch (412:9): [True: 0, False: 4.63M]
  ------------------
  413|      0|    {
  414|      0|        if (fAdoptedElems)
  ------------------
  |  Branch (414:13): [True: 0, False: 0]
  ------------------
  415|      0|            delete newBucket->fData;
  416|      0|        newBucket->fData = valueToAdopt;
  417|      0|        newBucket->fKey = key;
  418|      0|    }
  419|  4.63M|    else
  420|  4.63M|    {
  421|  4.63M|        newBucket =
  422|  4.63M|             new (fMemoryManager->allocate(sizeof(RefHashTableBucketElem<TVal>)))
  423|  4.63M|             RefHashTableBucketElem<TVal>(key, valueToAdopt, fBucketList[hashVal]);
  424|  4.63M|        fBucketList[hashVal] = newBucket;
  425|  4.63M|        fCount++;
  426|  4.63M|    }
  427|  4.63M|}
_ZN11xercesc_3_214RefHashTableOfINS_10XMLIntegerENS_16CMStateSetHasherEE6rehashEv:
  436|    712|{
  437|    712|    const XMLSize_t newMod = (fHashModulus * 2) + 1;
  438|       |
  439|    712|    RefHashTableBucketElem<TVal>** newBucketList =
  440|    712|        (RefHashTableBucketElem<TVal>**) fMemoryManager->allocate
  441|    712|    (
  442|    712|        newMod * sizeof(RefHashTableBucketElem<TVal>*)
  443|    712|    );
  444|       |
  445|       |    // Make sure the new bucket list is destroyed if an
  446|       |    // exception is thrown.
  447|    712|    ArrayJanitor<RefHashTableBucketElem<TVal>*>  guard(newBucketList, fMemoryManager);
  448|       |
  449|    712|    memset(newBucketList, 0, newMod * sizeof(newBucketList[0]));
  450|       |
  451|       |
  452|       |    // Rehash all existing entries.
  453|  6.33M|    for (XMLSize_t index = 0; index < fHashModulus; index++)
  ------------------
  |  Branch (453:31): [True: 6.33M, False: 712]
  ------------------
  454|  6.33M|    {
  455|       |        // Get the bucket list head for this entry
  456|  6.33M|        RefHashTableBucketElem<TVal>* curElem = fBucketList[index];
  457|       |
  458|  11.0M|        while (curElem)
  ------------------
  |  Branch (458:16): [True: 4.75M, False: 6.33M]
  ------------------
  459|  4.75M|        {
  460|       |            // Save the next element before we detach this one
  461|  4.75M|            RefHashTableBucketElem<TVal>* const nextElem = curElem->fNext;
  462|       |
  463|  4.75M|            const XMLSize_t hashVal = fHasher.getHashVal(curElem->fKey, newMod);
  464|       |
  465|  4.75M|            RefHashTableBucketElem<TVal>* const newHeadElem = newBucketList[hashVal];
  466|       |
  467|       |            // Insert at the start of this bucket's list.
  468|  4.75M|            curElem->fNext = newHeadElem;
  469|  4.75M|            newBucketList[hashVal] = curElem;
  470|       |
  471|  4.75M|            curElem = nextElem;
  472|  4.75M|        }
  473|  6.33M|    }
  474|       |
  475|    712|    RefHashTableBucketElem<TVal>** const oldBucketList = fBucketList;
  476|       |
  477|       |    // Everything is OK at this point, so update the
  478|       |    // member variables.
  479|    712|    fBucketList = guard.release();
  480|    712|    fHashModulus = newMod;
  481|       |
  482|       |    // Delete the old bucket list.
  483|    712|    fMemoryManager->deallocate(oldBucketList);//delete[] oldBucketList;
  484|       |
  485|    712|}
_ZN11xercesc_3_214RefHashTableOfINS_10XMLIntegerENS_16CMStateSetHasherEED2Ev:
  124|  1.47k|{
  125|  1.47k|    cleanup();
  126|  1.47k|}
_ZN11xercesc_3_214RefHashTableOfINS_10XMLIntegerENS_16CMStateSetHasherEE7cleanupEv:
  302|  1.47k|{
  303|  1.47k|    removeAll();
  304|       |
  305|       |    // Then delete the bucket list & hasher
  306|  1.47k|    fMemoryManager->deallocate(fBucketList);
  307|  1.47k|    fBucketList = 0;
  308|  1.47k|}
_ZN11xercesc_3_214RefHashTableOfINS_10XMLIntegerENS_16CMStateSetHasherEE9removeAllEv:
  203|  1.47k|{
  204|  1.47k|    if(isEmpty())
  ------------------
  |  Branch (204:8): [True: 0, False: 1.47k]
  ------------------
  205|      0|        return;
  206|       |
  207|       |    // Clean up the buckets first
  208|  13.3M|    for (XMLSize_t buckInd = 0; buckInd < fHashModulus; buckInd++)
  ------------------
  |  Branch (208:33): [True: 13.3M, False: 1.47k]
  ------------------
  209|  13.3M|    {
  210|       |        // Get the bucket list head for this entry
  211|  13.3M|        RefHashTableBucketElem<TVal>* curElem = fBucketList[buckInd];
  212|  13.3M|        RefHashTableBucketElem<TVal>* nextElem;
  213|  17.9M|        while (curElem)
  ------------------
  |  Branch (213:16): [True: 4.63M, False: 13.3M]
  ------------------
  214|  4.63M|        {
  215|       |            // Save the next element before we hose this one
  216|  4.63M|            nextElem = curElem->fNext;
  217|       |
  218|       |            // If we adopted the data, then delete it too
  219|       |            //    (Note:  the userdata hash table instance has data type of void *.
  220|       |            //    This will generate compiler warnings here on some platforms, but they
  221|       |            //    can be ignored since fAdoptedElements is false.
  222|  4.63M|            if (fAdoptedElems)
  ------------------
  |  Branch (222:17): [True: 4.63M, False: 0]
  ------------------
  223|  4.63M|                delete curElem->fData;
  224|       |
  225|       |            // Then delete the current element and move forward
  226|       |             // delete curElem;
  227|       |            // destructor doesn't do anything...
  228|       |            // curElem->~RefHashTableBucketElem();
  229|  4.63M|            fMemoryManager->deallocate(curElem);
  230|  4.63M|            curElem = nextElem;
  231|  4.63M|        }
  232|       |
  233|       |        // Clean out this entry
  234|  13.3M|        fBucketList[buckInd] = 0;
  235|  13.3M|    }
  236|       |
  237|  1.47k|    fCount = 0;
  238|  1.47k|}
_ZNK11xercesc_3_214RefHashTableOfINS_10XMLIntegerENS_16CMStateSetHasherEE7isEmptyEv:
  134|  1.47k|{
  135|  1.47k|    return fCount==0;
  136|  1.47k|}
_ZN11xercesc_3_214RefHashTableOfIjNS_9PtrHasherEE3getEPKv:
  349|  9.76M|{
  350|  9.76M|    XMLSize_t hashVal;
  351|  9.76M|    RefHashTableBucketElem<TVal>* findIt = findBucketElem(key, hashVal);
  352|  9.76M|    return findIt ? findIt->fData : 0;
  ------------------
  |  Branch (352:12): [True: 9.74M, False: 18.6k]
  ------------------
  353|  9.76M|}
_ZN11xercesc_3_214RefHashTableOfIjNS_9PtrHasherEE14findBucketElemEPKvRm:
  490|  9.76M|{
  491|       |    // Hash the key
  492|  9.76M|    hashVal = fHasher.getHashVal(key, fHashModulus);
  493|       |
  494|       |    // Search that bucket for the key
  495|  9.76M|    RefHashTableBucketElem<TVal>* curElem = fBucketList[hashVal];
  496|  9.76M|    while (curElem)
  ------------------
  |  Branch (496:12): [True: 9.74M, False: 19.1k]
  ------------------
  497|  9.74M|    {
  498|  9.74M|        if (fHasher.equals(key, curElem->fKey))
  ------------------
  |  Branch (498:13): [True: 9.74M, False: 32]
  ------------------
  499|  9.74M|            return curElem;
  500|       |
  501|     32|        curElem = curElem->fNext;
  502|     32|    }
  503|  19.1k|    return 0;
  504|  9.76M|}
_ZN11xercesc_3_214RefHashTableOfIjNS_9PtrHasherEE3putEPvPj:
  396|    523|{
  397|       |    // Apply 0.75 load factor to find threshold.
  398|    523|    XMLSize_t threshold = fHashModulus * 3 / 4;
  399|       |
  400|       |    // If we've grown too big, expand the table and rehash.
  401|    523|    if (fCount >= threshold)
  ------------------
  |  Branch (401:9): [True: 0, False: 523]
  ------------------
  402|      0|        rehash();
  403|       |
  404|       |    // First see if the key exists already
  405|    523|    XMLSize_t hashVal;
  406|    523|    RefHashTableBucketElem<TVal>* newBucket = findBucketElem(key, hashVal);
  407|       |
  408|       |    //
  409|       |    //  If so,then update its value. If not, then we need to add it to
  410|       |    //  the right bucket
  411|       |    //
  412|    523|    if (newBucket)
  ------------------
  |  Branch (412:9): [True: 0, False: 523]
  ------------------
  413|      0|    {
  414|      0|        if (fAdoptedElems)
  ------------------
  |  Branch (414:13): [True: 0, False: 0]
  ------------------
  415|      0|            delete newBucket->fData;
  416|      0|        newBucket->fData = valueToAdopt;
  417|      0|        newBucket->fKey = key;
  418|      0|    }
  419|    523|    else
  420|    523|    {
  421|    523|        newBucket =
  422|    523|             new (fMemoryManager->allocate(sizeof(RefHashTableBucketElem<TVal>)))
  423|    523|             RefHashTableBucketElem<TVal>(key, valueToAdopt, fBucketList[hashVal]);
  424|    523|        fBucketList[hashVal] = newBucket;
  425|    523|        fCount++;
  426|    523|    }
  427|    523|}
_ZN11xercesc_3_214RefHashTableOfIjNS_9PtrHasherEEC2EmbPNS_13MemoryManagerE:
   78|  7.12k|    : fMemoryManager(manager)
   79|  7.12k|    , fAdoptedElems(adoptElems)
   80|  7.12k|    , fBucketList(0)
   81|  7.12k|    , fHashModulus(modulus)
   82|  7.12k|    , fInitialModulus(modulus)
   83|  7.12k|    , fCount(0)
   84|       |
   85|  7.12k|{
   86|  7.12k|    initialize(modulus);
   87|  7.12k|}
_ZN11xercesc_3_214RefHashTableOfIjNS_9PtrHasherEE10initializeEm:
  109|  7.12k|{
  110|  7.12k|    if (modulus == 0)
  ------------------
  |  Branch (110:9): [True: 0, False: 7.12k]
  ------------------
  111|      0|        ThrowXMLwithMemMgr(IllegalArgumentException, XMLExcepts::HshTbl_ZeroModulus, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  112|       |
  113|       |    // Allocate the bucket list and zero them
  114|  7.12k|    fBucketList = (RefHashTableBucketElem<TVal>**) fMemoryManager->allocate
  115|  7.12k|    (
  116|  7.12k|        fHashModulus * sizeof(RefHashTableBucketElem<TVal>*)
  117|  7.12k|    );
  118|   940k|    for (XMLSize_t index = 0; index < fHashModulus; index++)
  ------------------
  |  Branch (118:31): [True: 933k, False: 7.12k]
  ------------------
  119|   933k|        fBucketList[index] = 0;
  120|  7.12k|}
_ZN11xercesc_3_214RefHashTableOfIjNS_9PtrHasherEED2Ev:
  124|  7.12k|{
  125|  7.12k|    cleanup();
  126|  7.12k|}
_ZN11xercesc_3_214RefHashTableOfIjNS_9PtrHasherEE7cleanupEv:
  302|  7.12k|{
  303|  7.12k|    removeAll();
  304|       |
  305|       |    // Then delete the bucket list & hasher
  306|  7.12k|    fMemoryManager->deallocate(fBucketList);
  307|  7.12k|    fBucketList = 0;
  308|  7.12k|}
_ZN11xercesc_3_214RefHashTableOfINS_10ValueStoreENS_9PtrHasherEE9removeAllEv:
  203|  14.2k|{
  204|  14.2k|    if(isEmpty())
  ------------------
  |  Branch (204:8): [True: 14.2k, False: 0]
  ------------------
  205|  14.2k|        return;
  206|       |
  207|       |    // Clean up the buckets first
  208|      0|    for (XMLSize_t buckInd = 0; buckInd < fHashModulus; buckInd++)
  ------------------
  |  Branch (208:33): [True: 0, False: 0]
  ------------------
  209|      0|    {
  210|       |        // Get the bucket list head for this entry
  211|      0|        RefHashTableBucketElem<TVal>* curElem = fBucketList[buckInd];
  212|      0|        RefHashTableBucketElem<TVal>* nextElem;
  213|      0|        while (curElem)
  ------------------
  |  Branch (213:16): [True: 0, False: 0]
  ------------------
  214|      0|        {
  215|       |            // Save the next element before we hose this one
  216|      0|            nextElem = curElem->fNext;
  217|       |
  218|       |            // If we adopted the data, then delete it too
  219|       |            //    (Note:  the userdata hash table instance has data type of void *.
  220|       |            //    This will generate compiler warnings here on some platforms, but they
  221|       |            //    can be ignored since fAdoptedElements is false.
  222|      0|            if (fAdoptedElems)
  ------------------
  |  Branch (222:17): [True: 0, False: 0]
  ------------------
  223|      0|                delete curElem->fData;
  224|       |
  225|       |            // Then delete the current element and move forward
  226|       |             // delete curElem;
  227|       |            // destructor doesn't do anything...
  228|       |            // curElem->~RefHashTableBucketElem();
  229|      0|            fMemoryManager->deallocate(curElem);
  230|      0|            curElem = nextElem;
  231|      0|        }
  232|       |
  233|       |        // Clean out this entry
  234|      0|        fBucketList[buckInd] = 0;
  235|      0|    }
  236|       |
  237|      0|    fCount = 0;
  238|      0|}
_ZNK11xercesc_3_214RefHashTableOfINS_10ValueStoreENS_9PtrHasherEE7isEmptyEv:
  134|  14.2k|{
  135|  14.2k|    return fCount==0;
  136|  14.2k|}
_ZN11xercesc_3_214RefHashTableOfINS_10ValueStoreENS_9PtrHasherEEC2EmbPNS_13MemoryManagerE:
   78|  7.12k|    : fMemoryManager(manager)
   79|  7.12k|    , fAdoptedElems(adoptElems)
   80|  7.12k|    , fBucketList(0)
   81|  7.12k|    , fHashModulus(modulus)
   82|  7.12k|    , fInitialModulus(modulus)
   83|  7.12k|    , fCount(0)
   84|       |
   85|  7.12k|{
   86|  7.12k|    initialize(modulus);
   87|  7.12k|}
_ZN11xercesc_3_214RefHashTableOfINS_10ValueStoreENS_9PtrHasherEE10initializeEm:
  109|  7.12k|{
  110|  7.12k|    if (modulus == 0)
  ------------------
  |  Branch (110:9): [True: 0, False: 7.12k]
  ------------------
  111|      0|        ThrowXMLwithMemMgr(IllegalArgumentException, XMLExcepts::HshTbl_ZeroModulus, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  112|       |
  113|       |    // Allocate the bucket list and zero them
  114|  7.12k|    fBucketList = (RefHashTableBucketElem<TVal>**) fMemoryManager->allocate
  115|  7.12k|    (
  116|  7.12k|        fHashModulus * sizeof(RefHashTableBucketElem<TVal>*)
  117|  7.12k|    );
  118|  99.7k|    for (XMLSize_t index = 0; index < fHashModulus; index++)
  ------------------
  |  Branch (118:31): [True: 92.6k, False: 7.12k]
  ------------------
  119|  92.6k|        fBucketList[index] = 0;
  120|  7.12k|}
_ZN11xercesc_3_214RefHashTableOfINS_10ValueStoreENS_9PtrHasherEED2Ev:
  124|  7.12k|{
  125|  7.12k|    cleanup();
  126|  7.12k|}
_ZN11xercesc_3_214RefHashTableOfINS_10ValueStoreENS_9PtrHasherEE7cleanupEv:
  302|  7.12k|{
  303|  7.12k|    removeAll();
  304|       |
  305|       |    // Then delete the bucket list & hasher
  306|  7.12k|    fMemoryManager->deallocate(fBucketList);
  307|  7.12k|    fBucketList = 0;
  308|  7.12k|}

_ZN11xercesc_3_222RefHashTableBucketElemINS_8ENameMapEEC2EPvPS1_PS2_:
   47|     48|      : fData(value), fNext(next), fKey(key)
   48|     48|  {
   49|     48|  }
_ZN11xercesc_3_222RefHashTableBucketElemINS_12KVStringPairEEC2EPvPS1_PS2_:
   47|     26|      : fData(value), fNext(next), fKey(key)
   48|     26|  {
   49|     26|  }
_ZN11xercesc_3_222RefHashTableBucketElemINS_7GrammarEEC2EPvPS1_PS2_:
   47|  7.12k|      : fData(value), fNext(next), fKey(key)
   48|  7.12k|  {
   49|  7.12k|  }
_ZN11xercesc_3_222RefHashTableBucketElemINS_17DatatypeValidatorEEC2EPvPS1_PS2_:
   47|     45|      : fData(value), fNext(next), fKey(key)
   48|     45|  {
   49|     45|  }
_ZN11xercesc_3_222RefHashTableBucketElemINS_14XMLCanRepGroupEEC2EPvPS1_PS2_:
   47|     14|      : fData(value), fNext(next), fKey(key)
   48|     14|  {
   49|     14|  }
_ZN11xercesc_3_222RefHashTableBucketElemINS_15XMLNotationDeclEEC2EPvPS1_PS2_:
   47|  1.88k|      : fData(value), fNext(next), fKey(key)
   48|  1.88k|  {
   49|  1.88k|  }
_ZN11xercesc_3_222RefHashTableBucketElemINS_13DTDEntityDeclEEC2EPvPS1_PS2_:
   47|  5.44k|      : fData(value), fNext(next), fKey(key)
   48|  5.44k|  {
   49|  5.44k|  }
_ZN11xercesc_3_222RefHashTableBucketElemINS_14DTDElementDeclEEC2EPvPS1_PS2_:
   47|  37.0k|      : fData(value), fNext(next), fKey(key)
   48|  37.0k|  {
   49|  37.0k|  }
_ZN11xercesc_3_222RefHashTableBucketElemINS_12RangeFactoryEEC2EPvPS1_PS2_:
   47|      4|      : fData(value), fNext(next), fKey(key)
   48|      4|  {
   49|      4|  }
_ZN11xercesc_3_222RefHashTableBucketElemINS_17RangeTokenElemMapEEC2EPvPS1_PS2_:
   47|    146|      : fData(value), fNext(next), fKey(key)
   48|    146|  {
   49|    146|  }
_ZN11xercesc_3_222RefHashTableBucketElemINS_13XMLStringPool8PoolElemEEC2EPvPS2_PS3_:
   47|  57.0k|      : fData(value), fNext(next), fKey(key)
   48|  57.0k|  {
   49|  57.0k|  }
_ZN11xercesc_3_222RefHashTableBucketElemINS_10XMLRefInfoEEC2EPvPS1_PS2_:
   47|  8.08k|      : fData(value), fNext(next), fKey(key)
   48|  8.08k|  {
   49|  8.08k|  }
_ZN11xercesc_3_222RefHashTableBucketElemINS_9DTDAttDefEEC2EPvPS1_PS2_:
   47|  14.1k|      : fData(value), fNext(next), fKey(key)
   48|  14.1k|  {
   49|  14.1k|  }
_ZN11xercesc_3_222RefHashTableBucketElemINS_10XMLIntegerEEC2EPvPS1_PS2_:
   47|  4.63M|      : fData(value), fNext(next), fKey(key)
   48|  4.63M|  {
   49|  4.63M|  }
_ZN11xercesc_3_222RefHashTableBucketElemIjEC2EPvPjPS1_:
   47|    523|      : fData(value), fNext(next), fKey(key)
   48|    523|  {
   49|    523|  }

_ZN11xercesc_3_210RefStackOfINS_9XMLReaderEED2Ev:
   45|  7.10k|{
   46|  7.10k|}
_ZN11xercesc_3_210RefStackOfINS_13XMLEntityDeclEED2Ev:
   45|  7.10k|{
   46|  7.10k|}
_ZN11xercesc_3_210RefStackOfINS_9XMLReaderEE5emptyEv:
  103|   376k|{
  104|   376k|    return (fVector.size() == 0);
  105|   376k|}
_ZN11xercesc_3_210RefStackOfINS_9XMLReaderEE3popEv:
   84|   365k|{
   85|   365k|    const XMLSize_t curSize = fVector.size();
   86|   365k|    if (curSize == 0)
  ------------------
  |  Branch (86:9): [True: 0, False: 365k]
  ------------------
   87|      0|        ThrowXMLwithMemMgr(EmptyStackException, XMLExcepts::Stack_EmptyStack, fVector.getMemoryManager());
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
   88|       |
   89|       |    // Orphan off the element from the last slot in the vector
   90|   365k|    return fVector.orphanElementAt(curSize-1);
   91|   365k|}
_ZN11xercesc_3_210RefStackOfINS_13XMLEntityDeclEE3popEv:
   84|   365k|{
   85|   365k|    const XMLSize_t curSize = fVector.size();
   86|   365k|    if (curSize == 0)
  ------------------
  |  Branch (86:9): [True: 0, False: 365k]
  ------------------
   87|      0|        ThrowXMLwithMemMgr(EmptyStackException, XMLExcepts::Stack_EmptyStack, fVector.getMemoryManager());
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
   88|       |
   89|       |    // Orphan off the element from the last slot in the vector
   90|   365k|    return fVector.orphanElementAt(curSize-1);
   91|   365k|}
_ZN11xercesc_3_210RefStackOfINS_13XMLEntityDeclEE4sizeEv:
  113|   368k|{
  114|   368k|    return fVector.size();
  115|   368k|}
_ZNK11xercesc_3_210RefStackOfINS_13XMLEntityDeclEE9elementAtEm:
   54|   323k|{
   55|   323k|    if (index >= fVector.size())
  ------------------
  |  Branch (55:9): [True: 0, False: 323k]
  ------------------
   56|      0|        ThrowXMLwithMemMgr(ArrayIndexOutOfBoundsException, XMLExcepts::Stack_BadIndex, fVector.getMemoryManager());
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
   57|   323k|    return fVector.elementAt(index);
   58|   323k|}
_ZN11xercesc_3_210RefStackOfINS_9XMLReaderEEC2EmbPNS_13MemoryManagerE:
   40|  7.10k|    fVector(initElems, adoptElems, manager)
   41|  7.10k|{
   42|  7.10k|}
_ZN11xercesc_3_210RefStackOfINS_13XMLEntityDeclEEC2EmbPNS_13MemoryManagerE:
   40|  7.10k|    fVector(initElems, adoptElems, manager)
   41|  7.10k|{
   42|  7.10k|}
_ZN11xercesc_3_210RefStackOfINS_9XMLReaderEE4pushEPS1_:
   70|   365k|{
   71|   365k|    fVector.addElement(toPush);
   72|   365k|}
_ZN11xercesc_3_210RefStackOfINS_13XMLEntityDeclEE4pushEPS1_:
   70|   365k|{
   71|   365k|    fVector.addElement(toPush);
   72|   365k|}
_ZN11xercesc_3_210RefStackOfINS_9XMLReaderEE17removeAllElementsEv:
   94|  7.10k|{
   95|  7.10k|    fVector.removeAllElements();
   96|  7.10k|}
_ZN11xercesc_3_210RefStackOfINS_13XMLEntityDeclEE17removeAllElementsEv:
   94|  7.10k|{
   95|  7.10k|    fVector.removeAllElements();
   96|  7.10k|}
_ZN11xercesc_3_210RefStackOfINS_9XMLReaderEE4sizeEv:
  113|    583|{
  114|    583|    return fVector.size();
  115|    583|}
_ZNK11xercesc_3_210RefStackOfINS_9XMLReaderEE9elementAtEm:
   54|    583|{
   55|    583|    if (index >= fVector.size())
  ------------------
  |  Branch (55:9): [True: 0, False: 583]
  ------------------
   56|      0|        ThrowXMLwithMemMgr(ArrayIndexOutOfBoundsException, XMLExcepts::Stack_BadIndex, fVector.getMemoryManager());
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
   57|    583|    return fVector.elementAt(index);
   58|    583|}
_ZN11xercesc_3_210RefStackOfINS_14RefHashTableOfINS_10ValueStoreENS_9PtrHasherEEEE17removeAllElementsEv:
   94|  7.12k|{
   95|  7.12k|    fVector.removeAllElements();
   96|  7.12k|}
_ZN11xercesc_3_210RefStackOfINS_14RefHashTableOfINS_10ValueStoreENS_9PtrHasherEEEED2Ev:
   45|  7.12k|{
   46|  7.12k|}
_ZN11xercesc_3_210RefStackOfINS_14RefHashTableOfINS_10ValueStoreENS_9PtrHasherEEEEC2EmbPNS_13MemoryManagerE:
   40|  7.12k|    fVector(initElems, adoptElems, manager)
   41|  7.12k|{
   42|  7.12k|}

_ZN11xercesc_3_211RefVectorOfINS_8ENameMapEEC2EmbPNS_13MemoryManagerE:
   39|      1|    : BaseRefVectorOf<TElem>(maxElems, adoptElems, manager)
   40|      1|{
   41|      1|}
_ZN11xercesc_3_211RefVectorOfINS_23DOMImplementationSourceEEC2EmbPNS_13MemoryManagerE:
   39|      1|    : BaseRefVectorOf<TElem>(maxElems, adoptElems, manager)
   40|      1|{
   41|      1|}
_ZN11xercesc_3_211RefVectorOfINS_7XMLAttrEEC2EmbPNS_13MemoryManagerE:
   39|  7.12k|    : BaseRefVectorOf<TElem>(maxElems, adoptElems, manager)
   40|  7.12k|{
   41|  7.12k|}
_ZN11xercesc_3_211RefVectorOfINS_7XMLAttrEED2Ev:
   44|  7.12k|{
   45|  7.12k|    if (this->fAdoptedElems)
  ------------------
  |  Branch (45:9): [True: 7.12k, False: 0]
  ------------------
   46|  7.12k|    {
   47|  9.74k|        for (XMLSize_t index = 0; index < this->fCurCount; index++)
  ------------------
  |  Branch (47:35): [True: 2.61k, False: 7.12k]
  ------------------
   48|  2.61k|            delete this->fElemList[index];
   49|  7.12k|    }
   50|  7.12k|    this->fMemoryManager->deallocate(this->fElemList);//delete [] this->fElemList;
   51|  7.12k|}
_ZN11xercesc_3_211RefVectorOfINS_9XMLReaderEED2Ev:
   44|  7.10k|{
   45|  7.10k|    if (this->fAdoptedElems)
  ------------------
  |  Branch (45:9): [True: 7.10k, False: 0]
  ------------------
   46|  7.10k|    {
   47|  7.10k|        for (XMLSize_t index = 0; index < this->fCurCount; index++)
  ------------------
  |  Branch (47:35): [True: 0, False: 7.10k]
  ------------------
   48|      0|            delete this->fElemList[index];
   49|  7.10k|    }
   50|  7.10k|    this->fMemoryManager->deallocate(this->fElemList);//delete [] this->fElemList;
   51|  7.10k|}
_ZN11xercesc_3_211RefVectorOfINS_13XMLEntityDeclEED2Ev:
   44|  7.10k|{
   45|  7.10k|    if (this->fAdoptedElems)
  ------------------
  |  Branch (45:9): [True: 0, False: 7.10k]
  ------------------
   46|      0|    {
   47|      0|        for (XMLSize_t index = 0; index < this->fCurCount; index++)
  ------------------
  |  Branch (47:35): [True: 0, False: 0]
  ------------------
   48|      0|            delete this->fElemList[index];
   49|      0|    }
   50|  7.10k|    this->fMemoryManager->deallocate(this->fElemList);//delete [] this->fElemList;
   51|  7.10k|}
_ZN11xercesc_3_211RefVectorOfINS_9XMLReaderEEC2EmbPNS_13MemoryManagerE:
   39|  7.10k|    : BaseRefVectorOf<TElem>(maxElems, adoptElems, manager)
   40|  7.10k|{
   41|  7.10k|}
_ZN11xercesc_3_211RefVectorOfINS_13XMLEntityDeclEEC2EmbPNS_13MemoryManagerE:
   39|  7.10k|    : BaseRefVectorOf<TElem>(maxElems, adoptElems, manager)
   40|  7.10k|{
   41|  7.10k|}
_ZN11xercesc_3_211RefVectorOfINS_5TokenEEC2EmbPNS_13MemoryManagerE:
   39|     11|    : BaseRefVectorOf<TElem>(maxElems, adoptElems, manager)
   40|     11|{
   41|     11|}
_ZN11xercesc_3_211RefVectorOfINS_2OpEEC2EmbPNS_13MemoryManagerE:
   39|      5|    : BaseRefVectorOf<TElem>(maxElems, adoptElems, manager)
   40|      5|{
   41|      5|}
_ZN11xercesc_3_211RefVectorOfINS_20PSVIAttributeStorageEEC2EmbPNS_13MemoryManagerE:
   39|  7.12k|    : BaseRefVectorOf<TElem>(maxElems, adoptElems, manager)
   40|  7.12k|{
   41|  7.12k|}
_ZN11xercesc_3_211RefVectorOfINS_20PSVIAttributeStorageEED2Ev:
   44|  7.12k|{
   45|  7.12k|    if (this->fAdoptedElems)
  ------------------
  |  Branch (45:9): [True: 7.12k, False: 0]
  ------------------
   46|  7.12k|    {
   47|  7.12k|        for (XMLSize_t index = 0; index < this->fCurCount; index++)
  ------------------
  |  Branch (47:35): [True: 0, False: 7.12k]
  ------------------
   48|      0|            delete this->fElemList[index];
   49|  7.12k|    }
   50|  7.12k|    this->fMemoryManager->deallocate(this->fElemList);//delete [] this->fElemList;
   51|  7.12k|}
_ZN11xercesc_3_211RefVectorOfINS_12KVStringPairEEC2EmbPNS_13MemoryManagerE:
   39|  7.12k|    : BaseRefVectorOf<TElem>(maxElems, adoptElems, manager)
   40|  7.12k|{
   41|  7.12k|}
_ZN11xercesc_3_211RefVectorOfINS_12KVStringPairEED2Ev:
   44|  7.12k|{
   45|  7.12k|    if (this->fAdoptedElems)
  ------------------
  |  Branch (45:9): [True: 7.12k, False: 0]
  ------------------
   46|  7.12k|    {
   47|  7.12k|        for (XMLSize_t index = 0; index < this->fCurCount; index++)
  ------------------
  |  Branch (47:35): [True: 0, False: 7.12k]
  ------------------
   48|      0|            delete this->fElemList[index];
   49|  7.12k|    }
   50|  7.12k|    this->fMemoryManager->deallocate(this->fElemList);//delete [] this->fElemList;
   51|  7.12k|}
_ZN11xercesc_3_211RefVectorOfINS_14RefHashTableOfINS_10ValueStoreENS_9PtrHasherEEEED2Ev:
   44|  7.12k|{
   45|  7.12k|    if (this->fAdoptedElems)
  ------------------
  |  Branch (45:9): [True: 7.12k, False: 0]
  ------------------
   46|  7.12k|    {
   47|  7.12k|        for (XMLSize_t index = 0; index < this->fCurCount; index++)
  ------------------
  |  Branch (47:35): [True: 0, False: 7.12k]
  ------------------
   48|      0|            delete this->fElemList[index];
   49|  7.12k|    }
   50|  7.12k|    this->fMemoryManager->deallocate(this->fElemList);//delete [] this->fElemList;
   51|  7.12k|}
_ZN11xercesc_3_211RefVectorOfINS_10ValueStoreEEC2EmbPNS_13MemoryManagerE:
   39|  7.12k|    : BaseRefVectorOf<TElem>(maxElems, adoptElems, manager)
   40|  7.12k|{
   41|  7.12k|}
_ZN11xercesc_3_211RefVectorOfINS_10ValueStoreEED2Ev:
   44|  7.12k|{
   45|  7.12k|    if (this->fAdoptedElems)
  ------------------
  |  Branch (45:9): [True: 0, False: 7.12k]
  ------------------
   46|      0|    {
   47|      0|        for (XMLSize_t index = 0; index < this->fCurCount; index++)
  ------------------
  |  Branch (47:35): [True: 0, False: 0]
  ------------------
   48|      0|            delete this->fElemList[index];
   49|      0|    }
   50|  7.12k|    this->fMemoryManager->deallocate(this->fElemList);//delete [] this->fElemList;
   51|  7.12k|}
_ZN11xercesc_3_211RefVectorOfINS_14RefHashTableOfINS_10ValueStoreENS_9PtrHasherEEEEC2EmbPNS_13MemoryManagerE:
   39|  7.12k|    : BaseRefVectorOf<TElem>(maxElems, adoptElems, manager)
   40|  7.12k|{
   41|  7.12k|}
_ZN11xercesc_3_211RefVectorOfINS_12XPathMatcherEEC2EmbPNS_13MemoryManagerE:
   39|  7.12k|    : BaseRefVectorOf<TElem>(maxElems, adoptElems, manager)
   40|  7.12k|{
   41|  7.12k|}
_ZN11xercesc_3_211RefVectorOfINS_12XPathMatcherEED2Ev:
   44|  7.12k|{
   45|  7.12k|    if (this->fAdoptedElems)
  ------------------
  |  Branch (45:9): [True: 7.12k, False: 0]
  ------------------
   46|  7.12k|    {
   47|  7.12k|        for (XMLSize_t index = 0; index < this->fCurCount; index++)
  ------------------
  |  Branch (47:35): [True: 0, False: 7.12k]
  ------------------
   48|      0|            delete this->fElemList[index];
   49|  7.12k|    }
   50|  7.12k|    this->fMemoryManager->deallocate(this->fElemList);//delete [] this->fElemList;
   51|  7.12k|}

_ZN11xercesc_3_213XMLStringPoolC2EjPNS_13MemoryManagerE:
   37|  14.2k|    fMemoryManager(manager)
   38|  14.2k|    , fIdMap(0)
   39|  14.2k|    , fHashTable(0)
   40|  14.2k|    , fMapCapacity(64)
   41|  14.2k|    , fCurId(1)
   42|  14.2k|{
   43|       |    // Create the hash table, passing it the modulus
   44|  14.2k|    fHashTable = new (fMemoryManager) RefHashTableOf<PoolElem>(modulus, false, fMemoryManager);
   45|       |
   46|       |    // Do an initial allocation of the id map and zero it all out
   47|  14.2k|    fIdMap = (PoolElem**) fMemoryManager->allocate
   48|  14.2k|    (
   49|  14.2k|        fMapCapacity * sizeof(PoolElem*)
   50|  14.2k|    ); //new PoolElem*[fMapCapacity];
   51|  14.2k|    memset(fIdMap, 0, sizeof(PoolElem*) * fMapCapacity);
   52|  14.2k|}
_ZN11xercesc_3_213XMLStringPoolD2Ev:
   55|  14.2k|{
   56|       |    // delete all buckelements, since the hashtable doesn't adopt the elements anymore
   57|  71.2k|    for (unsigned int index = 1; index < fCurId; index++)
  ------------------
  |  Branch (57:34): [True: 57.0k, False: 14.2k]
  ------------------
   58|  57.0k|    {
   59|       |        //fIdMap[index]->~PoolElem();                                // we have no destructor
   60|  57.0k|        fMemoryManager->deallocate((void*) fIdMap[index]->fString);  // deallocate memory
   61|  57.0k|        fMemoryManager->deallocate(fIdMap[index]);                   // deallocate memory
   62|  57.0k|    }
   63|  14.2k|    delete fHashTable;
   64|  14.2k|    fMemoryManager->deallocate(fIdMap); //delete [] fIdMap;
   65|  14.2k|}
_ZN11xercesc_3_213XMLStringPool11addNewEntryEPKDs:
   87|  57.0k|{
   88|       |    // See if we need to expand the id map
   89|  57.0k|    if (fCurId == fMapCapacity)
  ------------------
  |  Branch (89:9): [True: 0, False: 57.0k]
  ------------------
   90|      0|    {
   91|       |        // Calculate the new capacity, create a temp new map, and zero it
   92|      0|        const unsigned int newCap = (unsigned int)(fMapCapacity * 1.5);
   93|      0|        PoolElem** newMap = (PoolElem**) fMemoryManager->allocate
   94|      0|        (
   95|      0|            newCap * sizeof(PoolElem*)
   96|      0|        ); //new PoolElem*[newCap];
   97|      0|        memset(newMap, 0, sizeof(PoolElem*) * newCap);
   98|       |
   99|       |        //
  100|       |        //  Copy over the old elements from the old map. They are just pointers
  101|       |        //  so we can do it all at once.
  102|       |        //
  103|      0|        memcpy(newMap, fIdMap, sizeof(PoolElem*) * fMapCapacity);
  104|       |
  105|       |        // Clean up the old map and store the new info
  106|      0|        fMemoryManager->deallocate(fIdMap); //delete [] fIdMap;
  107|      0|        fIdMap = newMap;
  108|      0|        fMapCapacity = newCap;
  109|      0|    }
  110|       |
  111|       |    //
  112|       |    //  Ok, now create a new element and add it to the hash table. Then store
  113|       |    //  this new element in the id map at the current id index, then bump the
  114|       |    //  id index.
  115|       |    //
  116|  57.0k|    PoolElem* newElem = (PoolElem*) fMemoryManager->allocate(sizeof(PoolElem));
  117|  57.0k|    newElem->fId      = fCurId;
  118|  57.0k|    newElem->fString  = XMLString::replicate(newString, fMemoryManager);
  119|  57.0k|    fHashTable->put((void*)newElem->fString, newElem);
  120|  57.0k|    fIdMap[fCurId] = newElem;
  121|       |
  122|       |    // Bump the current id and return the id of the new elem we just added
  123|  57.0k|    fCurId++;
  124|  57.0k|    return newElem->fId;
  125|  57.0k|}

_ZN11xercesc_3_213XMLStringPool9addOrFindEPKDs:
  131|  57.0k|{
  132|  57.0k|    PoolElem* elemToFind = fHashTable->get(newString);
  133|  57.0k|    if (elemToFind)
  ------------------
  |  Branch (133:9): [True: 0, False: 57.0k]
  ------------------
  134|      0|        return elemToFind->fId;
  135|       |
  136|  57.0k|    return addNewEntry(newString);
  137|  57.0k|}
_ZNK11xercesc_3_213XMLStringPool5getIdEPKDs:
  140|    146|{
  141|    146|    PoolElem* elemToFind = fHashTable->get(toFind);
  142|    146|    if (elemToFind)
  ------------------
  |  Branch (142:9): [True: 146, False: 0]
  ------------------
  143|    146|        return elemToFind->fId;
  144|       |
  145|       |    // Not found, so return zero, which is never a legal id
  146|      0|    return 0;
  147|    146|}

_ZN11xercesc_3_211ENameMapForINS_15XMLChTranscoderEEC2EPKDs:
   34|      2|    ENameMap(encodingName)
   35|      2|{
   36|      2|}
_ZNK11xercesc_3_211ENameMapForINS_15XMLChTranscoderEE7makeNewEmPNS_13MemoryManagerE:
   49|   365k|{
   50|   365k|    return new (manager) TType(getKey(), blockSize, manager);
   51|   365k|}
_ZN11xercesc_3_211ENameMapForINS_18XMLASCIITranscoderEEC2EPKDs:
   34|      5|    ENameMap(encodingName)
   35|      5|{
   36|      5|}
_ZNK11xercesc_3_211ENameMapForINS_18XMLASCIITranscoderEE7makeNewEmPNS_13MemoryManagerE:
   49|    123|{
   50|    123|    return new (manager) TType(getKey(), blockSize, manager);
   51|    123|}
_ZN11xercesc_3_211ENameMapForINS_17XMLUTF8TranscoderEEC2EPKDs:
   34|      3|    ENameMap(encodingName)
   35|      3|{
   36|      3|}
_ZNK11xercesc_3_211ENameMapForINS_17XMLUTF8TranscoderEE7makeNewEmPNS_13MemoryManagerE:
   49|  6.40k|{
   50|  6.40k|    return new (manager) TType(getKey(), blockSize, manager);
   51|  6.40k|}
_ZN11xercesc_3_211ENameMapForINS_18XML88591TranscoderEEC2EPKDs:
   34|     12|    ENameMap(encodingName)
   35|     12|{
   36|     12|}
_ZNK11xercesc_3_211ENameMapForINS_18XML88591TranscoderEE7makeNewEmPNS_13MemoryManagerE:
   49|     74|{
   50|     74|    return new (manager) TType(getKey(), blockSize, manager);
   51|     74|}
_ZN11xercesc_3_217EEndianNameMapForINS_18XMLUTF16TranscoderEEC2EPKDsb:
   61|     13|    ENameMap(encodingName)
   62|     13|    , fSwapped(swapped)
   63|     13|{
   64|     13|}
_ZNK11xercesc_3_217EEndianNameMapForINS_18XMLUTF16TranscoderEE7makeNewEmPNS_13MemoryManagerE:
   77|    273|{
   78|    273|    return new (manager) TType(getKey(), blockSize, fSwapped, manager);
   79|    273|}
_ZN11xercesc_3_217EEndianNameMapForINS_17XMLUCS4TranscoderEEC2EPKDsb:
   61|     11|    ENameMap(encodingName)
   62|     11|    , fSwapped(swapped)
   63|     11|{
   64|     11|}
_ZNK11xercesc_3_217EEndianNameMapForINS_17XMLUCS4TranscoderEE7makeNewEmPNS_13MemoryManagerE:
   77|     50|{
   78|     50|    return new (manager) TType(getKey(), blockSize, fSwapped, manager);
   79|     50|}
_ZN11xercesc_3_211ENameMapForINS_19XMLEBCDICTranscoderEEC2EPKDs:
   34|      3|    ENameMap(encodingName)
   35|      3|{
   36|      3|}
_ZNK11xercesc_3_211ENameMapForINS_19XMLEBCDICTranscoderEE7makeNewEmPNS_13MemoryManagerE:
   49|     17|{
   50|     17|    return new (manager) TType(getKey(), blockSize, manager);
   51|     17|}
_ZN11xercesc_3_211ENameMapForINS_20XMLIBM1047TranscoderEEC2EPKDs:
   34|      2|    ENameMap(encodingName)
   35|      2|{
   36|      2|}
_ZNK11xercesc_3_211ENameMapForINS_20XMLIBM1047TranscoderEE7makeNewEmPNS_13MemoryManagerE:
   49|      2|{
   50|      2|    return new (manager) TType(getKey(), blockSize, manager);
   51|      2|}
_ZN11xercesc_3_211ENameMapForINS_20XMLIBM1140TranscoderEEC2EPKDs:
   34|      4|    ENameMap(encodingName)
   35|      4|{
   36|      4|}
_ZNK11xercesc_3_211ENameMapForINS_20XMLIBM1140TranscoderEE7makeNewEmPNS_13MemoryManagerE:
   49|     22|{
   50|     22|    return new (manager) TType(getKey(), blockSize, manager);
   51|     22|}
_ZN11xercesc_3_211ENameMapForINS_20XMLWin1252TranscoderEEC2EPKDs:
   34|      1|    ENameMap(encodingName)
   35|      1|{
   36|      1|}

_ZN11xercesc_3_28ENameMapC2EPKDs:
   73|     56|          fEncodingName(XMLString::replicate(encodingName, XMLPlatformUtils::fgMemoryManager))
   74|     56|    {
   75|     56|    }
_ZNK11xercesc_3_28ENameMap6getKeyEv:
   63|   372k|    {
   64|   372k|        return fEncodingName;
   65|   372k|    }

_ZN11xercesc_3_214XMLInitializer22initializeTransServiceEv:
   58|      1|{
   59|      1|    XMLTransService::gMappings = new RefHashTableOf<ENameMap>(103);
   60|      1|    XMLTransService::gMappingsRecognizer = new RefVectorOf<ENameMap>(
   61|      1|      (XMLSize_t)XMLRecognizer::Encodings_Count);
   62|      1|}
_ZN11xercesc_3_215XMLTransServiceC2Ev:
   77|      1|{
   78|      1|}
_ZN11xercesc_3_215XMLTransService20makeNewTranscoderForEPKDsRNS0_5CodesEmPNS_13MemoryManagerE:
  114|  6.98k|{
  115|       |    //
  116|       |    // If strict IANA encoding flag is set, validate encoding name
  117|       |    //
  118|  6.98k|    if (gStrictIANAEncoding)
  ------------------
  |  Branch (118:9): [True: 0, False: 6.98k]
  ------------------
  119|      0|    {
  120|      0|        if (!EncodingValidator::instance()->isValidEncoding(encodingName))
  ------------------
  |  Branch (120:13): [True: 0, False: 0]
  ------------------
  121|      0|        {
  122|      0|            resValue = XMLTransService::UnsupportedEncoding;
  123|      0|            return 0;
  124|      0|        }
  125|      0|    }
  126|       |
  127|       |    //
  128|       |    //  First try to find it in our list of mappings to intrinsically
  129|       |    //  supported encodings. We have to upper case the passed encoding
  130|       |    //  name because we use a hash table and we stored all our mappings
  131|       |    //  in all uppercase.
  132|       |    //
  133|  6.98k|    const XMLSize_t bufSize = 2048;
  134|  6.98k|    XMLCh upBuf[bufSize + 1];
  135|  6.98k|    if (!XMLString::copyNString(upBuf, encodingName, bufSize))
  ------------------
  |  Branch (135:9): [True: 13, False: 6.97k]
  ------------------
  136|     13|    {
  137|     13|        resValue = XMLTransService::InternalFailure;
  138|     13|        return 0;
  139|     13|    }
  140|  6.97k|    XMLString::upperCaseASCII(upBuf);
  141|  6.97k|    ENameMap* ourMapping = gMappings->get(upBuf);
  142|       |
  143|       |    // If we found it, then call the factory method for it
  144|  6.97k|    if (ourMapping)
  ------------------
  |  Branch (144:9): [True: 6.83k, False: 135]
  ------------------
  145|  6.83k|    {
  146|  6.83k|       XMLTranscoder* temp = ourMapping->makeNew(blockSize, manager);
  147|  6.83k|       resValue = temp ? XMLTransService::Ok : XMLTransService::InternalFailure;
  ------------------
  |  Branch (147:19): [True: 6.83k, False: 0]
  ------------------
  148|  6.83k|       return temp;
  149|  6.83k|    }
  150|       |
  151|       |    //
  152|       |    //  It wasn't an intrinsic and it wasn't disallowed, so pass it on
  153|       |    //  to the trans service to see if he can make anything of it.
  154|       |    //
  155|       |
  156|    135|    XMLTranscoder* temp =  makeNewXMLTranscoder(encodingName, resValue, blockSize, manager);
  157|       |
  158|       |    // if successful, set resValue to OK
  159|       |    // if failed, the makeNewXMLTranscoder has already set the proper failing resValue
  160|    135|    if (temp) resValue =  XMLTransService::Ok;
  ------------------
  |  Branch (160:9): [True: 81, False: 54]
  ------------------
  161|       |
  162|    135|    return temp;
  163|       |
  164|  6.97k|}
_ZN11xercesc_3_215XMLTransService20makeNewTranscoderForENS_13XMLRecognizer9EncodingsERNS0_5CodesEmPNS_13MemoryManagerE:
  172|   365k|{
  173|       |    //
  174|       |    // We can only make transcoder if the passed encodingEnum is under this range
  175|       |    //
  176|   365k|    if (encodingEnum < XMLRecognizer::Encodings_Min || encodingEnum > XMLRecognizer::Encodings_Max) {
  ------------------
  |  Branch (176:9): [True: 0, False: 365k]
  |  Branch (176:56): [True: 0, False: 365k]
  ------------------
  177|      0|        resValue = XMLTransService::InternalFailure;
  178|      0|        return 0;
  179|      0|    }
  180|       |
  181|   365k|    ENameMap* ourMapping = gMappingsRecognizer->elementAt(encodingEnum);
  182|       |
  183|       |    // If we found it, then call the factory method for it
  184|   365k|    if (ourMapping)    {
  ------------------
  |  Branch (184:9): [True: 365k, False: 0]
  ------------------
  185|   365k|       XMLTranscoder* temp = ourMapping->makeNew(blockSize, manager);
  186|   365k|       resValue = temp ? XMLTransService::Ok : XMLTransService::InternalFailure;
  ------------------
  |  Branch (186:19): [True: 365k, False: 0]
  ------------------
  187|   365k|       return temp;
  188|   365k|    }
  189|      0|    else {
  190|      0|        XMLTranscoder* temp =  makeNewXMLTranscoder(XMLRecognizer::nameForEncoding(encodingEnum, manager), resValue, blockSize, manager);
  191|       |
  192|       |        // if successful, set resValue to OK
  193|       |        // if failed, the makeNewXMLTranscoder has already set the proper failing resValue
  194|      0|        if (temp) resValue =  XMLTransService::Ok;
  ------------------
  |  Branch (194:13): [True: 0, False: 0]
  ------------------
  195|       |
  196|      0|        return temp;
  197|      0|    }
  198|       |
  199|   365k|}
_ZN11xercesc_3_215XMLTransService16initTransServiceEv:
  208|      1|{
  209|       |    //
  210|       |    //  A stupid way to increment the fCurCount inside the RefVectorOf
  211|       |    //
  212|      9|    for (XMLSize_t i = 0; i < (XMLSize_t)XMLRecognizer::Encodings_Count; i++)
  ------------------
  |  Branch (212:27): [True: 8, False: 1]
  ------------------
  213|      8|        gMappingsRecognizer->addElement(0);
  214|       |
  215|       |    //
  216|       |    //  Add in the magical mapping for the native XMLCh transcoder. This
  217|       |    //  is used for internal entities.
  218|       |    //
  219|      1|    gMappingsRecognizer->setElementAt(new ENameMapFor<XMLChTranscoder>(XMLUni::fgXMLChEncodingString), XMLRecognizer::XERCES_XMLCH);
  220|      1|    gMappings->put((void*)XMLUni::fgXMLChEncodingString, new ENameMapFor<XMLChTranscoder>(XMLUni::fgXMLChEncodingString));
  221|       |
  222|       |    //
  223|       |    //  Add in our mappings for ASCII.
  224|       |    //
  225|      1|    gMappingsRecognizer->setElementAt(new ENameMapFor<XMLASCIITranscoder>(XMLUni::fgUSASCIIEncodingString), XMLRecognizer::US_ASCII);
  226|      1|    gMappings->put((void*)XMLUni::fgUSASCIIEncodingString, new ENameMapFor<XMLASCIITranscoder>(XMLUni::fgUSASCIIEncodingString));
  227|      1|    gMappings->put((void*)XMLUni::fgUSASCIIEncodingString2, new ENameMapFor<XMLASCIITranscoder>(XMLUni::fgUSASCIIEncodingString2));
  228|      1|    gMappings->put((void*)XMLUni::fgUSASCIIEncodingString3, new ENameMapFor<XMLASCIITranscoder>(XMLUni::fgUSASCIIEncodingString3));
  229|      1|    gMappings->put((void*)XMLUni::fgUSASCIIEncodingString4, new ENameMapFor<XMLASCIITranscoder>(XMLUni::fgUSASCIIEncodingString4));
  230|       |
  231|       |
  232|       |    //
  233|       |    //  Add in our mappings for UTF-8
  234|       |    //
  235|      1|    gMappingsRecognizer->setElementAt(new ENameMapFor<XMLUTF8Transcoder>(XMLUni::fgUTF8EncodingString), XMLRecognizer::UTF_8);
  236|      1|    gMappings->put((void*)XMLUni::fgUTF8EncodingString, new ENameMapFor<XMLUTF8Transcoder>(XMLUni::fgUTF8EncodingString));
  237|      1|    gMappings->put((void*)XMLUni::fgUTF8EncodingString2, new ENameMapFor<XMLUTF8Transcoder>(XMLUni::fgUTF8EncodingString2));
  238|       |
  239|       |    //
  240|       |    //  Add in our mappings for Latin1
  241|       |    //
  242|      1|    gMappings->put((void*)XMLUni::fgISO88591EncodingString, new ENameMapFor<XML88591Transcoder>(XMLUni::fgISO88591EncodingString));
  243|      1|    gMappings->put((void*)XMLUni::fgISO88591EncodingString2, new ENameMapFor<XML88591Transcoder>(XMLUni::fgISO88591EncodingString2));
  244|      1|    gMappings->put((void*)XMLUni::fgISO88591EncodingString3, new ENameMapFor<XML88591Transcoder>(XMLUni::fgISO88591EncodingString3));
  245|      1|    gMappings->put((void*)XMLUni::fgISO88591EncodingString4, new ENameMapFor<XML88591Transcoder>(XMLUni::fgISO88591EncodingString4));
  246|      1|    gMappings->put((void*)XMLUni::fgISO88591EncodingString5, new ENameMapFor<XML88591Transcoder>(XMLUni::fgISO88591EncodingString5));
  247|      1|    gMappings->put((void*)XMLUni::fgISO88591EncodingString6, new ENameMapFor<XML88591Transcoder>(XMLUni::fgISO88591EncodingString6));
  248|      1|    gMappings->put((void*)XMLUni::fgISO88591EncodingString7, new ENameMapFor<XML88591Transcoder>(XMLUni::fgISO88591EncodingString7));
  249|      1|    gMappings->put((void*)XMLUni::fgISO88591EncodingString8, new ENameMapFor<XML88591Transcoder>(XMLUni::fgISO88591EncodingString8));
  250|      1|    gMappings->put((void*)XMLUni::fgISO88591EncodingString9, new ENameMapFor<XML88591Transcoder>(XMLUni::fgISO88591EncodingString9));
  251|      1|    gMappings->put((void*)XMLUni::fgISO88591EncodingString10, new ENameMapFor<XML88591Transcoder>(XMLUni::fgISO88591EncodingString10));
  252|      1|    gMappings->put((void*)XMLUni::fgISO88591EncodingString11, new ENameMapFor<XML88591Transcoder>(XMLUni::fgISO88591EncodingString11));
  253|      1|    gMappings->put((void*)XMLUni::fgISO88591EncodingString12, new ENameMapFor<XML88591Transcoder>(XMLUni::fgISO88591EncodingString12));
  254|       |
  255|       |    //
  256|       |    //  Add in our mappings for UTF-16 and UCS-4, little endian
  257|       |    //
  258|      1|    bool swapped = XMLPlatformUtils::fgXMLChBigEndian;
  259|       |
  260|      1|    gMappingsRecognizer->setElementAt(new EEndianNameMapFor<XMLUTF16Transcoder>(XMLUni::fgUTF16LEncodingString, swapped), XMLRecognizer::UTF_16L);
  261|      1|    gMappings->put
  262|      1|    (
  263|      1|        (void*)XMLUni::fgUTF16LEncodingString,
  264|      1|        new EEndianNameMapFor<XMLUTF16Transcoder>
  265|      1|        (
  266|      1|            XMLUni::fgUTF16LEncodingString
  267|      1|            , swapped
  268|      1|        )
  269|      1|    );
  270|       |
  271|      1|    gMappings->put
  272|      1|    (
  273|      1|        (void*)XMLUni::fgUTF16LEncodingString2,
  274|      1|        new EEndianNameMapFor<XMLUTF16Transcoder>
  275|      1|        (
  276|      1|            XMLUni::fgUTF16LEncodingString2
  277|      1|            , swapped
  278|      1|        )
  279|      1|    );
  280|       |
  281|      1|    gMappingsRecognizer->setElementAt(new EEndianNameMapFor<XMLUCS4Transcoder>(XMLUni::fgUCS4LEncodingString, swapped), XMLRecognizer::UCS_4L);
  282|      1|    gMappings->put
  283|      1|    (
  284|      1|        (void*)XMLUni::fgUCS4LEncodingString,
  285|      1|        new EEndianNameMapFor<XMLUCS4Transcoder>
  286|      1|        (
  287|      1|            XMLUni::fgUCS4LEncodingString
  288|      1|            , swapped
  289|      1|        )
  290|      1|    );
  291|       |
  292|      1|    gMappings->put
  293|      1|    (
  294|      1|        (void*)XMLUni::fgUCS4LEncodingString2,
  295|      1|        new EEndianNameMapFor<XMLUCS4Transcoder>
  296|      1|        (
  297|      1|            XMLUni::fgUCS4LEncodingString2
  298|      1|            , swapped
  299|      1|        )
  300|      1|    );
  301|       |
  302|       |    //
  303|       |    //  Add in our mappings for UTF-16 and UCS-4, big endian
  304|       |    //
  305|      1|    swapped = !XMLPlatformUtils::fgXMLChBigEndian;
  306|       |
  307|      1|    gMappingsRecognizer->setElementAt(new EEndianNameMapFor<XMLUTF16Transcoder>(XMLUni::fgUTF16BEncodingString, swapped), XMLRecognizer::UTF_16B);
  308|      1|    gMappings->put
  309|      1|    (
  310|      1|        (void*)XMLUni::fgUTF16BEncodingString,
  311|      1|        new EEndianNameMapFor<XMLUTF16Transcoder>
  312|      1|        (
  313|      1|            XMLUni::fgUTF16BEncodingString
  314|      1|            , swapped
  315|      1|        )
  316|      1|    );
  317|       |
  318|      1|    gMappings->put
  319|      1|    (
  320|      1|        (void*)XMLUni::fgUTF16BEncodingString2,
  321|      1|        new EEndianNameMapFor<XMLUTF16Transcoder>
  322|      1|        (
  323|      1|            XMLUni::fgUTF16BEncodingString2
  324|      1|            , swapped
  325|      1|        )
  326|      1|    );
  327|       |
  328|      1|    gMappingsRecognizer->setElementAt(new EEndianNameMapFor<XMLUCS4Transcoder>(XMLUni::fgUCS4BEncodingString, swapped), XMLRecognizer::UCS_4B);
  329|      1|    gMappings->put
  330|      1|    (
  331|      1|        (void*)XMLUni::fgUCS4BEncodingString,
  332|      1|        new EEndianNameMapFor<XMLUCS4Transcoder>
  333|      1|        (
  334|      1|            XMLUni::fgUCS4BEncodingString
  335|      1|            , swapped
  336|      1|        )
  337|      1|    );
  338|       |
  339|      1|    gMappings->put
  340|      1|    (
  341|      1|        (void*)XMLUni::fgUCS4BEncodingString2,
  342|      1|        new EEndianNameMapFor<XMLUCS4Transcoder>
  343|      1|        (
  344|      1|            XMLUni::fgUCS4BEncodingString2
  345|      1|            , swapped
  346|      1|        )
  347|      1|    );
  348|       |
  349|       |    //
  350|       |    //  Add in our mappings for UTF-16 and UCS-4 which does not indicate endian
  351|       |    //  assumes the same endian encoding as the OS
  352|       |    //
  353|       |
  354|      1|    gMappings->put
  355|      1|    (
  356|      1|        (void*)XMLUni::fgUTF16EncodingString,
  357|      1|        new EEndianNameMapFor<XMLUTF16Transcoder>
  358|      1|        (
  359|      1|            XMLUni::fgUTF16EncodingString
  360|      1|            , false
  361|      1|        )
  362|      1|    );
  363|      1|    gMappings->put
  364|      1|    (
  365|      1|        (void*)XMLUni::fgUTF16EncodingString2,
  366|      1|        new EEndianNameMapFor<XMLUTF16Transcoder>
  367|      1|        (
  368|      1|            XMLUni::fgUTF16EncodingString2
  369|      1|            , false
  370|      1|        )
  371|      1|    );
  372|      1|    gMappings->put
  373|      1|    (
  374|      1|        (void*)XMLUni::fgUTF16EncodingString3,
  375|      1|        new EEndianNameMapFor<XMLUTF16Transcoder>
  376|      1|        (
  377|      1|            XMLUni::fgUTF16EncodingString3
  378|      1|            , false
  379|      1|        )
  380|      1|    );
  381|      1|    gMappings->put
  382|      1|    (
  383|      1|        (void*)XMLUni::fgUTF16EncodingString4,
  384|      1|        new EEndianNameMapFor<XMLUTF16Transcoder>
  385|      1|        (
  386|      1|            XMLUni::fgUTF16EncodingString4
  387|      1|            , false
  388|      1|        )
  389|      1|    );
  390|      1|    gMappings->put
  391|      1|    (
  392|      1|        (void*)XMLUni::fgUTF16EncodingString5,
  393|      1|        new EEndianNameMapFor<XMLUTF16Transcoder>
  394|      1|        (
  395|      1|            XMLUni::fgUTF16EncodingString5
  396|      1|            , false
  397|      1|        )
  398|      1|    );
  399|      1|    gMappings->put
  400|      1|    (
  401|      1|        (void*)XMLUni::fgUTF16EncodingString6,
  402|      1|        new EEndianNameMapFor<XMLUTF16Transcoder>
  403|      1|        (
  404|      1|            XMLUni::fgUTF16EncodingString6
  405|      1|            , false
  406|      1|        )
  407|      1|    );
  408|      1|    gMappings->put
  409|      1|    (
  410|      1|        (void*)XMLUni::fgUTF16EncodingString7,
  411|      1|        new EEndianNameMapFor<XMLUTF16Transcoder>
  412|      1|        (
  413|      1|            XMLUni::fgUTF16EncodingString7
  414|      1|            , false
  415|      1|        )
  416|      1|    );
  417|      1|    gMappings->put
  418|      1|    (
  419|      1|        (void*)XMLUni::fgUCS4EncodingString,
  420|      1|        new EEndianNameMapFor<XMLUCS4Transcoder>
  421|      1|        (
  422|      1|            XMLUni::fgUCS4EncodingString
  423|      1|            , false
  424|      1|        )
  425|      1|    );
  426|      1|    gMappings->put
  427|      1|    (
  428|      1|        (void*)XMLUni::fgUCS4EncodingString2,
  429|      1|        new EEndianNameMapFor<XMLUCS4Transcoder>
  430|      1|        (
  431|      1|            XMLUni::fgUCS4EncodingString2
  432|      1|            , false
  433|      1|        )
  434|      1|    );
  435|      1|    gMappings->put
  436|      1|    (
  437|      1|        (void*)XMLUni::fgUCS4EncodingString3,
  438|      1|        new EEndianNameMapFor<XMLUCS4Transcoder>
  439|      1|        (
  440|      1|            XMLUni::fgUCS4EncodingString3
  441|      1|            , false
  442|      1|        )
  443|      1|    );
  444|      1|    gMappings->put
  445|      1|    (
  446|      1|        (void*)XMLUni::fgUCS4EncodingString4,
  447|      1|        new EEndianNameMapFor<XMLUCS4Transcoder>
  448|      1|        (
  449|      1|            XMLUni::fgUCS4EncodingString4
  450|      1|            , false
  451|      1|        )
  452|      1|    );
  453|      1|    gMappings->put
  454|      1|    (
  455|      1|        (void*)XMLUni::fgUCS4EncodingString5,
  456|      1|        new EEndianNameMapFor<XMLUCS4Transcoder>
  457|      1|        (
  458|      1|            XMLUni::fgUCS4EncodingString5
  459|      1|            , false
  460|      1|        )
  461|      1|    );
  462|       |
  463|       |    //
  464|       |    //  Add in our mappings for IBM037, and the one alias we support for
  465|       |    //  it, which is EBCDIC-CP-US.
  466|       |    //
  467|      1|    gMappingsRecognizer->setElementAt(new ENameMapFor<XMLEBCDICTranscoder>(XMLUni::fgEBCDICEncodingString), XMLRecognizer::EBCDIC);
  468|      1|    gMappings->put((void*)XMLUni::fgIBM037EncodingString, new ENameMapFor<XMLEBCDICTranscoder>(XMLUni::fgIBM037EncodingString));
  469|      1|    gMappings->put((void*)XMLUni::fgIBM037EncodingString2, new ENameMapFor<XMLEBCDICTranscoder>(XMLUni::fgIBM037EncodingString2));
  470|       |
  471|       |
  472|       |    //hhe
  473|      1|    gMappings->put((void*)XMLUni::fgIBM1047EncodingString, new ENameMapFor<XMLIBM1047Transcoder>(XMLUni::fgIBM1047EncodingString));
  474|      1|    gMappings->put((void*)XMLUni::fgIBM1047EncodingString2, new ENameMapFor<XMLIBM1047Transcoder>(XMLUni::fgIBM1047EncodingString2));
  475|       |
  476|       |    //
  477|       |    //  Add in our mappings for IBM037 with Euro update, i.e. IBM1140. It
  478|       |    //  has alias IBM01140, the one suggested by IANA
  479|       |    //
  480|      1|    gMappings->put((void*)XMLUni::fgIBM1140EncodingString, new ENameMapFor<XMLIBM1140Transcoder>(XMLUni::fgIBM1140EncodingString));
  481|      1|    gMappings->put((void*)XMLUni::fgIBM1140EncodingString2, new ENameMapFor<XMLIBM1140Transcoder>(XMLUni::fgIBM1140EncodingString2));
  482|      1|    gMappings->put((void*)XMLUni::fgIBM1140EncodingString3, new ENameMapFor<XMLIBM1140Transcoder>(XMLUni::fgIBM1140EncodingString3));
  483|      1|    gMappings->put((void*)XMLUni::fgIBM1140EncodingString4, new ENameMapFor<XMLIBM1140Transcoder>(XMLUni::fgIBM1140EncodingString4));
  484|       |
  485|       |    //
  486|       |    //  Add in our mappings for Windows-1252. We don't have any aliases for
  487|       |    //  this one, so there is just one mapping.
  488|       |    //
  489|      1|    gMappings->put((void*)XMLUni::fgWin1252EncodingString, new ENameMapFor<XMLWin1252Transcoder>(XMLUni::fgWin1252EncodingString));
  490|       |
  491|      1|}
_ZN11xercesc_3_213XMLTranscoderD2Ev:
  510|   372k|{
  511|   372k|    fMemoryManager->deallocate(fEncodingName);//delete [] fEncodingName;
  512|   372k|}
_ZN11xercesc_3_213XMLTranscoderC2EPKDsmPNS_13MemoryManagerE:
  521|   372k|      fBlockSize(blockSize)
  522|   372k|    , fEncodingName(0)
  523|   372k|    , fMemoryManager(manager)
  524|   372k|{
  525|   372k|    fEncodingName = XMLString::replicate(encodingName, fMemoryManager);
  526|   372k|}
_ZN11xercesc_3_216XMLLCPTranscoderC2Ev:
  538|      1|{
  539|      1|}

_ZNK11xercesc_3_213XMLTranscoder16getMemoryManagerEv:
  650|    638|{
  651|    638|    return fMemoryManager;
  652|    638|}
_ZNK11xercesc_3_213XMLTranscoder15getEncodingNameEv:
  663|     33|{
  664|     33|    return fEncodingName;
  665|     33|}

_ZN11xercesc_3_215IconvGNUWrapperC2EPNS_13MemoryManagerE:
  171|      1|    : fUChSize(0), fUBO(LITTLE_ENDIAN),
  172|      1|      fCDTo((iconv_t)-1), fCDFrom((iconv_t)-1), fMutex(manager)
  173|      1|{
  174|      1|}
_ZN11xercesc_3_215IconvGNUWrapperC2EPvS1_mjPNS_13MemoryManagerE:
  181|     82|    : fUChSize(uchsize), fUBO(ubo),
  182|     82|      fCDTo(cd_to), fCDFrom(cd_from), fMutex(manager)
  183|     82|{
  184|     82|    if (fCDFrom == (iconv_t) -1 || fCDTo == (iconv_t) -1) {
  ------------------
  |  Branch (184:9): [True: 0, False: 82]
  |  Branch (184:36): [True: 0, False: 82]
  ------------------
  185|      0|        XMLPlatformUtils::panic (PanicHandler::Panic_NoTransService);
  186|      0|    }
  187|     82|}
_ZN11xercesc_3_215IconvGNUWrapperD2Ev:
  190|     81|{
  191|     81|}
_ZN11xercesc_3_215IconvGNUWrapper9iconvFromEPKcPmPPcm:
  382|  7.11M|{
  383|       |#if ICONV_USES_CONST_POINTER
  384|       |    const char ** tmpPtr = &fromPtr;
  385|       |#else
  386|  7.11M|    char ** tmpPtr = (char**)&fromPtr;
  387|  7.11M|#endif
  388|  7.11M|    return ::iconv (fCDFrom, tmpPtr, fromLen, toPtr, &toLen);
  389|  7.11M|}
_ZN11xercesc_3_215IconvGNUWrapper7iconvToEPKcPmPPcm:
  395|  3.21k|{
  396|       |#if ICONV_USES_CONST_POINTER
  397|       |    const char ** tmpPtr = &fromPtr;
  398|       |#else
  399|  3.21k|    char ** tmpPtr = (char**)&fromPtr;
  400|  3.21k|#endif
  401|  3.21k|    return ::iconv (fCDTo, tmpPtr, fromLen, toPtr, &toLen);
  402|  3.21k|}
_ZN11xercesc_3_220IconvGNUTransServiceC2EPNS_13MemoryManagerE:
  410|      1|    : IconvGNUWrapper(manager), fUnicodeCP(0)
  411|      1|{
  412|       |    // Try to obtain local (host) characterset from the setlocale
  413|       |    // and through the environment. Do not call setlocale(LC_*, "")!
  414|       |    // Using an empty string instead of NULL, will modify the libc
  415|       |    // behavior.
  416|       |    //
  417|      1|    const char* fLocalCP = setlocale (LC_CTYPE, NULL);
  418|      1|    if (fLocalCP == NULL || *fLocalCP == 0 ||
  ------------------
  |  Branch (418:9): [True: 0, False: 1]
  |  Branch (418:29): [True: 0, False: 1]
  ------------------
  419|      1|        strcmp (fLocalCP, "C") == 0 ||
  ------------------
  |  Branch (419:9): [True: 1, False: 0]
  ------------------
  420|      1|        strcmp (fLocalCP, "POSIX") == 0) {
  ------------------
  |  Branch (420:9): [True: 0, False: 0]
  ------------------
  421|      1|      fLocalCP = getenv ("LC_ALL");
  422|      1|      if (fLocalCP == NULL) {
  ------------------
  |  Branch (422:11): [True: 1, False: 0]
  ------------------
  423|      1|        fLocalCP = getenv ("LC_CTYPE");
  424|      1|        if (fLocalCP == NULL)
  ------------------
  |  Branch (424:13): [True: 1, False: 0]
  ------------------
  425|      1|          fLocalCP = getenv ("LANG");
  426|      1|      }
  427|      1|    }
  428|       |
  429|      1|    if (fLocalCP == NULL || *fLocalCP == 0 ||
  ------------------
  |  Branch (429:9): [True: 1, False: 0]
  |  Branch (429:29): [True: 0, False: 0]
  ------------------
  430|      1|        strcmp (fLocalCP, "C") == 0 ||
  ------------------
  |  Branch (430:9): [True: 0, False: 0]
  ------------------
  431|      1|        strcmp (fLocalCP, "POSIX") == 0)
  ------------------
  |  Branch (431:9): [True: 0, False: 0]
  ------------------
  432|      1|        fLocalCP = "iso-8859-1";    // fallback locale
  433|      0|    else {
  434|      0|        const char *ptr = strchr (fLocalCP, '.');
  435|      0|        if (ptr == NULL)
  ------------------
  |  Branch (435:13): [True: 0, False: 0]
  ------------------
  436|      0|            fLocalCP = "iso-8859-1";    // fallback locale
  437|      0|        else
  438|      0|            fLocalCP = ptr + 1;
  439|      0|    }
  440|       |
  441|       |    // Select the native unicode characters encoding schema
  442|      1|    const IconvGNUEncoding    *eptr;
  443|       |    // first - try to use the schema with character size equal to XMLCh, and same endianness
  444|      1|    for (eptr = gIconvGNUEncodings; eptr->fSchema; eptr++)
  ------------------
  |  Branch (444:37): [True: 1, False: 0]
  ------------------
  445|      1|    {
  446|      1|        if (eptr->fUChSize != sizeof(XMLCh) || eptr->fUBO != BYTE_ORDER)
  ------------------
  |  Branch (446:13): [True: 0, False: 1]
  |  Branch (446:48): [True: 0, False: 1]
  ------------------
  447|      0|            continue;
  448|       |
  449|       |        // try to create conversion descriptor
  450|      1|        iconv_t    cd_to = iconv_open(fLocalCP, eptr->fSchema);
  451|      1|        if (cd_to == (iconv_t)-1)
  ------------------
  |  Branch (451:13): [True: 0, False: 1]
  ------------------
  452|      0|            continue;
  453|      1|        iconv_t    cd_from = iconv_open(eptr->fSchema, fLocalCP);
  454|      1|        if (cd_from == (iconv_t)-1) {
  ------------------
  |  Branch (454:13): [True: 0, False: 1]
  ------------------
  455|      0|            iconv_close (cd_to);
  456|      0|            continue;
  457|      0|        }
  458|       |
  459|       |        // got it
  460|      1|        setUChSize(eptr->fUChSize);
  461|      1|        setUBO(eptr->fUBO);
  462|      1|        setCDTo(cd_to);
  463|      1|        setCDFrom(cd_from);
  464|      1|        fUnicodeCP = eptr->fSchema;
  465|      1|        break;
  466|      1|    }
  467|      1|    if (fUnicodeCP == NULL)
  ------------------
  |  Branch (467:9): [True: 0, False: 1]
  ------------------
  468|       |        // try to use any known schema
  469|      0|        for (eptr = gIconvGNUEncodings; eptr->fSchema; eptr++)
  ------------------
  |  Branch (469:41): [True: 0, False: 0]
  ------------------
  470|      0|        {
  471|       |            // try to create conversion descriptor
  472|      0|            iconv_t    cd_to = iconv_open(fLocalCP, eptr->fSchema);
  473|      0|            if (cd_to == (iconv_t)-1)
  ------------------
  |  Branch (473:17): [True: 0, False: 0]
  ------------------
  474|      0|                continue;
  475|      0|            iconv_t    cd_from = iconv_open(eptr->fSchema, fLocalCP);
  476|      0|            if (cd_from == (iconv_t)-1) {
  ------------------
  |  Branch (476:17): [True: 0, False: 0]
  ------------------
  477|      0|                iconv_close (cd_to);
  478|      0|                continue;
  479|      0|            }
  480|       |
  481|       |            // got it
  482|      0|            setUChSize(eptr->fUChSize);
  483|      0|            setUBO(eptr->fUBO);
  484|      0|            setCDTo(cd_to);
  485|      0|            setCDFrom(cd_from);
  486|      0|            fUnicodeCP = eptr->fSchema;
  487|      0|            break;
  488|      0|        }
  489|       |
  490|      1|    if (fUnicodeCP == NULL || cdTo() == (iconv_t)-1 || cdFrom() == (iconv_t)-1)
  ------------------
  |  Branch (490:9): [True: 0, False: 1]
  |  Branch (490:31): [True: 0, False: 1]
  |  Branch (490:56): [True: 0, False: 1]
  ------------------
  491|      0|        XMLPlatformUtils::panic (PanicHandler::Panic_NoTransService);
  492|      1|}
_ZN11xercesc_3_220IconvGNUTransService20makeNewLCPTranscoderEPNS_13MemoryManagerE:
  573|      1|{
  574|      1|    return new (manager) IconvGNULCPTranscoder (cdFrom(), cdTo(), uChSize(), UBO(), manager);
  575|      1|}
_ZNK11xercesc_3_220IconvGNUTransService14supportsSrcOfsEv:
  578|   372k|{
  579|   372k|    return true;
  580|   372k|}
_ZN11xercesc_3_220IconvGNUTransService20makeNewXMLTranscoderEPKDsRNS_15XMLTransService5CodesEmPNS_13MemoryManagerE:
  593|    135|{
  594|    135|    resValue = XMLTransService::UnsupportedEncoding;
  595|    135|    IconvGNUTranscoder    *newTranscoder = NULL;
  596|       |
  597|    135|    char    *encLocal = XMLString::transcode(encodingName, manager);
  598|    135|    ArrayJanitor<char> janBuf(encLocal, manager);
  599|    135|    iconv_t    cd_from, cd_to;
  600|       |
  601|    135|    cd_from = iconv_open (fUnicodeCP, encLocal);
  602|    135|    if (cd_from == (iconv_t)-1) {
  ------------------
  |  Branch (602:9): [True: 54, False: 81]
  ------------------
  603|     54|        resValue = XMLTransService::SupportFilesNotFound;
  604|     54|        return NULL;
  605|     54|    }
  606|     81|    cd_to = iconv_open (encLocal, fUnicodeCP);
  607|     81|    if (cd_to == (iconv_t)-1) {
  ------------------
  |  Branch (607:9): [True: 0, False: 81]
  ------------------
  608|      0|        resValue = XMLTransService::SupportFilesNotFound;
  609|      0|        iconv_close (cd_from);
  610|      0|        return NULL;
  611|      0|    }
  612|     81|    newTranscoder = new (manager) IconvGNUTranscoder (encodingName,
  613|     81|                         blockSize,
  614|     81|                         cd_from, cd_to,
  615|     81|                         uChSize(), UBO(), manager);
  616|     81|    if (newTranscoder)
  ------------------
  |  Branch (616:9): [True: 81, False: 0]
  ------------------
  617|     81|        resValue = XMLTransService::Ok;
  618|     81|    return newTranscoder;
  619|     81|}
_ZN11xercesc_3_221IconvGNULCPTranscoder16calcRequiredSizeEPKcPNS_13MemoryManagerE:
  652|  7.27k|{
  653|  7.27k|    if (!srcText)
  ------------------
  |  Branch (653:9): [True: 0, False: 7.27k]
  ------------------
  654|      0|        return 0;
  655|       |
  656|  7.27k|    size_t len, srcLen;
  657|  7.27k|    len = srcLen = strlen(srcText);
  658|  7.27k|    if (len == 0)
  ------------------
  |  Branch (658:9): [True: 0, False: 7.27k]
  ------------------
  659|      0|        return 0;
  660|       |
  661|  7.27k|    char tmpWideArr[gTempBuffArraySize];
  662|  7.27k|    size_t totalLen = 0;
  663|       |
  664|  7.27k|    XMLMutexLock lockConverter(&fMutex);
  665|       |
  666|  7.27k|    for (;;) {
  667|  7.27k|        char        *pTmpArr = tmpWideArr;
  668|  7.27k|        const char    *ptr = srcText + srcLen - len;
  669|  7.27k|        size_t    rc = iconvFrom(ptr, &len, &pTmpArr, gTempBuffArraySize);
  670|  7.27k|        if (rc == (size_t) -1 && errno != E2BIG) {
  ------------------
  |  Branch (670:13): [True: 0, False: 7.27k]
  |  Branch (670:34): [True: 0, False: 0]
  ------------------
  671|      0|            ThrowXMLwithMemMgr(TranscodingException, XMLExcepts::Trans_BadSrcSeq, manager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  672|       |            /* return 0; */
  673|      0|        }
  674|  7.27k|        rc = pTmpArr - (char *) tmpWideArr;
  675|  7.27k|        totalLen += rc;
  676|  7.27k|        if (rc == 0 || len == 0)
  ------------------
  |  Branch (676:13): [True: 0, False: 7.27k]
  |  Branch (676:24): [True: 7.27k, False: 0]
  ------------------
  677|  7.27k|            break;
  678|  7.27k|    }
  679|  7.27k|    return totalLen / uChSize();
  680|  7.27k|}
_ZN11xercesc_3_221IconvGNULCPTranscoder16calcRequiredSizeEPKDsPNS_13MemoryManagerE:
  685|    756|{
  686|    756|    if (!srcText)
  ------------------
  |  Branch (686:9): [True: 0, False: 756]
  ------------------
  687|      0|        return 0;
  688|    756|    XMLSize_t  wLent = getWideCharLength(srcText);
  689|    756|    if (wLent == 0)
  ------------------
  |  Branch (689:9): [True: 0, False: 756]
  ------------------
  690|      0|        return 0;
  691|       |
  692|    756|    char    tmpWBuff[gTempBuffArraySize];
  693|    756|    char    *wBuf = 0;
  694|    756|    char    *wBufPtr = 0;
  695|    756|    ArrayJanitor<char>  janBuf(wBufPtr, manager);
  696|    756|    size_t      len = wLent * uChSize();
  697|    756|    if (uChSize() != sizeof(XMLCh) || UBO() != BYTE_ORDER) {
  ------------------
  |  Branch (697:9): [True: 0, False: 756]
  |  Branch (697:39): [True: 0, False: 756]
  ------------------
  698|      0|        if (len > gTempBuffArraySize) {
  ------------------
  |  Branch (698:13): [True: 0, False: 0]
  ------------------
  699|      0|            wBufPtr = (char*) manager->allocate(len * sizeof(char));//new char[len];
  700|      0|            janBuf.reset(wBufPtr, manager);
  701|      0|            wBuf = wBufPtr;
  702|      0|        } else
  703|      0|            wBuf = tmpWBuff;
  704|      0|        xmlToMbs (srcText, wBuf, wLent);
  705|      0|    } else
  706|    756|        wBuf = (char *) srcText;
  707|       |
  708|    756|    char    tmpBuff[gTempBuffArraySize];
  709|    756|    size_t    totalLen = 0;
  710|    756|    char    *srcEnd = wBuf + wLent * uChSize();
  711|       |
  712|    756|    XMLMutexLock lockConverter(&fMutex);
  713|       |
  714|  2.58k|    for (;;) {
  715|  2.58k|        char        *pTmpArr = tmpBuff;
  716|  2.58k|        const char    *ptr = srcEnd - len;
  717|  2.58k|        size_t    rc = iconvTo(ptr, &len, &pTmpArr, gTempBuffArraySize);
  718|  2.58k|        if (rc == (size_t) -1 && errno != E2BIG) {
  ------------------
  |  Branch (718:13): [True: 1.94k, False: 636]
  |  Branch (718:34): [True: 120, False: 1.82k]
  ------------------
  719|    120|            ThrowXMLwithMemMgr(TranscodingException, XMLExcepts::Trans_BadSrcSeq, manager);
  ------------------
  |  |  264|    120|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  720|       |            /* return 0; */
  721|    120|        }
  722|  2.46k|        rc = pTmpArr - tmpBuff;
  723|  2.46k|        totalLen += rc;
  724|  2.46k|        if (rc == 0 || len == 0)
  ------------------
  |  Branch (724:13): [True: 0, False: 2.46k]
  |  Branch (724:24): [True: 636, False: 1.82k]
  ------------------
  725|    636|            break;
  726|  2.46k|    }
  727|    636|    return totalLen;
  728|    756|}
_ZN11xercesc_3_221IconvGNULCPTranscoder9transcodeEPKDsPNS_13MemoryManagerE:
  733|    759|{
  734|    759|    if (!toTranscode)
  ------------------
  |  Branch (734:9): [True: 0, False: 759]
  ------------------
  735|      0|        return 0;
  736|       |
  737|    759|    char* retVal = 0;
  738|    759|    if (!*toTranscode) {
  ------------------
  |  Branch (738:9): [True: 3, False: 756]
  ------------------
  739|      3|        retVal = (char*) manager->allocate(sizeof(char));//new char[1];
  740|      3|        retVal[0] = 0;
  741|      3|        return retVal;
  742|      3|    }
  743|       |
  744|    756|    XMLSize_t wLent = getWideCharLength(toTranscode);
  745|       |
  746|       |    // Calc needed size.
  747|    756|    XMLSize_t neededLen = calcRequiredSize (toTranscode, manager);
  748|    756|    if (neededLen == 0)
  ------------------
  |  Branch (748:9): [True: 0, False: 756]
  ------------------
  749|      0|        return 0;
  750|       |    // allocate output buffer
  751|    756|    retVal = (char*) manager->allocate((neededLen + 1) * sizeof(char));//new char[neededLen + 1];
  752|       |    // prepare the original
  753|    756|    char    tmpWBuff[gTempBuffArraySize];
  754|    756|    char    *wideCharBuf = 0;
  755|    756|    char    *wBufPtr = 0;
  756|    756|    ArrayJanitor<char>  janBuf(wBufPtr, manager);
  757|    756|    size_t  len = wLent * uChSize();
  758|       |
  759|    756|    if (uChSize() != sizeof(XMLCh) || UBO() != BYTE_ORDER) {
  ------------------
  |  Branch (759:9): [True: 120, False: 636]
  |  Branch (759:39): [True: 0, False: 636]
  ------------------
  760|      0|        if (len > gTempBuffArraySize) {
  ------------------
  |  Branch (760:13): [True: 0, False: 0]
  ------------------
  761|      0|            wBufPtr = (char*) manager->allocate(len * sizeof(char));//new char[len];
  762|      0|            janBuf.reset(wBufPtr, manager);
  763|      0|            wideCharBuf = wBufPtr;
  764|      0|        } else
  765|      0|            wideCharBuf = tmpWBuff;
  766|      0|        xmlToMbs (toTranscode, wideCharBuf, wLent);
  767|      0|    } else
  768|    756|        wideCharBuf = (char *) toTranscode;
  769|       |
  770|       |    // perform conversion
  771|    756|    char* ptr = retVal;
  772|    756|    size_t rc;
  773|       |
  774|    756|    {
  775|    756|      XMLMutexLock lockConverter(&fMutex);
  776|    756|      rc = iconvTo(wideCharBuf, &len, &ptr, neededLen);
  777|    756|    }
  778|       |
  779|    756|    if (rc == (size_t)-1) {
  ------------------
  |  Branch (779:9): [True: 0, False: 756]
  ------------------
  780|      0|        return 0;
  781|      0|    }
  782|    756|    retVal[neededLen] = 0;
  783|       |
  784|    756|    return retVal;
  785|    756|}
_ZN11xercesc_3_221IconvGNULCPTranscoder9transcodeEPKcPNS_13MemoryManagerE:
  846|  7.27k|{
  847|  7.27k|    if (!toTranscode)
  ------------------
  |  Branch (847:9): [True: 0, False: 7.27k]
  ------------------
  848|      0|        return 0;
  849|       |
  850|  7.27k|    XMLCh* retVal = 0;
  851|  7.27k|    if (!*toTranscode) {
  ------------------
  |  Branch (851:9): [True: 1, False: 7.27k]
  ------------------
  852|      1|        retVal = (XMLCh*) manager->allocate(sizeof(XMLCh));//new XMLCh[1];
  853|      1|        retVal[0] = 0;
  854|      1|        return retVal;
  855|      1|    }
  856|       |
  857|  7.27k|    XMLSize_t wLent = calcRequiredSize(toTranscode, manager);
  858|  7.27k|    if (wLent == 0) {
  ------------------
  |  Branch (858:9): [True: 0, False: 7.27k]
  ------------------
  859|      0|        retVal = (XMLCh*) manager->allocate(sizeof(XMLCh));//new XMLCh[1];
  860|      0|        retVal[0] = 0;
  861|      0|        return retVal;
  862|      0|    }
  863|       |
  864|  7.27k|    char    tmpWBuff[gTempBuffArraySize];
  865|  7.27k|    char    *wideCharBuf = 0;
  866|  7.27k|    char    *wBufPtr = 0;
  867|  7.27k|    ArrayJanitor<char>  janBuf(wBufPtr, manager);
  868|  7.27k|    size_t  len = wLent * uChSize();
  869|       |
  870|  7.27k|    retVal = (XMLCh*) manager->allocate((wLent + 1) * sizeof(XMLCh));//new XMLCh[wLent + 1];
  871|  7.27k|    if (uChSize() != sizeof(XMLCh) || UBO() != BYTE_ORDER) {
  ------------------
  |  Branch (871:9): [True: 0, False: 7.27k]
  |  Branch (871:39): [True: 0, False: 7.27k]
  ------------------
  872|      0|        if (len > gTempBuffArraySize) {
  ------------------
  |  Branch (872:13): [True: 0, False: 0]
  ------------------
  873|      0|            wBufPtr = (char*) manager->allocate(len * sizeof(char));//new char[len];
  874|      0|            janBuf.reset(wBufPtr, manager);
  875|      0|            wideCharBuf = wBufPtr;
  876|      0|        } else
  877|      0|            wideCharBuf = tmpWBuff;
  878|      0|    } else
  879|  7.27k|        wideCharBuf = (char *) retVal;
  880|       |
  881|  7.27k|    size_t    flen = strlen(toTranscode);
  882|  7.27k|    char    *ptr = wideCharBuf;
  883|  7.27k|    size_t rc;
  884|       |
  885|  7.27k|    {
  886|  7.27k|      XMLMutexLock lockConverter(&fMutex);
  887|  7.27k|      rc = iconvFrom(toTranscode, &flen, &ptr, len);
  888|  7.27k|    }
  889|       |
  890|  7.27k|    if (rc == (size_t) -1) {
  ------------------
  |  Branch (890:9): [True: 0, False: 7.27k]
  ------------------
  891|      0|        return NULL;
  892|      0|    }
  893|  7.27k|    if (uChSize() != sizeof(XMLCh) || UBO() != BYTE_ORDER)
  ------------------
  |  Branch (893:9): [True: 0, False: 7.27k]
  |  Branch (893:39): [True: 0, False: 7.27k]
  ------------------
  894|      0|        mbsToXML (wideCharBuf, retVal, wLent);
  895|  7.27k|    retVal[wLent] = 0x00;
  896|       |
  897|  7.27k|    return retVal;
  898|  7.27k|}
_ZN11xercesc_3_221IconvGNULCPTranscoderC2EPvS1_mjPNS_13MemoryManagerE:
  970|      1|    : IconvGNUWrapper (cd_from, cd_to, uchsize, ubo, manager)
  971|      1|{
  972|      1|}
_ZN11xercesc_3_218IconvGNUTranscoderC2EPKDsmPvS3_mjPNS_13MemoryManagerE:
  991|     81|    : XMLTranscoder(encodingName, blockSize, manager)
  992|     81|    , IconvGNUWrapper (cd_from, cd_to, uchsize, ubo, manager)
  993|     81|{
  994|     81|}
_ZN11xercesc_3_218IconvGNUTranscoderD2Ev:
  997|     81|{
  998|     81|    if (cdTo() != (iconv_t)-1) {
  ------------------
  |  Branch (998:9): [True: 81, False: 0]
  ------------------
  999|     81|        iconv_close (cdTo());
 1000|     81|        setCDTo ((iconv_t)-1);
 1001|     81|    }
 1002|     81|    if (cdFrom() != (iconv_t)-1) {
  ------------------
  |  Branch (1002:9): [True: 81, False: 0]
  ------------------
 1003|     81|        iconv_close (cdFrom());
 1004|     81|        setCDFrom ((iconv_t)-1);
 1005|     81|    }
 1006|     81|}
_ZN11xercesc_3_218IconvGNUTranscoder13transcodeFromEPKhmPDsmRmPh:
 1019|    506|{
 1020|       |    // Transcode TO XMLCh
 1021|    506|    const char*  startSrc = (const char*) srcData;
 1022|    506|    const char*  endSrc = (const char*) srcData + srcCount;
 1023|       |
 1024|    506|    char    tmpWBuff[gTempBuffArraySize];
 1025|    506|    char    *startTarget = 0;
 1026|    506|    char    *wBufPtr = 0;
 1027|    506|    ArrayJanitor<char>  janBuf(wBufPtr, getMemoryManager());
 1028|    506|    size_t    len = maxChars * uChSize();
 1029|       |
 1030|    506|    if (uChSize() != sizeof(XMLCh) || UBO() != BYTE_ORDER) {
  ------------------
  |  Branch (1030:9): [True: 0, False: 506]
  |  Branch (1030:39): [True: 0, False: 506]
  ------------------
 1031|      0|        if (len > gTempBuffArraySize) {
  ------------------
  |  Branch (1031:13): [True: 0, False: 0]
  ------------------
 1032|      0|            wBufPtr = (char*) getMemoryManager()->allocate(len * sizeof(char));//new char[len];
 1033|      0|            janBuf.reset(wBufPtr, getMemoryManager());
 1034|      0|            startTarget = wBufPtr;
 1035|      0|        } else
 1036|      0|            startTarget = tmpWBuff;
 1037|      0|    } else
 1038|    506|        startTarget = (char *) toFill;
 1039|       |
 1040|       |    // Do character-by-character transcoding
 1041|    506|    char    *orgTarget = startTarget;
 1042|    506|    size_t    srcLen = srcCount;
 1043|    506|    size_t    prevSrcLen = srcLen;
 1044|    506|    XMLSize_t toReturn = 0;
 1045|    506|    bytesEaten = 0;
 1046|       |
 1047|    506|    XMLMutexLock lockConverter(&fMutex);
 1048|       |
 1049|  7.09M|    for (size_t cnt = 0; cnt < maxChars && srcLen; cnt++) {
  ------------------
  |  Branch (1049:26): [True: 7.09M, False: 389]
  |  Branch (1049:44): [True: 7.09M, False: 89]
  ------------------
 1050|  7.09M|        size_t    rc = iconvFrom(startSrc, &srcLen, &orgTarget, uChSize());
 1051|  7.09M|        if (rc == (size_t)-1) {
  ------------------
  |  Branch (1051:13): [True: 7.09M, False: 190]
  ------------------
 1052|  7.09M|            if (errno == EINVAL && cnt > 0)
  ------------------
  |  Branch (1052:17): [True: 26, False: 7.09M]
  |  Branch (1052:36): [True: 17, False: 9]
  ------------------
 1053|     17|                break;
 1054|  7.09M|            if (errno != E2BIG || prevSrcLen == srcLen) {
  ------------------
  |  Branch (1054:17): [True: 10, False: 7.09M]
  |  Branch (1054:35): [True: 1, False: 7.09M]
  ------------------
 1055|     11|                ThrowXMLwithMemMgr(TranscodingException, XMLExcepts::Trans_BadSrcSeq, getMemoryManager());
  ------------------
  |  |  264|     11|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
 1056|     11|            }
 1057|  7.09M|        }
 1058|  7.09M|        charSizes[cnt] = prevSrcLen - srcLen;
 1059|  7.09M|        prevSrcLen = srcLen;
 1060|  7.09M|        bytesEaten += charSizes[cnt];
 1061|  7.09M|        startSrc = endSrc - srcLen;
 1062|  7.09M|        toReturn++;
 1063|  7.09M|    }
 1064|    495|    if (uChSize() != sizeof(XMLCh) || UBO() != BYTE_ORDER)
  ------------------
  |  Branch (1064:9): [True: 0, False: 495]
  |  Branch (1064:39): [True: 0, False: 495]
  ------------------
 1065|      0|        mbsToXML (startTarget, toFill, toReturn);
 1066|    495|    return toReturn;
 1067|    506|}
IconvGNUTransService.cpp:_ZN11xercesc_3_2L17getWideCharLengthEPKDs:
  153|  1.51k|{
  154|  1.51k|    if (!src)
  ------------------
  |  Branch (154:9): [True: 0, False: 1.51k]
  ------------------
  155|      0|        return 0;
  156|       |
  157|  1.51k|    XMLSize_t len = 0;
  158|  1.51k|    const XMLCh* pTmp = src;
  159|  38.9M|    while (*pTmp++)
  ------------------
  |  Branch (159:12): [True: 38.9M, False: 1.51k]
  ------------------
  160|  38.9M|        len++;
  161|  1.51k|    return len;
  162|  1.51k|}

_ZNK11xercesc_3_215IconvGNUWrapper4cdToEv:
   77|    164|    inline iconv_t	cdTo () const { return fCDTo; }
_ZNK11xercesc_3_215IconvGNUWrapper6cdFromEv:
   78|    164|    inline iconv_t	cdFrom () const { return fCDFrom; }
_ZNK11xercesc_3_215IconvGNUWrapper7uChSizeEv:
   79|  7.13M|    inline size_t	uChSize () const { return fUChSize; }
_ZNK11xercesc_3_215IconvGNUWrapper3UBOEv:
   80|  17.0k|    inline unsigned int	UBO () const { return fUBO; }
_ZN11xercesc_3_215IconvGNUWrapper7setCDToEPv:
  117|     82|    inline void	setCDTo (iconv_t cd) { fCDTo = cd; }
_ZN11xercesc_3_215IconvGNUWrapper9setCDFromEPv:
  118|     82|    inline void	setCDFrom (iconv_t cd) { fCDFrom = cd; }
_ZN11xercesc_3_215IconvGNUWrapper10setUChSizeEm:
  119|      1|    inline void	setUChSize (size_t sz) { fUChSize = sz; }
_ZN11xercesc_3_215IconvGNUWrapper6setUBOEj:
  120|      1|    inline void	setUBO (unsigned int u) { fUBO = u; }

_ZN11xercesc_3_216ValueHashTableOfINS_7XSValue8DataTypeENS_12StringHasherEE14findBucketElemEPKvRm:
  273|     44|{
  274|       |    // Hash the key
  275|     44|    hashVal = fHasher.getHashVal(key, fHashModulus);
  276|     44|    assert(hashVal < fHashModulus);
  277|       |
  278|       |    // Search that bucket for the key
  279|     44|    ValueHashTableBucketElem<TVal>* curElem = fBucketList[hashVal];
  280|     63|    while (curElem)
  ------------------
  |  Branch (280:12): [True: 19, False: 44]
  ------------------
  281|     19|    {
  282|     19|        if (fHasher.equals(key, curElem->fKey))
  ------------------
  |  Branch (282:13): [True: 0, False: 19]
  ------------------
  283|      0|            return curElem;
  284|       |
  285|     19|        curElem = curElem->fNext;
  286|     19|    }
  287|     44|    return 0;
  288|     44|}
_ZN11xercesc_3_216ValueHashTableOfINS_7XSValue8DataTypeENS_12StringHasherEEC2EmPNS_13MemoryManagerE:
   57|      1|    : fMemoryManager(manager)
   58|      1|    , fBucketList(0)
   59|      1|    , fHashModulus(modulus)
   60|      1|    , fInitialModulus(modulus)
   61|      1|    , fCount(0)
   62|      1|    , fHasher()
   63|      1|{
   64|      1|    initialize(modulus);
   65|      1|}
_ZN11xercesc_3_216ValueHashTableOfINS_7XSValue8DataTypeENS_12StringHasherEE10initializeEm:
   69|      1|{
   70|      1|    if (modulus == 0)
  ------------------
  |  Branch (70:9): [True: 0, False: 1]
  ------------------
   71|      0|        ThrowXMLwithMemMgr(IllegalArgumentException, XMLExcepts::HshTbl_ZeroModulus, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
   72|       |
   73|       |    // Allocate the bucket list and zero them
   74|      1|    fBucketList = (ValueHashTableBucketElem<TVal>**) fMemoryManager->allocate
   75|      1|    (
   76|      1|        fHashModulus * sizeof(ValueHashTableBucketElem<TVal>*)
   77|      1|    ); //new ValueHashTableBucketElem<TVal>*[fHashModulus];
   78|      1|    memset(fBucketList, 0, sizeof(fBucketList[0]) * fHashModulus);
   79|      1|}
_ZN11xercesc_3_216ValueHashTableOfINS_7XSValue8DataTypeENS_12StringHasherEE3putEPvRKS2_:
  180|     44|{
  181|       |    // Apply 0.75 load factor to find threshold.
  182|     44|    XMLSize_t threshold = fHashModulus * 3 / 4;
  183|       |
  184|       |    // If we've grown too big, expand the table and rehash.
  185|     44|    if (fCount >= threshold)
  ------------------
  |  Branch (185:9): [True: 1, False: 43]
  ------------------
  186|      1|        rehash();
  187|       |
  188|       |    // First see if the key exists already
  189|     44|    XMLSize_t hashVal;
  190|     44|    ValueHashTableBucketElem<TVal>* newBucket = findBucketElem(key, hashVal);
  191|       |
  192|       |    //
  193|       |    //  If so,then update its value. If not, then we need to add it to
  194|       |    //  the right bucket
  195|       |    //
  196|     44|    if (newBucket)
  ------------------
  |  Branch (196:9): [True: 0, False: 44]
  ------------------
  197|      0|    {
  198|      0|        newBucket->fData = valueToAdopt;
  199|      0|        newBucket->fKey = key;
  200|      0|    }
  201|     44|     else
  202|     44|    {
  203|     44|        newBucket =
  204|     44|            new (fMemoryManager->allocate(sizeof(ValueHashTableBucketElem<TVal>)))
  205|     44|            ValueHashTableBucketElem<TVal>(key, valueToAdopt, fBucketList[hashVal]);
  206|     44|        fBucketList[hashVal] = newBucket;
  207|     44|        fCount++;
  208|     44|    }
  209|     44|}
_ZN11xercesc_3_216ValueHashTableOfINS_7XSValue8DataTypeENS_12StringHasherEE6rehashEv:
  218|      1|{
  219|      1|    const XMLSize_t newMod = (fHashModulus * 2) + 1;
  220|       |
  221|      1|    ValueHashTableBucketElem<TVal>** newBucketList =
  222|      1|        (ValueHashTableBucketElem<TVal>**) fMemoryManager->allocate
  223|      1|    (
  224|      1|        newMod * sizeof(ValueHashTableBucketElem<TVal>*)
  225|      1|    );//new RefHashTableBucketElem<TVal>*[newMod];
  226|       |
  227|       |    // Make sure the new bucket list is destroyed if an
  228|       |    // exception is thrown.
  229|      1|    ArrayJanitor<ValueHashTableBucketElem<TVal>*>  guard(newBucketList, fMemoryManager);
  230|       |
  231|      1|    memset(newBucketList, 0, newMod * sizeof(newBucketList[0]));
  232|       |
  233|       |
  234|       |    // Rehash all existing entries.
  235|     44|    for (XMLSize_t index = 0; index < fHashModulus; index++)
  ------------------
  |  Branch (235:31): [True: 43, False: 1]
  ------------------
  236|     43|    {
  237|       |        // Get the bucket list head for this entry
  238|     43|        ValueHashTableBucketElem<TVal>* curElem = fBucketList[index];
  239|       |
  240|     75|        while (curElem)
  ------------------
  |  Branch (240:16): [True: 32, False: 43]
  ------------------
  241|     32|        {
  242|       |            // Save the next element before we detach this one
  243|     32|            ValueHashTableBucketElem<TVal>* const nextElem = curElem->fNext;
  244|       |
  245|     32|            const XMLSize_t hashVal = fHasher.getHashVal(curElem->fKey, newMod);
  246|     32|            assert(hashVal < newMod);
  247|       |
  248|     32|            ValueHashTableBucketElem<TVal>* const newHeadElem = newBucketList[hashVal];
  249|       |
  250|       |            // Insert at the start of this bucket's list.
  251|     32|            curElem->fNext = newHeadElem;
  252|     32|            newBucketList[hashVal] = curElem;
  253|       |
  254|     32|            curElem = nextElem;
  255|     32|        }
  256|     43|    }
  257|       |
  258|      1|    ValueHashTableBucketElem<TVal>** const oldBucketList = fBucketList;
  259|       |
  260|       |    // Everything is OK at this point, so update the
  261|       |    // member variables.
  262|      1|    fBucketList = guard.release();
  263|      1|    fHashModulus = newMod;
  264|       |
  265|       |    // Delete the old bucket list.
  266|      1|    fMemoryManager->deallocate(oldBucketList);//delete[] oldBucketList;
  267|       |
  268|      1|}
_ZN11xercesc_3_216ValueHashTableOfIbNS_9PtrHasherEED2Ev:
   83|  7.12k|{
   84|  7.12k|    removeAll();
   85|       |
   86|       |    // Then delete the bucket list & hasher
   87|  7.12k|    fMemoryManager->deallocate(fBucketList); //delete [] fBucketList;
   88|  7.12k|}
_ZN11xercesc_3_216ValueHashTableOfIbNS_9PtrHasherEE9removeAllEv:
  119|  7.12k|{
  120|  7.12k|    if(isEmpty())
  ------------------
  |  Branch (120:8): [True: 7.12k, False: 0]
  ------------------
  121|  7.12k|        return;
  122|       |
  123|       |    // Clean up the buckets first
  124|      0|    for (XMLSize_t buckInd = 0; buckInd < fHashModulus; buckInd++)
  ------------------
  |  Branch (124:33): [True: 0, False: 0]
  ------------------
  125|      0|    {
  126|       |        // Get the bucket list head for this entry
  127|      0|        ValueHashTableBucketElem<TVal>* curElem = fBucketList[buckInd];
  128|      0|        ValueHashTableBucketElem<TVal>* nextElem;
  129|      0|        while (curElem)
  ------------------
  |  Branch (129:16): [True: 0, False: 0]
  ------------------
  130|      0|        {
  131|       |            // Save the next element before we hose this one
  132|      0|            nextElem = curElem->fNext;
  133|       |
  134|       |            // delete the current element and move forward
  135|       |            // destructor is empty...
  136|       |            // curElem->~ValueHashTableBucketElem();
  137|      0|            fMemoryManager->deallocate(curElem);
  138|      0|            curElem = nextElem;
  139|      0|        }
  140|       |
  141|       |        // Clean out this entry
  142|      0|        fBucketList[buckInd] = 0;
  143|      0|    }
  144|      0|    fCount = 0;
  145|      0|}
_ZNK11xercesc_3_216ValueHashTableOfIbNS_9PtrHasherEE7isEmptyEv:
   96|  7.12k|{
   97|  7.12k|    return fCount==0;
   98|  7.12k|}
_ZN11xercesc_3_216ValueHashTableOfIbNS_9PtrHasherEEC2EmPNS_13MemoryManagerE:
   57|  7.12k|    : fMemoryManager(manager)
   58|  7.12k|    , fBucketList(0)
   59|  7.12k|    , fHashModulus(modulus)
   60|  7.12k|    , fInitialModulus(modulus)
   61|  7.12k|    , fCount(0)
   62|  7.12k|    , fHasher()
   63|  7.12k|{
   64|  7.12k|    initialize(modulus);
   65|  7.12k|}
_ZN11xercesc_3_216ValueHashTableOfIbNS_9PtrHasherEE10initializeEm:
   69|  7.12k|{
   70|  7.12k|    if (modulus == 0)
  ------------------
  |  Branch (70:9): [True: 0, False: 7.12k]
  ------------------
   71|      0|        ThrowXMLwithMemMgr(IllegalArgumentException, XMLExcepts::HshTbl_ZeroModulus, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
   72|       |
   73|       |    // Allocate the bucket list and zero them
   74|  7.12k|    fBucketList = (ValueHashTableBucketElem<TVal>**) fMemoryManager->allocate
   75|  7.12k|    (
   76|  7.12k|        fHashModulus * sizeof(ValueHashTableBucketElem<TVal>*)
   77|  7.12k|    ); //new ValueHashTableBucketElem<TVal>*[fHashModulus];
   78|  7.12k|    memset(fBucketList, 0, sizeof(fBucketList[0]) * fHashModulus);
   79|  7.12k|}
_ZN11xercesc_3_216ValueHashTableOfItNS_12StringHasherEE14findBucketElemEPKvRm:
  273|     46|{
  274|       |    // Hash the key
  275|     46|    hashVal = fHasher.getHashVal(key, fHashModulus);
  276|     46|    assert(hashVal < fHashModulus);
  277|       |
  278|       |    // Search that bucket for the key
  279|     46|    ValueHashTableBucketElem<TVal>* curElem = fBucketList[hashVal];
  280|     60|    while (curElem)
  ------------------
  |  Branch (280:12): [True: 14, False: 46]
  ------------------
  281|     14|    {
  282|     14|        if (fHasher.equals(key, curElem->fKey))
  ------------------
  |  Branch (282:13): [True: 0, False: 14]
  ------------------
  283|      0|            return curElem;
  284|       |
  285|     14|        curElem = curElem->fNext;
  286|     14|    }
  287|     46|    return 0;
  288|     46|}
_ZN11xercesc_3_216ValueHashTableOfItNS_12StringHasherEEC2EmPNS_13MemoryManagerE:
   57|      2|    : fMemoryManager(manager)
   58|      2|    , fBucketList(0)
   59|      2|    , fHashModulus(modulus)
   60|      2|    , fInitialModulus(modulus)
   61|      2|    , fCount(0)
   62|      2|    , fHasher()
   63|      2|{
   64|      2|    initialize(modulus);
   65|      2|}
_ZN11xercesc_3_216ValueHashTableOfItNS_12StringHasherEE10initializeEm:
   69|      2|{
   70|      2|    if (modulus == 0)
  ------------------
  |  Branch (70:9): [True: 0, False: 2]
  ------------------
   71|      0|        ThrowXMLwithMemMgr(IllegalArgumentException, XMLExcepts::HshTbl_ZeroModulus, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
   72|       |
   73|       |    // Allocate the bucket list and zero them
   74|      2|    fBucketList = (ValueHashTableBucketElem<TVal>**) fMemoryManager->allocate
   75|      2|    (
   76|      2|        fHashModulus * sizeof(ValueHashTableBucketElem<TVal>*)
   77|      2|    ); //new ValueHashTableBucketElem<TVal>*[fHashModulus];
   78|      2|    memset(fBucketList, 0, sizeof(fBucketList[0]) * fHashModulus);
   79|      2|}
_ZN11xercesc_3_216ValueHashTableOfItNS_12StringHasherEE3putEPvRKt:
  180|     46|{
  181|       |    // Apply 0.75 load factor to find threshold.
  182|     46|    XMLSize_t threshold = fHashModulus * 3 / 4;
  183|       |
  184|       |    // If we've grown too big, expand the table and rehash.
  185|     46|    if (fCount >= threshold)
  ------------------
  |  Branch (185:9): [True: 2, False: 44]
  ------------------
  186|      2|        rehash();
  187|       |
  188|       |    // First see if the key exists already
  189|     46|    XMLSize_t hashVal;
  190|     46|    ValueHashTableBucketElem<TVal>* newBucket = findBucketElem(key, hashVal);
  191|       |
  192|       |    //
  193|       |    //  If so,then update its value. If not, then we need to add it to
  194|       |    //  the right bucket
  195|       |    //
  196|     46|    if (newBucket)
  ------------------
  |  Branch (196:9): [True: 0, False: 46]
  ------------------
  197|      0|    {
  198|      0|        newBucket->fData = valueToAdopt;
  199|      0|        newBucket->fKey = key;
  200|      0|    }
  201|     46|     else
  202|     46|    {
  203|     46|        newBucket =
  204|     46|            new (fMemoryManager->allocate(sizeof(ValueHashTableBucketElem<TVal>)))
  205|     46|            ValueHashTableBucketElem<TVal>(key, valueToAdopt, fBucketList[hashVal]);
  206|     46|        fBucketList[hashVal] = newBucket;
  207|     46|        fCount++;
  208|     46|    }
  209|     46|}
_ZN11xercesc_3_216ValueHashTableOfItNS_12StringHasherEE6rehashEv:
  218|      2|{
  219|      2|    const XMLSize_t newMod = (fHashModulus * 2) + 1;
  220|       |
  221|      2|    ValueHashTableBucketElem<TVal>** newBucketList =
  222|      2|        (ValueHashTableBucketElem<TVal>**) fMemoryManager->allocate
  223|      2|    (
  224|      2|        newMod * sizeof(ValueHashTableBucketElem<TVal>*)
  225|      2|    );//new RefHashTableBucketElem<TVal>*[newMod];
  226|       |
  227|       |    // Make sure the new bucket list is destroyed if an
  228|       |    // exception is thrown.
  229|      2|    ArrayJanitor<ValueHashTableBucketElem<TVal>*>  guard(newBucketList, fMemoryManager);
  230|       |
  231|      2|    memset(newBucketList, 0, newMod * sizeof(newBucketList[0]));
  232|       |
  233|       |
  234|       |    // Rehash all existing entries.
  235|     49|    for (XMLSize_t index = 0; index < fHashModulus; index++)
  ------------------
  |  Branch (235:31): [True: 47, False: 2]
  ------------------
  236|     47|    {
  237|       |        // Get the bucket list head for this entry
  238|     47|        ValueHashTableBucketElem<TVal>* curElem = fBucketList[index];
  239|       |
  240|     81|        while (curElem)
  ------------------
  |  Branch (240:16): [True: 34, False: 47]
  ------------------
  241|     34|        {
  242|       |            // Save the next element before we detach this one
  243|     34|            ValueHashTableBucketElem<TVal>* const nextElem = curElem->fNext;
  244|       |
  245|     34|            const XMLSize_t hashVal = fHasher.getHashVal(curElem->fKey, newMod);
  246|     34|            assert(hashVal < newMod);
  247|       |
  248|     34|            ValueHashTableBucketElem<TVal>* const newHeadElem = newBucketList[hashVal];
  249|       |
  250|       |            // Insert at the start of this bucket's list.
  251|     34|            curElem->fNext = newHeadElem;
  252|     34|            newBucketList[hashVal] = curElem;
  253|       |
  254|     34|            curElem = nextElem;
  255|     34|        }
  256|     47|    }
  257|       |
  258|      2|    ValueHashTableBucketElem<TVal>** const oldBucketList = fBucketList;
  259|       |
  260|       |    // Everything is OK at this point, so update the
  261|       |    // member variables.
  262|      2|    fBucketList = guard.release();
  263|      2|    fHashModulus = newMod;
  264|       |
  265|       |    // Delete the old bucket list.
  266|      2|    fMemoryManager->deallocate(oldBucketList);//delete[] oldBucketList;
  267|       |
  268|      2|}
_ZN11xercesc_3_216ValueHashTableOfIbNS_12StringHasherEEC2EmPNS_13MemoryManagerE:
   57|      1|    : fMemoryManager(manager)
   58|      1|    , fBucketList(0)
   59|      1|    , fHashModulus(modulus)
   60|      1|    , fInitialModulus(modulus)
   61|      1|    , fCount(0)
   62|      1|    , fHasher()
   63|      1|{
   64|      1|    initialize(modulus);
   65|      1|}
_ZN11xercesc_3_216ValueHashTableOfIbNS_12StringHasherEE10initializeEm:
   69|      1|{
   70|      1|    if (modulus == 0)
  ------------------
  |  Branch (70:9): [True: 0, False: 1]
  ------------------
   71|      0|        ThrowXMLwithMemMgr(IllegalArgumentException, XMLExcepts::HshTbl_ZeroModulus, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
   72|       |
   73|       |    // Allocate the bucket list and zero them
   74|      1|    fBucketList = (ValueHashTableBucketElem<TVal>**) fMemoryManager->allocate
   75|      1|    (
   76|      1|        fHashModulus * sizeof(ValueHashTableBucketElem<TVal>*)
   77|      1|    ); //new ValueHashTableBucketElem<TVal>*[fHashModulus];
   78|      1|    memset(fBucketList, 0, sizeof(fBucketList[0]) * fHashModulus);
   79|      1|}
_ZN11xercesc_3_216ValueHashTableOfIbNS_12StringHasherEE3putEPvRKb:
  180|    791|{
  181|       |    // Apply 0.75 load factor to find threshold.
  182|    791|    XMLSize_t threshold = fHashModulus * 3 / 4;
  183|       |
  184|       |    // If we've grown too big, expand the table and rehash.
  185|    791|    if (fCount >= threshold)
  ------------------
  |  Branch (185:9): [True: 4, False: 787]
  ------------------
  186|      4|        rehash();
  187|       |
  188|       |    // First see if the key exists already
  189|    791|    XMLSize_t hashVal;
  190|    791|    ValueHashTableBucketElem<TVal>* newBucket = findBucketElem(key, hashVal);
  191|       |
  192|       |    //
  193|       |    //  If so,then update its value. If not, then we need to add it to
  194|       |    //  the right bucket
  195|       |    //
  196|    791|    if (newBucket)
  ------------------
  |  Branch (196:9): [True: 0, False: 791]
  ------------------
  197|      0|    {
  198|      0|        newBucket->fData = valueToAdopt;
  199|      0|        newBucket->fKey = key;
  200|      0|    }
  201|    791|     else
  202|    791|    {
  203|    791|        newBucket =
  204|    791|            new (fMemoryManager->allocate(sizeof(ValueHashTableBucketElem<TVal>)))
  205|    791|            ValueHashTableBucketElem<TVal>(key, valueToAdopt, fBucketList[hashVal]);
  206|    791|        fBucketList[hashVal] = newBucket;
  207|    791|        fCount++;
  208|    791|    }
  209|    791|}
_ZN11xercesc_3_216ValueHashTableOfIbNS_12StringHasherEE6rehashEv:
  218|      4|{
  219|      4|    const XMLSize_t newMod = (fHashModulus * 2) + 1;
  220|       |
  221|      4|    ValueHashTableBucketElem<TVal>** newBucketList =
  222|      4|        (ValueHashTableBucketElem<TVal>**) fMemoryManager->allocate
  223|      4|    (
  224|      4|        newMod * sizeof(ValueHashTableBucketElem<TVal>*)
  225|      4|    );//new RefHashTableBucketElem<TVal>*[newMod];
  226|       |
  227|       |    // Make sure the new bucket list is destroyed if an
  228|       |    // exception is thrown.
  229|      4|    ArrayJanitor<ValueHashTableBucketElem<TVal>*>  guard(newBucketList, fMemoryManager);
  230|       |
  231|      4|    memset(newBucketList, 0, newMod * sizeof(newBucketList[0]));
  232|       |
  233|       |
  234|       |    // Rehash all existing entries.
  235|  1.65k|    for (XMLSize_t index = 0; index < fHashModulus; index++)
  ------------------
  |  Branch (235:31): [True: 1.64k, False: 4]
  ------------------
  236|  1.64k|    {
  237|       |        // Get the bucket list head for this entry
  238|  1.64k|        ValueHashTableBucketElem<TVal>* curElem = fBucketList[index];
  239|       |
  240|  2.87k|        while (curElem)
  ------------------
  |  Branch (240:16): [True: 1.23k, False: 1.64k]
  ------------------
  241|  1.23k|        {
  242|       |            // Save the next element before we detach this one
  243|  1.23k|            ValueHashTableBucketElem<TVal>* const nextElem = curElem->fNext;
  244|       |
  245|  1.23k|            const XMLSize_t hashVal = fHasher.getHashVal(curElem->fKey, newMod);
  246|  1.23k|            assert(hashVal < newMod);
  247|       |
  248|  1.23k|            ValueHashTableBucketElem<TVal>* const newHeadElem = newBucketList[hashVal];
  249|       |
  250|       |            // Insert at the start of this bucket's list.
  251|  1.23k|            curElem->fNext = newHeadElem;
  252|  1.23k|            newBucketList[hashVal] = curElem;
  253|       |
  254|  1.23k|            curElem = nextElem;
  255|  1.23k|        }
  256|  1.64k|    }
  257|       |
  258|      4|    ValueHashTableBucketElem<TVal>** const oldBucketList = fBucketList;
  259|       |
  260|       |    // Everything is OK at this point, so update the
  261|       |    // member variables.
  262|      4|    fBucketList = guard.release();
  263|      4|    fHashModulus = newMod;
  264|       |
  265|       |    // Delete the old bucket list.
  266|      4|    fMemoryManager->deallocate(oldBucketList);//delete[] oldBucketList;
  267|       |
  268|      4|}
_ZN11xercesc_3_216ValueHashTableOfIbNS_12StringHasherEE14findBucketElemEPKvRm:
  273|    791|{
  274|       |    // Hash the key
  275|    791|    hashVal = fHasher.getHashVal(key, fHashModulus);
  276|    791|    assert(hashVal < fHashModulus);
  277|       |
  278|       |    // Search that bucket for the key
  279|    791|    ValueHashTableBucketElem<TVal>* curElem = fBucketList[hashVal];
  280|  1.20k|    while (curElem)
  ------------------
  |  Branch (280:12): [True: 410, False: 791]
  ------------------
  281|    410|    {
  282|    410|        if (fHasher.equals(key, curElem->fKey))
  ------------------
  |  Branch (282:13): [True: 0, False: 410]
  ------------------
  283|      0|            return curElem;
  284|       |
  285|    410|        curElem = curElem->fNext;
  286|    410|    }
  287|    791|    return 0;
  288|    791|}

_ZN11xercesc_3_224ValueHashTableBucketElemINS_7XSValue8DataTypeEEC2EPvRKS2_PS3_:
   48|     44|		: fData(value), fNext(next), fKey(key)
   49|     44|        {
   50|     44|        }
_ZN11xercesc_3_224ValueHashTableBucketElemIbEC2EPvRKbPS1_:
   48|    791|		: fData(value), fNext(next), fKey(key)
   49|    791|        {
   50|    791|        }
_ZN11xercesc_3_224ValueHashTableBucketElemItEC2EPvRKtPS1_:
   48|     46|		: fData(value), fNext(next), fKey(key)
   49|     46|        {
   50|     46|        }

_ZN11xercesc_3_212ValueStackOfImED2Ev:
   46|  3.51k|{
   47|  3.51k|}
_ZN11xercesc_3_212ValueStackOfImEC2EmPNS_13MemoryManagerEb:
   41|  4.36k|    fVector(fInitCapacity, manager, toCallDestructor)
   42|  4.36k|{
   43|  4.36k|}
_ZN11xercesc_3_212ValueStackOfImE4pushERKm:
   54|  25.3k|{
   55|  25.3k|    fVector.addElement(toPush);
   56|  25.3k|}
_ZN11xercesc_3_212ValueStackOfImE3popEv:
   68|  14.1k|{
   69|  14.1k|    const XMLSize_t curSize = fVector.size();
   70|  14.1k|    if (curSize == 0)
  ------------------
  |  Branch (70:9): [True: 0, False: 14.1k]
  ------------------
   71|      0|        ThrowXMLwithMemMgr(EmptyStackException, XMLExcepts::Stack_EmptyStack, fVector.getMemoryManager());
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
   72|       |
   73|  14.1k|    TElem retVal = fVector.elementAt(curSize-1);
   74|  14.1k|    fVector.removeElementAt(curSize-1);
   75|  14.1k|    return retVal;
   76|  14.1k|}
_ZN11xercesc_3_212ValueStackOfINS_16formatNodeHolderEEC2EmPNS_13MemoryManagerEb:
   41|  1.34k|    fVector(fInitCapacity, manager, toCallDestructor)
   42|  1.34k|{
   43|  1.34k|}
_ZN11xercesc_3_212ValueStackOfINS_16formatNodeHolderEE4pushERKS1_:
   54|  7.68M|{
   55|  7.68M|    fVector.addElement(toPush);
   56|  7.68M|}
_ZN11xercesc_3_212ValueStackOfINS_16formatNodeHolderEE5emptyEv:
   88|  7.68M|{
   89|  7.68M|    return (fVector.size() == 0);
   90|  7.68M|}
_ZN11xercesc_3_212ValueStackOfINS_16formatNodeHolderEE3popEv:
   68|  7.68M|{
   69|  7.68M|    const XMLSize_t curSize = fVector.size();
   70|  7.68M|    if (curSize == 0)
  ------------------
  |  Branch (70:9): [True: 0, False: 7.68M]
  ------------------
   71|      0|        ThrowXMLwithMemMgr(EmptyStackException, XMLExcepts::Stack_EmptyStack, fVector.getMemoryManager());
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
   72|       |
   73|  7.68M|    TElem retVal = fVector.elementAt(curSize-1);
   74|  7.68M|    fVector.removeElementAt(curSize-1);
   75|  7.68M|    return retVal;
   76|  7.68M|}
_ZN11xercesc_3_212ValueStackOfINS_16formatNodeHolderEED2Ev:
   46|  1.34k|{
   47|  1.34k|}
_ZN11xercesc_3_212ValueStackOfIPNS_15ContentSpecNodeEEC2EmPNS_13MemoryManagerEb:
   41|  8.32k|    fVector(fInitCapacity, manager, toCallDestructor)
   42|  8.32k|{
   43|  8.32k|}
_ZN11xercesc_3_212ValueStackOfIPNS_15ContentSpecNodeEED2Ev:
   46|  8.32k|{
   47|  8.32k|}
_ZN11xercesc_3_212ValueStackOfIPNS_15ContentSpecNodeEE4pushERKS2_:
   54|  12.6M|{
   55|  12.6M|    fVector.addElement(toPush);
   56|  12.6M|}
_ZN11xercesc_3_212ValueStackOfIPNS_15ContentSpecNodeEE5emptyEv:
   88|  12.6M|{
   89|  12.6M|    return (fVector.size() == 0);
   90|  12.6M|}
_ZN11xercesc_3_212ValueStackOfIPNS_15ContentSpecNodeEE3popEv:
   68|  12.6M|{
   69|  12.6M|    const XMLSize_t curSize = fVector.size();
   70|  12.6M|    if (curSize == 0)
  ------------------
  |  Branch (70:9): [True: 0, False: 12.6M]
  ------------------
   71|      0|        ThrowXMLwithMemMgr(EmptyStackException, XMLExcepts::Stack_EmptyStack, fVector.getMemoryManager());
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
   72|       |
   73|  12.6M|    TElem retVal = fVector.elementAt(curSize-1);
   74|  12.6M|    fVector.removeElementAt(curSize-1);
   75|  12.6M|    return retVal;
   76|  12.6M|}
_ZN11xercesc_3_212ValueStackOfIPNS_15ComplexTypeInfoEEC2EmPNS_13MemoryManagerEb:
   41|  7.12k|    fVector(fInitCapacity, manager, toCallDestructor)
   42|  7.12k|{
   43|  7.12k|}
_ZN11xercesc_3_212ValueStackOfIPNS_15ComplexTypeInfoEED2Ev:
   46|  7.12k|{
   47|  7.12k|}
_ZN11xercesc_3_212ValueStackOfIPNS_15ComplexTypeInfoEE17removeAllElementsEv:
   79|  7.12k|{
   80|  7.12k|    fVector.removeAllElements();
   81|  7.12k|}
_ZN11xercesc_3_212ValueStackOfIbED2Ev:
   46|  7.12k|{
   47|  7.12k|}
_ZN11xercesc_3_212ValueStackOfIbEC2EmPNS_13MemoryManagerEb:
   41|  7.12k|    fVector(fInitCapacity, manager, toCallDestructor)
   42|  7.12k|{
   43|  7.12k|}
_ZN11xercesc_3_212ValueStackOfImE5emptyEv:
   88|  29.1k|{
   89|  29.1k|    return (fVector.size() == 0);
   90|  29.1k|}
_ZN11xercesc_3_212ValueStackOfIiEC2EmPNS_13MemoryManagerEb:
   41|  7.12k|    fVector(fInitCapacity, manager, toCallDestructor)
   42|  7.12k|{
   43|  7.12k|}
_ZN11xercesc_3_212ValueStackOfIiED2Ev:
   46|  7.12k|{
   47|  7.12k|}
_ZN11xercesc_3_212ValueStackOfIiE17removeAllElementsEv:
   79|  7.12k|{
   80|  7.12k|    fVector.removeAllElements();
   81|  7.12k|}

_ZN11xercesc_3_213ValueVectorOfIiEC2EmPNS_13MemoryManagerEb:
   41|  7.12k|    fCallDestructor(toCallDestructor)
   42|  7.12k|    , fCurCount(0)
   43|  7.12k|    , fMaxCount(maxElems)
   44|  7.12k|    , fElemList(0)
   45|  7.12k|    , fMemoryManager(manager)
   46|  7.12k|{
   47|  7.12k|    fElemList = (TElem*) fMemoryManager->allocate
   48|  7.12k|    (
   49|  7.12k|        fMaxCount * sizeof(TElem)
   50|  7.12k|    ); //new TElem[fMaxCount];
   51|       |
   52|  7.12k|    memset(fElemList, 0, fMaxCount * sizeof(TElem));
   53|  7.12k|}
_ZN11xercesc_3_213ValueVectorOfIiED2Ev:
   75|  7.12k|{
   76|  7.12k|    if (fCallDestructor) {
  ------------------
  |  Branch (76:9): [True: 0, False: 7.12k]
  ------------------
   77|      0|        for (XMLSize_t index=fMaxCount; index > 0; index--)
  ------------------
  |  Branch (77:41): [True: 0, False: 0]
  ------------------
   78|      0|            fElemList[index-1].~TElem();
   79|      0|    }
   80|  7.12k|    fMemoryManager->deallocate(fElemList); //delete [] fElemList;
   81|  7.12k|}
_ZN11xercesc_3_213ValueVectorOfIPNS_13SchemaGrammarEEC2EmPNS_13MemoryManagerEb:
   41|  7.12k|    fCallDestructor(toCallDestructor)
   42|  7.12k|    , fCurCount(0)
   43|  7.12k|    , fMaxCount(maxElems)
   44|  7.12k|    , fElemList(0)
   45|  7.12k|    , fMemoryManager(manager)
   46|  7.12k|{
   47|  7.12k|    fElemList = (TElem*) fMemoryManager->allocate
   48|  7.12k|    (
   49|  7.12k|        fMaxCount * sizeof(TElem)
   50|  7.12k|    ); //new TElem[fMaxCount];
   51|       |
   52|  7.12k|    memset(fElemList, 0, fMaxCount * sizeof(TElem));
   53|  7.12k|}
_ZN11xercesc_3_213ValueVectorOfIPNS_13SchemaGrammarEED2Ev:
   75|  7.12k|{
   76|  7.12k|    if (fCallDestructor) {
  ------------------
  |  Branch (76:9): [True: 0, False: 7.12k]
  ------------------
   77|      0|        for (XMLSize_t index=fMaxCount; index > 0; index--)
  ------------------
  |  Branch (77:41): [True: 0, False: 0]
  ------------------
   78|      0|            fElemList[index-1].~TElem();
   79|      0|    }
   80|  7.12k|    fMemoryManager->deallocate(fElemList); //delete [] fElemList;
   81|  7.12k|}
_ZN11xercesc_3_213ValueVectorOfIPNS_13SchemaGrammarEE17removeAllElementsEv:
  171|  7.12k|{
  172|  7.12k|    fCurCount = 0;
  173|  7.12k|}
_ZN11xercesc_3_213ValueVectorOfIPDsEC2EmPNS_13MemoryManagerEb:
   41|  7.12k|    fCallDestructor(toCallDestructor)
   42|  7.12k|    , fCurCount(0)
   43|  7.12k|    , fMaxCount(maxElems)
   44|  7.12k|    , fElemList(0)
   45|  7.12k|    , fMemoryManager(manager)
   46|  7.12k|{
   47|  7.12k|    fElemList = (TElem*) fMemoryManager->allocate
   48|  7.12k|    (
   49|  7.12k|        fMaxCount * sizeof(TElem)
   50|  7.12k|    ); //new TElem[fMaxCount];
   51|       |
   52|  7.12k|    memset(fElemList, 0, fMaxCount * sizeof(TElem));
   53|  7.12k|}
_ZN11xercesc_3_213ValueVectorOfIPDsED2Ev:
   75|  7.12k|{
   76|  7.12k|    if (fCallDestructor) {
  ------------------
  |  Branch (76:9): [True: 0, False: 7.12k]
  ------------------
   77|      0|        for (XMLSize_t index=fMaxCount; index > 0; index--)
  ------------------
  |  Branch (77:41): [True: 0, False: 0]
  ------------------
   78|      0|            fElemList[index-1].~TElem();
   79|      0|    }
   80|  7.12k|    fMemoryManager->deallocate(fElemList); //delete [] fElemList;
   81|  7.12k|}
_ZN11xercesc_3_213ValueVectorOfImED2Ev:
   75|  3.51k|{
   76|  3.51k|    if (fCallDestructor) {
  ------------------
  |  Branch (76:9): [True: 0, False: 3.51k]
  ------------------
   77|      0|        for (XMLSize_t index=fMaxCount; index > 0; index--)
  ------------------
  |  Branch (77:41): [True: 0, False: 0]
  ------------------
   78|      0|            fElemList[index-1].~TElem();
   79|      0|    }
   80|  3.51k|    fMemoryManager->deallocate(fElemList); //delete [] fElemList;
   81|  3.51k|}
_ZN11xercesc_3_213ValueVectorOfImEC2EmPNS_13MemoryManagerEb:
   41|  4.36k|    fCallDestructor(toCallDestructor)
   42|  4.36k|    , fCurCount(0)
   43|  4.36k|    , fMaxCount(maxElems)
   44|  4.36k|    , fElemList(0)
   45|  4.36k|    , fMemoryManager(manager)
   46|  4.36k|{
   47|  4.36k|    fElemList = (TElem*) fMemoryManager->allocate
   48|  4.36k|    (
   49|  4.36k|        fMaxCount * sizeof(TElem)
   50|  4.36k|    ); //new TElem[fMaxCount];
   51|       |
   52|  4.36k|    memset(fElemList, 0, fMaxCount * sizeof(TElem));
   53|  4.36k|}
_ZN11xercesc_3_213ValueVectorOfImE10addElementERKm:
  121|  25.3k|{
  122|  25.3k|    ensureExtraCapacity(1);
  123|  25.3k|    fElemList[fCurCount++] = toAdd;
  124|  25.3k|}
_ZN11xercesc_3_213ValueVectorOfImE19ensureExtraCapacityEm:
  229|  25.3k|{
  230|  25.3k|    XMLSize_t newMax = fCurCount + length;
  231|       |
  232|  25.3k|    if (newMax > fMaxCount)
  ------------------
  |  Branch (232:9): [True: 1.90k, False: 23.4k]
  ------------------
  233|  1.90k|    {
  234|       |        // Avoid too many reallocations by expanding by a percentage
  235|  1.90k|        XMLSize_t minNewMax = (XMLSize_t)((double)fCurCount * 1.25);
  236|  1.90k|        if (newMax < minNewMax)
  ------------------
  |  Branch (236:13): [True: 1.19k, False: 715]
  ------------------
  237|  1.19k|            newMax = minNewMax;
  238|       |
  239|  1.90k|        TElem* newList = (TElem*) fMemoryManager->allocate
  240|  1.90k|        (
  241|  1.90k|            newMax * sizeof(TElem)
  242|  1.90k|        ); //new TElem[newMax];
  243|  89.2k|        for (XMLSize_t index = 0; index < fCurCount; index++)
  ------------------
  |  Branch (243:35): [True: 87.3k, False: 1.90k]
  ------------------
  244|  87.3k|            newList[index] = fElemList[index];
  245|       |
  246|  1.90k|        fMemoryManager->deallocate(fElemList); //delete [] fElemList;
  247|  1.90k|        fElemList = newList;
  248|  1.90k|        fMaxCount = newMax;
  249|  1.90k|    }
  250|  25.3k|}
_ZNK11xercesc_3_213ValueVectorOfImE4sizeEv:
  214|  43.3k|{
  215|  43.3k|    return fCurCount;
  216|  43.3k|}
_ZN11xercesc_3_213ValueVectorOfImE9elementAtEm:
  202|  14.1k|{
  203|  14.1k|    if (getAt >= fCurCount)
  ------------------
  |  Branch (203:9): [True: 0, False: 14.1k]
  ------------------
  204|      0|        ThrowXMLwithMemMgr(ArrayIndexOutOfBoundsException, XMLExcepts::Vector_BadIndex, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  205|  14.1k|    return fElemList[getAt];
  206|  14.1k|}
_ZN11xercesc_3_213ValueVectorOfImE15removeElementAtEm:
  158|  14.1k|{
  159|  14.1k|    if (removeAt >= fCurCount)
  ------------------
  |  Branch (159:9): [True: 0, False: 14.1k]
  ------------------
  160|      0|        ThrowXMLwithMemMgr(ArrayIndexOutOfBoundsException, XMLExcepts::Vector_BadIndex, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  161|       |
  162|       |    // Copy down every element above remove point
  163|  14.1k|    for (XMLSize_t index = removeAt; index < fCurCount-1; index++)
  ------------------
  |  Branch (163:38): [True: 0, False: 14.1k]
  ------------------
  164|      0|        fElemList[index] = fElemList[index+1];
  165|       |
  166|       |    // And bump down count
  167|  14.1k|    fCurCount--;
  168|  14.1k|}
_ZN11xercesc_3_213ValueVectorOfIPNS_11PrefMapElemEEC2EmPNS_13MemoryManagerEb:
   41|  7.12k|    fCallDestructor(toCallDestructor)
   42|  7.12k|    , fCurCount(0)
   43|  7.12k|    , fMaxCount(maxElems)
   44|  7.12k|    , fElemList(0)
   45|  7.12k|    , fMemoryManager(manager)
   46|  7.12k|{
   47|  7.12k|    fElemList = (TElem*) fMemoryManager->allocate
   48|  7.12k|    (
   49|  7.12k|        fMaxCount * sizeof(TElem)
   50|  7.12k|    ); //new TElem[fMaxCount];
   51|       |
   52|  7.12k|    memset(fElemList, 0, fMaxCount * sizeof(TElem));
   53|  7.12k|}
_ZN11xercesc_3_213ValueVectorOfIPNS_11PrefMapElemEED2Ev:
   75|  7.12k|{
   76|  7.12k|    if (fCallDestructor) {
  ------------------
  |  Branch (76:9): [True: 0, False: 7.12k]
  ------------------
   77|      0|        for (XMLSize_t index=fMaxCount; index > 0; index--)
  ------------------
  |  Branch (77:41): [True: 0, False: 0]
  ------------------
   78|      0|            fElemList[index-1].~TElem();
   79|      0|    }
   80|  7.12k|    fMemoryManager->deallocate(fElemList); //delete [] fElemList;
   81|  7.12k|}
_ZN11xercesc_3_213ValueVectorOfIPNS_5QNameEEC2EmPNS_13MemoryManagerEb:
   41|     83|    fCallDestructor(toCallDestructor)
   42|     83|    , fCurCount(0)
   43|     83|    , fMaxCount(maxElems)
   44|     83|    , fElemList(0)
   45|     83|    , fMemoryManager(manager)
   46|     83|{
   47|     83|    fElemList = (TElem*) fMemoryManager->allocate
   48|     83|    (
   49|     83|        fMaxCount * sizeof(TElem)
   50|     83|    ); //new TElem[fMaxCount];
   51|       |
   52|     83|    memset(fElemList, 0, fMaxCount * sizeof(TElem));
   53|     83|}
_ZN11xercesc_3_213ValueVectorOfIPNS_5QNameEED2Ev:
   75|     83|{
   76|     83|    if (fCallDestructor) {
  ------------------
  |  Branch (76:9): [True: 0, False: 83]
  ------------------
   77|      0|        for (XMLSize_t index=fMaxCount; index > 0; index--)
  ------------------
  |  Branch (77:41): [True: 0, False: 0]
  ------------------
   78|      0|            fElemList[index-1].~TElem();
   79|      0|    }
   80|     83|    fMemoryManager->deallocate(fElemList); //delete [] fElemList;
   81|     83|}
_ZN11xercesc_3_213ValueVectorOfIbEC2EmPNS_13MemoryManagerEb:
   41|  7.12k|    fCallDestructor(toCallDestructor)
   42|  7.12k|    , fCurCount(0)
   43|  7.12k|    , fMaxCount(maxElems)
   44|  7.12k|    , fElemList(0)
   45|  7.12k|    , fMemoryManager(manager)
   46|  7.12k|{
   47|  7.12k|    fElemList = (TElem*) fMemoryManager->allocate
   48|  7.12k|    (
   49|  7.12k|        fMaxCount * sizeof(TElem)
   50|  7.12k|    ); //new TElem[fMaxCount];
   51|       |
   52|  7.12k|    memset(fElemList, 0, fMaxCount * sizeof(TElem));
   53|  7.12k|}
_ZN11xercesc_3_213ValueVectorOfIbED2Ev:
   75|  7.12k|{
   76|  7.12k|    if (fCallDestructor) {
  ------------------
  |  Branch (76:9): [True: 0, False: 7.12k]
  ------------------
   77|      0|        for (XMLSize_t index=fMaxCount; index > 0; index--)
  ------------------
  |  Branch (77:41): [True: 0, False: 0]
  ------------------
   78|      0|            fElemList[index-1].~TElem();
   79|      0|    }
   80|  7.12k|    fMemoryManager->deallocate(fElemList); //delete [] fElemList;
   81|  7.12k|}
_ZNK11xercesc_3_213ValueVectorOfIPNS_5QNameEE4sizeEv:
  214|     83|{
  215|     83|    return fCurCount;
  216|     83|}
_ZN11xercesc_3_213ValueVectorOfIPNS_5QNameEE9elementAtEm:
  202|  1.13M|{
  203|  1.13M|    if (getAt >= fCurCount)
  ------------------
  |  Branch (203:9): [True: 0, False: 1.13M]
  ------------------
  204|      0|        ThrowXMLwithMemMgr(ArrayIndexOutOfBoundsException, XMLExcepts::Vector_BadIndex, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  205|  1.13M|    return fElemList[getAt];
  206|  1.13M|}
_ZN11xercesc_3_213ValueVectorOfIPNS_5QNameEE10addElementERKS2_:
  121|  1.13M|{
  122|  1.13M|    ensureExtraCapacity(1);
  123|  1.13M|    fElemList[fCurCount++] = toAdd;
  124|  1.13M|}
_ZN11xercesc_3_213ValueVectorOfIPNS_5QNameEE19ensureExtraCapacityEm:
  229|  1.13M|{
  230|  1.13M|    XMLSize_t newMax = fCurCount + length;
  231|       |
  232|  1.13M|    if (newMax > fMaxCount)
  ------------------
  |  Branch (232:9): [True: 547, False: 1.13M]
  ------------------
  233|    547|    {
  234|       |        // Avoid too many reallocations by expanding by a percentage
  235|    547|        XMLSize_t minNewMax = (XMLSize_t)((double)fCurCount * 1.25);
  236|    547|        if (newMax < minNewMax)
  ------------------
  |  Branch (236:13): [True: 547, False: 0]
  ------------------
  237|    547|            newMax = minNewMax;
  238|       |
  239|    547|        TElem* newList = (TElem*) fMemoryManager->allocate
  240|    547|        (
  241|    547|            newMax * sizeof(TElem)
  242|    547|        ); //new TElem[newMax];
  243|  5.19M|        for (XMLSize_t index = 0; index < fCurCount; index++)
  ------------------
  |  Branch (243:35): [True: 5.19M, False: 547]
  ------------------
  244|  5.19M|            newList[index] = fElemList[index];
  245|       |
  246|    547|        fMemoryManager->deallocate(fElemList); //delete [] fElemList;
  247|    547|        fElemList = newList;
  248|    547|        fMaxCount = newMax;
  249|    547|    }
  250|  1.13M|}
_ZN11xercesc_3_213ValueVectorOfINS_16formatNodeHolderEEC2EmPNS_13MemoryManagerEb:
   41|  1.34k|    fCallDestructor(toCallDestructor)
   42|  1.34k|    , fCurCount(0)
   43|  1.34k|    , fMaxCount(maxElems)
   44|  1.34k|    , fElemList(0)
   45|  1.34k|    , fMemoryManager(manager)
   46|  1.34k|{
   47|  1.34k|    fElemList = (TElem*) fMemoryManager->allocate
   48|  1.34k|    (
   49|  1.34k|        fMaxCount * sizeof(TElem)
   50|  1.34k|    ); //new TElem[fMaxCount];
   51|       |
   52|  1.34k|    memset(fElemList, 0, fMaxCount * sizeof(TElem));
   53|  1.34k|}
_ZN11xercesc_3_213ValueVectorOfINS_16formatNodeHolderEE10addElementERKS1_:
  121|  7.68M|{
  122|  7.68M|    ensureExtraCapacity(1);
  123|  7.68M|    fElemList[fCurCount++] = toAdd;
  124|  7.68M|}
_ZN11xercesc_3_213ValueVectorOfINS_16formatNodeHolderEE19ensureExtraCapacityEm:
  229|  7.68M|{
  230|  7.68M|    XMLSize_t newMax = fCurCount + length;
  231|       |
  232|  7.68M|    if (newMax > fMaxCount)
  ------------------
  |  Branch (232:9): [True: 1.51k, False: 7.68M]
  ------------------
  233|  1.51k|    {
  234|       |        // Avoid too many reallocations by expanding by a percentage
  235|  1.51k|        XMLSize_t minNewMax = (XMLSize_t)((double)fCurCount * 1.25);
  236|  1.51k|        if (newMax < minNewMax)
  ------------------
  |  Branch (236:13): [True: 1.51k, False: 0]
  ------------------
  237|  1.51k|            newMax = minNewMax;
  238|       |
  239|  1.51k|        TElem* newList = (TElem*) fMemoryManager->allocate
  240|  1.51k|        (
  241|  1.51k|            newMax * sizeof(TElem)
  242|  1.51k|        ); //new TElem[newMax];
  243|   217k|        for (XMLSize_t index = 0; index < fCurCount; index++)
  ------------------
  |  Branch (243:35): [True: 215k, False: 1.51k]
  ------------------
  244|   215k|            newList[index] = fElemList[index];
  245|       |
  246|  1.51k|        fMemoryManager->deallocate(fElemList); //delete [] fElemList;
  247|  1.51k|        fElemList = newList;
  248|  1.51k|        fMaxCount = newMax;
  249|  1.51k|    }
  250|  7.68M|}
_ZNK11xercesc_3_213ValueVectorOfINS_16formatNodeHolderEE4sizeEv:
  214|  15.3M|{
  215|  15.3M|    return fCurCount;
  216|  15.3M|}
_ZN11xercesc_3_213ValueVectorOfINS_16formatNodeHolderEE9elementAtEm:
  202|  7.68M|{
  203|  7.68M|    if (getAt >= fCurCount)
  ------------------
  |  Branch (203:9): [True: 0, False: 7.68M]
  ------------------
  204|      0|        ThrowXMLwithMemMgr(ArrayIndexOutOfBoundsException, XMLExcepts::Vector_BadIndex, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  205|  7.68M|    return fElemList[getAt];
  206|  7.68M|}
_ZN11xercesc_3_213ValueVectorOfINS_16formatNodeHolderEE15removeElementAtEm:
  158|  7.68M|{
  159|  7.68M|    if (removeAt >= fCurCount)
  ------------------
  |  Branch (159:9): [True: 0, False: 7.68M]
  ------------------
  160|      0|        ThrowXMLwithMemMgr(ArrayIndexOutOfBoundsException, XMLExcepts::Vector_BadIndex, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  161|       |
  162|       |    // Copy down every element above remove point
  163|  7.68M|    for (XMLSize_t index = removeAt; index < fCurCount-1; index++)
  ------------------
  |  Branch (163:38): [True: 0, False: 7.68M]
  ------------------
  164|      0|        fElemList[index] = fElemList[index+1];
  165|       |
  166|       |    // And bump down count
  167|  7.68M|    fCurCount--;
  168|  7.68M|}
_ZN11xercesc_3_213ValueVectorOfINS_16formatNodeHolderEED2Ev:
   75|  1.34k|{
   76|  1.34k|    if (fCallDestructor) {
  ------------------
  |  Branch (76:9): [True: 0, False: 1.34k]
  ------------------
   77|      0|        for (XMLSize_t index=fMaxCount; index > 0; index--)
  ------------------
  |  Branch (77:41): [True: 0, False: 0]
  ------------------
   78|      0|            fElemList[index-1].~TElem();
   79|      0|    }
   80|  1.34k|    fMemoryManager->deallocate(fElemList); //delete [] fElemList;
   81|  1.34k|}
_ZN11xercesc_3_213ValueVectorOfIPNS_15ContentSpecNodeEEC2EmPNS_13MemoryManagerEb:
   41|  8.32k|    fCallDestructor(toCallDestructor)
   42|  8.32k|    , fCurCount(0)
   43|  8.32k|    , fMaxCount(maxElems)
   44|  8.32k|    , fElemList(0)
   45|  8.32k|    , fMemoryManager(manager)
   46|  8.32k|{
   47|  8.32k|    fElemList = (TElem*) fMemoryManager->allocate
   48|  8.32k|    (
   49|  8.32k|        fMaxCount * sizeof(TElem)
   50|  8.32k|    ); //new TElem[fMaxCount];
   51|       |
   52|  8.32k|    memset(fElemList, 0, fMaxCount * sizeof(TElem));
   53|  8.32k|}
_ZN11xercesc_3_213ValueVectorOfIPNS_15ContentSpecNodeEED2Ev:
   75|  8.32k|{
   76|  8.32k|    if (fCallDestructor) {
  ------------------
  |  Branch (76:9): [True: 0, False: 8.32k]
  ------------------
   77|      0|        for (XMLSize_t index=fMaxCount; index > 0; index--)
  ------------------
  |  Branch (77:41): [True: 0, False: 0]
  ------------------
   78|      0|            fElemList[index-1].~TElem();
   79|      0|    }
   80|  8.32k|    fMemoryManager->deallocate(fElemList); //delete [] fElemList;
   81|  8.32k|}
_ZN11xercesc_3_213ValueVectorOfIPNS_15ContentSpecNodeEE10addElementERKS2_:
  121|  12.6M|{
  122|  12.6M|    ensureExtraCapacity(1);
  123|  12.6M|    fElemList[fCurCount++] = toAdd;
  124|  12.6M|}
_ZN11xercesc_3_213ValueVectorOfIPNS_15ContentSpecNodeEE19ensureExtraCapacityEm:
  229|  12.6M|{
  230|  12.6M|    XMLSize_t newMax = fCurCount + length;
  231|       |
  232|  12.6M|    if (newMax > fMaxCount)
  ------------------
  |  Branch (232:9): [True: 19.2k, False: 12.6M]
  ------------------
  233|  19.2k|    {
  234|       |        // Avoid too many reallocations by expanding by a percentage
  235|  19.2k|        XMLSize_t minNewMax = (XMLSize_t)((double)fCurCount * 1.25);
  236|  19.2k|        if (newMax < minNewMax)
  ------------------
  |  Branch (236:13): [True: 19.2k, False: 0]
  ------------------
  237|  19.2k|            newMax = minNewMax;
  238|       |
  239|  19.2k|        TElem* newList = (TElem*) fMemoryManager->allocate
  240|  19.2k|        (
  241|  19.2k|            newMax * sizeof(TElem)
  242|  19.2k|        ); //new TElem[newMax];
  243|  11.4M|        for (XMLSize_t index = 0; index < fCurCount; index++)
  ------------------
  |  Branch (243:35): [True: 11.4M, False: 19.2k]
  ------------------
  244|  11.4M|            newList[index] = fElemList[index];
  245|       |
  246|  19.2k|        fMemoryManager->deallocate(fElemList); //delete [] fElemList;
  247|  19.2k|        fElemList = newList;
  248|  19.2k|        fMaxCount = newMax;
  249|  19.2k|    }
  250|  12.6M|}
_ZNK11xercesc_3_213ValueVectorOfIPNS_15ContentSpecNodeEE4sizeEv:
  214|  25.3M|{
  215|  25.3M|    return fCurCount;
  216|  25.3M|}
_ZN11xercesc_3_213ValueVectorOfIPNS_15ContentSpecNodeEE9elementAtEm:
  202|  12.6M|{
  203|  12.6M|    if (getAt >= fCurCount)
  ------------------
  |  Branch (203:9): [True: 0, False: 12.6M]
  ------------------
  204|      0|        ThrowXMLwithMemMgr(ArrayIndexOutOfBoundsException, XMLExcepts::Vector_BadIndex, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  205|  12.6M|    return fElemList[getAt];
  206|  12.6M|}
_ZN11xercesc_3_213ValueVectorOfIPNS_15ContentSpecNodeEE15removeElementAtEm:
  158|  12.6M|{
  159|  12.6M|    if (removeAt >= fCurCount)
  ------------------
  |  Branch (159:9): [True: 0, False: 12.6M]
  ------------------
  160|      0|        ThrowXMLwithMemMgr(ArrayIndexOutOfBoundsException, XMLExcepts::Vector_BadIndex, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  161|       |
  162|       |    // Copy down every element above remove point
  163|  12.6M|    for (XMLSize_t index = removeAt; index < fCurCount-1; index++)
  ------------------
  |  Branch (163:38): [True: 0, False: 12.6M]
  ------------------
  164|      0|        fElemList[index] = fElemList[index+1];
  165|       |
  166|       |    // And bump down count
  167|  12.6M|    fCurCount--;
  168|  12.6M|}
_ZN11xercesc_3_213ValueVectorOfINS_15ContentSpecNode9NodeTypesEEC2EmPNS_13MemoryManagerEb:
   41|     83|    fCallDestructor(toCallDestructor)
   42|     83|    , fCurCount(0)
   43|     83|    , fMaxCount(maxElems)
   44|     83|    , fElemList(0)
   45|     83|    , fMemoryManager(manager)
   46|     83|{
   47|     83|    fElemList = (TElem*) fMemoryManager->allocate
   48|     83|    (
   49|     83|        fMaxCount * sizeof(TElem)
   50|     83|    ); //new TElem[fMaxCount];
   51|       |
   52|     83|    memset(fElemList, 0, fMaxCount * sizeof(TElem));
   53|     83|}
_ZN11xercesc_3_213ValueVectorOfINS_15ContentSpecNode9NodeTypesEED2Ev:
   75|     83|{
   76|     83|    if (fCallDestructor) {
  ------------------
  |  Branch (76:9): [True: 0, False: 83]
  ------------------
   77|      0|        for (XMLSize_t index=fMaxCount; index > 0; index--)
  ------------------
  |  Branch (77:41): [True: 0, False: 0]
  ------------------
   78|      0|            fElemList[index-1].~TElem();
   79|      0|    }
   80|     83|    fMemoryManager->deallocate(fElemList); //delete [] fElemList;
   81|     83|}
_ZN11xercesc_3_213ValueVectorOfINS_15ContentSpecNode9NodeTypesEE9elementAtEm:
  202|  1.13M|{
  203|  1.13M|    if (getAt >= fCurCount)
  ------------------
  |  Branch (203:9): [True: 0, False: 1.13M]
  ------------------
  204|      0|        ThrowXMLwithMemMgr(ArrayIndexOutOfBoundsException, XMLExcepts::Vector_BadIndex, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  205|  1.13M|    return fElemList[getAt];
  206|  1.13M|}
_ZN11xercesc_3_213ValueVectorOfINS_15ContentSpecNode9NodeTypesEE10addElementERKS2_:
  121|  1.13M|{
  122|  1.13M|    ensureExtraCapacity(1);
  123|  1.13M|    fElemList[fCurCount++] = toAdd;
  124|  1.13M|}
_ZN11xercesc_3_213ValueVectorOfINS_15ContentSpecNode9NodeTypesEE19ensureExtraCapacityEm:
  229|  1.13M|{
  230|  1.13M|    XMLSize_t newMax = fCurCount + length;
  231|       |
  232|  1.13M|    if (newMax > fMaxCount)
  ------------------
  |  Branch (232:9): [True: 547, False: 1.13M]
  ------------------
  233|    547|    {
  234|       |        // Avoid too many reallocations by expanding by a percentage
  235|    547|        XMLSize_t minNewMax = (XMLSize_t)((double)fCurCount * 1.25);
  236|    547|        if (newMax < minNewMax)
  ------------------
  |  Branch (236:13): [True: 547, False: 0]
  ------------------
  237|    547|            newMax = minNewMax;
  238|       |
  239|    547|        TElem* newList = (TElem*) fMemoryManager->allocate
  240|    547|        (
  241|    547|            newMax * sizeof(TElem)
  242|    547|        ); //new TElem[newMax];
  243|  5.19M|        for (XMLSize_t index = 0; index < fCurCount; index++)
  ------------------
  |  Branch (243:35): [True: 5.19M, False: 547]
  ------------------
  244|  5.19M|            newList[index] = fElemList[index];
  245|       |
  246|    547|        fMemoryManager->deallocate(fElemList); //delete [] fElemList;
  247|    547|        fElemList = newList;
  248|    547|        fMaxCount = newMax;
  249|    547|    }
  250|  1.13M|}
_ZN11xercesc_3_213ValueVectorOfIPNS_15ComplexTypeInfoEEC2EmPNS_13MemoryManagerEb:
   41|  7.12k|    fCallDestructor(toCallDestructor)
   42|  7.12k|    , fCurCount(0)
   43|  7.12k|    , fMaxCount(maxElems)
   44|  7.12k|    , fElemList(0)
   45|  7.12k|    , fMemoryManager(manager)
   46|  7.12k|{
   47|  7.12k|    fElemList = (TElem*) fMemoryManager->allocate
   48|  7.12k|    (
   49|  7.12k|        fMaxCount * sizeof(TElem)
   50|  7.12k|    ); //new TElem[fMaxCount];
   51|       |
   52|  7.12k|    memset(fElemList, 0, fMaxCount * sizeof(TElem));
   53|  7.12k|}
_ZN11xercesc_3_213ValueVectorOfIPNS_15ComplexTypeInfoEED2Ev:
   75|  7.12k|{
   76|  7.12k|    if (fCallDestructor) {
  ------------------
  |  Branch (76:9): [True: 0, False: 7.12k]
  ------------------
   77|      0|        for (XMLSize_t index=fMaxCount; index > 0; index--)
  ------------------
  |  Branch (77:41): [True: 0, False: 0]
  ------------------
   78|      0|            fElemList[index-1].~TElem();
   79|      0|    }
   80|  7.12k|    fMemoryManager->deallocate(fElemList); //delete [] fElemList;
   81|  7.12k|}
_ZN11xercesc_3_213ValueVectorOfIPNS_15ComplexTypeInfoEE17removeAllElementsEv:
  171|  7.12k|{
  172|  7.12k|    fCurCount = 0;
  173|  7.12k|}
_ZN11xercesc_3_213ValueVectorOfIiE17removeAllElementsEv:
  171|  7.12k|{
  172|  7.12k|    fCurCount = 0;
  173|  7.12k|}

_ZN11xercesc_3_221XML256TableTranscoderD2Ev:
   35|     41|{
   36|       |    // We don't own the tables, we just reference them
   37|     41|}
_ZN11xercesc_3_221XML256TableTranscoder13transcodeFromEPKhmPDsmRmPh:
   50|    258|{
   51|       |    //
   52|       |    //  Calculate the max chars we can do here. Its the lesser of the
   53|       |    //  max output chars and the number of chars in the source.
   54|       |    //
   55|    258|    const XMLSize_t countToDo = srcCount < maxChars ? srcCount : maxChars;
  ------------------
  |  Branch (55:33): [True: 46, False: 212]
  ------------------
   56|       |
   57|       |    //
   58|       |    //  Loop through the count we have to do and map each char via the
   59|       |    //  lookup table.
   60|       |    //
   61|    258|    const XMLByte*  srcPtr = srcData;
   62|    258|    const XMLByte*  endPtr = (srcPtr + countToDo);
   63|    258|    XMLCh*          outPtr = toFill;
   64|  3.77M|    while (srcPtr < endPtr)
  ------------------
  |  Branch (64:12): [True: 3.77M, False: 258]
  ------------------
   65|  3.77M|    {
   66|  3.77M|        const XMLCh uniCh = fFromTable[*srcPtr++];
   67|  3.77M|        if (uniCh != 0xFFFF)
  ------------------
  |  Branch (67:13): [True: 3.77M, False: 0]
  ------------------
   68|  3.77M|        {
   69|  3.77M|            *outPtr++ = uniCh;
   70|  3.77M|            continue;
   71|  3.77M|        }
   72|  3.77M|    }
   73|       |
   74|       |
   75|       |    // Set the bytes eaten
   76|    258|    bytesEaten = countToDo;
   77|       |
   78|       |    // Set the character sizes to the fixed size
   79|    258|    memset(charSizes, 1, countToDo);
   80|       |
   81|       |    // Return the chars we transcoded
   82|    258|    return countToDo;
   83|    258|}
_ZN11xercesc_3_221XML256TableTranscoderC2EPKDsmS2_PKNS_15XMLTransService8TransRecEmPNS_13MemoryManagerE:
  169|     41|    XMLTranscoder(encodingName, blockSize, manager)
  170|     41|    , fFromTable(fromTable)
  171|     41|    , fToSize(toTableSize)
  172|     41|    , fToTable(toTable)
  173|     41|{
  174|     41|}

_ZN11xercesc_3_218XML88591TranscoderC2EPKDsmPNS_13MemoryManagerE:
   36|     74|    XMLTranscoder(encodingName, blockSize, manager)
   37|     74|{
   38|     74|}
_ZN11xercesc_3_218XML88591TranscoderD2Ev:
   42|     74|{
   43|     74|}
_ZN11xercesc_3_218XML88591Transcoder13transcodeFromEPKhmPDsmRmPh:
   56|    299|{
   57|       |    //
   58|       |    //  Calculate the max chars we can do here. Its the lesser of the
   59|       |    //  max output chars and the number of bytes in the source.
   60|       |    //
   61|    299|    const XMLSize_t countToDo = srcCount < maxChars ? srcCount : maxChars;
  ------------------
  |  Branch (61:33): [True: 87, False: 212]
  ------------------
   62|       |
   63|       |    //
   64|       |    //  Loop through the bytes to do and convert over each byte. Its just
   65|       |    //  a cast to the wide char type.
   66|       |    //
   67|    299|    const XMLByte*  srcPtr = srcData;
   68|    299|    XMLCh*          destPtr = toFill;
   69|    299|    const XMLByte*  srcEnd = srcPtr + countToDo;
   70|  3.97M|    while (srcPtr < srcEnd)
  ------------------
  |  Branch (70:12): [True: 3.97M, False: 299]
  ------------------
   71|  3.97M|        *destPtr++ = XMLCh(*srcPtr++);
   72|       |
   73|       |    // Set the bytes eaten, and set the char size array to the fixed size
   74|    299|    bytesEaten = countToDo;
   75|    299|    memset(charSizes, 1, countToDo);
   76|       |
   77|       |    // Return the chars we transcoded
   78|    299|    return countToDo;
   79|    299|}

_ZN11xercesc_3_218XMLASCIITranscoderC2EPKDsmPNS_13MemoryManagerE:
   36|    123|    XMLTranscoder(encodingName, blockSize, manager)
   37|    123|{
   38|    123|}
_ZN11xercesc_3_218XMLASCIITranscoderD2Ev:
   42|    123|{
   43|    123|}
_ZN11xercesc_3_218XMLASCIITranscoder13transcodeFromEPKhmPDsmRmPh:
   56|    398|{
   57|       |    //
   58|       |    //  Calculate the max chars we can do here. Its the lesser of the
   59|       |    //  max output chars and the source byte count.
   60|       |    //
   61|    398|    const XMLSize_t countToDo = srcCount < maxChars ? srcCount : maxChars;
  ------------------
  |  Branch (61:33): [True: 134, False: 264]
  ------------------
   62|       |
   63|       |    //
   64|       |    //  Now loop through that many source chars and just cast each one
   65|       |    //  over to the XMLCh format. Check each source that its really a
   66|       |    //  valid ASCI char.
   67|       |    //
   68|    398|    const XMLByte*  srcPtr = srcData;
   69|    398|    XMLCh*          outPtr = toFill;
   70|    398|    XMLSize_t       countDone = 0;
   71|  4.46M|    for (; countDone < countToDo; countDone++)
  ------------------
  |  Branch (71:12): [True: 4.46M, False: 329]
  ------------------
   72|  4.46M|    {
   73|       |        // Do the optimistic work up front
   74|  4.46M|        if (*srcPtr < 0x80)
  ------------------
  |  Branch (74:13): [True: 4.46M, False: 69]
  ------------------
   75|  4.46M|        {
   76|  4.46M|            *outPtr++ = XMLCh(*srcPtr++);
   77|  4.46M|            continue;
   78|  4.46M|        }
   79|       |
   80|       |        //
   81|       |        //  We got non source encoding char. If we got more than 32 chars,
   82|       |        //  the just break out. We'll come back here later to hit this again
   83|       |        //  and give an error much closer to the real source position.
   84|       |        //
   85|     69|        if (countDone > 32)
  ------------------
  |  Branch (85:13): [True: 36, False: 33]
  ------------------
   86|     36|            break;
   87|       |
   88|     33|        XMLCh tmpBuf[17];
   89|     33|        XMLString::binToText((unsigned int)*srcPtr, tmpBuf, 16, 16, getMemoryManager());
   90|     33|        ThrowXMLwithMemMgr2
  ------------------
  |  |  268|     33|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  ------------------
   91|     69|        (
   92|     69|            TranscodingException
   93|     69|            , XMLExcepts::Trans_Unrepresentable
   94|     69|            , tmpBuf
   95|     69|            , getEncodingName()
   96|     69|            , getMemoryManager()
   97|     69|        );
   98|     69|    }
   99|       |
  100|       |    // Set the bytes we ate
  101|    365|    bytesEaten = countDone;
  102|       |
  103|       |    // Set the char sizes to the fixed size
  104|    365|    memset(charSizes, 1, countDone);
  105|       |
  106|       |    // Return the chars we transcoded
  107|    365|    return countDone;
  108|    398|}

_ZN11xercesc_3_213XMLBigDecimalC2EPKDsPNS_13MemoryManagerE:
   55|     32|: fSign(0)
   56|     32|, fTotalDigits(0)
   57|     32|, fScale(0)
   58|     32|, fRawDataLen(0)
   59|     32|, fRawData(0)
   60|     32|, fIntVal(0)
   61|     32|, fMemoryManager(manager)
   62|     32|{
   63|     32|    if ((!strValue) || (!*strValue))
  ------------------
  |  Branch (63:9): [True: 0, False: 32]
  |  Branch (63:24): [True: 0, False: 32]
  ------------------
   64|      0|        ThrowXMLwithMemMgr(NumberFormatException, XMLExcepts::XMLNUM_emptyString, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
   65|       |
   66|     32|    CleanupType cleanup(this, &XMLBigDecimal::cleanUp);
   67|       |
   68|     32|    try
   69|     32|    {
   70|     32|        fRawDataLen = XMLString::stringLen(strValue);
   71|     32|        fRawData = (XMLCh*) fMemoryManager->allocate
   72|     32|        (
   73|     32|            ((fRawDataLen*2) + 2) * sizeof(XMLCh) //fRawData and fIntVal
   74|     32|        );
   75|     32|        memcpy(fRawData, strValue, fRawDataLen * sizeof(XMLCh));
   76|     32|        fRawData[fRawDataLen] = chNull;
   77|     32|        fIntVal = fRawData + fRawDataLen + 1;
   78|     32|        parseDecimal(strValue, fIntVal, fSign, (int&) fTotalDigits, (int&) fScale, fMemoryManager);
   79|     32|    }
   80|     32|    catch(const OutOfMemoryException&)
   81|     32|    {
   82|      0|        cleanup.release();
   83|       |
   84|      0|        throw;
   85|      0|    }
   86|       |
   87|     32|    cleanup.release();
   88|     32|}
_ZN11xercesc_3_213XMLBigDecimalD2Ev:
   91|     16|{
   92|     16|    cleanUp();
   93|     16|}
_ZN11xercesc_3_213XMLBigDecimal7cleanUpEv:
   96|     16|{
   97|     16|    if (fRawData)
  ------------------
  |  Branch (97:9): [True: 16, False: 0]
  ------------------
   98|     16|        fMemoryManager->deallocate(fRawData); //XMLString::release(&fRawData);
   99|     16|}
_ZN11xercesc_3_213XMLBigDecimal12parseDecimalEPKDsPDsRiS4_S4_PNS_13MemoryManagerE:
  208|     32|{
  209|       |    //init
  210|     32|    retBuffer[0] = chNull;
  211|     32|    totalDigits = 0;
  212|     32|    fractDigits = 0;
  213|       |
  214|       |    // Strip leading white space, if any. 
  215|     32|    const XMLCh* startPtr = toParse;
  216|     32|    while (XMLChar1_0::isWhitespace(*startPtr))
  ------------------
  |  Branch (216:12): [True: 0, False: 32]
  ------------------
  217|      0|        startPtr++;
  218|       |
  219|       |    // If we hit the end, then return failure
  220|     32|    if (!*startPtr)
  ------------------
  |  Branch (220:9): [True: 0, False: 32]
  ------------------
  221|      0|        ThrowXMLwithMemMgr(NumberFormatException, XMLExcepts::XMLNUM_WSString, manager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  222|       |
  223|       |    // Strip tailing white space, if any.
  224|     32|    const XMLCh* endPtr = toParse + XMLString::stringLen(toParse);
  225|     32|    while (XMLChar1_0::isWhitespace(*(endPtr - 1)))
  ------------------
  |  Branch (225:12): [True: 0, False: 32]
  ------------------
  226|      0|        endPtr--;
  227|       |
  228|       |    // '+' or '-' is allowed only at the first position
  229|       |    // and is NOT included in the return parsed string
  230|     32|    sign = 1;
  231|     32|    if (*startPtr == chDash)
  ------------------
  |  Branch (231:9): [True: 10, False: 22]
  ------------------
  232|     10|    {
  233|     10|        sign = -1;
  234|     10|        startPtr++;
  235|     10|        if (startPtr == endPtr)
  ------------------
  |  Branch (235:13): [True: 0, False: 10]
  ------------------
  236|      0|        {
  237|      0|            ThrowXMLwithMemMgr(NumberFormatException, XMLExcepts::XMLNUM_Inv_chars, manager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  238|      0|        }
  239|     10|    }
  240|     22|    else if (*startPtr == chPlus)
  ------------------
  |  Branch (240:14): [True: 0, False: 22]
  ------------------
  241|      0|    {
  242|      0|        startPtr++;         
  243|      0|        if (startPtr == endPtr)
  ------------------
  |  Branch (243:13): [True: 0, False: 0]
  ------------------
  244|      0|        {
  245|      0|            ThrowXMLwithMemMgr(NumberFormatException, XMLExcepts::XMLNUM_Inv_chars, manager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  246|      0|        }
  247|      0|    }
  248|       |
  249|       |    // Strip leading zeros
  250|     36|    while (*startPtr == chDigit_0)
  ------------------
  |  Branch (250:12): [True: 4, False: 32]
  ------------------
  251|      4|        startPtr++;
  252|       |
  253|       |    // containning zero, only zero, nothing but zero
  254|       |    // it is a zero, indeed
  255|     32|    if (startPtr >= endPtr)
  ------------------
  |  Branch (255:9): [True: 4, False: 28]
  ------------------
  256|      4|    {
  257|      4|        sign = 0;
  258|      4|        return;
  259|      4|    }
  260|       |
  261|     28|    XMLCh* retPtr = (XMLCh*) retBuffer;
  262|       |
  263|       |    // Scan data
  264|     28|    bool   dotSignFound = false;
  265|    256|    while (startPtr < endPtr)
  ------------------
  |  Branch (265:12): [True: 228, False: 28]
  ------------------
  266|    228|    {
  267|    228|        if (*startPtr == chPeriod)
  ------------------
  |  Branch (267:13): [True: 0, False: 228]
  ------------------
  268|      0|        {
  269|      0|            if (!dotSignFound)
  ------------------
  |  Branch (269:17): [True: 0, False: 0]
  ------------------
  270|      0|            {
  271|      0|                dotSignFound = true;
  272|      0|                fractDigits = (int)(endPtr - startPtr - 1);
  273|      0|                startPtr++;
  274|      0|                continue;
  275|      0|            }
  276|      0|            else  // '.' is allowed only once
  277|      0|                ThrowXMLwithMemMgr(NumberFormatException, XMLExcepts::XMLNUM_2ManyDecPoint, manager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  278|      0|        }
  279|       |
  280|       |        // If not valid decimal digit, then an error
  281|    228|        if ((*startPtr < chDigit_0) || (*startPtr > chDigit_9))
  ------------------
  |  Branch (281:13): [True: 0, False: 228]
  |  Branch (281:40): [True: 0, False: 228]
  ------------------
  282|      0|            ThrowXMLwithMemMgr(NumberFormatException, XMLExcepts::XMLNUM_Inv_chars, manager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  283|       |
  284|       |        // copy over
  285|    228|        *retPtr++ = *startPtr++;
  286|    228|        totalDigits++;
  287|    228|    }
  288|       |
  289|       |    /***
  290|       |    E2-44 totalDigits
  291|       |
  292|       |     ... by restricting it to numbers that are expressible as i x 10^-n
  293|       |     where i and n are integers such that |i| < 10^totalDigits and 0 <= n <= totalDigits. 
  294|       |
  295|       |        normalization: remove all trailing zero after the '.'
  296|       |                       and adjust the scaleValue as well.
  297|       |    ***/
  298|     28|    while ((fractDigits > 0) && (*(retPtr-1) == chDigit_0))          
  ------------------
  |  Branch (298:12): [True: 0, False: 28]
  |  Branch (298:33): [True: 0, False: 0]
  ------------------
  299|      0|    {
  300|      0|        retPtr--;
  301|      0|        fractDigits--;
  302|      0|        totalDigits--;
  303|      0|    }
  304|       |    // 0.0 got past the check for zero because of the decimal point, so we need to double check it here
  305|     28|    if(totalDigits==0)
  ------------------
  |  Branch (305:8): [True: 0, False: 28]
  ------------------
  306|      0|        sign = 0;
  307|       |
  308|     28|    *retPtr = chNull;   //terminated
  309|     28|    return;
  310|     28|}
_ZN11xercesc_3_213XMLBigDecimal13compareValuesEPKS0_S2_PNS_13MemoryManagerE:
  391|     46|{
  392|     46|    if ((!lValue) || (!rValue) )
  ------------------
  |  Branch (392:9): [True: 0, False: 46]
  |  Branch (392:22): [True: 0, False: 46]
  ------------------
  393|      0|        ThrowXMLwithMemMgr(NumberFormatException, XMLExcepts::XMLNUM_null_ptr, manager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  394|       |        	
  395|     46|    return lValue->toCompare(*rValue);
  396|     46|}                                
_ZNK11xercesc_3_213XMLBigDecimal9toCompareERKS0_:
  406|     46|{
  407|       |    /***
  408|       |     * different sign
  409|       |     */
  410|     46|    int lSign = this->getSign();
  411|     46|    if (lSign != other.getSign())
  ------------------
  |  Branch (411:9): [True: 28, False: 18]
  ------------------
  412|     28|        return (lSign > other.getSign() ? 1 : -1);
  ------------------
  |  Branch (412:17): [True: 16, False: 12]
  ------------------
  413|       |
  414|       |    /***
  415|       |     * same sign, zero
  416|       |     */
  417|     18|    if (lSign == 0)    // optimization
  ------------------
  |  Branch (417:9): [True: 0, False: 18]
  ------------------
  418|      0|        return 0;
  419|       |
  420|       |    /***
  421|       |     * same sign, non-zero
  422|       |     */
  423|     18|    unsigned int lIntDigit = this->getTotalDigit() - this->getScale();
  424|     18|    unsigned int rIntDigit = other.getTotalDigit() - other.getScale();
  425|       |
  426|     18|    if (lIntDigit > rIntDigit)
  ------------------
  |  Branch (426:9): [True: 0, False: 18]
  ------------------
  427|      0|    {
  428|      0|        return 1 * lSign;
  429|      0|    }
  430|     18|    else if (lIntDigit < rIntDigit)
  ------------------
  |  Branch (430:14): [True: 18, False: 0]
  ------------------
  431|     18|    {
  432|     18|        return -1 * lSign;
  433|     18|    }
  434|      0|    else  // compare fraction
  435|      0|    {
  436|      0|        int res = XMLString::compareString
  437|      0|        ( this->getValue()
  438|      0|        , other.getValue()
  439|      0|        );
  440|       |
  441|      0|        if (res > 0)
  ------------------
  |  Branch (441:13): [True: 0, False: 0]
  ------------------
  442|      0|            return 1 * lSign;
  443|      0|        else if (res < 0)
  ------------------
  |  Branch (443:18): [True: 0, False: 0]
  ------------------
  444|      0|            return -1 * lSign;
  445|      0|        else
  446|      0|            return 0;
  447|      0|    }
  448|       |
  449|     18|}

_ZNK11xercesc_3_213XMLBigDecimal7getSignEv:
  165|    120|{
  166|    120|    return fSign;
  167|    120|}
_ZNK11xercesc_3_213XMLBigDecimal8getScaleEv:
  175|     52|{
  176|     52|    return fScale;
  177|     52|}
_ZNK11xercesc_3_213XMLBigDecimal13getTotalDigitEv:
  180|     36|{
  181|     36|    return fTotalDigits;
  182|     36|}
_ZNK11xercesc_3_213XMLBigDecimal10getRawDataEv:
  185|     16|{
  186|     16|    return fRawData;
  187|     16|}
_ZNK11xercesc_3_213XMLBigDecimal16getMemoryManagerEv:
  195|     46|{
  196|     46|    return fMemoryManager;
  197|     46|}

_ZN11xercesc_3_215XMLChTranscoderC2EPKDsmPNS_13MemoryManagerE:
   35|   365k|    XMLTranscoder(encodingName, blockSize, manager)
   36|   365k|{
   37|   365k|}
_ZN11xercesc_3_215XMLChTranscoderD2Ev:
   41|   365k|{
   42|   365k|}
_ZN11xercesc_3_215XMLChTranscoder13transcodeFromEPKhmPDsmRmPh:
   55|   381k|{
   56|       |    //
   57|       |    //  Calculate the max chars we can do here. Its the lesser of the
   58|       |    //  max output chars and the number of chars in the source.
   59|       |    //
   60|   381k|    const XMLSize_t srcChars = srcCount / sizeof(XMLCh);
   61|   381k|    const XMLSize_t countToDo = srcChars < maxChars ? srcChars : maxChars;
  ------------------
  |  Branch (61:33): [True: 369k, False: 11.7k]
  ------------------
   62|       |
   63|       |    //
   64|       |    //  Copy over the count of chars that we precalculated. Notice we
   65|       |    //  convert char count to byte count here!!!
   66|       |    //
   67|   381k|    memcpy(toFill, srcData, countToDo * sizeof(XMLCh));
   68|       |
   69|       |    // Set the bytes eaten
   70|   381k|    bytesEaten = countToDo * sizeof(XMLCh);
   71|       |
   72|       |    // Set the character sizes to the fixed size
   73|   381k|    memset(charSizes, sizeof(XMLCh), countToDo);
   74|       |
   75|       |    // Return the chars we transcoded
   76|   381k|    return countToDo;
   77|   381k|}

_ZN11xercesc_3_210XMLChar1_014isPublicIdCharEDsDs:
  190|  88.1k|{
  191|  88.1k|    if (!toCheck2) {
  ------------------
  |  Branch (191:9): [True: 88.1k, False: 0]
  ------------------
  192|  88.1k|        const XMLCh* curTable = gPublicIdChars;
  193|       |
  194|       |        // Check the ranges
  195|   311k|        while (*curTable)
  ------------------
  |  Branch (195:16): [True: 310k, False: 5]
  ------------------
  196|   310k|        {
  197|       |            //
  198|       |            //  If the test char is less than the low range, then it's never
  199|       |            //  going to match any other range, so break out. But we have to
  200|       |            //  run up to the range terminator first.
  201|       |            //
  202|   310k|            if (toCheck < *curTable++)
  ------------------
  |  Branch (202:17): [True: 12.9k, False: 298k]
  ------------------
  203|  12.9k|            {
  204|   100k|                while (*curTable++)
  ------------------
  |  Branch (204:24): [True: 87.8k, False: 12.9k]
  ------------------
  205|  87.8k|                {
  206|       |                    // Purposefully empty, we are just running up the pointer
  207|  87.8k|                }
  208|  12.9k|                break;
  209|  12.9k|            }
  210|       |
  211|       |            // If it's less than or equal to the top of the range, then a match
  212|   298k|            if (toCheck <= *curTable++)
  ------------------
  |  Branch (212:17): [True: 75.2k, False: 222k]
  ------------------
  213|  75.2k|                return true;
  214|   298k|        }
  215|       |
  216|       |        // And now test against singles
  217|  39.5k|        while (*curTable)
  ------------------
  |  Branch (217:16): [True: 39.5k, False: 7]
  ------------------
  218|  39.5k|        {
  219|  39.5k|            if (toCheck == *curTable++)
  ------------------
  |  Branch (219:17): [True: 12.9k, False: 26.6k]
  ------------------
  220|  12.9k|                return true;
  221|  39.5k|        }
  222|      7|        return false;
  223|  12.9k|    }
  224|      0|    return false;
  225|  88.1k|}
_ZN11xercesc_3_210XMLChar1_114isPublicIdCharEDsDs:
 4687|  1.79M|{
 4688|  1.79M|    if (!toCheck2) {
  ------------------
  |  Branch (4688:9): [True: 1.79M, False: 0]
  ------------------
 4689|  1.79M|        const XMLCh* curTable = gPublicIdChars;
 4690|       |
 4691|       |        // Check the ranges
 4692|  6.81M|        while (*curTable)
  ------------------
  |  Branch (4692:16): [True: 6.81M, False: 3]
  ------------------
 4693|  6.81M|        {
 4694|       |            //
 4695|       |            //  If the test char is less than the low range, then it's never
 4696|       |            //  going to match any other range, so break out. But we have to
 4697|       |            //  run up to the range terminator first.
 4698|       |            //
 4699|  6.81M|            if (toCheck < *curTable++)
  ------------------
  |  Branch (4699:17): [True: 37.9k, False: 6.77M]
  ------------------
 4700|  37.9k|            {
 4701|   300k|                while (*curTable++)
  ------------------
  |  Branch (4701:24): [True: 262k, False: 37.9k]
  ------------------
 4702|   262k|                {
 4703|       |                    // Purposefully empty, we are just running up the pointer
 4704|   262k|                }
 4705|  37.9k|                break;
 4706|  37.9k|            }
 4707|       |
 4708|       |            // If it's less than or equal to the top of the range, then a match
 4709|  6.77M|            if (toCheck <= *curTable++)
  ------------------
  |  Branch (4709:17): [True: 1.75M, False: 5.01M]
  ------------------
 4710|  1.75M|                return true;
 4711|  6.77M|        }
 4712|       |
 4713|       |        // And now test against singles
 4714|   115k|        while (*curTable)
  ------------------
  |  Branch (4714:16): [True: 115k, False: 22]
  ------------------
 4715|   115k|        {
 4716|   115k|            if (toCheck == *curTable++)
  ------------------
  |  Branch (4716:17): [True: 37.8k, False: 77.2k]
  ------------------
 4717|  37.8k|                return true;
 4718|   115k|        }
 4719|     22|        return false;
 4720|  37.9k|    }
 4721|      0|    return false;
 4722|  1.79M|}

_ZN11xercesc_3_210XMLChar1_012isWhitespaceEDs:
  243|  11.4k|{
  244|  11.4k|    return ((fgCharCharsTable1_0[toCheck] & gWhitespaceCharMask) != 0);
  245|  11.4k|}

_ZN11xercesc_3_219XMLEBCDICTranscoder11xlatThisOneEh:
  176|   125k|{
  177|   125k|    return gFromTable[toXlat];
  178|   125k|}
_ZN11xercesc_3_219XMLEBCDICTranscoderC2EPKDsmPNS_13MemoryManagerE:
  188|     17|    XML256TableTranscoder
  189|     17|    (
  190|     17|        encodingName
  191|     17|        , blockSize
  192|     17|        , gFromTable
  193|     17|        , gToTable
  194|     17|        , gToTableSz
  195|     17|        , manager
  196|     17|    )
  197|     17|{
  198|     17|}
_ZN11xercesc_3_219XMLEBCDICTranscoderD2Ev:
  202|     17|{
  203|     17|}

_ZN11xercesc_3_213XMLEnumeratorINS_12KVStringPairEEC2Ev:
   44|     20|    XMLEnumerator() {}
_ZN11xercesc_3_213XMLEnumeratorINS_12KVStringPairEED2Ev:
   35|     20|    virtual ~XMLEnumerator() {};
_ZN11xercesc_3_213XMLEnumeratorINS_10XMLRefInfoEEC2Ev:
   44|  1.65k|    XMLEnumerator() {}
_ZN11xercesc_3_213XMLEnumeratorINS_10XMLRefInfoEED2Ev:
   35|  1.65k|    virtual ~XMLEnumerator() {};
_ZN11xercesc_3_213XMLEnumeratorINS_12SchemaAttDefEEC2Ev:
   44|      1|    XMLEnumerator() {}
_ZN11xercesc_3_213XMLEnumeratorINS_9DTDAttDefEEC2Ev:
   44|  27.6k|    XMLEnumerator() {}
_ZN11xercesc_3_213XMLEnumeratorINS_9DTDAttDefEED2Ev:
   35|  27.6k|    virtual ~XMLEnumerator() {};
_ZN11xercesc_3_213XMLEnumeratorINS_14DTDElementDeclEEC2Ev:
   44|  3.58k|    XMLEnumerator() {}
_ZN11xercesc_3_213XMLEnumeratorINS_14DTDElementDeclEED2Ev:
   35|  3.58k|    virtual ~XMLEnumerator() {};
_ZN11xercesc_3_213XMLEnumeratorINS_13DTDEntityDeclEEC2Ev:
   44|  3.58k|    XMLEnumerator() {}
_ZN11xercesc_3_213XMLEnumeratorINS_13DTDEntityDeclEED2Ev:
   35|  3.58k|    virtual ~XMLEnumerator() {};

_ZN11xercesc_3_214XMLInitializer22initializeXMLExceptionEv:
   39|      1|{
   40|      1|    sMsgLoader = XMLPlatformUtils::loadMsgSet(XMLUni::fgExceptDomain);
   41|       |
   42|      1|    if (!sMsgLoader)
  ------------------
  |  Branch (42:9): [True: 0, False: 1]
  ------------------
   43|      0|      XMLPlatformUtils::panic(PanicHandler::Panic_CantLoadMsgDomain);
   44|      1|}
_ZN11xercesc_3_212XMLExceptionD2Ev:
   63|  1.36k|{
   64|  1.36k|    fMemoryManager->deallocate(fMsg);
   65|  1.36k|    fMemoryManager->deallocate(fSrcFile);
   66|  1.36k|}
_ZN11xercesc_3_212XMLExceptionC2EPKcmPNS_13MemoryManagerE:
   99|  1.36k|    fCode(XMLExcepts::NoError)
  100|  1.36k|    , fSrcFile(0)
  101|  1.36k|    , fSrcLine(srcLine)
  102|  1.36k|    , fMsg(0)
  103|  1.36k|    , fMemoryManager(0)
  104|  1.36k|{
  105|  1.36k|    if (!memoryManager)
  ------------------
  |  Branch (105:9): [True: 0, False: 1.36k]
  ------------------
  106|      0|      fMemoryManager =
  107|      0|        XMLPlatformUtils::fgMemoryManager->getExceptionMemoryManager();
  108|  1.36k|    else
  109|  1.36k|      fMemoryManager = memoryManager->getExceptionMemoryManager();
  110|       |
  111|  1.36k|    fSrcFile = XMLString::replicate(srcFile, fMemoryManager);
  112|  1.36k|}
_ZN11xercesc_3_212XMLException14loadExceptTextENS_10XMLExcepts5CodesE:
  172|    683|{
  173|       |    // Store the error code
  174|    683|    fCode = toLoad;
  175|       |
  176|       |    // Load up the text into a local buffer
  177|    683|    const XMLSize_t msgSize = 2047;
  178|    683|    XMLCh errText[msgSize + 1];
  179|       |
  180|       |    // load the text
  181|    683|	if (!gGetMsgLoader().loadMsg(toLoad, errText, msgSize))
  ------------------
  |  Branch (181:6): [True: 0, False: 683]
  ------------------
  182|      0|	{
  183|      0|		fMsg = XMLString::replicate
  184|      0|        (
  185|      0|        XMLUni::fgDefErrMsg
  186|      0|            , fMemoryManager
  187|      0|        );
  188|      0|		return;
  189|      0|	}
  190|       |
  191|       |    // We got the text so replicate it into the message member
  192|    683|    fMsg = XMLString::replicate(errText, fMemoryManager);
  193|    683|}
_ZN11xercesc_3_212XMLException14loadExceptTextENS_10XMLExcepts5CodesEPKDsS4_S4_S4_:
  202|    625|{
  203|       |    // Store the error code
  204|    625|    fCode = toLoad;
  205|       |
  206|       |    // Load up the text into a local buffer
  207|    625|    const XMLSize_t msgSize = 4095;
  208|    625|    XMLCh errText[msgSize + 1];
  209|       |
  210|       |    // load the text
  211|    625|	if (!gGetMsgLoader().loadMsg(toLoad, errText, msgSize, text1, text2, text3, text4, fMemoryManager))
  ------------------
  |  Branch (211:6): [True: 0, False: 625]
  ------------------
  212|      0|	{
  213|      0|		fMsg = XMLString::replicate
  214|      0|        (
  215|      0|        XMLUni::fgDefErrMsg
  216|      0|            , fMemoryManager
  217|      0|        );
  218|      0|		return;
  219|      0|	}
  220|       |
  221|       |    // We got the text so replicate it into the message member
  222|    625|    fMsg = XMLString::replicate(errText, fMemoryManager);
  223|    625|}
_ZN11xercesc_3_212XMLException14loadExceptTextENS_10XMLExcepts5CodesEPKcS4_S4_S4_:
  232|     52|{
  233|       |    // Store the error code
  234|     52|    fCode = toLoad;
  235|       |
  236|       |    // Load up the text into a local buffer
  237|     52|    const XMLSize_t msgSize = 4095;
  238|     52|    XMLCh errText[msgSize + 1];
  239|       |
  240|       |    // load the text
  241|     52|	if (!gGetMsgLoader().loadMsg(toLoad, errText, msgSize, text1, text2, text3, text4, fMemoryManager))
  ------------------
  |  Branch (241:6): [True: 0, False: 52]
  ------------------
  242|      0|	{
  243|      0|		fMsg = XMLString::replicate
  244|      0|        (
  245|      0|        XMLUni::fgDefErrMsg
  246|      0|            , fMemoryManager
  247|      0|        );
  248|      0|		return;
  249|      0|	}
  250|       |
  251|       |    // We got the text so replicate it into the message member
  252|     52|    fMsg = XMLString::replicate(errText, fMemoryManager);
  253|     52|}
XMLException.cpp:_ZN11xercesc_3_2L13gGetMsgLoaderEv:
   55|  1.36k|{
   56|  1.36k|    return *sMsgLoader;
   57|  1.36k|}

_ZNK11xercesc_3_212XMLException7getCodeEv:
  141|  1.36k|{
  142|  1.36k|    return fCode;
  143|  1.36k|}
_ZNK11xercesc_3_212XMLException10getMessageEv:
  146|  1.36k|{
  147|  1.36k|    return fMsg;
  148|  1.36k|}
_ZNK11xercesc_3_212XMLException12getErrorTypeEv:
  163|  2.72k|{
  164|  2.72k|   if ((fCode >= XMLExcepts::W_LowBounds) && (fCode <= XMLExcepts::W_HighBounds))
  ------------------
  |  Branch (164:8): [True: 2.72k, False: 0]
  |  Branch (164:46): [True: 0, False: 2.72k]
  ------------------
  165|      0|       return XMLErrorReporter::ErrType_Warning;
  166|  2.72k|   else if ((fCode >= XMLExcepts::F_LowBounds) && (fCode <= XMLExcepts::F_HighBounds))
  ------------------
  |  Branch (166:13): [True: 2.72k, False: 0]
  |  Branch (166:51): [True: 2.72k, False: 0]
  ------------------
  167|  2.72k|        return XMLErrorReporter::ErrType_Fatal;
  168|      0|   else if ((fCode >= XMLExcepts::E_LowBounds) && (fCode <= XMLExcepts::E_HighBounds))
  ------------------
  |  Branch (168:13): [True: 0, False: 0]
  |  Branch (168:51): [True: 0, False: 0]
  ------------------
  169|      0|        return XMLErrorReporter::ErrType_Error;
  170|      0|   return XMLErrorReporter::ErrTypes_Unknown;
  171|  2.72k|}
_ZN11xercesc_3_225XMLPlatformUtilsExceptionC2EPKcmNS_10XMLExcepts5CodesEPNS_13MemoryManagerE:
  187|     17|        XMLException(srcFile, srcLine, memoryManager) \
  188|     17|    { \
  189|     17|        loadExceptText(toThrow); \
  190|     17|    } \
_ZN11xercesc_3_230ArrayIndexOutOfBoundsExceptionC2EPKcmNS_10XMLExcepts5CodesEPNS_13MemoryManagerE:
  187|      1|        XMLException(srcFile, srcLine, memoryManager) \
  188|      1|    { \
  189|      1|        loadExceptText(toThrow); \
  190|      1|    } \
_ZN11xercesc_3_216RuntimeExceptionC2EPKcmNS_10XMLExcepts5CodesEPNS_13MemoryManagerE:
  187|     11|        XMLException(srcFile, srcLine, memoryManager) \
  188|     11|    { \
  189|     11|        loadExceptText(toThrow); \
  190|     11|    } \
_ZN11xercesc_3_216RuntimeExceptionC2EPKcmNS_10XMLExcepts5CodesEPKDsS6_S6_S6_PNS_13MemoryManagerE:
  206|    261|        XMLException(srcFile, srcLine, memoryManager) \
  207|    261|    { \
  208|    261|        loadExceptText(toThrow, text1, text2, text3, text4); \
  209|    261|    } \
_ZN11xercesc_3_220TranscodingExceptionC2EPKcmNS_10XMLExcepts5CodesEPNS_13MemoryManagerE:
  187|    134|        XMLException(srcFile, srcLine, memoryManager) \
  188|    134|    { \
  189|    134|        loadExceptText(toThrow); \
  190|    134|    } \
_ZN11xercesc_3_220TranscodingExceptionC2EPKcmNS_10XMLExcepts5CodesEPKDsS6_S6_S6_PNS_13MemoryManagerE:
  206|    119|        XMLException(srcFile, srcLine, memoryManager) \
  207|    119|    { \
  208|    119|        loadExceptText(toThrow, text1, text2, text3, text4); \
  209|    119|    } \
_ZN11xercesc_3_221MalformedURLExceptionC2EPKcmNS_10XMLExcepts5CodesEPNS_13MemoryManagerE:
  187|     41|        XMLException(srcFile, srcLine, memoryManager) \
  188|     41|    { \
  189|     41|        loadExceptText(toThrow); \
  190|     41|    } \
_ZN11xercesc_3_221MalformedURLExceptionC2EPKcmNS_10XMLExcepts5CodesEPKDsS6_S6_S6_PNS_13MemoryManagerE:
  206|    147|        XMLException(srcFile, srcLine, memoryManager) \
  207|    147|    { \
  208|    147|        loadExceptText(toThrow, text1, text2, text3, text4); \
  209|    147|    } \
_ZN11xercesc_3_220NetAccessorExceptionC2EPKcmNS_10XMLExcepts5CodesEPKDsS6_S6_S6_PNS_13MemoryManagerE:
  206|     98|        XMLException(srcFile, srcLine, memoryManager) \
  207|     98|    { \
  208|     98|        loadExceptText(toThrow, text1, text2, text3, text4); \
  209|     98|    } \
_ZN11xercesc_3_222UTFDataFormatExceptionC2EPKcmNS_10XMLExcepts5CodesES2_S2_S2_S2_PNS_13MemoryManagerE:
  219|     52|        XMLException(srcFile, srcLine, memoryManager) \
  220|     52|    { \
  221|     52|        loadExceptText(toThrow, text1, text2, text3, text4); \
  222|     52|    } \
_ZN11xercesc_3_222UnexpectedEOFExceptionC2EPKcmNS_10XMLExcepts5CodesEPNS_13MemoryManagerE:
  187|    479|        XMLException(srcFile, srcLine, memoryManager) \
  188|    479|    { \
  189|    479|        loadExceptText(toThrow); \
  190|    479|    } \

_ZN11xercesc_3_210XMLFileMgrC2Ev:
   37|      1|        XMLFileMgr() {}

_ZN11xercesc_3_220XMLIBM1047TranscoderC2EPKDsmPNS_13MemoryManagerE:
  188|      2|    XML256TableTranscoder
  189|      2|    (
  190|      2|        encodingName
  191|      2|        , blockSize
  192|      2|        , gFromTable
  193|      2|        , gToTable
  194|      2|        , gToTableSz
  195|      2|        , manager
  196|      2|    )
  197|      2|{
  198|      2|}
_ZN11xercesc_3_220XMLIBM1047TranscoderD2Ev:
  202|      2|{
  203|      2|}

_ZN11xercesc_3_220XMLIBM1140TranscoderC2EPKDsmPNS_13MemoryManagerE:
  189|     22|    XML256TableTranscoder
  190|     22|    (
  191|     22|        encodingName
  192|     22|        , blockSize
  193|     22|        , gFromTable
  194|     22|        , gToTable
  195|     22|        , gToTableSz
  196|     22|        , manager
  197|     22|    )
  198|     22|{
  199|     22|}
_ZN11xercesc_3_220XMLIBM1140TranscoderD2Ev:
  203|     22|{
  204|     22|}

_ZN11xercesc_3_214XMLInitializer20initializeStaticDataEv:
   35|      1|{
   36|      1|    try
   37|      1|    {
   38|       |        // Note that in some cases the order of initialization can be
   39|       |        // important.
   40|       |        //
   41|       |
   42|       |        // Core
   43|       |        //
   44|      1|        initializeEncodingValidator();
   45|      1|        initializeXMLException();
   46|      1|        initializeXMLScanner();
   47|      1|        initializeXMLValidator();
   48|       |
   49|       |        // Regex
   50|       |        //
   51|      1|        initializeRangeTokenMap();
   52|      1|        initializeRegularExpression();
   53|       |
   54|       |        // DTD
   55|       |        //
   56|      1|        initializeDTDGrammar();
   57|       |
   58|       |        // Schema
   59|       |        //
   60|      1|        initializeXSDErrorReporter();
   61|      1|        initializeDatatypeValidatorFactory();
   62|      1|        initializeGeneralAttributeCheck();
   63|      1|        initializeXSValue();
   64|      1|        initializeComplexTypeInfo();
   65|       |
   66|       |        // DOM
   67|       |        //
   68|      1|        initializeDOMImplementationRegistry();
   69|      1|        initializeDOMImplementationImpl();
   70|      1|        initializeDOMDocumentTypeImpl();
   71|      1|        initializeDOMNodeListImpl();
   72|      1|        initializeDOMNormalizer();
   73|       |
   74|       |        // XInclude
   75|       |        //
   76|      1|        initializeXInclude();
   77|      1|	}
   78|      1|    catch(...) {
   79|      0|        XMLPlatformUtils::panic(PanicHandler::Panic_AllStaticInitErr);
   80|      0|    }
   81|      1|}

_ZNK11xercesc_3_210XMLInteger8intValueEv:
   76|  5.11M|{
   77|  5.11M|    return fData;
   78|  5.11M|}
_ZN11xercesc_3_210XMLIntegerC2Ei:
   67|  4.63M|:fData(intVal)
   68|  4.63M|{
   69|  4.63M|}
_ZN11xercesc_3_210XMLIntegerD2Ev:
   72|  4.63M|{
   73|  4.63M|}

_ZN11xercesc_3_212XMLMsgLoader9setLocaleEPKc:
   47|      1|{
   48|       |    /***
   49|       |     * Release the current setting's memory, if any
   50|       |     ***/
   51|      1|    if (fLocale)
  ------------------
  |  Branch (51:9): [True: 0, False: 1]
  ------------------
   52|      0|    {
   53|      0|        XMLPlatformUtils::fgMemoryManager->deallocate(fLocale);//delete [] fLocale;
   54|      0|        fLocale = 0;
   55|      0|    }
   56|       |
   57|       |    /***
   58|       |     *  
   59|       |     *  REVISIT: later we may do locale format checking
   60|       |     * 
   61|       |     *           refer to phttp://oss.software.ibm.com/icu/userguide/locale.html
   62|       |     *           for details.
   63|       |     */
   64|      1|    if (localeToAdopt && (strlen(localeToAdopt) == 2 || (strlen(localeToAdopt) > 3 && localeToAdopt[2]=='_')))
  ------------------
  |  Branch (64:9): [True: 1, False: 0]
  |  Branch (64:27): [True: 0, False: 1]
  |  Branch (64:58): [True: 1, False: 0]
  |  Branch (64:87): [True: 1, False: 0]
  ------------------
   65|      1|    {
   66|      1|        fLocale   = XMLString::replicate(localeToAdopt, XMLPlatformUtils::fgMemoryManager);                   
   67|      1|    }
   68|       |
   69|      1|}
_ZN11xercesc_3_212XMLMsgLoader10setNLSHomeEPKc:
   82|      1|{
   83|       |    /***
   84|       |     * Release the current setting's memory, if any
   85|       |     ***/
   86|      1|    if (fPath)
  ------------------
  |  Branch (86:9): [True: 0, False: 1]
  ------------------
   87|      0|    {
   88|      0|        XMLPlatformUtils::fgMemoryManager->deallocate(fPath);//delete [] fPath;
   89|      0|        fPath = 0;
   90|      0|    }
   91|       |
   92|      1|    if (nlsHomeToAdopt)
  ------------------
  |  Branch (92:9): [True: 0, False: 1]
  ------------------
   93|      0|    {
   94|      0|        fPath = XMLString::replicate(nlsHomeToAdopt, XMLPlatformUtils::fgMemoryManager);
   95|      0|    }
   96|       |
   97|      1|}

_ZN11xercesc_3_212XMLMsgLoaderC2Ev:
  177|      8|{
  178|      8|}

_ZN11xercesc_3_211XMLMutexMgrC2Ev:
   36|      1|        XMLMutexMgr() {}

_ZN11xercesc_3_214XMLNetAccessorC2Ev:
  123|      1|    {
  124|      1|    }

_ZN11xercesc_3_29XMLNumberC2Ev:
   38|     32|{}
_ZN11xercesc_3_29XMLNumberD2Ev:
   46|     16|{}

_ZN11xercesc_3_29XMLString14compareNStringEPKcS2_m:
  334|  13.5k|{
  335|       |    // Watch for pathological secenario
  336|  13.5k|    if (!count)
  ------------------
  |  Branch (336:9): [True: 0, False: 13.5k]
  ------------------
  337|      0|        return 0;
  338|       |
  339|  13.5k|    return strncmp(str1, str2, count);
  340|  13.5k|}
_ZN11xercesc_3_29XMLString3cutEPDsm:
  370|     97|{
  371|       |    #if defined(XML_DEBUG)
  372|       |    if (count > stringLen(toCutFrom))
  373|       |    {
  374|       |        // <TBD> This is bad of course
  375|       |    }
  376|       |    #endif
  377|       |
  378|       |    // If count is zero, then nothing to do
  379|     97|    if (!count)
  ------------------
  |  Branch (379:9): [True: 0, False: 97]
  ------------------
  380|      0|        return;
  381|       |
  382|     97|    XMLCh* targetPtr = toCutFrom;
  383|     97|    XMLCh* srcPtr = toCutFrom + count;
  384|  2.28M|    while (*srcPtr)
  ------------------
  |  Branch (384:12): [True: 2.28M, False: 97]
  ------------------
  385|  2.28M|        *targetPtr++ = *srcPtr++;
  386|       |
  387|       |    // Cap it off at the new end
  388|     97|    *targetPtr = 0;
  389|     97|}
_ZN11xercesc_3_29XMLString13replaceTokensEPDsmPKDsS3_S3_S3_PNS_13MemoryManagerE:
  486|    677|{
  487|       |    //
  488|       |    //  We have to build the string back into the source string, so allocate
  489|       |    //  a temp string and copy the orignal text to it. We'll then treat the
  490|       |    //  incoming buffer as a target buffer. Put a janitor on it to make sure
  491|       |    //  it gets cleaned up.
  492|       |    //
  493|    677|    XMLCh* orgText = replicate(errText, manager);
  494|    677|    ArrayJanitor<XMLCh> janText(orgText, manager);
  495|       |
  496|    677|    XMLCh* pszSrc = orgText;
  497|    677|    XMLSize_t curOutInd = 0;
  498|       |
  499|  1.60k|    while (*pszSrc && (curOutInd < maxChars))
  ------------------
  |  Branch (499:12): [True: 1.60k, False: 0]
  |  Branch (499:23): [True: 1.51k, False: 86]
  ------------------
  500|  1.51k|    {
  501|       |        //
  502|       |        //  Loop until we see a { character. Until we do, just copy chars
  503|       |        //  from src to target, being sure not to overrun the output buffer.
  504|       |        //
  505|  24.3k|        while ((*pszSrc != chOpenCurly) && (curOutInd < maxChars))
  ------------------
  |  Branch (505:16): [True: 23.4k, False: 927]
  |  Branch (505:44): [True: 23.4k, False: 8]
  ------------------
  506|  23.4k|        {
  507|  23.4k|            if (!*pszSrc)
  ------------------
  |  Branch (507:17): [True: 583, False: 22.8k]
  ------------------
  508|    583|                break;
  509|  22.8k|            errText[curOutInd++] = *pszSrc++;
  510|  22.8k|        }
  511|       |
  512|       |        // If we did not find a curly, then we are done
  513|  1.51k|        if (*pszSrc != chOpenCurly)
  ------------------
  |  Branch (513:13): [True: 591, False: 927]
  ------------------
  514|    591|            break;
  515|       |
  516|       |        //
  517|       |        //  Probe this one to see if it matches our pattern of {x}. If not
  518|       |        //  then copy over those chars and go back to the first loop.
  519|       |        //
  520|    927|        if ((*(pszSrc+1) >= chDigit_0)
  ------------------
  |  Branch (520:13): [True: 927, False: 0]
  ------------------
  521|    927|        &&  (*(pszSrc+1) <= chDigit_3)
  ------------------
  |  Branch (521:13): [True: 927, False: 0]
  ------------------
  522|    927|        &&  (*(pszSrc+2) == chCloseCurly))
  ------------------
  |  Branch (522:13): [True: 927, False: 0]
  ------------------
  523|    927|        {
  524|       |            //
  525|       |            //  Its one of our guys, so move the source pointer up past the
  526|       |            //  token we are replacing. First though get out the token number
  527|       |            //  character.
  528|       |            //
  529|    927|            XMLCh tokCh = *(pszSrc+1);
  530|    927|            pszSrc += 3;
  531|       |
  532|       |            // Now copy over the replacement text
  533|    927|            const XMLCh* repText = 0;
  534|    927|            if (tokCh == chDigit_0)
  ------------------
  |  Branch (534:17): [True: 677, False: 250]
  ------------------
  535|    677|                repText = text1;
  536|    250|            else if (tokCh == chDigit_1)
  ------------------
  |  Branch (536:22): [True: 202, False: 48]
  ------------------
  537|    202|                repText = text2;
  538|     48|            else if (tokCh == chDigit_2)
  ------------------
  |  Branch (538:22): [True: 48, False: 0]
  ------------------
  539|     48|                repText = text3;
  540|      0|            else if (tokCh == chDigit_3)
  ------------------
  |  Branch (540:22): [True: 0, False: 0]
  ------------------
  541|      0|                repText = text4;
  542|       |
  543|       |            // If this one is null, copy over a null string
  544|    927|            if (!repText)
  ------------------
  |  Branch (544:17): [True: 0, False: 927]
  ------------------
  545|      0|                repText = gNullStr;
  546|       |
  547|   504k|            while (*repText && (curOutInd < maxChars))
  ------------------
  |  Branch (547:20): [True: 503k, False: 841]
  |  Branch (547:32): [True: 503k, False: 86]
  ------------------
  548|   503k|                errText[curOutInd++] = *repText++;
  549|    927|        }
  550|      0|         else
  551|      0|        {
  552|       |            // Escape the curly brace character and continue
  553|      0|            errText[curOutInd++] = *pszSrc++;
  554|      0|        }
  555|    927|    }
  556|       |
  557|       |    // Copy over a null terminator
  558|    677|    errText[curOutInd] = 0;
  559|       |
  560|       |    // And return the count of chars we output
  561|    677|    return curOutInd;
  562|    677|}
_ZN11xercesc_3_29XMLString9replicateEPKcPNS_13MemoryManagerE:
  567|  1.36k|{
  568|       |    // If a null string, return a null string
  569|  1.36k|    if (!toRep)
  ------------------
  |  Branch (569:9): [True: 0, False: 1.36k]
  ------------------
  570|      0|        return 0;
  571|       |
  572|       |    //
  573|       |    //  Get the len of the source and allocate a new buffer. Make sure to
  574|       |    //  account for the nul terminator.
  575|       |    //
  576|  1.36k|    const XMLSize_t srcLen = strlen(toRep);
  577|  1.36k|    char* ret = (char*) manager->allocate((srcLen+1) * sizeof(char)); //new char[srcLen+1];
  578|       |
  579|       |    // Copy over the text, adjusting for the size of a char
  580|  1.36k|    memcpy(ret, toRep, (srcLen+1) * sizeof(char));
  581|  1.36k|    return ret;
  582|  1.36k|}
_ZN11xercesc_3_29XMLString9transcodeEPKDsPNS_13MemoryManagerE:
  605|    759|{
  606|    759|    return gTranscoder->transcode(toTranscode, manager);
  607|    759|}
_ZN11xercesc_3_29XMLString9transcodeEPKcPNS_13MemoryManagerE:
  620|  7.27k|{
  621|  7.27k|    return gTranscoder->transcode(toTranscode, manager);
  622|  7.27k|}
_ZN11xercesc_3_29XMLString14isValidEncNameEPKDs:
  743|    442|{
  744|    442|	if (name == 0 || *name == 0)
  ------------------
  |  Branch (744:6): [True: 0, False: 442]
  |  Branch (744:19): [True: 0, False: 442]
  ------------------
  745|      0|        return false;
  746|       |
  747|    442|    const XMLCh* tempName = name;
  748|    442|    XMLCh firstChar = *tempName++;
  749|       |
  750|    442|    if (!isAlpha(firstChar))
  ------------------
  |  Branch (750:9): [True: 2, False: 440]
  ------------------
  751|      2|        return false;
  752|       |
  753|   213k|    while(*tempName)
  ------------------
  |  Branch (753:11): [True: 213k, False: 425]
  ------------------
  754|   213k|    {
  755|   213k|        if (( !isAlpha(*tempName))       &&
  ------------------
  |  Branch (755:13): [True: 17.1k, False: 196k]
  ------------------
  756|   213k|            ( !isDigit(*tempName))       &&
  ------------------
  |  Branch (756:13): [True: 10.9k, False: 6.24k]
  ------------------
  757|   213k|            ( *tempName != chPeriod)     &&
  ------------------
  |  Branch (757:13): [True: 2.16k, False: 8.76k]
  ------------------
  758|   213k|            ( *tempName != chUnderscore) &&
  ------------------
  |  Branch (758:13): [True: 1.42k, False: 740]
  ------------------
  759|   213k|            ( *tempName != chDash)        )
  ------------------
  |  Branch (759:13): [True: 15, False: 1.41k]
  ------------------
  760|     15|            return false;
  761|       |
  762|   213k|        tempName++;
  763|   213k|    }
  764|       |
  765|    425|    return true;
  766|    440|}
_ZN11xercesc_3_29XMLString7isAlphaEDs:
  769|   559k|{
  770|   559k|    if ((( theChar >= chLatin_a ) && ( theChar <= chLatin_z )) ||
  ------------------
  |  Branch (770:10): [True: 430k, False: 128k]
  |  Branch (770:38): [True: 430k, False: 653]
  ------------------
  771|   559k|        (( theChar >= chLatin_A ) && ( theChar <= chLatin_Z )) )
  ------------------
  |  Branch (771:10): [True: 44.0k, False: 85.1k]
  |  Branch (771:38): [True: 41.4k, False: 2.61k]
  ------------------
  772|   471k|        return true;
  773|       |
  774|  87.7k|    return false;
  775|   559k|}
_ZN11xercesc_3_29XMLString7isDigitEDs:
  778|   100k|{
  779|   100k|    if (( theChar >= chDigit_0 ) && ( theChar <= chDigit_9 ))
  ------------------
  |  Branch (779:9): [True: 45.2k, False: 54.8k]
  |  Branch (779:37): [True: 31.8k, False: 13.3k]
  ------------------
  780|  31.8k|        return true;
  781|       |
  782|  68.2k|    return false;
  783|   100k|}
_ZN11xercesc_3_29XMLString10isAlphaNumEDs:
  786|   345k|{
  787|   345k|    return (isAlpha(theChar) || isDigit(theChar));
  ------------------
  |  Branch (787:13): [True: 275k, False: 70.6k]
  |  Branch (787:33): [True: 22.8k, False: 47.7k]
  ------------------
  788|   345k|}
_ZN11xercesc_3_29XMLString5isHexEDs:
  791|  12.3k|{
  792|  12.3k|	return (isDigit(theChar) ||
  ------------------
  |  Branch (792:10): [True: 2.77k, False: 9.55k]
  ------------------
  793|  12.3k|			(theChar >= chLatin_a && theChar <= chLatin_f) ||
  ------------------
  |  Branch (793:5): [True: 5.25k, False: 4.30k]
  |  Branch (793:29): [True: 5.22k, False: 30]
  ------------------
  794|  12.3k|			(theChar >= chLatin_A && theChar <= chLatin_F));
  ------------------
  |  Branch (794:5): [True: 4.28k, False: 48]
  |  Branch (794:29): [True: 4.23k, False: 45]
  ------------------
  795|  12.3k|}
_ZN11xercesc_3_29XMLString9binToTextEmPDsmjPNS_13MemoryManagerE:
  897|    434|{
  898|    434|    static const XMLCh digitList[16] =
  899|    434|    {
  900|    434|            chDigit_0, chDigit_1, chDigit_2, chDigit_3, chDigit_4, chDigit_5
  901|    434|        ,   chDigit_6, chDigit_7, chDigit_8, chDigit_9, chLatin_A, chLatin_B
  902|    434|        ,   chLatin_C, chLatin_D, chLatin_E, chLatin_F
  903|    434|    };
  904|       |
  905|    434|    if (!maxChars)
  ------------------
  |  Branch (905:9): [True: 0, False: 434]
  ------------------
  906|      0|        ThrowXMLwithMemMgr(IllegalArgumentException, XMLExcepts::Str_ZeroSizedTargetBuf, manager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  907|       |
  908|       |    // Handle special case
  909|    434|    if (!toFormat)
  ------------------
  |  Branch (909:9): [True: 42, False: 392]
  ------------------
  910|     42|    {
  911|     42|        toFill[0] = chDigit_0;
  912|     42|        toFill[1] = chNull;
  913|     42|        return;
  914|     42|    }
  915|       |
  916|       |    // This is used to fill the temp buffer
  917|    392|    XMLSize_t tmpIndex = 0;
  918|       |
  919|       |    // A copy of the conversion value that we can modify
  920|    392|    unsigned long tmpVal = toFormat;
  921|       |
  922|       |    //
  923|       |    //  Convert into a temp buffer that we know is large enough. This avoids
  924|       |    //  having to check for overflow in the inner loops, and we have to flip
  925|       |    //  the resulting sring anyway.
  926|       |    //
  927|    392|    XMLCh   tmpBuf[128];
  928|       |
  929|       |    //
  930|       |    //  For each radix, do the optimal thing. For bin and hex, we can special
  931|       |    //  case them and do shift and mask oriented stuff. For oct and decimal
  932|       |    //  there isn't much to do but bull through it with divides.
  933|       |    //
  934|    392|    if (radix == 2)
  ------------------
  |  Branch (934:9): [True: 0, False: 392]
  ------------------
  935|      0|    {
  936|      0|        while (tmpVal)
  ------------------
  |  Branch (936:16): [True: 0, False: 0]
  ------------------
  937|      0|        {
  938|      0|            if (tmpVal & 0x1UL)
  ------------------
  |  Branch (938:17): [True: 0, False: 0]
  ------------------
  939|      0|                tmpBuf[tmpIndex++] = chDigit_1;
  940|      0|            else
  941|      0|                tmpBuf[tmpIndex++] = chDigit_0;
  942|      0|            tmpVal >>= 1;
  943|      0|        }
  944|      0|    }
  945|    392|     else if (radix == 16)
  ------------------
  |  Branch (945:15): [True: 299, False: 93]
  ------------------
  946|    299|    {
  947|    887|        while (tmpVal)
  ------------------
  |  Branch (947:16): [True: 588, False: 299]
  ------------------
  948|    588|        {
  949|    588|            const unsigned long charInd = (tmpVal & 0xFUL);
  950|    588|            tmpBuf[tmpIndex++] = digitList[charInd];
  951|    588|            tmpVal >>= 4;
  952|    588|        }
  953|    299|    }
  954|     93|     else if ((radix == 8) || (radix == 10))
  ------------------
  |  Branch (954:15): [True: 0, False: 93]
  |  Branch (954:31): [True: 93, False: 0]
  ------------------
  955|     93|    {
  956|    777|        while (tmpVal)
  ------------------
  |  Branch (956:16): [True: 684, False: 93]
  ------------------
  957|    684|        {
  958|    684|            const unsigned long charInd = (tmpVal % radix);
  959|    684|            tmpBuf[tmpIndex++] = digitList[charInd];
  960|    684|            tmpVal /= radix;
  961|    684|        }
  962|     93|    }
  963|      0|     else
  964|      0|    {
  965|      0|        ThrowXMLwithMemMgr(RuntimeException, XMLExcepts::Str_UnknownRadix, manager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  966|      0|    }
  967|       |
  968|       |    // See if have enough room in the caller's buffer
  969|    392|    if (tmpIndex > maxChars)
  ------------------
  |  Branch (969:9): [True: 0, False: 392]
  ------------------
  970|      0|    {
  971|      0|        ThrowXMLwithMemMgr(IllegalArgumentException, XMLExcepts::Str_TargetBufTooSmall, manager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  972|      0|    }
  973|       |
  974|       |    // Reverse the tmp buffer into the caller's buffer
  975|    392|    XMLSize_t outIndex = 0;
  976|  1.66k|    for (; tmpIndex > 0; tmpIndex--)
  ------------------
  |  Branch (976:12): [True: 1.27k, False: 392]
  ------------------
  977|  1.27k|        toFill[outIndex++] = tmpBuf[tmpIndex-1];
  978|       |
  979|       |    // And cap off the caller's buffer
  980|    392|    toFill[outIndex] = chNull;
  981|    392|}
_ZN11xercesc_3_29XMLString9binToTextEjPDsmjPNS_13MemoryManagerE:
  988|    126|{
  989|       |    // Just call the unsigned long version
  990|    126|    binToText((unsigned long)toFormat, toFill, maxChars, radix, manager);
  991|    126|}
_ZN11xercesc_3_29XMLString9binToTextElPDsmjPNS_13MemoryManagerE:
  998|    308|{
  999|       |    //
 1000|       |    //  If its negative, then put a negative sign into the output and flip
 1001|       |    //  the sign of the local temp value.
 1002|       |    //
 1003|    308|    XMLSize_t startInd = 0;
 1004|    308|    unsigned long actualVal;
 1005|    308|    if (toFormat < 0)
  ------------------
  |  Branch (1005:9): [True: 0, False: 308]
  ------------------
 1006|      0|    {
 1007|      0|        toFill[0] = chDash;
 1008|      0|        startInd++;
 1009|       |        // Signed integers can represent one extra negative value
 1010|       |        // compared to the positive values. If we simply do (v * -1)
 1011|       |        // we will overflow on that extra value.
 1012|       |        //
 1013|      0|        long v = toFormat;
 1014|      0|        v++;
 1015|      0|        actualVal = (unsigned long)(v * -1);
 1016|      0|        actualVal++;
 1017|      0|    }
 1018|    308|     else
 1019|    308|    {
 1020|    308|        actualVal = (unsigned long)(toFormat);
 1021|    308|    }
 1022|       |
 1023|       |    // And now call the unsigned long version
 1024|    308|    binToText(actualVal, &toFill[startInd], maxChars, radix, manager);
 1025|    308|}
_ZN11xercesc_3_29XMLString9binToTextEiPDsmjPNS_13MemoryManagerE:
 1032|    308|{
 1033|       |    // Just call the long version
 1034|    308|    binToText((long)toFormat, toFill, maxChars, radix, manager);
 1035|    308|}
_ZN11xercesc_3_29XMLString9catStringEPDsPKDs:
 1038|    345|{
 1039|       |    // Get the starting point for the cat on the target XMLString
 1040|    345|    XMLSize_t index = stringLen(target);
 1041|       |
 1042|       |    // While the source is not zero, add them to target and bump
 1043|    345|    const XMLCh* pszTmp = src;
 1044|  1.69k|    while (*pszTmp)
  ------------------
  |  Branch (1044:12): [True: 1.34k, False: 345]
  ------------------
 1045|  1.34k|        target[index++] = *pszTmp++;
 1046|       |
 1047|       |    // Cap off the target where we ended
 1048|    345|    target[index] = chNull;
 1049|    345|}
_ZN11xercesc_3_29XMLString19compareIStringASCIIEPKDsS2_:
 1061|    722|{
 1062|    722|    const XMLCh* psz1 = str1;
 1063|    722|    const XMLCh* psz2 = str2;
 1064|       |
 1065|    722|    if (psz1 == 0 || psz2 == 0) {
  ------------------
  |  Branch (1065:9): [True: 0, False: 722]
  |  Branch (1065:22): [True: 0, False: 722]
  ------------------
 1066|       |
 1067|      0|        if (psz1 == 0) {
  ------------------
  |  Branch (1067:13): [True: 0, False: 0]
  ------------------
 1068|      0|            return 0 - (int)XMLString::stringLen(psz2);
 1069|      0|        }
 1070|      0|		else if (psz2 == 0) {
  ------------------
  |  Branch (1070:12): [True: 0, False: 0]
  ------------------
 1071|      0|            return (int)XMLString::stringLen(psz1);
 1072|      0|        }
 1073|      0|    }
 1074|       |
 1075|    722|    XMLCh ch1;
 1076|    722|    XMLCh ch2;
 1077|       |
 1078|  2.32k|    for (;;) {
 1079|  2.32k|        if (*psz1 >= chLatin_A && *psz1 <= chLatin_Z)
  ------------------
  |  Branch (1079:13): [True: 1.91k, False: 411]
  |  Branch (1079:35): [True: 688, False: 1.22k]
  ------------------
 1080|    688|            ch1 = *psz1 - chLatin_A + chLatin_a;
 1081|  1.63k|        else
 1082|  1.63k|            ch1 = *psz1;
 1083|  2.32k|        if (*psz2 >= chLatin_A && *psz2 <= chLatin_Z)
  ------------------
  |  Branch (1083:13): [True: 1.92k, False: 393]
  |  Branch (1083:35): [True: 1, False: 1.92k]
  ------------------
 1084|      1|            ch2 = *psz2 - chLatin_A + chLatin_a;
 1085|  2.32k|        else
 1086|  2.32k|            ch2 = *psz2;
 1087|       |
 1088|       |        // If an inequality, then return difference
 1089|  2.32k|        if (ch1 != ch2)
  ------------------
  |  Branch (1089:13): [True: 331, False: 1.99k]
  ------------------
 1090|    331|            return int(ch1) - int(ch2);
 1091|       |
 1092|       |        // If either ended, then both ended, so equal
 1093|  1.99k|        if (!ch1)
  ------------------
  |  Branch (1093:13): [True: 391, False: 1.60k]
  ------------------
 1094|    391|            break;
 1095|       |
 1096|       |        // Move upwards to next chars
 1097|  1.60k|        psz1++;
 1098|  1.60k|        psz2++;
 1099|  1.60k|    }
 1100|    391|    return 0;
 1101|    722|}
_ZN11xercesc_3_29XMLString14compareNStringEPKDsS2_m:
 1106|    368|{
 1107|    368|    const XMLCh* psz1 = str1;
 1108|    368|    const XMLCh* psz2 = str2;
 1109|       |
 1110|    368|    XMLSize_t curCount = 0;
 1111|  1.10k|    while (curCount < maxChars)
  ------------------
  |  Branch (1111:12): [True: 736, False: 367]
  ------------------
 1112|    736|    {
 1113|       |        // If an inequality, then return difference
 1114|    736|        if (*psz1 != *psz2)
  ------------------
  |  Branch (1114:13): [True: 1, False: 735]
  ------------------
 1115|      1|            return int(*psz1) - int(*psz2);
 1116|       |
 1117|       |        // If either ended, then both ended, so equal
 1118|    735|        if (!*psz1)
  ------------------
  |  Branch (1118:13): [True: 0, False: 735]
  ------------------
 1119|      0|            break;
 1120|       |
 1121|       |        // Move upwards to next chars
 1122|    735|        psz1++;
 1123|    735|        psz2++;
 1124|       |
 1125|       |        //
 1126|       |        //  Bump the count of chars done.
 1127|       |        //
 1128|    735|        curCount++;
 1129|    735|    }
 1130|       |    // If we inspected all the maxChars, then we are equal.
 1131|    367|    return 0;
 1132|    368|}
_ZN11xercesc_3_29XMLString13compareStringEPKDsS2_:
 1146|  5.23k|{
 1147|  5.23k|    const XMLCh* psz1 = str1;
 1148|  5.23k|    const XMLCh* psz2 = str2;
 1149|       |
 1150|  5.23k|    if (psz1 == 0 || psz2 == 0) {
  ------------------
  |  Branch (1150:9): [True: 0, False: 5.23k]
  |  Branch (1150:22): [True: 0, False: 5.23k]
  ------------------
 1151|       |
 1152|      0|        if (psz1 == 0) {
  ------------------
  |  Branch (1152:13): [True: 0, False: 0]
  ------------------
 1153|      0|            return 0 - (int)XMLString::stringLen(psz2);
 1154|      0|        }
 1155|      0|		else if (psz2 == 0) {
  ------------------
  |  Branch (1155:12): [True: 0, False: 0]
  ------------------
 1156|      0|            return (int)XMLString::stringLen(psz1);
 1157|      0|        }
 1158|      0|    }
 1159|       |
 1160|  5.23k|    for (;;)
 1161|  6.83k|    {
 1162|       |        // If an inequality, then return the difference
 1163|  6.83k|        if (*psz1 != *psz2)
  ------------------
  |  Branch (1163:13): [True: 5.10k, False: 1.72k]
  ------------------
 1164|  5.10k|            return int(*psz1) - int(*psz2);
 1165|       |
 1166|       |        // If either has ended, then they both ended, so equal
 1167|  1.72k|        if (!*psz1)
  ------------------
  |  Branch (1167:13): [True: 128, False: 1.60k]
  ------------------
 1168|    128|            break;
 1169|       |
 1170|       |        // Move upwards for the next round
 1171|  1.60k|        psz1++;
 1172|  1.60k|        psz2++;
 1173|  1.60k|    }
 1174|    128|    return 0;
 1175|  5.23k|}
_ZN11xercesc_3_29XMLString10copyStringEPDsPKDs:
 1209|  5.53M|{
 1210|  5.53M|    if (!src)
  ------------------
  |  Branch (1210:9): [True: 0, False: 5.53M]
  ------------------
 1211|      0|    {
 1212|      0|        *target = 0;
 1213|      0|        return;
 1214|      0|    }
 1215|       |
 1216|  5.53M|    XMLCh* pszOut = target;
 1217|  5.53M|    const XMLCh* pszIn = src;
 1218|  41.8M|    while (*pszIn)
  ------------------
  |  Branch (1218:12): [True: 36.2M, False: 5.53M]
  ------------------
 1219|  36.2M|        *pszOut++ = *pszIn++;
 1220|       |
 1221|       |    // Cap off the target where we ended
 1222|  5.53M|    *pszOut = 0;
 1223|  5.53M|}
_ZN11xercesc_3_29XMLString11copyNStringEPDsPKDsm:
 1229|  6.98k|{
 1230|       |    // Return whether we copied it all or hit the max
 1231|  6.98k|    XMLSize_t len = stringLen(src);
 1232|  6.98k|    if(len > maxChars)
  ------------------
  |  Branch (1232:8): [True: 13, False: 6.97k]
  ------------------
 1233|     13|    {
 1234|     13|        XMLString::moveChars(target, src, maxChars);
 1235|     13|        target[maxChars] = 0;
 1236|     13|        return false;
 1237|     13|    }
 1238|  6.97k|    XMLString::moveChars(target, src, len+1);
 1239|  6.97k|    return true;
 1240|  6.98k|}
_ZN11xercesc_3_29XMLString7findAnyEPDsPKDs:
 1263|  2.54k|{
 1264|  2.54k|    XMLCh* srcPtr = toSearch;
 1265|  42.2M|    while (*srcPtr)
  ------------------
  |  Branch (1265:12): [True: 42.2M, False: 1.25k]
  ------------------
 1266|  42.2M|    {
 1267|  42.2M|        const XMLCh* listPtr = searchList;
 1268|  42.2M|        const XMLCh  curCh = *srcPtr;
 1269|       |
 1270|  88.1M|        while (*listPtr)
  ------------------
  |  Branch (1270:16): [True: 45.9M, False: 42.2M]
  ------------------
 1271|  45.9M|        {
 1272|  45.9M|            if (curCh == *listPtr++)
  ------------------
  |  Branch (1272:17): [True: 1.29k, False: 45.9M]
  ------------------
 1273|  1.29k|                return srcPtr;
 1274|  45.9M|        }
 1275|  42.2M|        srcPtr++;
 1276|  42.2M|    }
 1277|  1.25k|    return 0;
 1278|  2.54k|}
_ZN11xercesc_3_29XMLString7indexOfEPKDsDs:
 1315|  88.1k|{
 1316|  88.1k|    if (!toSearch || !*toSearch) return -1;
  ------------------
  |  Branch (1316:9): [True: 0, False: 88.1k]
  |  Branch (1316:22): [True: 0, False: 88.1k]
  ------------------
 1317|       |
 1318|  88.1k|    const XMLCh* srcPtr = toSearch;
 1319|  22.7M|    while (*srcPtr)
  ------------------
  |  Branch (1319:12): [True: 22.6M, False: 43.1k]
  ------------------
 1320|  22.6M|        if (ch == *srcPtr++)
  ------------------
  |  Branch (1320:13): [True: 45.0k, False: 22.6M]
  ------------------
 1321|  45.0k|            return (int)(srcPtr - toSearch - 1);
 1322|  43.1k|    return -1;
 1323|  88.1k|}
_ZN11xercesc_3_29XMLString7indexOfEPKDsDsmPNS_13MemoryManagerE:
 1330|  23.0k|{
 1331|  23.0k|    const XMLSize_t len = stringLen(toSearch);
 1332|       |
 1333|       |    // Make sure the start index is within the XMLString bounds
 1334|  23.0k|    if (fromIndex >= len) {
  ------------------
  |  Branch (1334:9): [True: 1, False: 23.0k]
  ------------------
 1335|      1|        ThrowXMLwithMemMgr(ArrayIndexOutOfBoundsException, XMLExcepts::Str_StartIndexPastEnd, manager);
  ------------------
  |  |  264|      1|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
 1336|      1|    }
 1337|       |
 1338|  23.0k|    const XMLCh* srcPtr = toSearch+fromIndex;
 1339|  3.43M|    while (*srcPtr)
  ------------------
  |  Branch (1339:12): [True: 3.43M, False: 188]
  ------------------
 1340|  3.43M|        if (ch == *srcPtr++)
  ------------------
  |  Branch (1340:13): [True: 22.8k, False: 3.41M]
  ------------------
 1341|  22.8k|            return (int)(srcPtr - toSearch - 1);
 1342|    188|    return -1;
 1343|  23.0k|}
_ZN11xercesc_3_29XMLString9textToBinEPKDsRjPNS_13MemoryManagerE:
 1407|    230|{
 1408|    230|    toFill = 0;
 1409|       |
 1410|       |    // If no string, then its a failure
 1411|    230|    if ((!toConvert) || (!*toConvert))
  ------------------
  |  Branch (1411:9): [True: 0, False: 230]
  |  Branch (1411:25): [True: 0, False: 230]
  ------------------
 1412|      0|        return false;
 1413|       |
 1414|    230|	XMLCh* trimmedStr = XMLString::replicate(toConvert, manager);
 1415|    230|	ArrayJanitor<XMLCh> jan1(trimmedStr, manager);
 1416|    230|	XMLString::trim(trimmedStr);
 1417|    230|    XMLSize_t trimmedStrLen = XMLString::stringLen(trimmedStr);
 1418|       |
 1419|    230|	if ( !trimmedStrLen )
  ------------------
  |  Branch (1419:7): [True: 8, False: 222]
  ------------------
 1420|      8|		return false;
 1421|       |
 1422|       |	// we don't allow '-' sign
 1423|    222|	if (XMLString::indexOf(trimmedStr, chDash, 0, manager) != -1)
  ------------------
  |  Branch (1423:6): [True: 76, False: 146]
  ------------------
 1424|     76|		return false;
 1425|       |
 1426|       |	//the errno set by previous run is NOT automatically cleared
 1427|    146|	errno = 0;
 1428|       |
 1429|    146|	char *nptr = XMLString::transcode(trimmedStr, manager);
 1430|    146|    ArrayJanitor<char> jan2(nptr, manager);
 1431|       |
 1432|    146|    char *endptr;
 1433|       |	 //
 1434|       |     // REVISIT: conversion of (unsigned long) to (unsigned int)
 1435|       |	 //          may truncate value on IA64
 1436|    146|    toFill = (unsigned int) strtoul(nptr, &endptr, 10);
 1437|       |
 1438|       |	// check if all chars are valid char
 1439|       |	// check if overflow/underflow occurs
 1440|    146|	if ( ( (endptr - nptr) != (int) trimmedStrLen) ||
  ------------------
  |  Branch (1440:7): [True: 50, False: 96]
  ------------------
 1441|    146|         (errno == ERANGE)                      )
  ------------------
  |  Branch (1441:10): [True: 1, False: 95]
  ------------------
 1442|     29|		return false;
 1443|       |
 1444|    117|    return true;
 1445|    146|}
_ZN11xercesc_3_29XMLString8parseIntEPKDsPNS_13MemoryManagerE:
 1449|      4|{
 1450|       |    // If no string, or empty string, then it is a failure
 1451|      4|    if ((!toConvert) || (!*toConvert))
  ------------------
  |  Branch (1451:9): [True: 0, False: 4]
  |  Branch (1451:25): [True: 0, False: 4]
  ------------------
 1452|      0|        ThrowXMLwithMemMgr(NumberFormatException, XMLExcepts::XMLNUM_null_ptr, manager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
 1453|       |
 1454|      4|	XMLCh* trimmedStr = XMLString::replicate(toConvert, manager);
 1455|      4|	ArrayJanitor<XMLCh> jan1(trimmedStr, manager);
 1456|      4|	XMLString::trim(trimmedStr);
 1457|      4|    XMLSize_t trimmedStrLen = XMLString::stringLen(trimmedStr);
 1458|       |
 1459|      4|	if ( !trimmedStrLen )
  ------------------
  |  Branch (1459:7): [True: 0, False: 4]
  ------------------
 1460|      0|        ThrowXMLwithMemMgr(NumberFormatException, XMLExcepts::XMLNUM_null_ptr, manager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
 1461|       |
 1462|       |	//the errno set by previous run is NOT automatically cleared
 1463|      4|	errno = 0;
 1464|       |
 1465|      4|	char *nptr = XMLString::transcode(trimmedStr, manager);
 1466|      4|    ArrayJanitor<char> jan2(nptr, manager);
 1467|       |
 1468|      4|    char *endptr;
 1469|      4|    long retVal = strtol(nptr, &endptr, 10);
 1470|       |
 1471|       |	// check if all chars are valid char
 1472|      4|	if ( (endptr - nptr) != (int) trimmedStrLen)
  ------------------
  |  Branch (1472:7): [True: 0, False: 4]
  ------------------
 1473|      0|		ThrowXMLwithMemMgr(NumberFormatException, XMLExcepts::XMLNUM_Inv_chars, manager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
 1474|       |
 1475|       |	// check if overflow/underflow occurs
 1476|      4|    if (errno == ERANGE)
  ------------------
  |  Branch (1476:9): [True: 0, False: 4]
  ------------------
 1477|      0|        ThrowXMLwithMemMgr(NumberFormatException, XMLExcepts::Str_ConvertOverflow, manager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
 1478|       |
 1479|       |	 //
 1480|       |     // REVISIT: conversion of (long) to (int)
 1481|       |	 //          may truncate value on IA64
 1482|      4|	return (int) retVal;
 1483|      4|}
_ZN11xercesc_3_29XMLString4trimEPDs:
 1487|    234|{
 1488|    234|    const XMLSize_t len = stringLen(toTrim);
 1489|       |
 1490|    234|    XMLSize_t skip, scrape;
 1491|  8.89k|    for (skip = 0; skip < len; skip++)
  ------------------
  |  Branch (1491:20): [True: 8.88k, False: 8]
  ------------------
 1492|  8.88k|    {
 1493|  8.88k|        if (!XMLChar1_0::isWhitespace(toTrim[skip]))
  ------------------
  |  Branch (1493:13): [True: 226, False: 8.66k]
  ------------------
 1494|    226|            break;
 1495|  8.88k|    }
 1496|       |
 1497|  1.39k|    for (scrape = len; scrape > skip; scrape--)
  ------------------
  |  Branch (1497:24): [True: 1.38k, False: 8]
  ------------------
 1498|  1.38k|    {
 1499|  1.38k|        if (!XMLChar1_0::isWhitespace(toTrim[scrape - 1]))
  ------------------
  |  Branch (1499:13): [True: 226, False: 1.15k]
  ------------------
 1500|    226|            break;
 1501|  1.38k|    }
 1502|       |
 1503|       |    // Cap off at the scrap point
 1504|    234|    if (scrape != len)
  ------------------
  |  Branch (1504:9): [True: 61, False: 173]
  ------------------
 1505|     61|        toTrim[scrape] = 0;
 1506|       |
 1507|    234|    if (skip)
  ------------------
  |  Branch (1507:9): [True: 45, False: 189]
  ------------------
 1508|     45|    {
 1509|       |        // Copy the chars down
 1510|     45|        XMLSize_t index = 0;
 1511|   380k|        while (toTrim[skip])
  ------------------
  |  Branch (1511:16): [True: 380k, False: 45]
  ------------------
 1512|   380k|            toTrim[index++] = toTrim[skip++];
 1513|       |
 1514|     45|        toTrim[index] = 0;
 1515|     45|    }
 1516|    234|}
_ZN11xercesc_3_29XMLString14upperCaseASCIIEPDs:
 1526|  7.37k|{
 1527|  7.37k|    XMLCh* psz1 = toUpperCase;
 1528|       |
 1529|  7.37k|    if (!psz1)
  ------------------
  |  Branch (1529:9): [True: 0, False: 7.37k]
  ------------------
 1530|      0|        return;
 1531|       |
 1532|   214k|    while (*psz1) {
  ------------------
  |  Branch (1532:12): [True: 207k, False: 7.37k]
  ------------------
 1533|   207k|        if (*psz1 >= chLatin_a && *psz1 <= chLatin_z)
  ------------------
  |  Branch (1533:13): [True: 130k, False: 77.1k]
  |  Branch (1533:35): [True: 130k, False: 0]
  ------------------
 1534|   130k|            *psz1 = *psz1 - chLatin_a + chLatin_A;
 1535|       |
 1536|   207k|        psz1++;
 1537|   207k|    }
 1538|  7.37k|}
_ZN11xercesc_3_29XMLString9subStringEPDsPKDsmmPNS_13MemoryManagerE:
 1565|      3|{
 1566|      3|    subString(targetStr, srcStr, startIndex, endIndex, stringLen(srcStr), manager);
 1567|      3|}
_ZN11xercesc_3_29XMLString9subStringEPDsPKDsmmmPNS_13MemoryManagerE:
 1573|      3|{
 1574|       |    //if (startIndex < 0 || endIndex < 0)
 1575|       |    //    ThrowXMLwithMemMgr(ArrayIndexOutOfBoundsException, XMLExcepts::Str_NegativeIndex);
 1576|       |
 1577|      3|    if (targetStr == 0)
  ------------------
  |  Branch (1577:9): [True: 0, False: 3]
  ------------------
 1578|      0|        ThrowXMLwithMemMgr(IllegalArgumentException, XMLExcepts::Str_ZeroSizedTargetBuf, manager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
 1579|       |
 1580|       |    // Make sure the start index is within the XMLString bounds
 1581|      3|    if (startIndex > endIndex || endIndex > srcStrLength)
  ------------------
  |  Branch (1581:9): [True: 0, False: 3]
  |  Branch (1581:34): [True: 0, False: 3]
  ------------------
 1582|      0|        ThrowXMLwithMemMgr(ArrayIndexOutOfBoundsException, XMLExcepts::Str_StartIndexPastEnd, manager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
 1583|       |
 1584|      3|    const XMLSize_t copySize = endIndex - startIndex;
 1585|       |
 1586|     46|    for (XMLSize_t i= startIndex; i < endIndex; i++) {
  ------------------
  |  Branch (1586:35): [True: 43, False: 3]
  ------------------
 1587|     43|        targetStr[i-startIndex] = srcStr[i];
 1588|     43|    }
 1589|       |
 1590|      3|    targetStr[copySize] = 0;
 1591|      3|}
_ZN11xercesc_3_29XMLString8isInListEPKDsS2_:
 1695|  12.4k|{
 1696|       |    //
 1697|       |    //  We loop through the values in the list via this outer loop. We end
 1698|       |    //  when we hit the end of the enum list or get a match.
 1699|       |    //
 1700|  12.4k|    const XMLCh* listPtr = enumList;
 1701|  12.4k|    const XMLSize_t findLen = XMLString::stringLen(toFind);
 1702|  46.8k|    while (*listPtr)
  ------------------
  |  Branch (1702:12): [True: 45.5k, False: 1.27k]
  ------------------
 1703|  45.5k|    {
 1704|  45.5k|        XMLSize_t testInd;
 1705|  57.4k|        for (testInd = 0; testInd < findLen; testInd++)
  ------------------
  |  Branch (1705:27): [True: 51.9k, False: 5.55k]
  ------------------
 1706|  51.9k|        {
 1707|       |            //
 1708|       |            //  If they don't match, then reset and try again. Note that
 1709|       |            //  hitting the end of the current item will cause a mismatch
 1710|       |            //  because there can be no spaces in the toFind string.
 1711|       |            //
 1712|  51.9k|            if (listPtr[testInd] != toFind[testInd])
  ------------------
  |  Branch (1712:17): [True: 39.9k, False: 11.9k]
  ------------------
 1713|  39.9k|                break;
 1714|  51.9k|        }
 1715|       |
 1716|       |        //
 1717|       |        //  If we went the distance, see if we matched. If we did, the current
 1718|       |        //  list character has to be null or space.
 1719|       |        //
 1720|  45.5k|        if (testInd == findLen)
  ------------------
  |  Branch (1720:13): [True: 5.55k, False: 39.9k]
  ------------------
 1721|  5.55k|        {
 1722|  5.55k|            if ((listPtr[testInd] == chSpace) || !listPtr[testInd])
  ------------------
  |  Branch (1722:17): [True: 2.62k, False: 2.92k]
  |  Branch (1722:50): [True: 858, False: 2.06k]
  ------------------
 1723|  3.48k|                return true;
 1724|  5.55k|        }
 1725|       |
 1726|       |        // Run the list pointer up to the next substring
 1727|   365k|        while ((*listPtr != chSpace) && *listPtr)
  ------------------
  |  Branch (1727:16): [True: 330k, False: 34.3k]
  |  Branch (1727:41): [True: 323k, False: 7.74k]
  ------------------
 1728|   323k|            listPtr++;
 1729|       |
 1730|       |        // If we hit the end, then we failed
 1731|  42.0k|        if (!*listPtr)
  ------------------
  |  Branch (1731:13): [True: 7.74k, False: 34.3k]
  ------------------
 1732|  7.74k|            return false;
 1733|       |
 1734|       |        // Else move past the space and try again
 1735|  34.3k|        listPtr++;
 1736|  34.3k|    }
 1737|       |
 1738|       |    // We never found it
 1739|  1.27k|    return false;
 1740|  12.4k|}
_ZN11xercesc_3_29XMLString12isWSReplacedEPKDs:
 1749|  10.9M|{
 1750|       |    // If no string, then its a OK
 1751|  10.9M|    if (( !toCheck ) || ( !*toCheck ))
  ------------------
  |  Branch (1751:9): [True: 0, False: 10.9M]
  |  Branch (1751:25): [True: 0, False: 10.9M]
  ------------------
 1752|      0|        return true;
 1753|       |
 1754|  10.9M|    const XMLCh* startPtr = toCheck;
 1755|   455M|    while ( *startPtr )
  ------------------
  |  Branch (1755:13): [True: 444M, False: 10.9M]
  ------------------
 1756|   444M|    {
 1757|   444M|        if ( ( *startPtr == chCR) ||
  ------------------
  |  Branch (1757:14): [True: 117, False: 444M]
  ------------------
 1758|   444M|             ( *startPtr == chLF) ||
  ------------------
  |  Branch (1758:14): [True: 1.06k, False: 444M]
  ------------------
 1759|   444M|             ( *startPtr == chHTab))
  ------------------
  |  Branch (1759:14): [True: 1.19k, False: 444M]
  ------------------
 1760|  2.38k|        return false;
 1761|       |
 1762|   444M|        startPtr++;
 1763|   444M|    }
 1764|       |
 1765|  10.9M|    return true;
 1766|  10.9M|}
_ZN11xercesc_3_29XMLString9replaceWSEPDsPNS_13MemoryManagerE:
 1775|  2.38k|{
 1776|       |    // If no string, then its a OK
 1777|  2.38k|    if (( !toConvert ) || ( !*toConvert ))
  ------------------
  |  Branch (1777:9): [True: 0, False: 2.38k]
  |  Branch (1777:27): [True: 0, False: 2.38k]
  ------------------
 1778|      0|        return;
 1779|       |
 1780|  2.38k|    XMLCh* cursorPtr = toConvert;
 1781|  54.6k|    while ( *cursorPtr )
  ------------------
  |  Branch (1781:13): [True: 52.2k, False: 2.38k]
  ------------------
 1782|  52.2k|    {
 1783|  52.2k|        if ( ( *cursorPtr == chCR) ||
  ------------------
  |  Branch (1783:14): [True: 620, False: 51.6k]
  ------------------
 1784|  52.2k|             ( *cursorPtr == chLF) ||
  ------------------
  |  Branch (1784:14): [True: 1.24k, False: 50.3k]
  ------------------
 1785|  52.2k|             ( *cursorPtr == chHTab))
  ------------------
  |  Branch (1785:14): [True: 2.95k, False: 47.4k]
  ------------------
 1786|  4.82k|            *cursorPtr = chSpace;
 1787|       |
 1788|  52.2k|        cursorPtr++;
 1789|  52.2k|    }
 1790|  2.38k|}
_ZN11xercesc_3_29XMLString13isWSCollapsedEPKDs:
 1800|  5.45M|{
 1801|  5.45M|    if (( !toCheck ) || ( !*toCheck ))
  ------------------
  |  Branch (1801:9): [True: 0, False: 5.45M]
  |  Branch (1801:25): [True: 0, False: 5.45M]
  ------------------
 1802|      0|        return true;
 1803|       |
 1804|       |    // shall be whitespace::replaced first
 1805|  5.45M|    if ( !isWSReplaced(toCheck) )
  ------------------
  |  Branch (1805:10): [True: 0, False: 5.45M]
  ------------------
 1806|      0|        return false;
 1807|       |
 1808|       |    // no leading or trailing space
 1809|  5.45M|    if ((*toCheck == chSpace) ||
  ------------------
  |  Branch (1809:9): [True: 0, False: 5.45M]
  ------------------
 1810|  5.45M|        (toCheck[XMLString::stringLen(toCheck)-1] == chSpace))
  ------------------
  |  Branch (1810:9): [True: 0, False: 5.45M]
  ------------------
 1811|      0|        return false;
 1812|       |
 1813|  5.45M|    const XMLCh* startPtr = toCheck;
 1814|  5.45M|    XMLCh theChar;
 1815|  5.45M|    bool  inSpace = false;
 1816|   227M|    while ( (theChar = *startPtr) != 0 )
  ------------------
  |  Branch (1816:13): [True: 222M, False: 5.45M]
  ------------------
 1817|   222M|    {
 1818|   222M|        if ( theChar == chSpace)
  ------------------
  |  Branch (1818:14): [True: 2.12M, False: 220M]
  ------------------
 1819|  2.12M|        {
 1820|  2.12M|            if (inSpace)
  ------------------
  |  Branch (1820:17): [True: 383, False: 2.12M]
  ------------------
 1821|    383|                return false;
 1822|  2.12M|            else
 1823|  2.12M|                inSpace = true;
 1824|  2.12M|        }
 1825|   220M|        else
 1826|   220M|            inSpace = false;
 1827|       |
 1828|   222M|        startPtr++;
 1829|       |
 1830|   222M|    }
 1831|       |
 1832|  5.45M|    return true;
 1833|  5.45M|}
_ZN11xercesc_3_29XMLString10collapseWSEPDsPNS_13MemoryManagerE:
 1841|  5.45M|{
 1842|       |    // If no string, then its a failure
 1843|  5.45M|    if (( !toConvert ) || ( !*toConvert ))
  ------------------
  |  Branch (1843:9): [True: 0, False: 5.45M]
  |  Branch (1843:27): [True: 0, False: 5.45M]
  ------------------
 1844|      0|        return;
 1845|       |
 1846|       |    // replace whitespace first
 1847|  5.45M|    if(!isWSReplaced(toConvert))
  ------------------
  |  Branch (1847:8): [True: 2.38k, False: 5.45M]
  ------------------
 1848|  2.38k|        replaceWS(toConvert, manager);
 1849|       |
 1850|       |    // remove leading spaces
 1851|  5.45M|    XMLCh* startPtr = toConvert;
 1852|  5.45M|    while ( *startPtr == chSpace )
  ------------------
  |  Branch (1852:13): [True: 2.56k, False: 5.45M]
  ------------------
 1853|  2.56k|        startPtr++;
 1854|       |
 1855|  5.45M|    if (!*startPtr)
  ------------------
  |  Branch (1855:9): [True: 1.23k, False: 5.45M]
  ------------------
 1856|  1.23k|    {
 1857|  1.23k|        *toConvert = chNull;
 1858|  1.23k|        return;
 1859|  1.23k|    }
 1860|       |
 1861|       |    // remove trailing spaces
 1862|  5.45M|    XMLCh* endPtr = toConvert + stringLen(toConvert);
 1863|  5.45M|    while (*(endPtr - 1) == chSpace)
  ------------------
  |  Branch (1863:12): [True: 716, False: 5.45M]
  ------------------
 1864|    716|        endPtr--;
 1865|  5.45M|    *endPtr = chNull;
 1866|       |
 1867|       |    // move data to beginning only if there were spaces in front
 1868|  5.45M|    if(startPtr != toConvert)
  ------------------
  |  Branch (1868:8): [True: 818, False: 5.45M]
  ------------------
 1869|    818|        XMLString::moveChars(toConvert, startPtr, endPtr - startPtr + 1);
 1870|       |
 1871|  5.45M|    if(!isWSCollapsed(toConvert))
  ------------------
  |  Branch (1871:8): [True: 383, False: 5.45M]
  ------------------
 1872|    383|    {
 1873|       |        //
 1874|       |        //  Work through what remains and chop continuous spaces
 1875|       |        //
 1876|    383|        XMLCh* retPtr = toConvert;
 1877|    383|        startPtr = toConvert;
 1878|    383|        bool inSpace = false;
 1879|  36.3k|        while (*startPtr)
  ------------------
  |  Branch (1879:16): [True: 36.0k, False: 383]
  ------------------
 1880|  36.0k|        {
 1881|  36.0k|            if ( *startPtr == chSpace)
  ------------------
  |  Branch (1881:18): [True: 5.10k, False: 30.9k]
  ------------------
 1882|  5.10k|            {
 1883|       |                // copy a single space, then ignore subsequent
 1884|  5.10k|                if (!inSpace)
  ------------------
  |  Branch (1884:21): [True: 1.81k, False: 3.28k]
  ------------------
 1885|  1.81k|                {
 1886|  1.81k|                    inSpace = true;
 1887|  1.81k|                    *retPtr++ = chSpace;
 1888|  1.81k|                }
 1889|  5.10k|            }
 1890|  30.9k|            else
 1891|  30.9k|            {
 1892|  30.9k|                inSpace = false;
 1893|  30.9k|                *retPtr++ = *startPtr;
 1894|  30.9k|            }
 1895|       |
 1896|  36.0k|            startPtr++;
 1897|  36.0k|        }
 1898|       |
 1899|    383|        *retPtr = chNull;
 1900|    383|    }
 1901|  5.45M|}
_ZN11xercesc_3_29XMLString10removeCharEPKDsRS1_RNS_9XMLBufferE:
 1934|    685|{
 1935|    685|    if(!srcString) return;
  ------------------
  |  Branch (1935:8): [True: 1, False: 684]
  ------------------
 1936|    684|    const XMLCh* pszSrc = srcString;
 1937|    684|    XMLCh c;
 1938|       |
 1939|    684|    dstBuffer.reset();
 1940|       |
 1941|  27.3M|    while ((c=*pszSrc++)!=0)
  ------------------
  |  Branch (1941:12): [True: 27.3M, False: 684]
  ------------------
 1942|  27.3M|    {
 1943|  27.3M|        if (c != toRemove)
  ------------------
  |  Branch (1943:13): [True: 27.3M, False: 268]
  ------------------
 1944|  27.3M|            dstBuffer.append(c);
 1945|  27.3M|    }
 1946|    684|}
_ZN11xercesc_3_29XMLString10initStringEPNS_16XMLLCPTranscoderEPNS_13MemoryManagerE:
 2030|      1|{
 2031|       |    // Store away the default transcoder that we are to use
 2032|      1|    gTranscoder = defToUse;
 2033|       |
 2034|       |    // Store memory manager
 2035|      1|    fgMemoryManager = manager;
 2036|      1|}

_ZN11xercesc_3_29XMLString9moveCharsEPDsPKDsm:
 1456|  34.3M|{
 1457|  34.3M|    memmove(targetStr, srcStr, count * sizeof(XMLCh));
 1458|  34.3M|}
_ZN11xercesc_3_29XMLString9stringLenEPKDs:
 1461|  56.0M|{
 1462|  56.0M|    if (src == 0)
  ------------------
  |  Branch (1462:9): [True: 1.42k, False: 56.0M]
  ------------------
 1463|  1.42k|        return 0;
 1464|       |
 1465|  56.0M|    const XMLCh* pszTmp = src;
 1466|       |
 1467|  5.36G|    while (*pszTmp++) ;
  ------------------
  |  Branch (1467:12): [True: 5.31G, False: 56.0M]
  ------------------
 1468|       |
 1469|  56.0M|    return (pszTmp - src - 1);
 1470|  56.0M|}
_ZN11xercesc_3_29XMLString9replicateEPKDsPNS_13MemoryManagerE:
 1474|  1.67M|{
 1475|       |    // If a null string, return a null string!
 1476|  1.67M|    XMLCh* ret = 0;
 1477|  1.67M|    if (toRep)
  ------------------
  |  Branch (1477:9): [True: 1.29M, False: 382k]
  ------------------
 1478|  1.29M|    {
 1479|  1.29M|        const XMLSize_t len = stringLen(toRep);
 1480|  1.29M|        ret = (XMLCh*) manager->allocate((len+1) * sizeof(XMLCh)); //new XMLCh[len + 1];
 1481|  1.29M|        memcpy(ret, toRep, (len + 1) * sizeof(XMLCh));
 1482|  1.29M|    }
 1483|  1.67M|    return ret;
 1484|  1.67M|}
_ZN11xercesc_3_29XMLString10startsWithEPKDsS2_:
 1488|    368|{
 1489|    368|    return (compareNString(toTest, prefix, stringLen(prefix)) == 0);
 1490|    368|}
_ZN11xercesc_3_29XMLString6equalsEPKDsS2_:
 1525|   118M|{
 1526|   118M|    if (str1 == str2)
  ------------------
  |  Branch (1526:9): [True: 2.21k, False: 118M]
  ------------------
 1527|  2.21k|        return true;
 1528|       |
 1529|   118M|    if (str1 == 0 || str2 == 0)
  ------------------
  |  Branch (1529:9): [True: 3, False: 118M]
  |  Branch (1529:22): [True: 0, False: 118M]
  ------------------
 1530|      3|        return ((!str1 || !*str1) && (!str2 || !*str2));
  ------------------
  |  Branch (1530:18): [True: 3, False: 0]
  |  Branch (1530:27): [True: 0, False: 0]
  |  Branch (1530:39): [True: 0, False: 3]
  |  Branch (1530:48): [True: 0, False: 3]
  ------------------
 1531|       |
 1532|   202M|    while (*str1)
  ------------------
  |  Branch (1532:12): [True: 149M, False: 52.6M]
  ------------------
 1533|   149M|        if(*str1++ != *str2++)  // they are different (or str2 is shorter and we hit the NULL)
  ------------------
  |  Branch (1533:12): [True: 65.6M, False: 84.3M]
  ------------------
 1534|  65.6M|            return false;
 1535|       |
 1536|       |    // either both ended (and *str2 is 0 too), or str2 is longer
 1537|  52.6M|    return (*str2==0);
 1538|   118M|}
_ZN11xercesc_3_29XMLString4hashEPKDsm:
 1598|  39.9M|{
 1599|  39.9M|    if (tohash == 0 || *tohash == 0)
  ------------------
  |  Branch (1599:9): [True: 0, False: 39.9M]
  |  Branch (1599:24): [True: 29.7k, False: 39.9M]
  ------------------
 1600|  29.7k|        return 0;
 1601|       |
 1602|  39.9M|    const XMLCh* curCh = tohash;
 1603|  39.9M|    XMLSize_t hashVal = (XMLSize_t)(*curCh++);
 1604|       |
 1605|  98.8M|    while (*curCh)
  ------------------
  |  Branch (1605:12): [True: 58.8M, False: 39.9M]
  ------------------
 1606|  58.8M|        hashVal = (hashVal * 38) + (hashVal >> 24) + (XMLSize_t)(*curCh++);
 1607|       |
 1608|       |    // Divide by modulus
 1609|  39.9M|    return hashVal % hashModulus;
 1610|  39.9M|}

_ZN11xercesc_3_218XMLStringTokenizerC2EPKDsPNS_13MemoryManagerE:
   48|      1|    : fOffset(0)
   49|      1|    , fStringLen(XMLString::stringLen(srcStr))
   50|      1|    , fString(XMLString::replicate(srcStr, manager))
   51|      1|    , fDelimeters(fgDelimeters)
   52|      1|    , fTokens(0)
   53|      1|    , fMemoryManager(manager)
   54|      1|{
   55|      1|    CleanupType cleanup(this, &XMLStringTokenizer::cleanUp);
   56|       |
   57|      1|	try {
   58|      1|        if (fStringLen > 0) {
  ------------------
  |  Branch (58:13): [True: 1, False: 0]
  ------------------
   59|      1|            fTokens = new (fMemoryManager) RefArrayVectorOf<XMLCh>(4, true, fMemoryManager);
   60|      1|        }
   61|      1|    }
   62|      1|    catch(const OutOfMemoryException&)
   63|      1|    {
   64|      0|        cleanup.release();
   65|       |
   66|      0|        throw;
   67|      0|    }
   68|       |
   69|      1|    cleanup.release();
   70|      1|}
_ZN11xercesc_3_218XMLStringTokenizerD2Ev:
  100|      1|{
  101|      1|	cleanUp();
  102|      1|}
_ZN11xercesc_3_218XMLStringTokenizer7cleanUpEv:
  107|      1|void XMLStringTokenizer::cleanUp() {
  108|       |
  109|      1|	fMemoryManager->deallocate(fString);//delete [] fString;
  110|      1|    if (fDelimeters != fgDelimeters) {
  ------------------
  |  Branch (110:9): [True: 0, False: 1]
  ------------------
  111|      0|        fMemoryManager->deallocate((void*)fDelimeters);//delete [] fDelimeters;
  112|      0|    }
  113|      1|    delete fTokens;
  114|      1|}
_ZN11xercesc_3_218XMLStringTokenizer9nextTokenEv:
  120|      2|XMLCh* XMLStringTokenizer::nextToken() {
  121|       |
  122|      2|    if (fOffset >= fStringLen) {
  ------------------
  |  Branch (122:9): [True: 1, False: 1]
  ------------------
  123|      1|        return 0;
  124|      1|    }
  125|       |
  126|      1|    bool tokFound = false;
  127|      1|    XMLSize_t startIndex = fOffset;
  128|      1|    XMLSize_t endIndex = fOffset;
  129|       |
  130|      5|    for (; endIndex < fStringLen; endIndex++) {
  ------------------
  |  Branch (130:12): [True: 4, False: 1]
  ------------------
  131|       |
  132|      4|        if (isDelimeter(fString[endIndex])) {
  ------------------
  |  Branch (132:13): [True: 0, False: 4]
  ------------------
  133|       |
  134|      0|			if (tokFound) {
  ------------------
  |  Branch (134:8): [True: 0, False: 0]
  ------------------
  135|      0|                break;
  136|      0|            }
  137|       |
  138|      0|			startIndex++;
  139|      0|			continue;
  140|      0|        }
  141|       |
  142|      4|        tokFound = true;
  143|      4|    }
  144|       |
  145|      1|    fOffset = endIndex;
  146|       |
  147|      1|    if (tokFound) {
  ------------------
  |  Branch (147:9): [True: 1, False: 0]
  ------------------
  148|       |
  149|      1|        XMLCh* tokStr = (XMLCh*) fMemoryManager->allocate
  150|      1|        (
  151|      1|            (endIndex - startIndex + 1) * sizeof(XMLCh)
  152|      1|        );//new XMLCh[(endIndex - startIndex) + 1];
  153|       |
  154|      1|        XMLString::subString(tokStr, fString, startIndex, endIndex, fMemoryManager);
  155|      1|        fTokens->addElement(tokStr);
  156|       |
  157|      1|        return tokStr;
  158|      1|	}
  159|       |
  160|      0|    return 0;
  161|      1|}
_ZN11xercesc_3_218XMLStringTokenizer13hasMoreTokensEv:
  164|      2|bool XMLStringTokenizer::hasMoreTokens() {
  165|       |
  166|      2|    if (countTokens() > 0)
  ------------------
  |  Branch (166:9): [True: 1, False: 1]
  ------------------
  167|      1|        return true;
  168|       |
  169|      1|	return false;
  170|      2|}

_ZN11xercesc_3_218XMLStringTokenizer11isDelimeterEDs:
  172|      8|inline bool XMLStringTokenizer::isDelimeter(const XMLCh ch) {
  173|       |
  174|      8|    return XMLString::indexOf(fDelimeters, ch) == -1 ? false : true;
  ------------------
  |  Branch (174:12): [True: 8, False: 0]
  ------------------
  175|      8|}
_ZN11xercesc_3_218XMLStringTokenizer11countTokensEv:
  181|      2|inline unsigned int XMLStringTokenizer::countTokens() {
  182|       |
  183|      2|    if (fStringLen == 0)
  ------------------
  |  Branch (183:9): [True: 0, False: 2]
  ------------------
  184|      0|		return 0;
  185|       |
  186|      2|    unsigned int tokCount = 0;
  187|      2|    bool inToken = false;
  188|       |
  189|      6|    for (XMLSize_t i= fOffset; i< fStringLen; i++) {
  ------------------
  |  Branch (189:32): [True: 4, False: 2]
  ------------------
  190|       |
  191|      4|        if (isDelimeter(fString[i])) {
  ------------------
  |  Branch (191:13): [True: 0, False: 4]
  ------------------
  192|       |
  193|      0|            if (inToken) {
  ------------------
  |  Branch (193:17): [True: 0, False: 0]
  ------------------
  194|      0|                inToken = false;
  195|      0|            }
  196|       |
  197|      0|            continue;
  198|      0|        }
  199|       |
  200|      4|		if (!inToken) {
  ------------------
  |  Branch (200:7): [True: 1, False: 3]
  ------------------
  201|       |
  202|      1|            tokCount++;
  203|      1|            inToken = true;
  204|      1|        }
  205|       |
  206|      4|    } // end for
  207|       |
  208|      2|    return tokCount;
  209|      2|}

_ZN11xercesc_3_217XMLUCS4TranscoderC2EPKDsmbPNS_13MemoryManagerE:
   37|     50|    XMLTranscoder(encodingName, blockSize, manager)
   38|     50|    , fSwapped(swapped)
   39|     50|{
   40|     50|}
_ZN11xercesc_3_217XMLUCS4TranscoderD2Ev:
   44|     50|{
   45|     50|}
_ZN11xercesc_3_217XMLUCS4Transcoder13transcodeFromEPKhmPDsmRmPh:
   58|    395|{
   59|       |    //
   60|       |    //  Get pointers to the start and end of the source buffer in terms of
   61|       |    //  UCS-4 characters.
   62|       |    //
   63|    395|    const UCS4Ch*   srcPtr = reinterpret_cast<const UCS4Ch*>(srcData);
   64|    395|    const UCS4Ch*   srcEnd = srcPtr + (srcCount / sizeof(UCS4Ch));
   65|       |
   66|       |    //
   67|       |    //  Get pointers to the start and end of the target buffer, which is
   68|       |    //  in terms of the XMLCh chars we output.
   69|       |    //
   70|    395|    XMLCh*  outPtr = toFill;
   71|    395|    XMLCh*  outEnd = toFill + maxChars;
   72|       |
   73|       |    //
   74|       |    //  And get a pointer into the char sizes buffer. We will run this
   75|       |    //  up as we put chars into the output buffer.
   76|       |    //
   77|    395|    unsigned char* sizePtr = charSizes;
   78|       |
   79|       |    //
   80|       |    //  Now process chars until we either use up all our source or all of
   81|       |    //  our output space.
   82|       |    //
   83|  2.11M|    while ((outPtr < outEnd) && (srcPtr < srcEnd))
  ------------------
  |  Branch (83:12): [True: 2.11M, False: 111]
  |  Branch (83:33): [True: 2.11M, False: 223]
  ------------------
   84|  2.11M|    {
   85|       |        //
   86|       |        //  Get the next UCS char out of the buffer. Don't bump the ptr
   87|       |        //  yet since we might not have enough storage for it in the target
   88|       |        //  (if its causes a surrogate pair to be created.
   89|       |        //
   90|  2.11M|        UCS4Ch nextVal = *srcPtr;
   91|       |
   92|       |        // If it needs to be swapped, then do it
   93|  2.11M|        if (fSwapped)
  ------------------
  |  Branch (93:13): [True: 1.18M, False: 921k]
  ------------------
   94|  1.18M|            nextVal = BitOps::swapBytes(nextVal);
   95|       |
   96|       |        // Handle a surrogate pair if needed
   97|  2.11M|        if (nextVal & 0xFFFF0000)
  ------------------
  |  Branch (97:13): [True: 2.10M, False: 1.04k]
  ------------------
   98|  2.10M|        {
   99|       |            //
  100|       |            //  If we don't have room for both of the chars, then we
  101|       |            //  bail out now.
  102|       |            //
  103|  2.10M|            if (outPtr + 1 == outEnd)
  ------------------
  |  Branch (103:17): [True: 61, False: 2.10M]
  ------------------
  104|     61|                break;
  105|       |
  106|  2.10M|            const XMLInt32 LEAD_OFFSET = 0xD800 - (0x10000 >> 10);
  107|  2.10M|	        const XMLCh ch1 = XMLCh(LEAD_OFFSET + (nextVal >> 10));
  108|  2.10M|	        const XMLCh ch2 = XMLCh(0xDC00 + (nextVal & 0x3FF));
  109|       |
  110|       |            //
  111|       |            //  We have room so store them both. But note that the
  112|       |            //  second one took up no source bytes!
  113|       |            //
  114|  2.10M|            *sizePtr++ = sizeof(UCS4Ch);
  115|  2.10M|            *outPtr++ = ch1;
  116|  2.10M|            *sizePtr++ = 0;
  117|  2.10M|            *outPtr++ = ch2;
  118|  2.10M|        }
  119|  1.04k|         else
  120|  1.04k|        {
  121|       |            //
  122|       |            //  No surrogate, so just store it and bump the count of chars
  123|       |            //  read. Update the char sizes buffer for this char's entry.
  124|       |            //
  125|  1.04k|            *sizePtr++ = sizeof(UCS4Ch);
  126|  1.04k|            *outPtr++ = XMLCh(nextVal);
  127|  1.04k|        }
  128|       |
  129|       |        // Indicate that we ate another UCS char's worth of bytes
  130|  2.11M|        srcPtr++;
  131|  2.11M|    }
  132|       |
  133|       |    // Set the bytes eaten parameter
  134|    395|    bytesEaten = ((const XMLByte*)srcPtr) - srcData;
  135|       |
  136|       |    // And return the chars written into the output buffer
  137|    395|    return outPtr - toFill;
  138|    395|}

_ZN11xercesc_3_26XMLURL12lookupByNameEPKDs:
  145|    417|{
  146|    741|    for (unsigned int index = 0; index < XMLURL::Protocols_Count; index++)
  ------------------
  |  Branch (146:34): [True: 714, False: 27]
  ------------------
  147|    714|    {
  148|    714|        if (!XMLString::compareIStringASCII(protoName, gProtoList[index].prefix))
  ------------------
  |  Branch (148:13): [True: 390, False: 324]
  ------------------
  149|    390|            return gProtoList[index].protocol;
  150|    714|    }
  151|     27|    return XMLURL::Unknown;
  152|    417|}
_ZN11xercesc_3_26XMLURLC2EPNS_13MemoryManagerE:
  161|    856|    fMemoryManager(manager)
  162|    856|    , fFragment(0)
  163|    856|    , fHost(0)
  164|    856|    , fPassword(0)
  165|    856|    , fPath(0)
  166|    856|    , fPortNum(0)
  167|    856|    , fProtocol(XMLURL::Unknown)
  168|    856|    , fQuery(0)
  169|    856|    , fUser(0)
  170|    856|    , fURLText(0)
  171|    856|    , fHasInvalidChar(false)
  172|    856|{
  173|    856|}
_ZN11xercesc_3_26XMLURLC2ERKS0_:
  372|    443|    XMemory(toCopy)
  373|    443|    , fMemoryManager(toCopy.fMemoryManager)
  374|    443|    , fFragment(0)
  375|    443|    , fHost(0)
  376|    443|    , fPassword(0)
  377|    443|    , fPath(0)
  378|    443|    , fPortNum(toCopy.fPortNum)
  379|    443|    , fProtocol(toCopy.fProtocol)
  380|    443|    , fQuery(0)
  381|    443|    , fUser(0)
  382|    443|    , fURLText(0)
  383|    443|    , fHasInvalidChar(toCopy.fHasInvalidChar)
  384|    443|{
  385|    443|    CleanupType cleanup(this, &XMLURL::cleanUp);
  386|       |
  387|    443|    try
  388|    443|    {
  389|    443|        fFragment = XMLString::replicate(toCopy.fFragment, fMemoryManager);
  390|    443|        fHost = XMLString::replicate(toCopy.fHost, fMemoryManager);
  391|    443|        fPassword = XMLString::replicate(toCopy.fPassword, fMemoryManager);
  392|    443|        fPath = XMLString::replicate(toCopy.fPath, fMemoryManager);
  393|    443|        fQuery = XMLString::replicate(toCopy.fQuery, fMemoryManager);
  394|    443|        fUser = XMLString::replicate(toCopy.fUser, fMemoryManager);
  395|    443|        fURLText = XMLString::replicate(toCopy.fURLText, fMemoryManager);
  396|    443|    }
  397|    443|    catch(const OutOfMemoryException&)
  398|    443|    {
  399|      0|        cleanup.release();
  400|       |
  401|      0|        throw;
  402|      0|    }
  403|       |
  404|    443|    cleanup.release();
  405|    443|}
_ZN11xercesc_3_26XMLURLD2Ev:
  408|  1.29k|{
  409|  1.29k|    cleanUp();
  410|  1.29k|}
_ZNK11xercesc_3_26XMLURL10getPortNumEv:
  459|     98|{
  460|       |    //
  461|       |    //  If it was not provided explicitly, then lets return the default one
  462|       |    //  for the protocol.
  463|       |    //
  464|     98|    if (!fPortNum)
  ------------------
  |  Branch (464:9): [True: 25, False: 73]
  ------------------
  465|     25|    {
  466|     25|        if (fProtocol == Unknown)
  ------------------
  |  Branch (466:13): [True: 0, False: 25]
  ------------------
  467|      0|            return 0;
  468|     25|        return gProtoList[fProtocol].defPort;
  469|     25|    }
  470|     73|    return fPortNum;
  471|     98|}
_ZNK11xercesc_3_26XMLURL15getProtocolNameEv:
  475|    345|{
  476|       |    // Check to see if its ever been set
  477|    345|    if (fProtocol == Unknown)
  ------------------
  |  Branch (477:9): [True: 0, False: 345]
  ------------------
  478|      0|        ThrowXMLwithMemMgr(MalformedURLException, XMLExcepts::URL_NoProtocolPresent, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  479|       |
  480|    345|    return gProtoList[fProtocol].prefix;
  481|    345|}
_ZN11xercesc_3_26XMLURL6setURLEPKDsS2_RS0_:
  528|    685|{
  529|    685|    cleanUp();
  530|       |
  531|       |    // Parse our URL string
  532|    685|    if (parse(relativeURL, xmlURL))
  ------------------
  |  Branch (532:9): [True: 516, False: 169]
  ------------------
  533|    516|    {
  534|       |	    //  If its relative and the base is non-null and non-empty, then
  535|       |	    //  parse the base URL string and conglomerate them.
  536|       |	    //
  537|    516|	    if (isRelative() && baseURL && *baseURL)
  ------------------
  |  Branch (537:10): [True: 171, False: 345]
  |  Branch (537:26): [True: 171, False: 0]
  |  Branch (537:37): [True: 171, False: 0]
  ------------------
  538|    171|	    {
  539|    171|	        XMLURL basePart(fMemoryManager);
  540|    171|            if (parse(baseURL, basePart)  && conglomerateWithBase(basePart, false))
  ------------------
  |  Branch (540:17): [True: 171, False: 0]
  |  Branch (540:46): [True: 0, False: 171]
  ------------------
  541|      0|            {
  542|      0|		        return true;
  543|      0|		    }
  544|    171|	    }
  545|    345|        else
  546|    345|            return true;
  547|    516|    }
  548|    340|    return false;
  549|    685|}
_ZNK11xercesc_3_26XMLURL10isRelativeEv:
  569|  1.03k|{
  570|       |    // If no protocol then relative
  571|  1.03k|    if (fProtocol == Unknown)
  ------------------
  |  Branch (571:9): [True: 341, False: 691]
  ------------------
  572|    341|        return true;
  573|       |
  574|       |    // If no path, or the path is not absolute, then relative
  575|    691|    if (!fPath)
  ------------------
  |  Branch (575:9): [True: 0, False: 691]
  ------------------
  576|      0|        return true;
  577|       |
  578|    691|    if (*fPath != chForwardSlash)
  ------------------
  |  Branch (578:9): [True: 1, False: 690]
  ------------------
  579|      1|        return true;
  580|       |
  581|    690|    return false;
  582|    691|}
_ZNK11xercesc_3_26XMLURL13makeNewStreamEv:
  591|    345|{
  592|       |    //
  593|       |    //  If its a local host, then we short circuit it and use our own file
  594|       |    //  stream support. Otherwise, we just let it fall through and let the
  595|       |    //  installed network access object provide a stream.
  596|       |    //
  597|    345|    if (fProtocol == XMLURL::File)
  ------------------
  |  Branch (597:9): [True: 209, False: 136]
  ------------------
  598|    209|    {
  599|    209|        if (!fHost || !XMLString::compareIStringASCII(fHost, XMLUni::fgLocalHostString))
  ------------------
  |  Branch (599:13): [True: 203, False: 6]
  |  Branch (599:23): [True: 0, False: 6]
  ------------------
  600|    203|        {
  601|       |
  602|    203|            XMLCh* realPath = XMLString::replicate(fPath, fMemoryManager);
  603|    203|            ArrayJanitor<XMLCh> basePathName(realPath, fMemoryManager);
  604|       |
  605|       |            //
  606|       |            // Need to manually replace any character reference %xx first
  607|       |            // HTTP protocol will be done automatically by the netaccessor
  608|       |            //
  609|    203|            XMLSize_t end = XMLString::stringLen(realPath);
  610|    203|            int percentIndex = XMLString::indexOf(realPath, chPercent, 0, fMemoryManager);
  611|       |
  612|  22.8k|            while (percentIndex != -1) {
  ------------------
  |  Branch (612:20): [True: 22.7k, False: 56]
  ------------------
  613|       |
  614|       |            	// Isolate the length/boundary check so we don't try and copy off the end.
  615|  22.7k|                if (percentIndex+2 >= (int)end)
  ------------------
  |  Branch (615:21): [True: 51, False: 22.7k]
  ------------------
  616|     51|                {
  617|     51|                    XMLCh value1[3];
  618|     51|                    value1[1] = chNull;
  619|     51|                    value1[2] = chNull;
  620|     51|					XMLString::moveChars(value1, &(realPath[percentIndex]), (percentIndex + 1 >= (int)end ? 1 : 2));
  ------------------
  |  Branch (620:63): [True: 46, False: 5]
  ------------------
  621|     51|                    ThrowXMLwithMemMgr2(MalformedURLException
  ------------------
  |  |  268|     51|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  ------------------
  622|     51|                            , XMLExcepts::XMLNUM_URI_Component_Invalid_EscapeSequence
  623|     51|                            , realPath
  624|     51|                            , value1
  625|     51|                            , fMemoryManager);
  626|     51|                }
  627|  22.7k|                else if (!isHexDigit(realPath[percentIndex+1]) || !isHexDigit(realPath[percentIndex+2]))
  ------------------
  |  Branch (627:26): [True: 51, False: 22.6k]
  |  Branch (627:67): [True: 45, False: 22.6k]
  ------------------
  628|     96|                {
  629|     96|                    XMLCh value1[4];
  630|     96|                    XMLString::moveChars(value1, &(realPath[percentIndex]), 3);
  631|     96|                    value1[3] = chNull;
  632|     96|                    ThrowXMLwithMemMgr2(MalformedURLException
  ------------------
  |  |  268|     96|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  ------------------
  633|     96|                            , XMLExcepts::XMLNUM_URI_Component_Invalid_EscapeSequence
  634|     96|                            , realPath
  635|     96|                            , value1
  636|     96|                            , fMemoryManager);
  637|     96|                }
  638|       |
  639|  22.6k|                unsigned int value = (xlatHexDigit(realPath[percentIndex+1]) * 16) + xlatHexDigit(realPath[percentIndex+2]);
  640|       |
  641|  22.6k|                realPath[percentIndex] = XMLCh(value);
  642|       |
  643|  22.6k|                XMLSize_t i =0;
  644|  1.75G|                for (i = percentIndex + 1; i < end - 2 ; i++)
  ------------------
  |  Branch (644:44): [True: 1.75G, False: 22.6k]
  ------------------
  645|  1.75G|                    realPath[i] = realPath[i+2];
  646|  22.6k|                realPath[i] = chNull;
  647|  22.6k|                end = i;
  648|       |
  649|  22.6k|                if (((XMLSize_t)(percentIndex + 1)) < end)
  ------------------
  |  Branch (649:21): [True: 22.6k, False: 13]
  ------------------
  650|  22.6k|                  percentIndex = XMLString::indexOf(realPath, chPercent, percentIndex + 1, fMemoryManager);
  651|     13|                else
  652|     13|                  percentIndex = -1;
  653|  22.6k|            }
  654|       |
  655|       |
  656|     56|            BinFileInputStream* retStrm = new (fMemoryManager) BinFileInputStream(realPath, fMemoryManager);
  657|     56|            if (!retStrm->getIsOpen())
  ------------------
  |  Branch (657:17): [True: 37, False: 19]
  ------------------
  658|     37|            {
  659|     37|                delete retStrm;
  660|     37|                return 0;
  661|     37|            }
  662|     19|            return retStrm;
  663|     56|        }
  664|    209|    }
  665|       |
  666|       |    //
  667|       |    //  If we don't have have an installed net accessor object, then we
  668|       |    //  have to just throw here.
  669|       |    //
  670|    142|    if (!XMLPlatformUtils::fgNetAccessor)
  ------------------
  |  Branch (670:9): [True: 0, False: 142]
  ------------------
  671|      0|        ThrowXMLwithMemMgr(MalformedURLException, XMLExcepts::URL_UnsupportedProto, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  672|       |
  673|       |    // Else ask the net accessor to create the stream
  674|    142|    return XMLPlatformUtils::fgNetAccessor->makeNew(*this);
  675|    142|}
_ZN11xercesc_3_26XMLURL13buildFullTextEv:
  708|    345|{
  709|       |    // Calculate the worst case size of the buffer required
  710|    345|    XMLSize_t bufSize = gMaxProtoLen + 1
  711|    345|                           + XMLString::stringLen(fFragment) + 1
  712|    345|                           + XMLString::stringLen(fHost) + 2
  713|    345|                           + XMLString::stringLen(fPassword) + 1
  714|    345|                           + XMLString::stringLen(fPath)
  715|    345|                           + XMLString::stringLen(fQuery) + 1
  716|    345|                           + XMLString::stringLen(fUser) + 1
  717|    345|                           + 32;
  718|       |
  719|       |    // Clean up the existing buffer and allocate another
  720|    345|    fMemoryManager->deallocate(fURLText);//delete [] fURLText;
  721|    345|    fURLText = (XMLCh*) fMemoryManager->allocate((bufSize) * sizeof(XMLCh));//new XMLCh[bufSize];
  722|    345|    *fURLText = 0;
  723|       |
  724|    345|    XMLCh* outPtr = fURLText;
  725|    345|    if (fProtocol != Unknown)
  ------------------
  |  Branch (725:9): [True: 345, False: 0]
  ------------------
  726|    345|    {
  727|    345|        XMLString::catString(fURLText, getProtocolName());
  728|    345|        outPtr += XMLString::stringLen(fURLText);
  729|    345|        *outPtr++ = chColon;
  730|    345|        *outPtr++ = chForwardSlash;
  731|    345|        *outPtr++ = chForwardSlash;
  732|    345|    }
  733|       |
  734|    345|    if (fUser)
  ------------------
  |  Branch (734:9): [True: 44, False: 301]
  ------------------
  735|     44|    {
  736|     44|        XMLString::copyString(outPtr, fUser);
  737|     44|        outPtr += XMLString::stringLen(fUser);
  738|       |
  739|     44|        if (fPassword)
  ------------------
  |  Branch (739:13): [True: 35, False: 9]
  ------------------
  740|     35|        {
  741|     35|            *outPtr++ = chColon;
  742|     35|            XMLString::copyString(outPtr, fPassword);
  743|     35|            outPtr += XMLString::stringLen(fPassword);
  744|     35|        }
  745|       |
  746|     44|        *outPtr++ = chAt;
  747|     44|    }
  748|       |
  749|    345|    if (fHost)
  ------------------
  |  Branch (749:9): [True: 137, False: 208]
  ------------------
  750|    137|    {
  751|    137|        XMLString::copyString(outPtr, fHost);
  752|    137|        outPtr += XMLString::stringLen(fHost);
  753|       |
  754|       |        //
  755|       |        //  If the port is zero, then we don't put it in. Else we need
  756|       |        //  to because it was explicitly provided.
  757|       |        //
  758|    137|        if (fPortNum)
  ------------------
  |  Branch (758:13): [True: 93, False: 44]
  ------------------
  759|     93|        {
  760|     93|            *outPtr++ = chColon;
  761|       |
  762|     93|            XMLCh tmpBuf[17];
  763|     93|            XMLString::binToText(fPortNum, tmpBuf, 16, 10, fMemoryManager);
  764|     93|            XMLString::copyString(outPtr, tmpBuf);
  765|     93|            outPtr += XMLString::stringLen(tmpBuf);
  766|     93|        }
  767|    137|    }
  768|       |
  769|    345|    if (fPath)
  ------------------
  |  Branch (769:9): [True: 345, False: 0]
  ------------------
  770|    345|    {
  771|    345|        XMLString::copyString(outPtr, fPath);
  772|    345|        outPtr += XMLString::stringLen(fPath);
  773|    345|    }
  774|       |
  775|    345|    if (fQuery)
  ------------------
  |  Branch (775:9): [True: 42, False: 303]
  ------------------
  776|     42|    {
  777|     42|        *outPtr++ = chQuestion;
  778|     42|        XMLString::copyString(outPtr, fQuery);
  779|     42|        outPtr += XMLString::stringLen(fQuery);
  780|     42|    }
  781|       |
  782|    345|    if (fFragment)
  ------------------
  |  Branch (782:9): [True: 46, False: 299]
  ------------------
  783|     46|    {
  784|     46|        *outPtr++ = chPound;
  785|     46|        XMLString::copyString(outPtr, fFragment);
  786|     46|        outPtr += XMLString::stringLen(fFragment);
  787|     46|    }
  788|       |
  789|       |    // Cap it off in case the last op was not a string copy
  790|    345|    *outPtr = 0;
  791|    345|}
_ZN11xercesc_3_26XMLURL7cleanUpEv:
  799|  1.98k|{
  800|  1.98k|    fMemoryManager->deallocate(fFragment);//delete [] fFragment;
  801|  1.98k|    fMemoryManager->deallocate(fHost);//delete [] fHost;
  802|  1.98k|    fMemoryManager->deallocate(fPassword);//delete [] fPassword;
  803|  1.98k|    fMemoryManager->deallocate(fPath);//delete [] fPath;
  804|  1.98k|    fMemoryManager->deallocate(fQuery);//delete [] fQuery;
  805|  1.98k|    fMemoryManager->deallocate(fUser);//delete [] fUser;
  806|  1.98k|    fMemoryManager->deallocate(fURLText);//delete [] fURLText;
  807|       |
  808|  1.98k|    fFragment = 0;
  809|  1.98k|    fHost = 0;
  810|  1.98k|    fPassword = 0;
  811|  1.98k|    fPath = 0;
  812|  1.98k|    fQuery = 0;
  813|  1.98k|    fUser = 0;
  814|  1.98k|    fURLText = 0;
  815|       |
  816|  1.98k|    fProtocol = Unknown;
  817|  1.98k|    fPortNum = 0;
  818|  1.98k|    fHasInvalidChar = false;
  819|  1.98k|}
_ZN11xercesc_3_26XMLURL20conglomerateWithBaseERKS0_b:
  827|    171|{
  828|       |    // The base URL cannot be relative
  829|    171|    if (baseURL.isRelative())
  ------------------
  |  Branch (829:9): [True: 171, False: 0]
  ------------------
  830|    171|    {
  831|    171|        if (useExceptions)
  ------------------
  |  Branch (831:13): [True: 0, False: 171]
  ------------------
  832|      0|			ThrowXMLwithMemMgr(MalformedURLException, XMLExcepts::URL_RelativeBaseURL, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  833|    171|        else
  834|    171|            return false;
  835|    171|    }
  836|       |
  837|       |    //
  838|       |    //  Check a special case. If all we have is a fragment, then we want
  839|       |    //  to just take the base host and path, plus our fragment.
  840|       |    //
  841|      0|    if ((fProtocol == Unknown)
  ------------------
  |  Branch (841:9): [True: 0, False: 0]
  ------------------
  842|      0|    &&  !fHost
  ------------------
  |  Branch (842:9): [True: 0, False: 0]
  ------------------
  843|      0|    &&  !fPath
  ------------------
  |  Branch (843:9): [True: 0, False: 0]
  ------------------
  844|      0|    &&  fFragment)
  ------------------
  |  Branch (844:9): [True: 0, False: 0]
  ------------------
  845|      0|    {
  846|       |        // Just in case, make sure we don't leak the user or password values
  847|      0|        fMemoryManager->deallocate(fUser);//delete [] fUser;
  848|      0|        fUser = 0;
  849|      0|        fMemoryManager->deallocate(fPassword);//delete [] fPassword;
  850|      0|        fPassword = 0;
  851|       |
  852|       |        // Copy over the protocol and port number as is
  853|      0|        fProtocol = baseURL.fProtocol;
  854|      0|        fPortNum = baseURL.fPortNum;
  855|       |
  856|       |        // Replicate the base fields that are provided
  857|      0|        fHost = XMLString::replicate(baseURL.fHost, fMemoryManager);
  858|      0|        fUser = XMLString::replicate(baseURL.fUser, fMemoryManager);
  859|      0|        fPassword = XMLString::replicate(baseURL.fPassword, fMemoryManager);
  860|      0|        fPath = XMLString::replicate(baseURL.fPath, fMemoryManager);
  861|      0|        return true;
  862|      0|    }
  863|       |
  864|       |    //
  865|       |    //  All we have to do is run up through our fields and, for each one
  866|       |    //  that we don't have, use the based URL's. Once we hit one field
  867|       |    //  that we have, we stop.
  868|       |    //
  869|      0|    if (fProtocol != Unknown)
  ------------------
  |  Branch (869:9): [True: 0, False: 0]
  ------------------
  870|      0|        return true;
  871|      0|    fProtocol = baseURL.fProtocol;
  872|       |
  873|       |    //
  874|       |    //  If the protocol is not file, and we either already have our own
  875|       |    //  host, or the base does not have one, then we are done.
  876|       |    //
  877|      0|    if (fProtocol != File)
  ------------------
  |  Branch (877:9): [True: 0, False: 0]
  ------------------
  878|      0|    {
  879|      0|        if (fHost || !baseURL.fHost)
  ------------------
  |  Branch (879:13): [True: 0, False: 0]
  |  Branch (879:22): [True: 0, False: 0]
  ------------------
  880|      0|            return true;
  881|      0|    }
  882|       |
  883|       |    // Replicate all of the hosty stuff if the base has one
  884|      0|    if (baseURL.fHost)
  ------------------
  |  Branch (884:9): [True: 0, False: 0]
  ------------------
  885|      0|    {
  886|       |        // Just in case, make sure we don't leak a user or password field
  887|      0|        fMemoryManager->deallocate(fUser);//delete [] fUser;
  888|      0|        fUser = 0;
  889|      0|        fMemoryManager->deallocate(fPassword);//delete [] fPassword;
  890|      0|        fPassword = 0;
  891|      0|        fMemoryManager->deallocate(fHost);//delete [] fHost;
  892|      0|        fHost = 0;
  893|       |
  894|      0|        fHost = XMLString::replicate(baseURL.fHost, fMemoryManager);
  895|      0|        fUser = XMLString::replicate(baseURL.fUser, fMemoryManager);
  896|      0|        fPassword = XMLString::replicate(baseURL.fPassword, fMemoryManager);
  897|       |
  898|      0|        fPortNum = baseURL.fPortNum;
  899|      0|    }
  900|       |
  901|       |    // If we have a path and its absolute, then we are done
  902|      0|    const bool hadPath = (fPath != 0);
  903|      0|    if (hadPath)
  ------------------
  |  Branch (903:9): [True: 0, False: 0]
  ------------------
  904|      0|    {
  905|      0|        if (*fPath == chForwardSlash)
  ------------------
  |  Branch (905:13): [True: 0, False: 0]
  ------------------
  906|      0|            return true;
  907|      0|    }
  908|       |
  909|       |    // Its a relative path, so weave them together.
  910|      0|    if (baseURL.fPath) {
  ------------------
  |  Branch (910:9): [True: 0, False: 0]
  ------------------
  911|      0|        XMLCh* temp = XMLPlatformUtils::weavePaths(baseURL.fPath, fPath ,fMemoryManager);
  912|      0|        fMemoryManager->deallocate(fPath);//delete [] fPath;
  913|      0|        fPath = temp;
  914|      0|    }
  915|       |
  916|       |    // If we had any original path, then we are done
  917|      0|    if (hadPath)
  ------------------
  |  Branch (917:9): [True: 0, False: 0]
  ------------------
  918|      0|        return true;
  919|       |
  920|       |    // We had no original path, so go on to deal with the query/fragment parts
  921|      0|    if (fQuery || !baseURL.fQuery)
  ------------------
  |  Branch (921:9): [True: 0, False: 0]
  |  Branch (921:19): [True: 0, False: 0]
  ------------------
  922|      0|        return true;
  923|      0|    fQuery = XMLString::replicate(baseURL.fQuery, fMemoryManager);
  924|       |
  925|      0|    if (fFragment || !baseURL.fFragment)
  ------------------
  |  Branch (925:9): [True: 0, False: 0]
  |  Branch (925:22): [True: 0, False: 0]
  ------------------
  926|      0|        return true;
  927|      0|    fFragment = XMLString::replicate(baseURL.fFragment, fMemoryManager);
  928|      0|	return true;
  929|      0|}
_ZN11xercesc_3_26XMLURL5parseEPKDsRS0_:
 1228|    856|{
 1229|       |    // Simplify things by checking for the psycho scenarios first
 1230|    856|    if (!*urlText)
  ------------------
  |  Branch (1230:9): [True: 3, False: 853]
  ------------------
 1231|      3|        return false;
 1232|       |
 1233|       |    // Before we start, check if this urlText contains valid uri characters
 1234|    853|    if (!XMLUri::isURIString(urlText))
  ------------------
  |  Branch (1234:9): [True: 535, False: 318]
  ------------------
 1235|    535|        xmlURL.fHasInvalidChar = true;
 1236|    318|    else
 1237|    318|        xmlURL.fHasInvalidChar = false;
 1238|       |
 1239|       |    //
 1240|       |    //  The first thing we will do is to check for a file name, so that
 1241|       |    //  we don't waste time thinking its a URL. If its in the form x:\ or x:/
 1242|       |    //  and x is an ASCII letter, then assume that's the deal.
 1243|       |    //
 1244|    853|    if (((*urlText >= chLatin_A) && (*urlText <= chLatin_Z))
  ------------------
  |  Branch (1244:10): [True: 656, False: 197]
  |  Branch (1244:37): [True: 258, False: 398]
  ------------------
 1245|    853|    ||  ((*urlText >= chLatin_a) && (*urlText <= chLatin_z)))
  ------------------
  |  Branch (1245:10): [True: 394, False: 201]
  |  Branch (1245:37): [True: 370, False: 24]
  ------------------
 1246|    628|    {
 1247|    628|        if (*(urlText + 1) == chColon)
  ------------------
  |  Branch (1247:13): [True: 1, False: 627]
  ------------------
 1248|      1|        {
 1249|      1|            if ((*(urlText + 2) == chForwardSlash)
  ------------------
  |  Branch (1249:17): [True: 0, False: 1]
  ------------------
 1250|      1|            ||  (*(urlText + 2) == chBackSlash))
  ------------------
  |  Branch (1250:17): [True: 0, False: 1]
  ------------------
 1251|      0|            {
 1252|      0|                return false;
 1253|      0|            }
 1254|      1|        }
 1255|    628|    }
 1256|       |
 1257|       |    // Get a copy of the URL that we can modify
 1258|    853|    XMLCh* srcCpy = XMLString::replicate(urlText, xmlURL.fMemoryManager);
 1259|    853|    ArrayJanitor<XMLCh> janSrcCopy(srcCpy, xmlURL.fMemoryManager);
 1260|       |
 1261|       |    //
 1262|       |    //  Get a pointer now that we can run up thrown the source as we parse
 1263|       |    //  bits and pieces out of it.
 1264|       |    //
 1265|    853|    XMLCh* srcPtr = srcCpy;
 1266|       |
 1267|       |    // Run up past any spaces
 1268|  1.11k|    while (*srcPtr)
  ------------------
  |  Branch (1268:12): [True: 1.11k, False: 3]
  ------------------
 1269|  1.11k|    {
 1270|  1.11k|        if (!XMLChar1_0::isWhitespace(*srcPtr))
  ------------------
  |  Branch (1270:13): [True: 850, False: 265]
  ------------------
 1271|    850|            break;
 1272|    265|        srcPtr++;
 1273|    265|    }
 1274|       |
 1275|       |    // Make sure it wasn't all space
 1276|    853|    if (!*srcPtr)
  ------------------
  |  Branch (1276:9): [True: 3, False: 850]
  ------------------
 1277|      3|        return false;
 1278|       |
 1279|       |    //
 1280|       |    //  Ok, the next thing we have to do is to find either a / or : character.
 1281|       |    //  If the : is first, we assume we have a protocol. If the / is first,
 1282|       |    //  then we skip to the host processing.
 1283|       |    //
 1284|    850|    XMLCh* ptr1 = XMLString::findAny(srcPtr, gListOne);
 1285|    850|    XMLCh* ptr2;
 1286|       |
 1287|       |    // If we found a protocol, then deal with it
 1288|    850|    if (ptr1)
  ------------------
  |  Branch (1288:9): [True: 614, False: 236]
  ------------------
 1289|    614|    {
 1290|    614|        if (*ptr1 == chColon)
  ------------------
  |  Branch (1290:13): [True: 417, False: 197]
  ------------------
 1291|    417|        {
 1292|       |            // Cap the string at the colon
 1293|    417|            *ptr1 = 0;
 1294|       |
 1295|       |            // And try to find it in our list of protocols
 1296|    417|            xmlURL.fProtocol = lookupByName(srcPtr);
 1297|       |
 1298|    417|            if (xmlURL.fProtocol == Unknown)
  ------------------
  |  Branch (1298:17): [True: 27, False: 390]
  ------------------
 1299|     27|                return false;
 1300|       |
 1301|       |            // And move our source pointer up past what we've processed
 1302|    390|            srcPtr = (ptr1 + 1);
 1303|    390|        }
 1304|    614|    }
 1305|       |
 1306|       |    //
 1307|       |    //  Ok, next we need to see if we have any host part. If the next
 1308|       |    //  two characters are //, then we need to check, else move on.
 1309|       |    //
 1310|    823|    if ((*srcPtr == chForwardSlash) && (*(srcPtr + 1) == chForwardSlash))
  ------------------
  |  Branch (1310:9): [True: 543, False: 280]
  |  Branch (1310:40): [True: 314, False: 229]
  ------------------
 1311|    314|    {
 1312|       |        // Move up past the slashes
 1313|    314|        srcPtr += 2;
 1314|       |
 1315|       |        //
 1316|       |        //  If we aren't at the end of the string, then there has to be a
 1317|       |        //  host part at this point. we will just look for the next / char
 1318|       |        //  or end of string and make all of that the host for now.
 1319|       |        //
 1320|    314|        if (*srcPtr)
  ------------------
  |  Branch (1320:13): [True: 314, False: 0]
  ------------------
 1321|    314|        {
 1322|       |            // Search from here for a / character
 1323|    314|            ptr1 = XMLString::findAny(srcPtr, gListFour);
 1324|       |
 1325|       |            //
 1326|       |            //  If we found something, then the host is between where
 1327|       |            //  we are and what we found. Else the host is the rest of
 1328|       |            //  the content and we are done. If its empty, leave it null.
 1329|       |            //
 1330|    314|            if (ptr1)
  ------------------
  |  Branch (1330:17): [True: 103, False: 211]
  ------------------
 1331|    103|            {
 1332|    103|                if (ptr1 != srcPtr)
  ------------------
  |  Branch (1332:21): [True: 98, False: 5]
  ------------------
 1333|     98|                {
 1334|     98|                    xmlURL.fHost = (XMLCh*) xmlURL.fMemoryManager->allocate
 1335|     98|                    (
 1336|     98|                        ((ptr1 - srcPtr) + 1) * sizeof(XMLCh)
 1337|     98|                    );//new XMLCh[(ptr1 - srcPtr) + 1];
 1338|     98|                    ptr2 = xmlURL.fHost;
 1339|  5.00M|                    while (srcPtr < ptr1)
  ------------------
  |  Branch (1339:28): [True: 5.00M, False: 98]
  ------------------
 1340|  5.00M|                        *ptr2++ = *srcPtr++;
 1341|     98|                    *ptr2 = 0;
 1342|     98|                }
 1343|    103|            }
 1344|    211|             else
 1345|    211|            {
 1346|    211|                xmlURL.fHost = XMLString::replicate(srcPtr, xmlURL.fMemoryManager);
 1347|       |
 1348|       |                // Update source pointer to the end
 1349|    211|                srcPtr += XMLString::stringLen(xmlURL.fHost);
 1350|    211|            }
 1351|    314|        }
 1352|    314|    }
 1353|    509|    else
 1354|    509|    {
 1355|       |        //
 1356|       |        // http protocol requires two forward slashes
 1357|       |        // we didn't get them, so throw an exception
 1358|       |        //
 1359|    509|        if (xmlURL.fProtocol == HTTP)
  ------------------
  |  Branch (1359:13): [True: 1, False: 508]
  ------------------
 1360|      1|            return false;
 1361|    509|    }
 1362|       |
 1363|       |    //
 1364|       |    //  If there was a host part, then we have to grovel through it for
 1365|       |    //  all the bits and pieces it can hold.
 1366|       |    //
 1367|    822|    if (xmlURL.fHost)
  ------------------
  |  Branch (1367:9): [True: 309, False: 513]
  ------------------
 1368|    309|    {
 1369|       |        //
 1370|       |        //  Look for a '@' character, which indicates a user name. If we
 1371|       |        //  find one, then everything between the start of the host data
 1372|       |        //  and the character is the user name.
 1373|       |        //
 1374|    309|        ptr1 = XMLString::findAny(xmlURL.fHost, gListTwo);
 1375|    309|        if (ptr1)
  ------------------
  |  Branch (1375:13): [True: 97, False: 212]
  ------------------
 1376|     97|        {
 1377|       |            // Get this info out as the user name
 1378|     97|            *ptr1 = 0;
 1379|     97|            xmlURL.fUser = XMLString::replicate(xmlURL.fHost, xmlURL.fMemoryManager);
 1380|     97|            ptr1++;
 1381|       |
 1382|       |            // And now cut these chars from the host string
 1383|     97|            XMLString::cut(xmlURL.fHost, ptr1 - xmlURL.fHost);
 1384|       |
 1385|       |            // Is there a password inside the user string?
 1386|     97|            ptr2 = XMLString::findAny(xmlURL.fUser, gListThree);
 1387|     97|            if (ptr2)
  ------------------
  |  Branch (1387:17): [True: 60, False: 37]
  ------------------
 1388|     60|            {
 1389|       |                // Remove it from the user name string
 1390|     60|                *ptr2 = 0;
 1391|       |
 1392|       |                // And copy out the remainder to the password field
 1393|     60|                ptr2++;
 1394|     60|                xmlURL.fPassword = XMLString::replicate(ptr2, xmlURL.fMemoryManager);
 1395|     60|            }
 1396|     97|        }
 1397|       |
 1398|       |        //
 1399|       |        //  Ok, so now we are at the actual host name, if any. If we are
 1400|       |        //  not at the end of the host data, then lets see if we have a
 1401|       |        //  port trailing the
 1402|       |        //
 1403|    309|        ptr1 = XMLString::findAny(xmlURL.fHost, gListThree);
 1404|    309|        if (ptr1)
  ------------------
  |  Branch (1404:13): [True: 230, False: 79]
  ------------------
 1405|    230|        {
 1406|       |            // Remove it from the host name
 1407|    230|            *ptr1 = 0;
 1408|       |
 1409|       |            // Try to convert it to a numeric port value and store it
 1410|    230|            ptr1++;
 1411|    230|            if (!XMLString::textToBin(ptr1, xmlURL.fPortNum, xmlURL.fMemoryManager))
  ------------------
  |  Branch (1411:17): [True: 113, False: 117]
  ------------------
 1412|    113|                return false;
 1413|    230|        }
 1414|       |
 1415|       |        // If the host ended up empty, then toss is
 1416|    196|        if (!*(xmlURL.fHost))
  ------------------
  |  Branch (1416:13): [True: 5, False: 191]
  ------------------
 1417|      5|        {
 1418|      5|            xmlURL.fMemoryManager->deallocate(xmlURL.fHost);//delete[] fHost;
 1419|      5|            xmlURL.fHost = 0;
 1420|      5|        }
 1421|    196|    }
 1422|       |
 1423|       |    // If we are at the end, then we are done now
 1424|    709|    if (!*srcPtr) {
  ------------------
  |  Branch (1424:9): [True: 121, False: 588]
  ------------------
 1425|    121|        if(xmlURL.fHost) {
  ------------------
  |  Branch (1425:12): [True: 116, False: 5]
  ------------------
 1426|    116|            static const XMLCh slash[] = { chForwardSlash, chNull };
 1427|    116|            xmlURL.fPath = XMLString::replicate(slash, xmlURL.fMemoryManager);
 1428|    116|        }
 1429|    121|        return true;
 1430|    121|    }
 1431|       |
 1432|       |    //
 1433|       |    //  Next is the path part. It can be absolute, i.e. starting with a
 1434|       |    //  forward slash character, or relative. Its basically everything up
 1435|       |    //  to the end of the string or to any trailing query or fragment.
 1436|       |    //
 1437|    588|    ptr1 = XMLString::findAny(srcPtr, gListFive);
 1438|    588|    if (!ptr1)
  ------------------
  |  Branch (1438:9): [True: 418, False: 170]
  ------------------
 1439|    418|    {
 1440|    418|        xmlURL.fPath = XMLString::replicate(srcPtr, xmlURL.fMemoryManager);
 1441|    418|        return true;
 1442|    418|    }
 1443|       |
 1444|       |    // Everything from where we are to what we found is the path
 1445|    170|    if (ptr1 > srcPtr)
  ------------------
  |  Branch (1445:9): [True: 138, False: 32]
  ------------------
 1446|    138|    {
 1447|    138|        xmlURL.fPath = (XMLCh*) xmlURL.fMemoryManager->allocate
 1448|    138|        (
 1449|    138|            ((ptr1 - srcPtr) + 1) * sizeof(XMLCh)
 1450|    138|        );//new XMLCh[(ptr1 - srcPtr) + 1];
 1451|    138|        ptr2 = xmlURL.fPath;
 1452|  2.74M|        while (srcPtr < ptr1)
  ------------------
  |  Branch (1452:16): [True: 2.74M, False: 138]
  ------------------
 1453|  2.74M|            *ptr2++ = *srcPtr++;
 1454|    138|        *ptr2 = 0;
 1455|    138|    }
 1456|       |
 1457|       |    //
 1458|       |    //  If we found a fragment, then it is the rest of the string and we
 1459|       |    //  are done.
 1460|       |    //
 1461|    170|    if (*srcPtr == chPound)
  ------------------
  |  Branch (1461:9): [True: 47, False: 123]
  ------------------
 1462|     47|    {
 1463|     47|        srcPtr++;
 1464|     47|        xmlURL.fFragment = XMLString::replicate(srcPtr, xmlURL.fMemoryManager);
 1465|     47|        return true;
 1466|     47|    }
 1467|       |
 1468|       |    //
 1469|       |    //  The query is either the rest of the string, or up to the fragment
 1470|       |    //  separator.
 1471|       |    //
 1472|    123|    srcPtr++;
 1473|    123|    ptr1 = XMLString::findAny(srcPtr, gListSix);
 1474|    123|    if (!ptr1)
  ------------------
  |  Branch (1474:9): [True: 57, False: 66]
  ------------------
 1475|     57|    {
 1476|     57|        xmlURL.fQuery = XMLString::replicate(srcPtr, xmlURL.fMemoryManager);
 1477|     57|        return true;
 1478|     57|    }
 1479|     66|     else
 1480|     66|    {
 1481|     66|        xmlURL.fQuery = (XMLCh*) xmlURL.fMemoryManager->allocate
 1482|     66|        (
 1483|     66|            ((ptr1 - srcPtr) + 1) * sizeof(XMLCh)
 1484|     66|        );//new XMLCh[(ptr1 - srcPtr) + 1];
 1485|     66|        ptr2 = xmlURL.fQuery;
 1486|  1.09M|        while (srcPtr < ptr1)
  ------------------
  |  Branch (1486:16): [True: 1.09M, False: 66]
  ------------------
 1487|  1.09M|            *ptr2++ = *srcPtr++;
 1488|     66|        *ptr2 = 0;
 1489|     66|    }
 1490|       |
 1491|       |    // If we are not at the end now, then everything else is the fragment
 1492|     66|    if (*srcPtr == chPound)
  ------------------
  |  Branch (1492:9): [True: 44, False: 22]
  ------------------
 1493|     44|    {
 1494|     44|        srcPtr++;
 1495|     44|        xmlURL.fFragment = XMLString::replicate(srcPtr, xmlURL.fMemoryManager);
 1496|     44|    }
 1497|       |
 1498|     66|    return true;
 1499|    123|}
XMLURL.cpp:_ZN11xercesc_3_2L10isHexDigitEDs:
  118|  45.3k|{
  119|  45.3k|    if (((toCheck >= chDigit_0) && (toCheck <= chDigit_9))
  ------------------
  |  Branch (119:10): [True: 45.3k, False: 47]
  |  Branch (119:36): [True: 13.6k, False: 31.6k]
  ------------------
  120|  45.3k|    ||  ((toCheck >= chLatin_A) && (toCheck <= chLatin_F))
  ------------------
  |  Branch (120:10): [True: 31.6k, False: 55]
  |  Branch (120:36): [True: 6.02k, False: 25.6k]
  ------------------
  121|  45.3k|    ||  ((toCheck >= chLatin_a) && (toCheck <= chLatin_f)))
  ------------------
  |  Branch (121:10): [True: 25.6k, False: 66]
  |  Branch (121:36): [True: 25.5k, False: 30]
  ------------------
  122|  45.2k|    {
  123|  45.2k|        return true;
  124|  45.2k|    }
  125|     96|    return false;
  126|  45.3k|}
XMLURL.cpp:_ZN11xercesc_3_2L12xlatHexDigitEDs:
  129|  45.2k|{
  130|  45.2k|    if ((toXlat >= chDigit_0) && (toXlat <= chDigit_9))
  ------------------
  |  Branch (130:9): [True: 45.2k, False: 0]
  |  Branch (130:34): [True: 13.6k, False: 31.5k]
  ------------------
  131|  13.6k|        return (unsigned int)(toXlat - chDigit_0);
  132|       |
  133|  31.5k|    if ((toXlat >= chLatin_A) && (toXlat <= chLatin_F))
  ------------------
  |  Branch (133:9): [True: 31.5k, False: 0]
  |  Branch (133:34): [True: 6.01k, False: 25.5k]
  ------------------
  134|  6.01k|        return (unsigned int)(toXlat - chLatin_A) + 10;
  135|       |
  136|  25.5k|    return (unsigned int)(toXlat - chLatin_a) + 10;
  137|  31.5k|}

_ZNK11xercesc_3_26XMLURL7getHostEv:
  240|    101|{
  241|    101|    return fHost;
  242|    101|}
_ZNK11xercesc_3_26XMLURL11getProtocolEv:
  255|    142|{
  256|    142|    return fProtocol;
  257|    142|}
_ZNK11xercesc_3_26XMLURL10getURLTextEv:
  270|    371|{
  271|       |    //
  272|       |    //  Fault it in if not already. Since this is a const method and we
  273|       |    //  can't use mutable members due the compilers we have to support,
  274|       |    //  we have to cast off the constness.
  275|       |    //
  276|    371|    if (!fURLText)
  ------------------
  |  Branch (276:9): [True: 345, False: 26]
  ------------------
  277|    345|        ((XMLURL*)this)->buildFullText();
  278|       |
  279|    371|    return fURLText;
  280|    371|}
_ZNK11xercesc_3_26XMLURL16getMemoryManagerEv:
  283|    344|{
  284|    344|    return fMemoryManager;
  285|    344|}

_ZN11xercesc_3_218XMLUTF16TranscoderC2EPKDsmbPNS_13MemoryManagerE:
   39|    273|    XMLTranscoder(encodingName, blockSize, manager)
   40|    273|    , fSwapped(swapped)
   41|    273|{
   42|    273|}
_ZN11xercesc_3_218XMLUTF16TranscoderD2Ev:
   46|    273|{
   47|    273|}
_ZN11xercesc_3_218XMLUTF16Transcoder13transcodeFromEPKhmPDsmRmPh:
   60|    585|{
   61|       |    //
   62|       |    //  Calculate the max chars we can do here. Its the lesser of the
   63|       |    //  max output chars and the number of chars in the source.
   64|       |    //
   65|    585|    const XMLSize_t srcChars = srcCount / sizeof(UTF16Ch);
   66|    585|    const XMLSize_t countToDo = srcChars < maxChars ? srcChars : maxChars;
  ------------------
  |  Branch (66:33): [True: 471, False: 114]
  ------------------
   67|       |
   68|       |    // Look at the source data as UTF16 chars
   69|    585|    const UTF16Ch* asUTF16 = reinterpret_cast<const UTF16Ch*>(srcData);
   70|       |
   71|       |    // And get a mutable pointer to the output
   72|    585|    XMLCh* outPtr = toFill;
   73|       |
   74|       |    //
   75|       |    //  If its swapped, we have to do a char by char swap and cast. Else
   76|       |    //  we have to check whether our XMLCh and UTF16Ch types are the same
   77|       |    //  size or not. If so, we can optimize by just doing a buffer copy.
   78|       |    //
   79|    585|    if (fSwapped)
  ------------------
  |  Branch (79:9): [True: 173, False: 412]
  ------------------
   80|    173|    {
   81|       |        //
   82|       |        //  And then do the swapping loop for the count we precalculated. Note
   83|       |        //  that this also handles size conversion as well if XMLCh is not the
   84|       |        //  same size as UTF16Ch.
   85|       |        //
   86|  1.41M|        for (XMLSize_t index = 0; index < countToDo; index++)
  ------------------
  |  Branch (86:35): [True: 1.41M, False: 173]
  ------------------
   87|  1.41M|            *outPtr++ = BitOps::swapBytes(*asUTF16++);
   88|    173|    }
   89|    412|     else
   90|    412|    {
   91|       |        //
   92|       |        //  If the XMLCh type is the same size as a UTF16 value on this
   93|       |        //  platform, then we can do just a buffer copy straight to the target
   94|       |        //  buffer since our source chars are UTF-16 chars. If its not, then
   95|       |        //  we still have to do a loop and assign each one, in order to
   96|       |        //  implicitly convert.
   97|       |        //
   98|    412|        if (sizeof(XMLCh) == sizeof(UTF16Ch))
  ------------------
  |  Branch (98:13): [Folded - Ignored]
  ------------------
   99|    412|        {
  100|       |            //  Notice we convert char count to byte count here!!!
  101|    412|            memcpy(toFill, srcData, countToDo * sizeof(UTF16Ch));
  102|    412|        }
  103|      0|         else
  104|      0|        {
  105|      0|            for (XMLSize_t index = 0; index < countToDo; index++)
  ------------------
  |  Branch (105:39): [True: 0, False: 0]
  ------------------
  106|      0|                *outPtr++ = XMLCh(*asUTF16++);
  107|      0|        }
  108|    412|    }
  109|       |
  110|       |    // Set the bytes eaten
  111|    585|    bytesEaten = countToDo * sizeof(UTF16Ch);
  112|       |
  113|       |    // Set the character sizes to the fixed size
  114|    585|    memset(charSizes, sizeof(UTF16Ch), countToDo);
  115|       |
  116|       |    // Return the chars we transcoded
  117|    585|    return countToDo;
  118|    585|}

_ZN11xercesc_3_217XMLUTF8TranscoderC2EPKDsmPNS_13MemoryManagerE:
  103|  6.40k|:XMLTranscoder(encodingName, blockSize, manager)
  104|  6.40k|{
  105|  6.40k|}
_ZN11xercesc_3_217XMLUTF8TranscoderD2Ev:
  108|  6.40k|{
  109|  6.40k|}
_ZN11xercesc_3_217XMLUTF8Transcoder13transcodeFromEPKhmPDsmRmPh:
  122|  14.1k|{
  123|       |    // Watch for pathological scenario. Shouldn't happen, but...
  124|  14.1k|    if (!srcCount || !maxChars)
  ------------------
  |  Branch (124:9): [True: 0, False: 14.1k]
  |  Branch (124:22): [True: 0, False: 14.1k]
  ------------------
  125|      0|        return 0;
  126|       |
  127|       |    //
  128|       |    //  Get pointers to our start and end points of the input and output
  129|       |    //  buffers.
  130|       |    //
  131|  14.1k|    const XMLByte*  srcPtr = srcData;
  132|  14.1k|    const XMLByte*  srcEnd = srcPtr + srcCount;
  133|  14.1k|    XMLCh*          outPtr = toFill;
  134|  14.1k|    XMLCh*          outEnd = outPtr + maxChars;
  135|  14.1k|    unsigned char*  sizePtr = charSizes;
  136|       |
  137|       |
  138|       |
  139|       |    //
  140|       |    //  We now loop until we either run out of input data, or room to store
  141|       |    //  output chars.
  142|       |    //
  143|   200k|    while ((srcPtr < srcEnd) && (outPtr < outEnd))
  ------------------
  |  Branch (143:12): [True: 200k, False: 52]
  |  Branch (143:33): [True: 200k, False: 13]
  ------------------
  144|   200k|    {
  145|       |        // Special-case ASCII, which is a leading byte value of <= 127
  146|   200k|        if (*srcPtr <= 127)
  ------------------
  |  Branch (146:13): [True: 194k, False: 5.19k]
  ------------------
  147|   194k|        {
  148|       |            // Handle ASCII in groups instead of single character at a time.
  149|   194k|            const XMLByte* srcPtr_save = srcPtr;
  150|   194k|            const XMLSize_t chunkSize = (srcEnd-srcPtr)<(outEnd-outPtr)?(srcEnd-srcPtr):(outEnd-outPtr);
  ------------------
  |  Branch (150:41): [True: 67.6k, False: 127k]
  ------------------
  151|  70.3M|            for(XMLSize_t i=0;i<chunkSize && *srcPtr <= 127;++i)
  ------------------
  |  Branch (151:31): [True: 70.3M, False: 9.91k]
  |  Branch (151:46): [True: 70.2M, False: 184k]
  ------------------
  152|  70.2M|                *outPtr++ = XMLCh(*srcPtr++);
  153|   194k|            memset(sizePtr,1,srcPtr - srcPtr_save);
  154|   194k|            sizePtr += srcPtr - srcPtr_save;
  155|   194k|            if (srcPtr == srcEnd || outPtr == outEnd)
  ------------------
  |  Branch (155:17): [True: 7.15k, False: 187k]
  |  Branch (155:37): [True: 2.75k, False: 184k]
  ------------------
  156|  9.91k|                break;
  157|   194k|        }
  158|       |
  159|       |        // See how many trailing src bytes this sequence is going to require
  160|   190k|        const unsigned int trailingBytes = gUTFBytes[*srcPtr];
  161|       |
  162|       |        //
  163|       |        //  If there are not enough source bytes to do this one, then we
  164|       |        //  are done. Note that we done >= here because we are implicitly
  165|       |        //  counting the 1 byte we get no matter what.
  166|       |        //
  167|       |        //  If we break out here, then there is nothing to undo since we
  168|       |        //  haven't updated any pointers yet.
  169|       |        //
  170|   190k|        if (srcPtr + trailingBytes >= srcEnd)
  ------------------
  |  Branch (170:13): [True: 284, False: 189k]
  ------------------
  171|    284|            break;
  172|       |
  173|       |        // Looks ok, so lets build up the value
  174|       |        // or at least let's try to do so--remembering that
  175|       |        // we cannot assume the encoding to be valid:
  176|       |
  177|       |        // first, test first byte
  178|   189k|        if((gUTFByteIndicatorTest[trailingBytes] & *srcPtr) != gUTFByteIndicator[trailingBytes]) {
  ------------------
  |  Branch (178:12): [True: 32, False: 189k]
  ------------------
  179|     32|            char pos[2] = {(char)0x31, 0}; 
  180|     32|            char len[2] = {(char)(trailingBytes+0x31), 0};
  181|     32|            char byte[2] = {(char)*srcPtr,0};
  182|     32|            ThrowXMLwithMemMgr3(UTFDataFormatException, XMLExcepts::UTF8_FormatError, pos, byte, len, getMemoryManager());
  ------------------
  |  |  270|     32|#define ThrowXMLwithMemMgr3(type,code,p1,p2,p3,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, p3, 0, memMgr)
  ------------------
  183|     32|        }
  184|       |
  185|       |        /***
  186|       |         * http://www.unicode.org/reports/tr27/
  187|       |         *
  188|       |         * Table 3.1B. lists all of the byte sequences that are legal in UTF-8. 
  189|       |         * A range of byte values such as A0..BF indicates that any byte from A0 to BF (inclusive) 
  190|       |         * is legal in that position. 
  191|       |         * Any byte value outside of the ranges listed is illegal. 
  192|       |         * For example, 
  193|       |         * the byte sequence <C0 AF> is illegal  since C0 is not legal in the 1st Byte column. 
  194|       |         * The byte sequence <E0 9F 80> is illegal since in the row 
  195|       |         *    where E0 is legal as a first byte, 
  196|       |         *    9F is not legal as a second byte. 
  197|       |         * The byte sequence <F4 80 83 92> is legal, since every byte in that sequence matches 
  198|       |         * a byte range in a row of the table (the last row). 
  199|       |         *
  200|       |         *
  201|       |         * Table 3.1B. Legal UTF-8 Byte Sequences  
  202|       |         * Code Points              1st Byte    2nd Byte    3rd Byte    4th Byte 
  203|       |         * =========================================================================
  204|       |         * U+0000..U+007F            00..7F       
  205|       |         * -------------------------------------------------------------------------
  206|       |         * U+0080..U+07FF            C2..DF      80..BF      
  207|       |         *
  208|       |         * -------------------------------------------------------------------------
  209|       |         * U+0800..U+0FFF            E0          A0..BF     80..BF   
  210|       |         *                                       -- 
  211|       |         *                          
  212|       |         * U+1000..U+FFFF            E1..EF      80..BF     80..BF    
  213|       |         *
  214|       |         * --------------------------------------------------------------------------
  215|       |         * U+10000..U+3FFFF          F0          90..BF     80..BF       80..BF 
  216|       |         *                                       --
  217|       |         * U+40000..U+FFFFF          F1..F3      80..BF     80..BF       80..BF 
  218|       |         * U+100000..U+10FFFF        F4          80..8F     80..BF       80..BF 
  219|       |         *                                           --
  220|       |         * ==========================================================================
  221|       |         *
  222|       |         *  Cases where a trailing byte range is not 80..BF are underlined in the table to 
  223|       |         *  draw attention to them. These occur only in the second byte of a sequence.
  224|       |         *
  225|       |         ***/
  226|       |
  227|   189k|        XMLUInt32 tmpVal = 0;
  228|       |
  229|   189k|        switch(trailingBytes)
  230|   189k|        {
  231|   111k|            case 1 :
  ------------------
  |  Branch (231:13): [True: 111k, False: 78.6k]
  ------------------
  232|       |                // UTF-8:   [110y yyyy] [10xx xxxx]
  233|       |                // Unicode: [0000 0yyy] [yyxx xxxx]
  234|       |                //
  235|       |                // 0xC0, 0xC1 has been filtered out             
  236|   111k|                checkTrailingBytes(*(srcPtr+1), 1, 1);
  237|       |
  238|   111k|                tmpVal = *srcPtr++;
  239|   111k|                tmpVal <<= 6;
  240|   111k|                tmpVal += *srcPtr++;
  241|       |
  242|   111k|                break;
  243|  50.3k|            case 2 :
  ------------------
  |  Branch (243:13): [True: 50.3k, False: 139k]
  ------------------
  244|       |                // UTF-8:   [1110 zzzz] [10yy yyyy] [10xx xxxx]
  245|       |                // Unicode: [zzzz yyyy] [yyxx xxxx]
  246|       |                //
  247|  50.3k|                if (( *srcPtr == 0xE0) && ( *(srcPtr+1) < 0xA0)) 
  ------------------
  |  Branch (247:21): [True: 420, False: 49.8k]
  |  Branch (247:43): [True: 0, False: 420]
  ------------------
  248|      0|                {
  249|      0|                    char byte0[2] = {(char)*srcPtr    ,0};
  250|      0|                    char byte1[2] = {(char)*(srcPtr+1),0};
  251|       |
  252|      0|                    ThrowXMLwithMemMgr2(UTFDataFormatException
  ------------------
  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  ------------------
  253|      0|                                      , XMLExcepts::UTF8_Invalid_3BytesSeq
  254|      0|                                      , byte0
  255|      0|                                      , byte1
  256|      0|                                      , getMemoryManager());
  257|      0|                }
  258|       |
  259|  50.3k|                checkTrailingBytes(*(srcPtr+1), 2, 1);
  260|  50.3k|                checkTrailingBytes(*(srcPtr+2), 2, 2);
  261|       |
  262|       |                //
  263|       |                // D36 (a) UTF-8 is the Unicode Transformation Format that serializes 
  264|       |                //         a Unicode code point as a sequence of one to four bytes, 
  265|       |                //         as specified in Table 3.1, UTF-8 Bit Distribution.
  266|       |                //     (b) An illegal UTF-8 code unit sequence is any byte sequence that 
  267|       |                //         does not match the patterns listed in Table 3.1B, Legal UTF-8 
  268|       |                //         Byte Sequences.
  269|       |                //     (c) An irregular UTF-8 code unit sequence is a six-byte sequence 
  270|       |                //         where the first three bytes correspond to a high surrogate, 
  271|       |                //         and the next three bytes correspond to a low surrogate. 
  272|       |                //         As a consequence of C12, these irregular UTF-8 sequences shall 
  273|       |                //         not be generated by a conformant process. 
  274|       |                //
  275|       |                //irregular three bytes sequence
  276|       |                // that is zzzzyy matches leading surrogate tag 110110 or 
  277|       |                //                       trailing surrogate tag 110111
  278|       |                // *srcPtr=1110 1101 
  279|       |                // *(srcPtr+1)=1010 yyyy or 
  280|       |                // *(srcPtr+1)=1011 yyyy
  281|       |                //
  282|       |                // 0xED 1110 1101
  283|       |                // 0xA0 1010 0000
  284|       |
  285|  50.3k|                if ((*srcPtr == 0xED) && (*(srcPtr+1) >= 0xA0))
  ------------------
  |  Branch (285:21): [True: 493, False: 49.8k]
  |  Branch (285:42): [True: 0, False: 493]
  ------------------
  286|      0|                {
  287|      0|                    char byte0[2] = {(char)*srcPtr,    0};
  288|      0|                    char byte1[2] = {(char)*(srcPtr+1),0};
  289|       |
  290|      0|                     ThrowXMLwithMemMgr2(UTFDataFormatException
  ------------------
  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  ------------------
  291|      0|                              , XMLExcepts::UTF8_Irregular_3BytesSeq
  292|      0|                              , byte0
  293|      0|                              , byte1
  294|      0|                              , getMemoryManager());
  295|      0|                }
  296|       |
  297|  50.3k|                tmpVal = *srcPtr++;
  298|  50.3k|                tmpVal <<= 6;
  299|  50.3k|                tmpVal += *srcPtr++;
  300|  50.3k|                tmpVal <<= 6;
  301|  50.3k|                tmpVal += *srcPtr++;
  302|       |
  303|  50.3k|                break;
  304|  28.3k|            case 3 : 
  ------------------
  |  Branch (304:13): [True: 28.3k, False: 161k]
  ------------------
  305|       |                // UTF-8:   [1111 0uuu] [10uu zzzz] [10yy yyyy] [10xx xxxx]*
  306|       |                // Unicode: [1101 10ww] [wwzz zzyy] (high surrogate)
  307|       |                //          [1101 11yy] [yyxx xxxx] (low surrogate)
  308|       |                //          * uuuuu = wwww + 1
  309|       |                //
  310|  28.3k|                if (((*srcPtr == 0xF0) && (*(srcPtr+1) < 0x90)) ||
  ------------------
  |  Branch (310:22): [True: 984, False: 27.3k]
  |  Branch (310:43): [True: 3, False: 981]
  ------------------
  311|  28.3k|                    ((*srcPtr == 0xF4) && (*(srcPtr+1) > 0x8F))  )
  ------------------
  |  Branch (311:22): [True: 1.03k, False: 27.2k]
  |  Branch (311:43): [True: 1, False: 1.03k]
  ------------------
  312|      4|                {
  313|      4|                    char byte0[2] = {(char)*srcPtr    ,0};
  314|      4|                    char byte1[2] = {(char)*(srcPtr+1),0};
  315|       |
  316|      4|                    ThrowXMLwithMemMgr2(UTFDataFormatException
  ------------------
  |  |  268|      4|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  ------------------
  317|      4|                                      , XMLExcepts::UTF8_Invalid_4BytesSeq
  318|      4|                                      , byte0
  319|      4|                                      , byte1
  320|      4|                                      , getMemoryManager());
  321|      4|                }
  322|       |
  323|  28.3k|                checkTrailingBytes(*(srcPtr+1), 3, 1);
  324|  28.3k|                checkTrailingBytes(*(srcPtr+2), 3, 2);
  325|  28.3k|                checkTrailingBytes(*(srcPtr+3), 3, 3);
  326|       |                
  327|  28.3k|                tmpVal = *srcPtr++;
  328|  28.3k|                tmpVal <<= 6;
  329|  28.3k|                tmpVal += *srcPtr++;
  330|  28.3k|                tmpVal <<= 6;
  331|  28.3k|                tmpVal += *srcPtr++;
  332|  28.3k|                tmpVal <<= 6;
  333|  28.3k|                tmpVal += *srcPtr++;
  334|       |
  335|  28.3k|                break;
  336|      0|            default: // trailingBytes > 3
  ------------------
  |  Branch (336:13): [True: 0, False: 189k]
  ------------------
  337|       |
  338|       |                /***
  339|       |                 * The definition of UTF-8 in Annex D of ISO/IEC 10646-1:2000 also allows 
  340|       |                 * for the use of five- and six-byte sequences to encode characters that 
  341|       |                 * are outside the range of the Unicode character set; those five- and 
  342|       |                 * six-byte sequences are illegal for the use of UTF-8 as a transformation 
  343|       |                 * of Unicode characters. ISO/IEC 10646 does not allow mapping of unpaired 
  344|       |                 * surrogates, nor U+FFFE and U+FFFF (but it does allow other noncharacters).
  345|       |                 ***/
  346|      0|                char len[2]  = {(char)(trailingBytes+0x31), 0};
  347|      0|                char byte[2] = {(char)*srcPtr,0};
  348|       |
  349|      0|                ThrowXMLwithMemMgr2(UTFDataFormatException
  ------------------
  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  ------------------
  350|  28.3k|                                  , XMLExcepts::UTF8_Exceeds_BytesLimit
  351|  28.3k|                                  , byte
  352|  28.3k|                                  , len
  353|  28.3k|                                  , getMemoryManager());
  354|       |
  355|      0|                break;
  356|   189k|        }
  357|       |
  358|       |
  359|       |        // since trailingBytes comes from an array, this logic is redundant
  360|       |        //  default :
  361|       |        //      ThrowXMLwithMemMgr(TranscodingException, XMLExcepts::Trans_BadSrcSeq);
  362|       |        //}
  363|   189k|        tmpVal -= gUTFOffsets[trailingBytes];
  364|       |
  365|       |        //
  366|       |        //  If it will fit into a single char, then put it in. Otherwise
  367|       |        //  encode it as a surrogate pair. If its not valid, use the
  368|       |        //  replacement char.
  369|       |        //
  370|   189k|        if (!(tmpVal & 0xFFFF0000))
  ------------------
  |  Branch (370:13): [True: 161k, False: 28.3k]
  ------------------
  371|   161k|        {
  372|   161k|            *sizePtr++ = trailingBytes + 1;
  373|   161k|            *outPtr++ = XMLCh(tmpVal);
  374|   161k|        }
  375|  28.3k|         else if (tmpVal > 0x10FFFF)
  ------------------
  |  Branch (375:19): [True: 3.77k, False: 24.5k]
  ------------------
  376|  3.77k|        {
  377|       |            //
  378|       |            //  If we've gotten more than 32 chars so far, then just break
  379|       |            //  out for now and lets process those. When we come back in
  380|       |            //  here again, we'll get no chars and throw an exception. This
  381|       |            //  way, the error will have a line and col number closer to
  382|       |            //  the real problem area.
  383|       |            //
  384|  3.77k|            if ((outPtr - toFill) > 32)
  ------------------
  |  Branch (384:17): [True: 3.77k, False: 3]
  ------------------
  385|  3.77k|                break;
  386|       |
  387|  3.77k|            ThrowXMLwithMemMgr(TranscodingException, XMLExcepts::Trans_BadSrcSeq, getMemoryManager());
  ------------------
  |  |  264|      3|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  388|  3.77k|        }
  389|  24.5k|         else
  390|  24.5k|        {
  391|       |            //
  392|       |            //  If we have enough room to store the leading and trailing
  393|       |            //  chars, then lets do it. Else, pretend this one never
  394|       |            //  happened, and leave it for the next time.
  395|       |            //
  396|  24.5k|            if (outPtr + 1 >= outEnd)
  ------------------
  |  Branch (396:17): [True: 54, False: 24.4k]
  ------------------
  397|     54|            {
  398|     54|                srcPtr -= (trailingBytes + 1);
  399|     54|                break;
  400|     54|            }
  401|       |
  402|       |            // Store the leading surrogate char
  403|  24.4k|            tmpVal -= 0x10000;
  404|  24.4k|            *sizePtr++ = trailingBytes + 1;
  405|  24.4k|            *outPtr++ = XMLCh((tmpVal >> 10) + 0xD800);
  406|       |
  407|       |            //
  408|       |            //  And then the trailing char. This one accounts for no
  409|       |            //  bytes eaten from the source, so set the char size for this
  410|       |            //  one to be zero.
  411|       |            //
  412|  24.4k|            *sizePtr++ = 0;
  413|  24.4k|            *outPtr++ = XMLCh((tmpVal & 0x3FF) + 0xDC00);
  414|  24.4k|        }
  415|   189k|    }
  416|       |
  417|       |    // Update the bytes eaten
  418|  14.0k|    bytesEaten = srcPtr - srcData;
  419|       |
  420|       |    // Return the characters read
  421|  14.0k|    return outPtr - toFill;
  422|  14.1k|}

_ZNK11xercesc_3_217XMLUTF8Transcoder18checkTrailingBytesEhjj:
  104|   296k|{
  105|       |
  106|   296k|    if((toCheck & 0xC0) != 0x80) 
  ------------------
  |  Branch (106:8): [True: 16, False: 296k]
  ------------------
  107|     16|    {
  108|     16|        char len[2]  = {(char)(trailingBytes+0x31), 0};
  109|     16|        char pos[2]  = {(char)(position+0x31), 0};
  110|     16|        char byte[2] = {(char)toCheck,0};
  111|     16|        ThrowXMLwithMemMgr3(UTFDataFormatException, XMLExcepts::UTF8_FormatError, pos, byte, len, getMemoryManager());
  ------------------
  |  |  270|     16|#define ThrowXMLwithMemMgr3(type,code,p1,p2,p3,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, p3, 0, memMgr)
  ------------------
  112|     16|    }
  113|       |
  114|   296k|}

_ZN11xercesc_3_26XMLUri11isURIStringEPKDs:
 1619|    853|{
 1620|    853|	if (!uricString || !*uricString)
  ------------------
  |  Branch (1620:6): [True: 0, False: 853]
  |  Branch (1620:21): [True: 0, False: 853]
  ------------------
 1621|      0|        return false;
 1622|       |
 1623|    853|    const XMLCh* tmpStr = uricString;
 1624|       |
 1625|   346k|    while (*tmpStr)
  ------------------
  |  Branch (1625:12): [True: 345k, False: 318]
  ------------------
 1626|   345k|    {
 1627|   345k|        if (isReservedOrUnreservedCharacter(*tmpStr))
  ------------------
  |  Branch (1627:13): [True: 339k, False: 6.63k]
  ------------------
 1628|   339k|        {
 1629|   339k|            tmpStr++;
 1630|   339k|        }
 1631|  6.63k|        else if (*tmpStr == chPercent)               // '%'
  ------------------
  |  Branch (1631:18): [True: 6.22k, False: 410]
  ------------------
 1632|  6.22k|        {
 1633|  6.22k|            if (XMLString::stringLen(tmpStr) >=3
  ------------------
  |  Branch (1633:17): [True: 6.19k, False: 32]
  ------------------
 1634|  6.22k|                && XMLString::isHex(*(tmpStr+1))     // 1st hex
  ------------------
  |  Branch (1634:20): [True: 6.13k, False: 52]
  ------------------
 1635|  6.22k|                && XMLString::isHex(*(tmpStr+2))  )  // 2nd hex
  ------------------
  |  Branch (1635:20): [True: 6.09k, False: 41]
  ------------------
 1636|  6.09k|            {
 1637|  6.09k|                tmpStr+=3;
 1638|  6.09k|            }
 1639|    125|            else
 1640|    125|            {
 1641|    125|                return false;
 1642|    125|            }
 1643|  6.22k|        }
 1644|    410|        else
 1645|    410|        {
 1646|    410|            return false;
 1647|    410|        }
 1648|   345k|    }
 1649|       |
 1650|    318|    return true;
 1651|    853|}
_ZN11xercesc_3_26XMLUri12normalizeURIEPKDsRNS_9XMLBufferE:
 2546|    318|{
 2547|    318|    const XMLCh* pszSrc = systemURI;
 2548|       |
 2549|    318|    normalizedURI.reset();
 2550|       |
 2551|  17.1M|    while (*pszSrc) {
  ------------------
  |  Branch (2551:12): [True: 17.1M, False: 318]
  ------------------
 2552|       |
 2553|  17.1M|        if ((*(pszSrc) == chPercent)
  ------------------
  |  Branch (2553:13): [True: 157k, False: 16.9M]
  ------------------
 2554|  17.1M|        &&  (*(pszSrc+1) == chDigit_2)
  ------------------
  |  Branch (2554:13): [True: 67.3k, False: 90.0k]
  ------------------
 2555|  17.1M|        &&  (*(pszSrc+2) == chDigit_0))
  ------------------
  |  Branch (2555:13): [True: 42.0k, False: 25.3k]
  ------------------
 2556|  42.0k|        {
 2557|  42.0k|            pszSrc += 3;
 2558|  42.0k|            normalizedURI.append(chSpace);
 2559|  42.0k|        }
 2560|  17.0M|        else
 2561|  17.0M|        {
 2562|  17.0M|            normalizedURI.append(*pszSrc);
 2563|  17.0M|            pszSrc++;
 2564|  17.0M|        }
 2565|  17.1M|    }
 2566|    318|}

_ZN11xercesc_3_26XMLUri31isReservedOrUnreservedCharacterEDs:
  640|   345k|{
  641|   345k|   return (XMLString::isAlphaNum(theChar) ||
  ------------------
  |  Branch (641:12): [True: 297k, False: 47.7k]
  ------------------
  642|   345k|           XMLString::indexOf(MARK_OR_RESERVED_CHARACTERS, theChar) != -1);
  ------------------
  |  Branch (642:12): [True: 41.1k, False: 6.63k]
  ------------------
  643|   345k|}

_ZN11xercesc_3_27XMemorynwEm:
   34|  14.5k|{
   35|  14.5k|	size_t headerSize = XMLPlatformUtils::alignPointerForNewBlockAllocation(
   36|  14.5k|										sizeof(MemoryManager*));
   37|       |	
   38|  14.5k|    void* const block = XMLPlatformUtils::fgMemoryManager->allocate
   39|  14.5k|        (
   40|  14.5k|	        headerSize + size
   41|  14.5k|        );
   42|  14.5k|    *(MemoryManager**)block = XMLPlatformUtils::fgMemoryManager;
   43|       |
   44|  14.5k|    return (char*)block + headerSize;
   45|  14.5k|}
_ZN11xercesc_3_27XMemorynwEmPNS_13MemoryManagerE:
   62|  48.7M|{
   63|  48.7M|    assert(manager != 0);
   64|       |	
   65|  48.7M|    size_t headerSize = XMLPlatformUtils::alignPointerForNewBlockAllocation(
   66|  48.7M|       sizeof(MemoryManager*));
   67|       |       
   68|  48.7M|    void* const block = manager->allocate(headerSize + size);
   69|  48.7M|    *(MemoryManager**)block = manager;
   70|       |
   71|  48.7M|    return (char*)block + headerSize;
   72|  48.7M|}
_ZN11xercesc_3_27XMemorydlEPv:
   80|  48.7M|{
   81|  48.7M|    if (p != 0)
  ------------------
  |  Branch (81:9): [True: 48.7M, False: 0]
  ------------------
   82|  48.7M|    {
   83|  48.7M|        size_t headerSize = XMLPlatformUtils::alignPointerForNewBlockAllocation(
   84|  48.7M|          sizeof(MemoryManager*));
   85|  48.7M|        void* const block = (char*)p - headerSize;
   86|       |
   87|  48.7M|        MemoryManager* const manager = *(MemoryManager**)block;
   88|  48.7M|        assert(manager != 0);
   89|  48.7M|        manager->deallocate(block);
   90|  48.7M|    }
   91|  48.7M|}
_ZN11xercesc_3_27XMemorydlEPvPNS_13MemoryManagerE:
   97|    231|{
   98|    231|    assert(manager != 0);
   99|       |	
  100|    231|    if (p != 0)
  ------------------
  |  Branch (100:9): [True: 231, False: 0]
  ------------------
  101|    231|    {
  102|    231|        size_t headerSize = XMLPlatformUtils::alignPointerForNewBlockAllocation(sizeof(MemoryManager*));
  103|    231|        void* const block = (char*)p - headerSize;
  104|       |
  105|       |        /***
  106|       |         * assert(*(MemoryManager**)block == manager);                 
  107|       |         *
  108|       |         * NOTE: for compiler which can't properly trace the memory manager used in the 
  109|       |         *       placement new, we use the memory manager embedded in the memory rather 
  110|       |         *       than the one passed in
  111|       |         */ 
  112|    231|        MemoryManager* pM = *(MemoryManager**)block;
  113|    231|        pM->deallocate(block);
  114|    231|    }
  115|    231|}

_ZN11xercesc_3_27XMemoryC2Ev:
  131|   100M|    {
  132|   100M|    }

_ZN11xercesc_3_217ASCIIRangeFactoryC2Ev:
   37|      1|{
   38|      1|}
_ZN11xercesc_3_217ASCIIRangeFactory11buildRangesEPNS_13RangeTokenMapE:
   47|      1|void ASCIIRangeFactory::buildRanges(RangeTokenMap *rangeTokMap) {
   48|       |
   49|      1|    if (fRangesCreated)
  ------------------
  |  Branch (49:9): [True: 0, False: 1]
  ------------------
   50|      0|        return;
   51|       |
   52|      1|    if (!fKeywordsInitialized) {
  ------------------
  |  Branch (52:9): [True: 0, False: 1]
  ------------------
   53|      0|        initializeKeywordMap(rangeTokMap);
   54|      0|    }
   55|       |
   56|      1|    TokenFactory* tokFactory = rangeTokMap->getTokenFactory();
   57|       |
   58|       |    // Create space ranges
   59|      1|    RangeToken* tok = tokFactory->createRange();
   60|      1|    tok->addRange(chHTab, chHTab);
   61|      1|    tok->addRange(chLF, chLF);
   62|      1|    tok->addRange(chFF, chFF);
   63|      1|    tok->addRange(chCR, chCR);
   64|      1|    tok->addRange(chSpace, chSpace);
   65|       |
   66|       |    // Build the internal map.
   67|      1|    tok->createMap();
   68|       |
   69|      1|    rangeTokMap->setRangeToken(fgASCIISpace, tok);
   70|       |
   71|      1|    tok = RangeToken::complementRanges(tok, tokFactory);
   72|       |
   73|       |    // Build the internal map.
   74|      1|    tok->createMap();
   75|       |
   76|      1|    rangeTokMap->setRangeToken(fgASCIISpace, tok , true);
   77|       |
   78|       |    // Create digits ranges
   79|      1|    tok = tokFactory->createRange();
   80|      1|    tok->addRange(chDigit_0, chDigit_9);
   81|       |
   82|       |    // Build the internal map.
   83|      1|    tok->createMap();
   84|       |
   85|      1|    rangeTokMap->setRangeToken(fgASCIIDigit, tok);
   86|       |
   87|      1|    tok = RangeToken::complementRanges(tok, tokFactory);
   88|       |
   89|       |    // Build the internal map.
   90|      1|    tok->createMap();
   91|       |
   92|      1|    rangeTokMap->setRangeToken(fgASCIIDigit, tok , true);
   93|       |
   94|       |    // Create word ranges
   95|      1|    tok = tokFactory->createRange();
   96|      1|    tok->addRange(chDigit_0, chDigit_9);
   97|      1|    tok->addRange(chLatin_A, chLatin_Z);
   98|      1|    tok->addRange(chUnderscore, chUnderscore);
   99|      1|    tok->addRange(chLatin_a, chLatin_z);
  100|       |    // Build the internal map.
  101|      1|    tok->createMap();
  102|      1|    rangeTokMap->setRangeToken(fgASCIIWord, tok);
  103|       |
  104|      1|    tok = RangeToken::complementRanges(tok, tokFactory);
  105|       |    // Build the internal map.
  106|      1|    tok->createMap();
  107|      1|    rangeTokMap->setRangeToken(fgASCIIWord, tok , true);
  108|       |
  109|       |    // Create xdigit ranges
  110|      1|    tok = tokFactory->createRange();
  111|      1|    tok->addRange(chDigit_0, chDigit_9);
  112|      1|    tok->addRange(chLatin_A, chLatin_F);
  113|      1|    tok->addRange(chLatin_a, chLatin_a);
  114|       |    // Build the internal map.
  115|      1|    tok->createMap();
  116|       |
  117|      1|    rangeTokMap->setRangeToken(fgASCIIXDigit, tok);
  118|       |
  119|      1|    tok = RangeToken::complementRanges(tok, tokFactory);
  120|       |    // Build the internal map.
  121|      1|    tok->createMap();
  122|      1|    rangeTokMap->setRangeToken(fgASCIIXDigit, tok , true);
  123|       |
  124|       |    // Create ascii ranges
  125|      1|    tok = tokFactory->createRange();
  126|      1|    tok->addRange(0x00, 0x7F);
  127|       |    // Build the internal map.
  128|      1|    tok->createMap();
  129|      1|    rangeTokMap->setRangeToken(fgASCII, tok);
  130|       |
  131|      1|    tok = RangeToken::complementRanges(tok, tokFactory);
  132|       |    // Build the internal map.
  133|      1|    tok->createMap();
  134|      1|    rangeTokMap->setRangeToken(fgASCII, tok , true);
  135|       |
  136|      1|    fRangesCreated = true;
  137|      1|}
_ZN11xercesc_3_217ASCIIRangeFactory20initializeKeywordMapEPNS_13RangeTokenMapE:
  142|      1|void ASCIIRangeFactory::initializeKeywordMap(RangeTokenMap *rangeTokMap) {
  143|       |
  144|      1|    if (fKeywordsInitialized)
  ------------------
  |  Branch (144:9): [True: 0, False: 1]
  ------------------
  145|      0|        return;
  146|       |
  147|      1|    rangeTokMap->addKeywordMap(fgASCIISpace, fgASCIICategory);
  148|      1|    rangeTokMap->addKeywordMap(fgASCIIDigit, fgASCIICategory);
  149|      1|    rangeTokMap->addKeywordMap(fgASCIIWord, fgASCIICategory);
  150|      1|    rangeTokMap->addKeywordMap(fgASCIIXDigit, fgASCIICategory);
  151|      1|    rangeTokMap->addKeywordMap(fgASCII, fgASCIICategory);
  152|       |
  153|      1|    fKeywordsInitialized = true;
  154|      1|}

_ZN11xercesc_3_217BlockRangeFactoryC2Ev:
  297|      1|{
  298|       |
  299|      1|}
_ZN11xercesc_3_217BlockRangeFactory11buildRangesEPNS_13RangeTokenMapE:
  308|      1|void BlockRangeFactory::buildRanges(RangeTokenMap *rangeTokMap) {
  309|       |
  310|      1|    if (fRangesCreated)
  ------------------
  |  Branch (310:9): [True: 0, False: 1]
  ------------------
  311|      0|        return;
  312|       |
  313|      1|    if (!fKeywordsInitialized) {
  ------------------
  |  Branch (313:9): [True: 0, False: 1]
  ------------------
  314|      0|        initializeKeywordMap(rangeTokMap);
  315|      0|    }
  316|       |
  317|      1|    TokenFactory* tokFactory = rangeTokMap->getTokenFactory();
  318|       |
  319|       |    //for performance, once the desired specials and private use are found
  320|       |    //don't need to compareString anymore
  321|      1|    bool foundSpecial = false;
  322|      1|    bool foundPrivate = false;
  323|       |
  324|     94|    for (int i=0; i < BLOCKNAMESIZE; i++) {
  ------------------
  |  Branch (324:19): [True: 93, False: 1]
  ------------------
  325|     93|        RangeToken* tok = tokFactory->createRange();
  326|     93|        tok->addRange(blockRanges[i*2], blockRanges[(i*2)+1]);
  327|       |
  328|     93|        if (!foundSpecial && XMLString::equals((XMLCh*)fgBlockNames[i] , (XMLCh*) fgBlockIsSpecials)) {
  ------------------
  |  Branch (328:13): [True: 83, False: 10]
  |  Branch (328:30): [True: 1, False: 82]
  ------------------
  329|      1|            tok->addRange(0xFFF0, 0xFFFD);
  330|      1|            foundSpecial = true;
  331|      1|        }
  332|     93|        if (!foundPrivate && XMLString::equals((XMLCh*)fgBlockNames[i] , (XMLCh*) fgBlockIsPrivateUse)) {
  ------------------
  |  Branch (332:13): [True: 75, False: 18]
  |  Branch (332:30): [True: 1, False: 74]
  ------------------
  333|      1|            tok->addRange(0xF0000, 0xFFFFD);
  334|      1|            tok->addRange(0x100000, 0x10FFFD);
  335|      1|            foundPrivate = true;
  336|      1|        }
  337|       |
  338|       |        // Build the internal map.
  339|     93|        tok->createMap();
  340|     93|        rangeTokMap->setRangeToken(fgBlockNames[i], tok);
  341|     93|        tok = RangeToken::complementRanges(tok, tokFactory);
  342|       |        // Build the internal map.
  343|     93|        tok->createMap();
  344|     93|        rangeTokMap->setRangeToken(fgBlockNames[i], tok , true);
  345|     93|    }
  346|       |
  347|      1|    fRangesCreated = true;
  348|      1|}
_ZN11xercesc_3_217BlockRangeFactory20initializeKeywordMapEPNS_13RangeTokenMapE:
  353|      1|void BlockRangeFactory::initializeKeywordMap(RangeTokenMap *rangeTokMap) {
  354|       |
  355|      1|    if (fKeywordsInitialized)
  ------------------
  |  Branch (355:9): [True: 0, False: 1]
  ------------------
  356|      0|        return;
  357|       |
  358|     94|    for (int i=0; i< BLOCKNAMESIZE; i++) {
  ------------------
  |  Branch (358:19): [True: 93, False: 1]
  ------------------
  359|     93|        rangeTokMap->addKeywordMap(fgBlockNames[i], fgBlockCategory);
  360|     93|    }
  361|       |
  362|      1|    fKeywordsInitialized = true;
  363|      1|}

_ZN11xercesc_3_29CharTokenC2ENS_5Token7tokTypeEiPNS_13MemoryManagerE:
   33|      2|    : Token(tkType, manager)
   34|      2|    , fCharData(ch)
   35|      2|{
   36|       |
   37|      2|}

_ZNK11xercesc_3_29CharToken7getCharEv:
   68|      2|inline XMLInt32 CharToken::getChar() const {
   69|       |
   70|      2|    return fCharData;
   71|      2|}

_ZN11xercesc_3_212ClosureTokenC2ENS_5Token7tokTypeEPS1_PNS_13MemoryManagerE:
   33|      8|    : Token(tkType, manager)
   34|      8|    , fMin(-1)    
   35|      8|    , fMax(-1)
   36|      8|    , fChild(tok)
   37|      8|{
   38|       |
   39|      8|}

_ZNK11xercesc_3_212ClosureToken6getMaxEv:
   80|      8|inline int ClosureToken::getMax() const {
   81|       |
   82|      8|    return fMax;
   83|      8|}
_ZNK11xercesc_3_212ClosureToken6getMinEv:
   85|     20|inline int ClosureToken::getMin() const {
   86|       |
   87|     20|    return fMin;
   88|     20|}
_ZNK11xercesc_3_212ClosureToken8getChildEm:
   90|     12|inline Token* ClosureToken::getChild(const XMLSize_t) const {
   91|       |
   92|     12|    return fChild;
   93|     12|}
_ZN11xercesc_3_212ClosureToken6setMaxEi:
   98|      4|inline void ClosureToken::setMax(const int maxVal) {
   99|       |
  100|      4|    fMax = maxVal;
  101|      4|}
_ZN11xercesc_3_212ClosureToken6setMinEi:
  103|      4|inline void ClosureToken::setMin(const int minVal) {
  104|       |
  105|      4|    fMin = minVal;
  106|      4|}

_ZN11xercesc_3_211ConcatTokenC2EPNS_5TokenES2_PNS_13MemoryManagerE:
   33|      2|    : Token(Token::T_CONCAT, manager)
   34|      2|    , fChild1(tok1)
   35|      2|    , fChild2(tok2)
   36|      2|{
   37|       |
   38|      2|}

_ZNK11xercesc_3_211ConcatToken4sizeEv:
   65|      3|inline XMLSize_t ConcatToken::size() const {
   66|       |
   67|      3|    return 2;
   68|      3|}
_ZNK11xercesc_3_211ConcatToken8getChildEm:
   70|      6|inline Token* ConcatToken::getChild(const XMLSize_t index) const {
   71|       |
   72|      6|    return index == 0 ? fChild1 : fChild2;
  ------------------
  |  Branch (72:12): [True: 3, False: 3]
  ------------------
   73|      6|}

_ZN11xercesc_3_22OpC2ENS0_6opTypeEPNS_13MemoryManagerE:
   34|     72|    : fMemoryManager(manager)
   35|     72|    , fOpType(type)
   36|     72|    , fNextOp(0)
   37|     72|{
   38|     72|}
_ZN11xercesc_3_26CharOpC2ENS_2Op6opTypeEiPNS_13MemoryManagerE:
   91|      2|    : Op(type, manager)
   92|      2|      , fCharData(charData) {
   93|      2|}
_ZN11xercesc_3_27UnionOpC2ENS_2Op6opTypeEmPNS_13MemoryManagerE:
  107|      1|    : Op(type, manager)
  108|      1|      , fBranches(new (manager) RefVectorOf<Op> (size, false, manager)) {
  109|       |
  110|      1|}
_ZNK11xercesc_3_27UnionOp7getSizeEv:
  115|     16|XMLSize_t UnionOp::getSize() const {
  116|       |
  117|     16|    return fBranches->size();
  118|     16|}
_ZNK11xercesc_3_27UnionOp9elementAtEm:
  120|     27|const Op* UnionOp::elementAt(XMLSize_t index) const {
  121|       |
  122|     27|    return fBranches->elementAt(index);
  123|     27|}
_ZN11xercesc_3_27UnionOp10addElementEPNS_2OpE:
  125|      2|void UnionOp::addElement(Op* const op) {
  126|       |
  127|      2|    fBranches->addElement(op);
  128|      2|}
_ZN11xercesc_3_27ChildOpC2ENS_2Op6opTypeEPNS_13MemoryManagerE:
  134|     32|    : Op(type, manager)
  135|     32|      , fChild(0) {
  136|       |
  137|     32|}
_ZNK11xercesc_3_27ChildOp8getChildEv:
  142|    116|const Op* ChildOp::getChild() const {
  143|       |
  144|    116|    return fChild;
  145|    116|}
_ZN11xercesc_3_27ChildOp8setChildEPKNS_2OpE:
  147|     32|void ChildOp::setChild(const Op* const child) {
  148|       |
  149|     32|    fChild = child;
  150|     32|}
_ZN11xercesc_3_210ModifierOpC2ENS_2Op6opTypeEiiPNS_13MemoryManagerE:
  157|      4|    : ChildOp(type, manager)
  158|      4|      , fVal1(v1)
  159|      4|      , fVal2(v2) {
  160|       |
  161|      4|}
_ZNK11xercesc_3_210ModifierOp7getDataEv:
  166|     16|XMLInt32 ModifierOp::getData() const {
  167|       |
  168|     16|    return fVal1;
  169|     16|}
_ZN11xercesc_3_27RangeOpC2ENS_2Op6opTypeEPKNS_5TokenEPNS_13MemoryManagerE:
  180|     37|    : Op (type, manager)
  181|     37|      , fToken(token) {
  182|       |
  183|     37|}
_ZNK11xercesc_3_27RangeOp8getTokenEv:
  188|    132|const Token* RangeOp::getToken() const {
  189|       |
  190|    132|    return fToken;
  191|    132|}

_ZNK11xercesc_3_22Op9getOpTypeEv:
  277|    182|inline Op::opType Op::getOpType() const {
  278|       |
  279|    182|    return fOpType;
  280|    182|}
_ZNK11xercesc_3_22Op9getNextOpEv:
  282|    141|inline const Op* Op::getNextOp() const {
  283|       |
  284|    141|    return fNextOp;
  285|    141|}
_ZN11xercesc_3_22Op9setOpTypeENS0_6opTypeE:
  290|      4|inline void Op::setOpType(const Op::opType type) {
  291|       |
  292|      4|    fOpType = type;
  293|      4|}
_ZN11xercesc_3_22Op9setNextOpEPKS0_:
  295|     71|inline void Op::setNextOp(const Op* const nextOp) {
  296|       |    
  297|     71|    fNextOp = nextOp;
  298|     71|}

_ZN11xercesc_3_29OpFactoryC2EPNS_13MemoryManagerE:
   35|      4|    fOpVector(0)
   36|      4|    , fMemoryManager(manager)
   37|      4|{
   38|      4|    fOpVector = new (fMemoryManager) RefVectorOf<Op>(16, true, fMemoryManager);
   39|      4|}
_ZN11xercesc_3_29OpFactory12createCharOpEi:
   57|      2|CharOp* OpFactory::createCharOp(XMLInt32 data) {
   58|       |
   59|      2|    CharOp* tmpOp = new (fMemoryManager) CharOp(Op::O_CHAR, data, fMemoryManager);
   60|       |
   61|      2|    fOpVector->addElement(tmpOp);
   62|      2|    return tmpOp;
   63|      2|}
_ZN11xercesc_3_29OpFactory13createUnionOpEm:
   82|      1|UnionOp* OpFactory::createUnionOp(XMLSize_t size) {
   83|       |
   84|      1|    UnionOp* tmpOp = new (fMemoryManager) UnionOp(Op::O_UNION, size, fMemoryManager);
   85|       |
   86|      1|    fOpVector->addElement(tmpOp);
   87|      1|    return tmpOp;
   88|      1|}
_ZN11xercesc_3_29OpFactory15createClosureOpEi:
   90|      4|ChildOp* OpFactory::createClosureOp(int id) {
   91|       |
   92|      4|    ModifierOp* tmpOp = new (fMemoryManager) ModifierOp(Op::O_CLOSURE, id, -1, fMemoryManager);
   93|       |
   94|      4|    fOpVector->addElement(tmpOp);
   95|      4|    return tmpOp;
   96|      4|}
_ZN11xercesc_3_29OpFactory16createQuestionOpEb:
  106|     28|ChildOp* OpFactory::createQuestionOp(bool nonGreedy) {
  107|       |
  108|     28|    ChildOp* tmpOp = new (fMemoryManager)  ChildOp(nonGreedy ? Op::O_NONGREEDYQUESTION :
  ------------------
  |  Branch (108:52): [True: 0, False: 28]
  ------------------
  109|     28|                                             Op::O_QUESTION, fMemoryManager);
  110|       |
  111|     28|    fOpVector->addElement(tmpOp);
  112|     28|    return tmpOp;
  113|     28|}
_ZN11xercesc_3_29OpFactory13createRangeOpEPKNS_5TokenE:
  115|     37|RangeOp* OpFactory::createRangeOp(const Token* const token) {
  116|       |
  117|     37|    RangeOp* tmpOp = new (fMemoryManager)  RangeOp(Op::O_RANGE, token, fMemoryManager);
  118|       |    
  119|     37|    fOpVector->addElement(tmpOp);
  120|     37|    return tmpOp;
  121|     37|}

_ZN11xercesc_3_210ParenTokenC2ENS_5Token7tokTypeEPS1_iPNS_13MemoryManagerE:
   34|      4|    : Token(tkType, manager)
   35|      4|    , fNoParen(noParen)
   36|      4|    , fChild(tok)
   37|      4|{
   38|       |
   39|      4|}

_ZNK11xercesc_3_210ParenToken10getNoParenEv:
   71|      4|inline int ParenToken::getNoParen() const {
   72|       |
   73|      4|    return fNoParen;
   74|      4|}
_ZNK11xercesc_3_210ParenToken8getChildEm:
   76|      8|inline Token* ParenToken::getChild(const XMLSize_t) const {
   77|       |
   78|      8|    return fChild;
   79|      8|}

_ZN11xercesc_3_218ParserForXMLSchemaC2EPNS_13MemoryManagerE:
   40|      4|    : RegxParser(manager)
   41|      4|{
   42|       |
   43|      4|}
_ZN11xercesc_3_218ParserForXMLSchemaD2Ev:
   45|      4|ParserForXMLSchema::~ParserForXMLSchema() {
   46|       |
   47|      4|}
_ZN11xercesc_3_218ParserForXMLSchema11processPlusEPNS_5TokenE:
   66|      2|Token* ParserForXMLSchema::processPlus(Token* const tok) {
   67|       |
   68|       |    // XML Schema doesn't support reluctant quantifiers
   69|      2|    processNext();
   70|      2|    return getTokenFactory()->createConcat(tok,
   71|      2|                               getTokenFactory()->createClosure(tok));
   72|      2|}
_ZN11xercesc_3_218ParserForXMLSchema11processStarEPNS_5TokenE:
   74|      2|Token* ParserForXMLSchema::processStar(Token* const tok) {
   75|       |
   76|       |    // XML Schema doesn't support reluctant quantifiers
   77|      2|    processNext();
   78|      2|    return getTokenFactory()->createClosure(tok);
   79|      2|}
_ZN11xercesc_3_218ParserForXMLSchema15processQuestionEPNS_5TokenE:
   81|      1|Token* ParserForXMLSchema::processQuestion(Token* const tok) {
   82|       |
   83|       |    // XML Schema doesn't support reluctant quantifiers
   84|      1|    processNext();
   85|       |
   86|      1|    TokenFactory* tokFactory = getTokenFactory();
   87|      1|    Token* retTok = tokFactory->createUnion();
   88|      1|    retTok->addChild(tok, tokFactory);
   89|      1|    retTok->addChild(tokFactory->createToken(Token::T_EMPTY), tokFactory);
   90|      1|    return retTok;
   91|      1|}
_ZN11xercesc_3_218ParserForXMLSchema12processParenEv:
   93|      4|Token* ParserForXMLSchema::processParen() {
   94|       |
   95|       |    // XML Schema doesn't support back references
   96|      4|    processNext();
   97|      4|    Token* retTok = getTokenFactory()->createParenthesis(parseRegx(true), 0);
   98|       |
   99|      4|    if (getState() != REGX_T_RPAREN) {
  ------------------
  |  Branch (99:9): [True: 0, False: 4]
  ------------------
  100|      0|        ThrowXMLwithMemMgr(ParseException, XMLExcepts::Parser_Factor1, getMemoryManager());
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  101|      0|    }
  102|       |
  103|      4|    processNext();
  104|      4|    return retTok;
  105|      4|}
_ZN11xercesc_3_218ParserForXMLSchema13checkQuestionEm:
  117|      4|bool ParserForXMLSchema::checkQuestion(const XMLSize_t ) {
  118|       |
  119|       |    // XML Schema doesn't support reluctant quantifiers
  120|      4|    return false;
  121|      4|}
_ZN11xercesc_3_218ParserForXMLSchema13decodeEscapedEv:
  124|      1|XMLInt32 ParserForXMLSchema::decodeEscaped() {
  125|       |
  126|       |    // XML Schema doesn't support an escaped "$"
  127|      1|    if (getState() != REGX_T_BACKSOLIDUS)
  ------------------
  |  Branch (127:9): [True: 0, False: 1]
  ------------------
  128|      0|        ThrowXMLwithMemMgr(ParseException,XMLExcepts::Parser_Next1, getMemoryManager());
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  129|       |
  130|      1|    XMLInt32 ch = getCharData();
  131|       |
  132|      1|    switch (ch) {
  133|      0|    case chLatin_n:
  ------------------
  |  Branch (133:5): [True: 0, False: 1]
  ------------------
  134|      0|        ch = chLF;
  135|      0|        break;
  136|      0|    case chLatin_r:
  ------------------
  |  Branch (136:5): [True: 0, False: 1]
  ------------------
  137|      0|        ch = chCR;
  138|      0|        break;
  139|      0|    case chLatin_t:
  ------------------
  |  Branch (139:5): [True: 0, False: 1]
  ------------------
  140|      0|        ch = chHTab;
  141|      0|        break;
  142|      0|    case chBackSlash:
  ------------------
  |  Branch (142:5): [True: 0, False: 1]
  ------------------
  143|      0|    case chPipe:
  ------------------
  |  Branch (143:5): [True: 0, False: 1]
  ------------------
  144|      0|    case chPeriod:
  ------------------
  |  Branch (144:5): [True: 0, False: 1]
  ------------------
  145|      0|    case chCaret:
  ------------------
  |  Branch (145:5): [True: 0, False: 1]
  ------------------
  146|      1|    case chDash:
  ------------------
  |  Branch (146:5): [True: 1, False: 0]
  ------------------
  147|      1|    case chQuestion:
  ------------------
  |  Branch (147:5): [True: 0, False: 1]
  ------------------
  148|      1|    case chAsterisk:
  ------------------
  |  Branch (148:5): [True: 0, False: 1]
  ------------------
  149|      1|    case chPlus:
  ------------------
  |  Branch (149:5): [True: 0, False: 1]
  ------------------
  150|      1|    case chOpenCurly:
  ------------------
  |  Branch (150:5): [True: 0, False: 1]
  ------------------
  151|      1|    case chCloseCurly:
  ------------------
  |  Branch (151:5): [True: 0, False: 1]
  ------------------
  152|      1|    case chOpenParen:
  ------------------
  |  Branch (152:5): [True: 0, False: 1]
  ------------------
  153|      1|    case chCloseParen:
  ------------------
  |  Branch (153:5): [True: 0, False: 1]
  ------------------
  154|      1|    case chOpenSquare:
  ------------------
  |  Branch (154:5): [True: 0, False: 1]
  ------------------
  155|      1|    case chCloseSquare:
  ------------------
  |  Branch (155:5): [True: 0, False: 1]
  ------------------
  156|      1|        break;
  157|      0|    default:
  ------------------
  |  Branch (157:5): [True: 0, False: 1]
  ------------------
  158|      0|        {
  159|      0|        XMLCh chString[] = {chBackSlash, (XMLCh)ch, chNull};
  160|      0|        ThrowXMLwithMemMgr1(ParseException,XMLExcepts::Parser_Process2, chString, getMemoryManager());
  ------------------
  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
  161|      1|        }
  162|      1|    }
  163|       |
  164|      1|    return ch;
  165|      1|}

_ZN11xercesc_3_212RangeFactoryC2Ev:
   33|      4|   fRangesCreated(false)
   34|      4| , fKeywordsInitialized(false)
   35|      4|{
   36|       |
   37|      4|}

_ZN11xercesc_3_210RangeTokenC2ENS_5Token7tokTypeEPNS_13MemoryManagerE:
   59|    295|    : Token(tkType, manager)
   60|    295|    , fSorted(false)
   61|    295|    , fCompacted(false)
   62|    295|    , fNonMapIndex(0)
   63|    295|    , fElemCount(0)
   64|    295|    , fMaxCount(INITIALSIZE)
   65|    295|    , fMap(0)
   66|    295|    , fRanges(0)
   67|    295|    , fCaseIToken(0)
   68|    295|    , fMemoryManager(manager)
   69|    295|{
   70|       |
   71|    295|}
_ZN11xercesc_3_210RangeToken14setRangeValuesEPij:
  313|      4|{
  314|      4|    if (fRanges) {
  ------------------
  |  Branch (314:9): [True: 0, False: 4]
  ------------------
  315|       |
  316|      0|        if (fMap) {
  ------------------
  |  Branch (316:13): [True: 0, False: 0]
  ------------------
  317|      0|            fMemoryManager->deallocate(fMap);//delete [] fMap;
  318|      0|            fMap = 0;
  319|      0|        }
  320|       |
  321|      0|        fElemCount = 0;
  322|      0|        fMemoryManager->deallocate(fRanges);//delete [] fRanges;
  323|      0|        fRanges = 0;
  324|      0|    }
  325|       |
  326|      4|    fElemCount = fMaxCount = count;
  327|      4|    fRanges = rangeValues;
  328|      4|}
_ZN11xercesc_3_210RangeToken8addRangeEii:
  333|   151k|void RangeToken::addRange(const XMLInt32 start, const XMLInt32 end) {
  334|       |
  335|   151k|    XMLInt32 val1, val2;
  336|       |
  337|   151k|    fCaseIToken = 0;
  338|       |
  339|   151k|    if (start <= end) {
  ------------------
  |  Branch (339:9): [True: 151k, False: 1]
  ------------------
  340|       |
  341|   151k|        val1 = start;
  342|   151k|        val2 = end;
  343|   151k|    }
  344|      1|    else {
  345|       |
  346|      1|        val1 = end;
  347|      1|        val2 = start;
  348|      1|    }
  349|       |
  350|   151k|    if (fRanges == 0) {
  ------------------
  |  Branch (350:9): [True: 287, False: 151k]
  ------------------
  351|       |
  352|    287|        fRanges = (XMLInt32*) fMemoryManager->allocate
  353|    287|        (
  354|    287|            fMaxCount * sizeof(XMLInt32)
  355|    287|        );//new XMLInt32[fMaxCount];
  356|    287|        fRanges[0] = val1;
  357|    287|        fRanges[1] = val2;
  358|    287|        fElemCount = 2;
  359|    287|        fSorted = true;
  360|    287|    }
  361|   151k|    else {
  362|       |
  363|   151k|        if (fRanges[fElemCount-1] + 1 == val1) {
  ------------------
  |  Branch (363:13): [True: 142k, False: 8.09k]
  ------------------
  364|       |
  365|   142k|            fRanges[fElemCount-1] = val2;
  366|   142k|            return;
  367|   142k|        }
  368|       |
  369|  8.09k|        if (fElemCount + 2 >= fMaxCount) {
  ------------------
  |  Branch (369:13): [True: 803, False: 7.29k]
  ------------------
  370|    803|            expand(2);
  371|    803|        }
  372|       |
  373|  8.09k|        if(fSorted && fRanges[fElemCount-1] >= val1)
  ------------------
  |  Branch (373:12): [True: 8.09k, False: 0]
  |  Branch (373:23): [True: 7, False: 8.08k]
  ------------------
  374|      7|        {
  375|      9|            for (int i = 0; i < (int)fElemCount; i +=2)
  ------------------
  |  Branch (375:29): [True: 9, False: 0]
  ------------------
  376|      9|            {
  377|       |                // check if this range is already part of this one
  378|      9|                if (fRanges[i] <= val1 && fRanges[i+1] >= val2)
  ------------------
  |  Branch (378:21): [True: 2, False: 7]
  |  Branch (378:43): [True: 0, False: 2]
  ------------------
  379|      0|                    break;
  380|       |                // or if the new one extends the old one
  381|      9|                else if(fRanges[i]==val1 && fRanges[i+1] < val2)
  ------------------
  |  Branch (381:25): [True: 0, False: 9]
  |  Branch (381:45): [True: 0, False: 0]
  ------------------
  382|      0|                {
  383|      0|                    fRanges[i+1]=val2;
  384|      0|                    break;
  385|      0|                }
  386|      9|                else if (fRanges[i] > val1 ||
  ------------------
  |  Branch (386:26): [True: 7, False: 2]
  ------------------
  387|      9|                          (fRanges[i]==val1 && fRanges[i+1] > val2))
  ------------------
  |  Branch (387:28): [True: 0, False: 2]
  |  Branch (387:48): [True: 0, False: 0]
  ------------------
  388|      7|                {
  389|  2.04k|                    for(int j=fElemCount-1;j>=i;j--)
  ------------------
  |  Branch (389:44): [True: 2.04k, False: 7]
  ------------------
  390|  2.04k|                        fRanges[j+2]=fRanges[j];
  391|      7|                    fRanges[i]   = val1;
  392|      7|                    fRanges[i+1] = val2;
  393|      7|                    fElemCount  += 2;
  394|      7|                    break;
  395|      7|                }
  396|      9|            }
  397|      7|        }
  398|  8.08k|        else
  399|  8.08k|        {
  400|  8.08k|            if (fRanges[fElemCount-1] >= val1)
  ------------------
  |  Branch (400:17): [True: 0, False: 8.08k]
  ------------------
  401|      0|                fSorted = false;
  402|       |
  403|  8.08k|            fRanges[fElemCount++] = val1;
  404|  8.08k|            fRanges[fElemCount++] = val2;
  405|       |
  406|  8.08k|            if (!fSorted) {
  ------------------
  |  Branch (406:17): [True: 0, False: 8.08k]
  ------------------
  407|      0|                sortRanges();
  408|      0|            }
  409|  8.08k|        }
  410|  8.09k|    }
  411|   151k|}
_ZN11xercesc_3_210RangeToken10sortRangesEv:
  413|    168|void RangeToken::sortRanges() {
  414|       |
  415|    168|    if (fSorted || fRanges == 0)
  ------------------
  |  Branch (415:9): [True: 160, False: 8]
  |  Branch (415:20): [True: 4, False: 4]
  ------------------
  416|    164|        return;
  417|       |
  418|    556|    for (int i = fElemCount - 4; i >= 0; i -= 2) {
  ------------------
  |  Branch (418:34): [True: 552, False: 4]
  ------------------
  419|       |
  420|  76.2k|        for (int j = 0; j <= i; j +=2) {
  ------------------
  |  Branch (420:25): [True: 75.7k, False: 552]
  ------------------
  421|       |
  422|  75.7k|            if (fRanges[j] > fRanges[j + 2]
  ------------------
  |  Branch (422:17): [True: 23.1k, False: 52.5k]
  ------------------
  423|  75.7k|                || (fRanges[j]==fRanges[j+2] && fRanges[j+1] > fRanges[j+3])) {
  ------------------
  |  Branch (423:21): [True: 0, False: 52.5k]
  |  Branch (423:49): [True: 0, False: 0]
  ------------------
  424|       |
  425|  23.1k|                XMLInt32 tmpVal = fRanges[j+2];
  426|  23.1k|                fRanges[j+2] = fRanges[j];
  427|  23.1k|                fRanges[j] = tmpVal;
  428|  23.1k|                tmpVal = fRanges[j+3];
  429|  23.1k|                fRanges[j+3] = fRanges[j+1];
  430|  23.1k|                fRanges[j+1] = tmpVal;
  431|  23.1k|            }
  432|  75.7k|        }
  433|    552|    }
  434|       |
  435|      4|    fSorted = true;
  436|      4|}
_ZN11xercesc_3_210RangeToken13compactRangesEv:
  438|    152|void RangeToken::compactRanges() {
  439|       |
  440|    152|    if (fCompacted || fRanges == 0 || fElemCount <= 2)
  ------------------
  |  Branch (440:9): [True: 4, False: 148]
  |  Branch (440:23): [True: 0, False: 148]
  |  Branch (440:39): [True: 98, False: 50]
  ------------------
  441|    102|        return;
  442|       |
  443|     50|    unsigned int base = 0;
  444|     50|    unsigned int target = 0;
  445|       |
  446|  4.31k|    while (target < fElemCount) {
  ------------------
  |  Branch (446:12): [True: 4.26k, False: 50]
  ------------------
  447|       |
  448|  4.26k|        if (base != target) {
  ------------------
  |  Branch (448:13): [True: 774, False: 3.49k]
  ------------------
  449|       |
  450|    774|            fRanges[base] = fRanges[target++];
  451|    774|            fRanges[base+1] = fRanges[target++];
  452|    774|        }
  453|  3.49k|        else
  454|  3.49k|            target += 2;
  455|       |
  456|  4.26k|        XMLInt32 baseEnd = fRanges[base + 1];
  457|       |
  458|  5.03k|        while (target < fElemCount) {
  ------------------
  |  Branch (458:16): [True: 4.98k, False: 50]
  ------------------
  459|       |
  460|  4.98k|            XMLInt32 startRange = fRanges[target];
  461|       |
  462|  4.98k|            if (baseEnd + 1 < startRange)
  ------------------
  |  Branch (462:17): [True: 4.21k, False: 765]
  ------------------
  463|  4.21k|                break;
  464|       |
  465|    765|            XMLInt32 endRange = fRanges[target + 1];
  466|       |
  467|    765|            if (baseEnd + 1 == startRange || baseEnd < endRange) {
  ------------------
  |  Branch (467:17): [True: 765, False: 0]
  |  Branch (467:46): [True: 0, False: 0]
  ------------------
  468|       |
  469|    765|                baseEnd = endRange;
  470|    765|                fRanges[base+1] = baseEnd;
  471|    765|                target += 2;
  472|    765|            }
  473|      0|            else if (baseEnd >= endRange) {
  ------------------
  |  Branch (473:22): [True: 0, False: 0]
  ------------------
  474|      0|                target += 2;
  475|      0|            }
  476|      0|            else {
  477|      0|                ThrowXMLwithMemMgr(RuntimeException, XMLExcepts::Regex_CompactRangesError, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  478|      0|            }
  479|    765|        } // inner while
  480|       |
  481|  4.26k|        base += 2;
  482|  4.26k|    }
  483|       |
  484|     50|    fElemCount = base;
  485|     50|    fCompacted = true;
  486|     50|}
_ZN11xercesc_3_210RangeToken11mergeRangesEPKNS_5TokenE:
  488|      8|void RangeToken::mergeRanges(const Token *const tok) {
  489|       |
  490|       |
  491|      8|    if (tok->getTokenType() != this->getTokenType())
  ------------------
  |  Branch (491:9): [True: 0, False: 8]
  ------------------
  492|      0|        ThrowXMLwithMemMgr(IllegalArgumentException, XMLExcepts::Regex_MergeRangesTypeMismatch, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  493|       |
  494|      8|    RangeToken* rangeTok = (RangeToken *) tok;
  495|       |
  496|      8|    if (rangeTok->fRanges == 0)
  ------------------
  |  Branch (496:9): [True: 0, False: 8]
  ------------------
  497|      0|        return;
  498|       |
  499|      8|    fCaseIToken = 0;
  500|      8|    sortRanges();
  501|      8|    rangeTok->sortRanges();
  502|       |
  503|      8|    if (fRanges == 0) {
  ------------------
  |  Branch (503:9): [True: 4, False: 4]
  ------------------
  504|       |
  505|      4|        fMaxCount = rangeTok->fMaxCount;
  506|      4|        fRanges = (XMLInt32*) fMemoryManager->allocate
  507|      4|        (
  508|      4|            fMaxCount * sizeof(XMLInt32)
  509|      4|        );//new XMLInt32[fMaxCount];
  510|  4.81k|        for (unsigned int index = 0; index < rangeTok->fElemCount; index++) {
  ------------------
  |  Branch (510:38): [True: 4.81k, False: 4]
  ------------------
  511|  4.81k|            fRanges[index] = rangeTok->fRanges[index];
  512|  4.81k|        }
  513|       |
  514|      4|        fElemCount = rangeTok->fElemCount;
  515|      4|        fSorted = true;
  516|      4|        return;
  517|      4|    }
  518|       |
  519|      4|    unsigned int newMaxCount = (fElemCount + rangeTok->fElemCount >= fMaxCount)
  ------------------
  |  Branch (519:32): [True: 3, False: 1]
  ------------------
  520|      4|                                 ? fMaxCount + rangeTok->fMaxCount : fMaxCount;
  521|      4|    XMLInt32* result = (XMLInt32*) fMemoryManager->allocate
  522|      4|    (
  523|      4|        newMaxCount * sizeof(XMLInt32)
  524|      4|    );//new XMLInt32[newMaxCount];
  525|       |
  526|  2.80k|    for (unsigned int i=0, j=0, k=0; i < fElemCount || j < rangeTok->fElemCount;) {
  ------------------
  |  Branch (526:38): [True: 2.79k, False: 12]
  |  Branch (526:56): [True: 8, False: 4]
  ------------------
  527|       |
  528|  2.80k|        if (i >= fElemCount) {
  ------------------
  |  Branch (528:13): [True: 8, False: 2.79k]
  ------------------
  529|       |
  530|     24|            for (int count = 0; count < 2; count++) {
  ------------------
  |  Branch (530:33): [True: 16, False: 8]
  ------------------
  531|     16|                result[k++] = rangeTok->fRanges[j++];
  532|     16|            }
  533|      8|        }
  534|  2.79k|        else if (j >= rangeTok->fElemCount) {
  ------------------
  |  Branch (534:18): [True: 12, False: 2.78k]
  ------------------
  535|       |
  536|     36|            for (int count = 0; count < 2; count++) {
  ------------------
  |  Branch (536:33): [True: 24, False: 12]
  ------------------
  537|     24|                result[k++] = fRanges[i++];
  538|     24|            }
  539|     12|        }
  540|  2.78k|        else if (rangeTok->fRanges[j] < fRanges[i]
  ------------------
  |  Branch (540:18): [True: 618, False: 2.16k]
  ------------------
  541|  2.78k|                 || (rangeTok->fRanges[j] == fRanges[i]
  ------------------
  |  Branch (541:22): [True: 0, False: 2.16k]
  ------------------
  542|  2.16k|                     && rangeTok->fRanges[j+1] < fRanges[i+1])) {
  ------------------
  |  Branch (542:25): [True: 0, False: 0]
  ------------------
  543|       |
  544|  1.85k|            for (int count = 0; count < 2; count++) {
  ------------------
  |  Branch (544:33): [True: 1.23k, False: 618]
  ------------------
  545|  1.23k|                result[k++] = rangeTok->fRanges[j++];
  546|  1.23k|            }
  547|    618|        }
  548|  2.16k|        else {
  549|       |
  550|  6.49k|            for (int count = 0; count < 2; count++) {
  ------------------
  |  Branch (550:33): [True: 4.33k, False: 2.16k]
  ------------------
  551|       |
  552|  4.33k|                result[k++] = fRanges[i++];
  553|  4.33k|            }
  554|  2.16k|        }
  555|  2.80k|    }
  556|       |
  557|      4|    fMemoryManager->deallocate(fRanges);//delete [] fRanges;
  558|      4|    fElemCount += rangeTok->fElemCount;
  559|      4|    fRanges = result;
  560|      4|    fMaxCount = newMaxCount;
  561|      4|}
_ZN11xercesc_3_210RangeToken16complementRangesEPS0_PNS_12TokenFactoryEPNS_13MemoryManagerE:
  743|    143|                                    MemoryManager* const manager) {
  744|       |
  745|    143|    if (tok->getTokenType() != T_RANGE && tok->getTokenType() != T_NRANGE)
  ------------------
  |  Branch (745:9): [True: 0, False: 143]
  |  Branch (745:43): [True: 0, False: 0]
  ------------------
  746|      0|        ThrowXMLwithMemMgr(IllegalArgumentException, XMLExcepts::Regex_ComplementRangesInvalidArg, manager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  747|       |
  748|    143|    tok->sortRanges();
  749|    143|    tok->compactRanges();
  750|       |
  751|    143|    XMLInt32 lastElem = tok->fRanges[tok->fElemCount - 1];
  752|    143|    RangeToken* rangeTok = tokFactory->createRange();
  753|       |
  754|    143|    if (tok->fRanges[0] > 0) {
  ------------------
  |  Branch (754:9): [True: 138, False: 5]
  ------------------
  755|    138|        rangeTok->addRange(0, tok->fRanges[0] - 1);
  756|    138|    }
  757|       |
  758|  4.69k|    for (unsigned int i= 1; i< tok->fElemCount - 2; i += 2) {
  ------------------
  |  Branch (758:29): [True: 4.55k, False: 143]
  ------------------
  759|  4.55k|        rangeTok->addRange(tok->fRanges[i] + 1, tok->fRanges[i+1] - 1);
  760|  4.55k|    }
  761|       |
  762|    143|    if (lastElem != UTF16_MAX) {
  ------------------
  |  Branch (762:9): [True: 141, False: 2]
  ------------------
  763|    141|        rangeTok->addRange(lastElem + 1, UTF16_MAX);
  764|    141|    }
  765|       |
  766|    143|    rangeTok->fCompacted = true;
  767|       |
  768|    143|    return rangeTok;
  769|    143|}
_ZN11xercesc_3_210RangeToken5matchEi:
  775|    132|bool RangeToken::match(const XMLInt32 ch) {
  776|       |
  777|    132|    createMap();
  778|       |
  779|    132|    bool ret;
  780|       |
  781|    132|    if (getTokenType() == T_RANGE) {
  ------------------
  |  Branch (781:9): [True: 132, False: 0]
  ------------------
  782|       |
  783|    132|        if (ch < MAPSIZE)
  ------------------
  |  Branch (783:13): [True: 132, False: 0]
  ------------------
  784|    132|            return ((fMap[ch/32] & (1<<(ch&0x1f))) != 0);
  785|       |
  786|      0|        ret = false;
  787|       |
  788|      0|        for (unsigned int i= fNonMapIndex; i< fElemCount; i +=2) {
  ------------------
  |  Branch (788:44): [True: 0, False: 0]
  ------------------
  789|       |
  790|      0|            if (fRanges[i] <= ch && ch <= fRanges[i+1])
  ------------------
  |  Branch (790:17): [True: 0, False: 0]
  |  Branch (790:37): [True: 0, False: 0]
  ------------------
  791|      0|                return true;
  792|      0|        }
  793|      0|    }
  794|      0|    else {
  795|       |
  796|      0|        if (ch < MAPSIZE)
  ------------------
  |  Branch (796:13): [True: 0, False: 0]
  ------------------
  797|      0|            return ((fMap[ch/32] & (1<<(ch&0x1f))) == 0);
  798|       |
  799|      0|        ret = true;
  800|       |
  801|      0|        for (unsigned int i= fNonMapIndex; i< fElemCount; i += 2) {
  ------------------
  |  Branch (801:44): [True: 0, False: 0]
  ------------------
  802|       |
  803|      0|            if (fRanges[i] <= ch && ch <= fRanges[i+1])
  ------------------
  |  Branch (803:17): [True: 0, False: 0]
  |  Branch (803:37): [True: 0, False: 0]
  ------------------
  804|      0|                return false;
  805|      0|        }
  806|      0|    }
  807|       |
  808|      0|    return ret;
  809|    132|}
_ZN11xercesc_3_210RangeToken6expandEj:
  814|    803|void RangeToken::expand(const unsigned int length) {
  815|       |
  816|    803|    unsigned int newMax = fElemCount + length;
  817|       |
  818|       |    // Avoid too many reallocations by expanding by a percentage
  819|    803|    unsigned int minNewMax = (unsigned int)((double)fElemCount * 1.25);
  820|    803|    if (newMax < minNewMax)
  ------------------
  |  Branch (820:9): [True: 803, False: 0]
  ------------------
  821|    803|        newMax = minNewMax;
  822|       |
  823|    803|    XMLInt32* newList = (XMLInt32*) fMemoryManager->allocate
  824|    803|    (
  825|    803|        newMax * sizeof(XMLInt32)
  826|    803|    );//new XMLInt32[newMax];
  827|  74.5k|    for (unsigned int index = 0; index < fElemCount; index++)
  ------------------
  |  Branch (827:34): [True: 73.7k, False: 803]
  ------------------
  828|  73.7k|        newList[index] = fRanges[index];
  829|       |
  830|    803|    fMemoryManager->deallocate(fRanges);//delete [] fRanges;
  831|    803|    fRanges = newList;
  832|    803|    fMaxCount = newMax;
  833|    803|}
_ZN11xercesc_3_210RangeToken11doCreateMapEv:
  835|    291|void RangeToken::doCreateMap() {
  836|       |
  837|    291|    assert(!fMap);
  838|       |
  839|    291|    int asize = MAPSIZE/32;
  840|    291|    fMap = (int*) fMemoryManager->allocate(asize * sizeof(int));//new int[asize];
  841|    291|    fNonMapIndex = fElemCount;
  842|       |
  843|  2.61k|    for (int i = 0; i < asize; i++) {
  ------------------
  |  Branch (843:21): [True: 2.32k, False: 291]
  ------------------
  844|  2.32k|        fMap[i] = 0;
  845|  2.32k|    }
  846|       |
  847|    644|    for (unsigned int j= 0; j < fElemCount; j += 2) {
  ------------------
  |  Branch (847:29): [True: 632, False: 12]
  ------------------
  848|       |
  849|    632|        XMLInt32 begin = fRanges[j];
  850|    632|        XMLInt32 end = fRanges[j+1];
  851|       |
  852|    632|        if (begin < MAPSIZE) {
  ------------------
  |  Branch (852:13): [True: 492, False: 140]
  ------------------
  853|       |
  854|  37.6k|            for (int k = begin; k <= end && k < MAPSIZE; k++) {
  ------------------
  |  Branch (854:33): [True: 37.2k, False: 353]
  |  Branch (854:45): [True: 37.1k, False: 139]
  ------------------
  855|  37.1k|                fMap[k/32] |= 1<<(k&0x1F);
  856|  37.1k|            }
  857|    492|        }
  858|    140|        else {
  859|       |
  860|    140|            fNonMapIndex = j;
  861|    140|            break;
  862|    140|        }
  863|       |
  864|    492|        if (end >= MAPSIZE) {
  ------------------
  |  Branch (864:13): [True: 139, False: 353]
  ------------------
  865|       |
  866|    139|            fNonMapIndex = j;
  867|    139|            break;
  868|    139|        }
  869|    492|    }
  870|    291|}

_ZN11xercesc_3_210RangeToken23setCaseInsensitiveTokenEPS0_:
  122|     37|{
  123|     37|    fCaseIToken = tok;
  124|     37|}
_ZN11xercesc_3_210RangeToken9createMapEv:
  127|    421|{
  128|    421|    if (!fMap)
  ------------------
  |  Branch (128:9): [True: 291, False: 130]
  ------------------
  129|    291|    {
  130|    291|        doCreateMap();
  131|    291|    }
  132|    421|}

_ZN11xercesc_3_214XMLInitializer23initializeRangeTokenMapEv:
   44|      1|{
   45|      1|    RangeTokenMap::fInstance = new RangeTokenMap(
   46|      1|      XMLPlatformUtils::fgMemoryManager);
   47|       |
   48|      1|    if (RangeTokenMap::fInstance)
  ------------------
  |  Branch (48:9): [True: 1, False: 0]
  ------------------
   49|      1|      RangeTokenMap::fInstance->buildTokenRanges();
   50|      1|}
_ZN11xercesc_3_217RangeTokenElemMapC2Ej:
   63|    146|    fCategoryId(categoryId)
   64|    146|    , fRange(0)
   65|    146|    , fNRange(0)
   66|    146|{
   67|       |
   68|    146|}
_ZN11xercesc_3_213RangeTokenMapC2EPNS_13MemoryManagerE:
   82|      1|    fTokenRegistry(0)
   83|      1|    , fRangeMap(0)
   84|      1|    , fCategories(0)
   85|      1|    , fTokenFactory(0)
   86|      1|    , fMutex(manager)
   87|      1|{
   88|      1|    CleanupType cleanup(this, &RangeTokenMap::cleanUp);
   89|       |
   90|      1|    try {
   91|      1|        fTokenRegistry = new (manager) RefHashTableOf<RangeTokenElemMap>(109, manager);
   92|      1|        fRangeMap = new (manager) RefHashTableOf<RangeFactory>(29, manager);
   93|      1|        fCategories = new (manager) XMLStringPool(109, manager);
   94|      1|        fTokenFactory = new (manager) TokenFactory(manager);
   95|      1|        initializeRegistry();
   96|      1|    }
   97|      1|    catch(const OutOfMemoryException&)
   98|      1|    {
   99|      0|        cleanup.release();
  100|       |
  101|      0|        throw;
  102|      0|    }
  103|       |
  104|      1|    cleanup.release();
  105|      1|}
_ZN11xercesc_3_213RangeTokenMap8getRangeEPKDsb:
  116|      2|                                    const bool complement) {
  117|       |
  118|      2|    if (!fTokenRegistry->containsKey(keyword))
  ------------------
  |  Branch (118:9): [True: 0, False: 2]
  ------------------
  119|      0|        return 0;
  120|       |
  121|      2|    RangeTokenElemMap* elemMap = fTokenRegistry->get(keyword);
  122|      2|    RangeToken* rangeTok = elemMap->getRangeToken(complement);
  123|       |
  124|      2|    if (!rangeTok)
  ------------------
  |  Branch (124:9): [True: 0, False: 2]
  ------------------
  125|      0|    {
  126|      0|        XMLMutexLock lockInit(&fMutex);
  127|       |
  128|       |        // make sure that it was not created while we were locked
  129|      0|        rangeTok = elemMap->getRangeToken(complement);
  130|       |
  131|      0|        if (!rangeTok)
  ------------------
  |  Branch (131:13): [True: 0, False: 0]
  ------------------
  132|      0|        {
  133|      0|            unsigned int categId = elemMap->getCategoryId();
  134|      0|            const XMLCh* categName = fCategories->getValueForId(categId);
  135|      0|            RangeFactory* rangeFactory = fRangeMap->get(categName);
  136|       |
  137|      0|            if (rangeFactory)
  ------------------
  |  Branch (137:17): [True: 0, False: 0]
  ------------------
  138|      0|            {
  139|      0|                rangeFactory->buildRanges(this);
  140|      0|                rangeTok = elemMap->getRangeToken(complement);
  141|       |
  142|       |                // see if we are complementing an existing range
  143|      0|                if (!rangeTok && complement)
  ------------------
  |  Branch (143:21): [True: 0, False: 0]
  |  Branch (143:34): [True: 0, False: 0]
  ------------------
  144|      0|                {
  145|      0|                    rangeTok = elemMap->getRangeToken();
  146|      0|                    if (rangeTok)
  ------------------
  |  Branch (146:25): [True: 0, False: 0]
  ------------------
  147|      0|                    {
  148|      0|                        rangeTok = RangeToken::complementRanges(rangeTok, fTokenFactory, fTokenRegistry->getMemoryManager());
  149|      0|                        elemMap->setRangeToken(rangeTok , complement);
  150|      0|                    }
  151|      0|                }
  152|      0|            }
  153|      0|        }
  154|      0|    }
  155|       |
  156|      2|    return rangeTok;
  157|      2|}
_ZN11xercesc_3_213RangeTokenMap13addKeywordMapEPKDsS2_:
  175|    146|                                 const XMLCh* const categoryName) {
  176|       |
  177|    146|    unsigned int categId = fCategories->getId(categoryName);
  178|       |
  179|    146|    if (categId == 0) {
  ------------------
  |  Branch (179:9): [True: 0, False: 146]
  ------------------
  180|      0|        ThrowXMLwithMemMgr1(RuntimeException, XMLExcepts::Regex_InvalidCategoryName, categoryName, fTokenRegistry->getMemoryManager());
  ------------------
  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
  181|      0|    }
  182|       |
  183|    146|    if (fTokenRegistry->containsKey(keyword)) {
  ------------------
  |  Branch (183:9): [True: 0, False: 146]
  ------------------
  184|       |
  185|      0|        RangeTokenElemMap* elemMap = fTokenRegistry->get(keyword);
  186|       |
  187|      0|        if (elemMap->getCategoryId() != categId)
  ------------------
  |  Branch (187:13): [True: 0, False: 0]
  ------------------
  188|      0|            elemMap->setCategoryId(categId);
  189|       |
  190|      0|        return;
  191|      0|    }
  192|       |
  193|    146|    fTokenRegistry->put((void*) keyword, new RangeTokenElemMap(categId));
  194|    146|}
_ZN11xercesc_3_213RangeTokenMap13setRangeTokenEPKDsPNS_10RangeTokenEb:
  200|    288|                                  RangeToken* const tok,const bool complement) {
  201|       |
  202|    288|    if (fTokenRegistry->containsKey(keyword)) {
  ------------------
  |  Branch (202:9): [True: 288, False: 0]
  ------------------
  203|    288|        fTokenRegistry->get(keyword)->setRangeToken(tok, complement);
  204|    288|    }
  205|      0|    else {
  206|      0|        ThrowXMLwithMemMgr1(RuntimeException, XMLExcepts::Regex_KeywordNotFound, keyword, fTokenRegistry->getMemoryManager());
  ------------------
  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
  207|      0|    }
  208|    288|}
_ZN11xercesc_3_213RangeTokenMap18initializeRegistryEv:
  214|      1|void RangeTokenMap::initializeRegistry() {
  215|       |
  216|       |    // Add categories
  217|      1|    fCategories->addOrFind(fgXMLCategory);
  218|      1|    fCategories->addOrFind(fgASCIICategory);
  219|      1|    fCategories->addOrFind(fgUnicodeCategory);
  220|      1|    fCategories->addOrFind(fgBlockCategory);
  221|       |
  222|       |    // Add xml range factory
  223|      1|    RangeFactory* rangeFact = new XMLRangeFactory();
  224|      1|    fRangeMap->put((void*)fgXMLCategory, rangeFact);
  225|      1|    rangeFact->initializeKeywordMap(this);
  226|       |
  227|       |    // Add ascii range factory
  228|      1|    rangeFact = new ASCIIRangeFactory();
  229|      1|    fRangeMap->put((void*)fgASCIICategory, rangeFact);
  230|      1|    rangeFact->initializeKeywordMap(this);
  231|       |
  232|       |    // Add unicode range factory
  233|      1|    rangeFact = new UnicodeRangeFactory();
  234|      1|    fRangeMap->put((void*)fgUnicodeCategory, rangeFact);
  235|      1|    rangeFact->initializeKeywordMap(this);
  236|       |
  237|       |    // Add block range factory
  238|      1|    rangeFact = new BlockRangeFactory();
  239|      1|    fRangeMap->put((void*)fgBlockCategory, rangeFact);
  240|      1|    rangeFact->initializeKeywordMap(this);
  241|      1|}
_ZN11xercesc_3_213RangeTokenMap16buildTokenRangesEv:
  244|      1|{
  245|       |    // Build ranges */
  246|      1|    RangeFactory* rangeFactory = fRangeMap->get(fgXMLCategory);
  247|      1|    rangeFactory->buildRanges(this);
  248|       |
  249|      1|    rangeFactory = fRangeMap->get(fgASCIICategory);
  250|      1|    rangeFactory->buildRanges(this);
  251|       |
  252|      1|    rangeFactory = fRangeMap->get(fgUnicodeCategory);
  253|      1|    rangeFactory->buildRanges(this);
  254|       |
  255|      1|    rangeFactory = fRangeMap->get(fgBlockCategory);
  256|      1|    rangeFactory->buildRanges(this);
  257|      1|}
_ZN11xercesc_3_213RangeTokenMap8instanceEv:
  263|      2|{
  264|      2|    return fInstance;
  265|      2|}

_ZNK11xercesc_3_217RangeTokenElemMap13getRangeTokenEb:
  181|      2|inline RangeToken* RangeTokenElemMap::getRangeToken(const bool complement) const {
  182|       |
  183|      2|    return complement ? fNRange : fRange;
  ------------------
  |  Branch (183:12): [True: 0, False: 2]
  ------------------
  184|      2|}
_ZN11xercesc_3_217RangeTokenElemMap13setRangeTokenEPNS_10RangeTokenEb:
  195|    288|                                      const bool complement) {
  196|       |
  197|    288|    if (complement)
  ------------------
  |  Branch (197:9): [True: 142, False: 146]
  ------------------
  198|    142|        fNRange = tok;
  199|    146|    else
  200|    146|        fRange = tok;
  201|    288|}
_ZNK11xercesc_3_213RangeTokenMap15getTokenFactoryEv:
  221|      4|inline TokenFactory* RangeTokenMap::getTokenFactory() const {
  222|       |
  223|      4|    return fTokenFactory;
  224|      4|}

_ZN11xercesc_3_217RegularExpression7ContextC2EPNS_13MemoryManagerE:
  108|     32|    fAdoptMatch(false)
  109|     32|    , fStart(0)
  110|     32|    , fLimit(0)
  111|     32|    , fLength(0)
  112|     32|    , fSize(0)
  113|     32|    , fStringMaxLen(0)
  114|     32|    , fOffsets(0)
  115|     32|    , fMatch(0)
  116|     32|    , fString(0)
  117|     32|    , fOptions(0)
  118|     32|    , fMemoryManager(manager)
  119|     32|{
  120|     32|}
_ZN11xercesc_3_217RegularExpression7ContextC2EPS1_:
  123|     27|    fAdoptMatch(false)
  124|     27|    , fStart(src->fStart)
  125|     27|    , fLimit(src->fLimit)
  126|     27|    , fLength(src->fLength)
  127|     27|    , fSize(src->fSize)
  128|     27|    , fStringMaxLen(src->fStringMaxLen)
  129|     27|    , fOffsets(0)
  130|     27|    , fMatch(0)
  131|     27|    , fString(src->fString)
  132|     27|    , fOptions(src->fOptions)
  133|     27|    , fMemoryManager(src->fMemoryManager)
  134|     27|{
  135|     27|    if(src->fOffsets)
  ------------------
  |  Branch (135:8): [True: 0, False: 27]
  ------------------
  136|      0|    {
  137|      0|        fOffsets = (int*) fMemoryManager->allocate(fSize* sizeof(int));
  138|      0|        for (int i = 0; i< fSize; i++)
  ------------------
  |  Branch (138:25): [True: 0, False: 0]
  ------------------
  139|      0|            fOffsets[i] = src->fOffsets[i];
  140|      0|    }
  141|     27|    if(src->fMatch)
  ------------------
  |  Branch (141:8): [True: 0, False: 27]
  ------------------
  142|      0|    {
  143|      0|        fMatch=new (fMemoryManager) Match(*src->fMatch);
  144|      0|        fAdoptMatch=true;
  145|      0|    }
  146|     27|}
_ZN11xercesc_3_217RegularExpression7ContextaSERKS1_:
  149|     32|{
  150|     32|    if (this != &other)
  ------------------
  |  Branch (150:9): [True: 32, False: 0]
  ------------------
  151|     32|    {
  152|     32|        fStart=other.fStart;
  153|     32|        fLimit=other.fLimit;
  154|     32|        fLength=other.fLength;
  155|     32|        fStringMaxLen=other.fStringMaxLen;
  156|     32|        fString=other.fString;
  157|     32|        fOptions=other.fOptions;
  158|       |
  159|       |        // if offset and match are already allocated with the right size, reuse them 
  160|       |        // (fMatch can be provided by the user to get the data back)
  161|     32|        if(fMatch && other.fMatch && fMatch->getNoGroups()==other.fMatch->getNoGroups())
  ------------------
  |  Branch (161:12): [True: 0, False: 32]
  |  Branch (161:22): [True: 0, False: 0]
  |  Branch (161:38): [True: 0, False: 0]
  ------------------
  162|      0|            *fMatch=*other.fMatch;
  163|     32|        else
  164|     32|        {
  165|     32|            if (fAdoptMatch)
  ------------------
  |  Branch (165:17): [True: 0, False: 32]
  ------------------
  166|      0|                delete fMatch;
  167|     32|            fMatch=0;
  168|     32|            if(other.fMatch)
  ------------------
  |  Branch (168:16): [True: 0, False: 32]
  ------------------
  169|      0|            {
  170|      0|                fMatch=new (other.fMemoryManager) Match(*other.fMatch);
  171|      0|                fAdoptMatch=true;
  172|      0|            }
  173|     32|        }
  174|       |
  175|     32|        if (fOffsets && other.fOffsets && fSize==other.fSize)
  ------------------
  |  Branch (175:13): [True: 0, False: 32]
  |  Branch (175:25): [True: 0, False: 0]
  |  Branch (175:43): [True: 0, False: 0]
  ------------------
  176|      0|        {
  177|      0|            for (int i = 0; i< fSize; i++)
  ------------------
  |  Branch (177:29): [True: 0, False: 0]
  ------------------
  178|      0|                fOffsets[i] = other.fOffsets[i];
  179|      0|        }
  180|     32|        else
  181|     32|        {
  182|     32|            if(fOffsets)
  ------------------
  |  Branch (182:16): [True: 0, False: 32]
  ------------------
  183|      0|                fMemoryManager->deallocate(fOffsets);//delete [] fOffsets;
  184|     32|            fOffsets=0;
  185|     32|            fSize=other.fSize;
  186|     32|            if(other.fOffsets)
  ------------------
  |  Branch (186:16): [True: 0, False: 32]
  ------------------
  187|      0|            {
  188|      0|                fOffsets = (int*) other.fMemoryManager->allocate(fSize* sizeof(int));
  189|      0|                for (int i = 0; i< fSize; i++)
  ------------------
  |  Branch (189:33): [True: 0, False: 0]
  ------------------
  190|      0|                    fOffsets[i] = other.fOffsets[i];
  191|      0|            }
  192|     32|        }
  193|       |
  194|     32|        fMemoryManager=other.fMemoryManager;
  195|     32|    }
  196|       |
  197|     32|    return *this;
  198|     32|}
_ZN11xercesc_3_217RegularExpression7ContextD2Ev:
  201|     59|{
  202|     59|    if (fOffsets)
  ------------------
  |  Branch (202:9): [True: 0, False: 59]
  ------------------
  203|      0|        fMemoryManager->deallocate(fOffsets);//delete [] fOffsets;
  204|       |
  205|     59|    if (fAdoptMatch)
  ------------------
  |  Branch (205:9): [True: 0, False: 59]
  ------------------
  206|      0|        delete fMatch;
  207|     59|}
_ZN11xercesc_3_217RegularExpression7Context5resetEPKDsmmmij:
  218|     16|{
  219|     16|    fString = string;
  220|     16|    fStringMaxLen = stringLen;
  221|     16|    fStart = start;
  222|     16|    fLimit = limit;
  223|     16|    fLength = fLimit - fStart;
  224|     16|    if (fAdoptMatch)
  ------------------
  |  Branch (224:9): [True: 0, False: 16]
  ------------------
  225|      0|        delete fMatch;
  226|     16|    fMatch = 0;
  227|       |
  228|     16|    if (fSize != noClosures) {
  ------------------
  |  Branch (228:9): [True: 0, False: 16]
  ------------------
  229|      0|        if (fOffsets)
  ------------------
  |  Branch (229:13): [True: 0, False: 0]
  ------------------
  230|      0|            fMemoryManager->deallocate(fOffsets);//delete [] fOffsets;
  231|      0|        fOffsets = (int*) fMemoryManager->allocate(noClosures * sizeof(int));//new int[noClosures];
  232|      0|    }
  233|       |
  234|     16|    fSize = noClosures;
  235|     16|    fOptions = options;
  236|       |
  237|     16|    for (int i = 0; i< fSize; i++)
  ------------------
  |  Branch (237:21): [True: 0, False: 16]
  ------------------
  238|      0|        fOffsets[i] = -1;
  239|     16|}
_ZN11xercesc_3_217RegularExpression7Context6nextChERiRm:
  242|    132|{
  243|    132|    ch = fString[offset];
  244|       |
  245|    132|    if (RegxUtil::isHighSurrogate(ch)) {
  ------------------
  |  Branch (245:9): [True: 0, False: 132]
  ------------------
  246|      0|        if ((offset + 1 < fLimit) && RegxUtil::isLowSurrogate(fString[offset+1])) {
  ------------------
  |  Branch (246:13): [True: 0, False: 0]
  |  Branch (246:38): [True: 0, False: 0]
  ------------------
  247|      0|            ch = RegxUtil::composeFromSurrogate(ch, fString[++offset]);
  248|      0|        }
  249|      0|        else return false;
  250|      0|    }
  251|    132|    else if (RegxUtil::isLowSurrogate(ch)) {
  ------------------
  |  Branch (251:14): [True: 0, False: 132]
  ------------------
  252|      0|        return false;
  253|      0|    }
  254|       |
  255|    132|    return true;
  256|    132|}
_ZN11xercesc_3_217RegularExpressionC2EPKDsS2_PNS_13MemoryManagerE:
  377|      4|    :fHasBackReferences(false),
  378|      4|     fFixedStringOnly(false),
  379|      4|     fNoGroups(0),
  380|      4|     fMinLength(0),
  381|      4|     fNoClosures(0),
  382|      4|     fOptions(0),
  383|      4|     fBMPattern(0),
  384|      4|     fPattern(0),
  385|      4|     fFixedString(0),
  386|      4|     fOperations(0),
  387|      4|     fTokenTree(0),
  388|      4|     fFirstChar(0),
  389|      4|     fOpFactory(manager),
  390|      4|     fTokenFactory(0),
  391|      4|     fMemoryManager(manager)
  392|      4|{
  393|      4|    CleanupType cleanup(this, &RegularExpression::cleanUp);
  394|       |
  395|      4|    try {
  396|       |
  397|      4|        setPattern(pattern, options);
  398|      4|    }
  399|      4|    catch(const OutOfMemoryException&)
  400|      4|    {
  401|      0|        cleanup.release();
  402|       |
  403|      0|        throw;
  404|      0|    }
  405|       |
  406|      4|    cleanup.release();
  407|      4|}
_ZN11xercesc_3_217RegularExpression14getRegexParserEiPNS_13MemoryManagerE:
  419|      4|{
  420|       |    // the following construct causes an error in an Intel 7.1 32 bit compiler for
  421|       |    // red hat linux 7.2
  422|       |    // (when an exception is thrown the wrong object is deleted)
  423|       |    //RegxParser* regxParser = isSet(fOptions, XMLSCHEMA_MODE)
  424|       |    //    ? new (fMemoryManager) ParserForXMLSchema(fMemoryManager)
  425|       |    //    : new (fMemoryManager) RegxParser(fMemoryManager);
  426|      4|    if (isSet(options, XMLSCHEMA_MODE))
  ------------------
  |  Branch (426:9): [True: 4, False: 0]
  ------------------
  427|      4|        return new (manager) ParserForXMLSchema(manager);
  428|       |
  429|      0|    return new (manager) RegxParser(manager);
  430|      4|}
_ZN11xercesc_3_217RegularExpression10setPatternEPKDsS2_:
  434|      4|{
  435|       |
  436|      4|    fTokenFactory = new (fMemoryManager) TokenFactory(fMemoryManager);
  437|      4|    fOptions = parseOptions(options);
  438|      4|    fPattern = XMLString::replicate(pattern, fMemoryManager);
  439|       |
  440|      4|    RegxParser* regxParser=getRegexParser(fOptions, fMemoryManager);
  441|       |
  442|      4|    if (regxParser)
  ------------------
  |  Branch (442:9): [True: 4, False: 0]
  ------------------
  443|      4|        regxParser->setTokenFactory(fTokenFactory);
  444|       |
  445|      4|    Janitor<RegxParser> janRegxParser(regxParser);
  446|      4|    fTokenTree = regxParser->parse(fPattern, fOptions);
  447|      4|    fNoGroups = regxParser->getNoParen();
  448|      4|    fHasBackReferences = regxParser->hasBackReferences();
  449|       |
  450|      4|    prepare();
  451|      4|}
_ZNK11xercesc_3_217RegularExpression7matchesEPKDsPNS_13MemoryManagerE:
  499|     16|{
  500|     16|    return matches(expression, 0, XMLString::stringLen(expression), 0, manager);
  501|     16|}
_ZNK11xercesc_3_217RegularExpression7matchesEPKDsmmPNS_5MatchEPNS_13MemoryManagerE:
  520|     16|{
  521|       |
  522|     16|    Context context(manager);
  523|     16|    XMLSize_t strLength = XMLString::stringLen(expression);
  524|       |
  525|     16|    context.reset(expression, strLength, start, end, fNoClosures, fOptions);
  526|       |
  527|     16|    bool adoptMatch = false;
  528|     16|    Match* lMatch = pMatch;
  529|       |
  530|     16|    if (lMatch != 0) {
  ------------------
  |  Branch (530:9): [True: 0, False: 16]
  ------------------
  531|      0|        lMatch->setNoGroups(fNoGroups);
  532|      0|    }
  533|     16|    else if (fHasBackReferences) {
  ------------------
  |  Branch (533:14): [True: 0, False: 16]
  ------------------
  534|      0|        lMatch = new (manager) Match(manager);
  535|      0|        lMatch->setNoGroups(fNoGroups);
  536|      0|        adoptMatch = true;
  537|      0|    }
  538|       |
  539|     16|    if (context.fAdoptMatch)
  ------------------
  |  Branch (539:9): [True: 0, False: 16]
  ------------------
  540|      0|        delete context.fMatch;
  541|     16|    context.fMatch = lMatch;
  542|     16|    context.fAdoptMatch = adoptMatch;
  543|       |
  544|     16|    if (isSet(fOptions, XMLSCHEMA_MODE)) {
  ------------------
  |  Branch (544:9): [True: 16, False: 0]
  ------------------
  545|       |
  546|     16|        int matchEnd = match(&context, fOperations, context.fStart);
  547|       |
  548|     16|        if (matchEnd == (int)context.fLimit) {
  ------------------
  |  Branch (548:13): [True: 16, False: 0]
  ------------------
  549|       |
  550|     16|            if (context.fMatch != 0) {
  ------------------
  |  Branch (550:17): [True: 0, False: 16]
  ------------------
  551|       |
  552|      0|                context.fMatch->setStartPos(0, (int)context.fStart);
  553|      0|                context.fMatch->setEndPos(0, matchEnd);
  554|      0|            }
  555|     16|            return true;
  556|     16|        }
  557|       |
  558|      0|        return false;
  559|     16|    }
  560|       |
  561|       |    /*
  562|       |     * If the pattern has only fixed string, use Boyer-Moore
  563|       |     */
  564|      0|    if (fFixedStringOnly) {
  ------------------
  |  Branch (564:9): [True: 0, False: 0]
  ------------------
  565|       |
  566|      0|        int ret = fBMPattern->matches(expression, context.fStart, context.fLimit);
  567|      0|        if (ret >= 0) {
  ------------------
  |  Branch (567:13): [True: 0, False: 0]
  ------------------
  568|       |
  569|      0|            if (context.fMatch != 0) {
  ------------------
  |  Branch (569:17): [True: 0, False: 0]
  ------------------
  570|      0|                context.fMatch->setStartPos(0, ret);
  571|      0|                context.fMatch->setEndPos(0, (int)(ret + XMLString::stringLen(fPattern)));
  572|      0|            }
  573|      0|            return true;
  574|      0|        }
  575|      0|        return false;
  576|      0|    }
  577|       |
  578|       |    /*
  579|       |     * If the pattern contains a fixed string, we check with Boyer-Moore
  580|       |     * whether the text contains the fixed string or not. If not found
  581|       |     * return false
  582|       |     */
  583|      0|    if (fFixedString != 0) {
  ------------------
  |  Branch (583:9): [True: 0, False: 0]
  ------------------
  584|       |
  585|      0|        int ret = fBMPattern->matches(expression, context.fStart, context.fLimit);
  586|       |
  587|      0|        if (ret < 0) { // No match
  ------------------
  |  Branch (587:13): [True: 0, False: 0]
  ------------------
  588|      0|            return false;
  589|      0|        }
  590|      0|    }
  591|       |
  592|       |    // if the length is less than the minimum length, we cannot possibly match
  593|      0|    if(context.fLimit<fMinLength)
  ------------------
  |  Branch (593:8): [True: 0, False: 0]
  ------------------
  594|      0|        return false;
  595|       |
  596|      0|    XMLSize_t limit = context.fLimit - fMinLength;
  597|      0|    XMLSize_t matchStart;
  598|      0|    int matchEnd = -1;
  599|       |
  600|       |    /*
  601|       |     * Check whether the expression start with ".*"
  602|       |     */
  603|      0|    if (fOperations != 0 && (fOperations->getOpType() == Op::O_CLOSURE || fOperations->getOpType() == Op::O_FINITE_CLOSURE)
  ------------------
  |  Branch (603:9): [True: 0, False: 0]
  |  Branch (603:30): [True: 0, False: 0]
  |  Branch (603:75): [True: 0, False: 0]
  ------------------
  604|      0|        && fOperations->getChild()->getOpType() == Op::O_DOT) {
  ------------------
  |  Branch (604:12): [True: 0, False: 0]
  ------------------
  605|       |
  606|      0|        if (isSet(fOptions, SINGLE_LINE)) {
  ------------------
  |  Branch (606:13): [True: 0, False: 0]
  ------------------
  607|      0|            matchStart = context.fStart;
  608|      0|            matchEnd = match(&context, fOperations, matchStart);
  609|      0|        }
  610|      0|        else {
  611|      0|            bool previousIsEOL = true;
  612|       |
  613|      0|            for (matchStart=context.fStart; matchStart<=limit; matchStart++) {
  ------------------
  |  Branch (613:45): [True: 0, False: 0]
  ------------------
  614|       |
  615|      0|                XMLCh ch = expression[matchStart];
  616|      0|                if (RegxUtil::isEOLChar(ch)) {
  ------------------
  |  Branch (616:21): [True: 0, False: 0]
  ------------------
  617|      0|                    previousIsEOL = true;
  618|      0|                }
  619|      0|                else {
  620|       |
  621|      0|                    if (previousIsEOL) {
  ------------------
  |  Branch (621:25): [True: 0, False: 0]
  ------------------
  622|      0|                        if (0 <= (matchEnd = match(&context, fOperations,
  ------------------
  |  Branch (622:29): [True: 0, False: 0]
  ------------------
  623|      0|                                                   matchStart)))
  624|      0|                            break;
  625|      0|                    }
  626|       |
  627|      0|                    previousIsEOL = false;
  628|      0|                }
  629|      0|            }
  630|      0|        }
  631|      0|    }
  632|      0|    else {
  633|       |        /*
  634|       |         *    Optimization against the first char
  635|       |         */
  636|      0|        if (fFirstChar != 0) {
  ------------------
  |  Branch (636:13): [True: 0, False: 0]
  ------------------
  637|      0|            bool ignoreCase = isSet(fOptions, IGNORE_CASE);
  638|      0|            RangeToken* range = fFirstChar;
  639|       |
  640|      0|            if (ignoreCase)
  ------------------
  |  Branch (640:17): [True: 0, False: 0]
  ------------------
  641|      0|                range = fFirstChar->getCaseInsensitiveToken(fTokenFactory);
  642|       |
  643|      0|            for (matchStart=context.fStart; matchStart<=limit; matchStart++) {
  ------------------
  |  Branch (643:45): [True: 0, False: 0]
  ------------------
  644|       |
  645|      0|                XMLInt32 ch;
  646|       |
  647|      0|                if (!context.nextCh(ch, matchStart))
  ------------------
  |  Branch (647:21): [True: 0, False: 0]
  ------------------
  648|      0|                    break;
  649|       |
  650|      0|                if (!range->match(ch))
  ------------------
  |  Branch (650:21): [True: 0, False: 0]
  ------------------
  651|      0|                    continue;
  652|       |
  653|      0|                if (0 <= (matchEnd = match(&context,fOperations,matchStart)))
  ------------------
  |  Branch (653:21): [True: 0, False: 0]
  ------------------
  654|      0|                    break;
  655|      0|            }
  656|      0|        }
  657|      0|        else {
  658|       |
  659|       |            /*
  660|       |             *    Straightforward matching
  661|       |             */
  662|      0|            for (matchStart=context.fStart; matchStart<=limit; matchStart++) {
  ------------------
  |  Branch (662:45): [True: 0, False: 0]
  ------------------
  663|       |
  664|      0|                if (0 <= (matchEnd = match(&context,fOperations,matchStart)))
  ------------------
  |  Branch (664:21): [True: 0, False: 0]
  ------------------
  665|      0|                    break;
  666|      0|            }
  667|      0|        }
  668|      0|    }
  669|       |
  670|      0|    if (matchEnd >= 0) {
  ------------------
  |  Branch (670:9): [True: 0, False: 0]
  ------------------
  671|       |
  672|      0|        if (context.fMatch != 0) {
  ------------------
  |  Branch (672:13): [True: 0, False: 0]
  ------------------
  673|       |
  674|      0|            context.fMatch->setStartPos(0, (int)matchStart);
  675|      0|            context.fMatch->setEndPos(0, matchEnd);
  676|      0|        }
  677|      0|        return true;
  678|      0|    }
  679|      0|    return false;
  680|      0|}
_ZN11xercesc_3_214XMLInitializer27initializeRegularExpressionEv:
  932|      1|{
  933|      1|    RegularExpression::staticInitialize(XMLPlatformUtils::fgMemoryManager);
  934|      1|}
_ZN11xercesc_3_217RegularExpression16staticInitializeEPNS_13MemoryManagerE:
  944|      1|{
  945|      1|    fWordRange = TokenFactory::staticGetRange(fgUniIsWord, false);
  946|       |
  947|      1|    if (fWordRange == 0)
  ------------------
  |  Branch (947:9): [True: 0, False: 1]
  ------------------
  948|      0|        ThrowXMLwithMemMgr1(RuntimeException, XMLExcepts::Regex_RangeTokenGetError, fgUniIsWord, memoryManager);
  ------------------
  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
  949|      1|}
_ZN11xercesc_3_217RegularExpression14getOptionValueEDs:
  954|      4|int RegularExpression::getOptionValue(const XMLCh ch) {
  955|       |
  956|      4|    int ret = 0;
  957|       |
  958|      4|    switch (ch) {
  959|       |
  960|      0|        case chLatin_i:
  ------------------
  |  Branch (960:9): [True: 0, False: 4]
  ------------------
  961|      0|            ret = IGNORE_CASE;
  962|      0|            break;
  963|      0|        case chLatin_m:
  ------------------
  |  Branch (963:9): [True: 0, False: 4]
  ------------------
  964|      0|            ret = MULTIPLE_LINE;
  965|      0|            break;
  966|      0|        case chLatin_s:
  ------------------
  |  Branch (966:9): [True: 0, False: 4]
  ------------------
  967|      0|            ret = SINGLE_LINE;
  968|      0|            break;
  969|      0|        case chLatin_x:
  ------------------
  |  Branch (969:9): [True: 0, False: 4]
  ------------------
  970|      0|            ret = EXTENDED_COMMENT;
  971|      0|            break;
  972|      0|        case chLatin_F:
  ------------------
  |  Branch (972:9): [True: 0, False: 4]
  ------------------
  973|      0|            ret = PROHIBIT_FIXED_STRING_OPTIMIZATION;
  974|      0|            break;
  975|      0|        case chLatin_H:
  ------------------
  |  Branch (975:9): [True: 0, False: 4]
  ------------------
  976|      0|            ret = PROHIBIT_HEAD_CHARACTER_OPTIMIZATION;
  977|      0|            break;
  978|      4|        case chLatin_X:
  ------------------
  |  Branch (978:9): [True: 4, False: 0]
  ------------------
  979|      4|            ret = XMLSCHEMA_MODE;
  980|      4|            break;
  981|      0|        default:
  ------------------
  |  Branch (981:9): [True: 0, False: 4]
  ------------------
  982|      0|            break;
  983|      4|    }
  984|       |
  985|      4|    return ret;
  986|      4|}
_ZNK11xercesc_3_217RegularExpression5matchEPNS0_7ContextEPKNS_2OpEm:
  997|    159|{
  998|    159|    ValueStackOf<RE_RuntimeContext>* opStack=NULL;
  999|    159|    Janitor<ValueStackOf<RE_RuntimeContext> > janStack(NULL);
 1000|    159|    if(context->fLimit > 256)
  ------------------
  |  Branch (1000:8): [True: 0, False: 159]
  ------------------
 1001|      0|    {
 1002|      0|        opStack=new ValueStackOf<RE_RuntimeContext>(16, context->fMemoryManager);
 1003|      0|        janStack.reset(opStack);
 1004|      0|    }
 1005|    159|    const Op* tmpOp = operations;
 1006|    159|    bool ignoreCase = isSet(context->fOptions, IGNORE_CASE);
 1007|    159|    int doReturn;
 1008|       |
 1009|    296|    while (tmpOp != 0) {
  ------------------
  |  Branch (1009:12): [True: 180, False: 116]
  ------------------
 1010|       |        // no one wants to return -5, only -1, 0, and greater
 1011|    180|        doReturn = -5;
 1012|       |
 1013|    180|        if (offset > context->fLimit || offset < context->fStart)
  ------------------
  |  Branch (1013:13): [True: 0, False: 180]
  |  Branch (1013:41): [True: 0, False: 180]
  ------------------
 1014|      0|            doReturn = -1;
 1015|    180|        else
 1016|    180|        {
 1017|    180|            switch(tmpOp->getOpType()) {
  ------------------
  |  Branch (1017:20): [True: 0, False: 180]
  ------------------
 1018|      0|                case Op::O_CHAR:
  ------------------
  |  Branch (1018:17): [True: 0, False: 180]
  ------------------
 1019|      0|                    if (!matchChar(context, tmpOp->getData(), offset, ignoreCase))
  ------------------
  |  Branch (1019:25): [True: 0, False: 0]
  ------------------
 1020|      0|                        doReturn = -1;
 1021|      0|                    else
 1022|      0|                        tmpOp = tmpOp->getNextOp();
 1023|      0|                    break;
 1024|      0|                case Op::O_DOT:
  ------------------
  |  Branch (1024:17): [True: 0, False: 180]
  ------------------
 1025|      0|                    if (!matchDot(context, offset))
  ------------------
  |  Branch (1025:25): [True: 0, False: 0]
  ------------------
 1026|      0|                        doReturn = -1;
 1027|      0|                    else
 1028|      0|                        tmpOp = tmpOp->getNextOp();
 1029|      0|                    break;
 1030|    148|                case Op::O_RANGE:
  ------------------
  |  Branch (1030:17): [True: 148, False: 32]
  ------------------
 1031|    148|                case Op::O_NRANGE:
  ------------------
  |  Branch (1031:17): [True: 0, False: 180]
  ------------------
 1032|    148|                    if (!matchRange(context, tmpOp, offset, ignoreCase))
  ------------------
  |  Branch (1032:25): [True: 27, False: 121]
  ------------------
 1033|     27|                        doReturn = -1;
 1034|    121|                    else
 1035|    121|                        tmpOp = tmpOp->getNextOp();
 1036|    148|                    break;
 1037|      0|                case Op::O_ANCHOR:
  ------------------
  |  Branch (1037:17): [True: 0, False: 180]
  ------------------
 1038|      0|                    if (!matchAnchor(context, tmpOp->getData(), offset))
  ------------------
  |  Branch (1038:25): [True: 0, False: 0]
  ------------------
 1039|      0|                        doReturn = -1;
 1040|      0|                    else
 1041|      0|                        tmpOp = tmpOp->getNextOp();
 1042|      0|                    break;
 1043|      0|                case Op::O_BACKREFERENCE:
  ------------------
  |  Branch (1043:17): [True: 0, False: 180]
  ------------------
 1044|      0|                    if (!matchBackReference(context, tmpOp->getData(), offset,
  ------------------
  |  Branch (1044:25): [True: 0, False: 0]
  ------------------
 1045|      0|                                            ignoreCase))
 1046|      0|                        doReturn = -1;
 1047|      0|                    else
 1048|      0|                        tmpOp = tmpOp->getNextOp();
 1049|      0|                    break;
 1050|      0|                case Op::O_STRING:
  ------------------
  |  Branch (1050:17): [True: 0, False: 180]
  ------------------
 1051|      0|                    if (!matchString(context, tmpOp->getLiteral(), offset, ignoreCase))
  ------------------
  |  Branch (1051:25): [True: 0, False: 0]
  ------------------
 1052|      0|                        doReturn = -1;
 1053|      0|                    else
 1054|      0|                        tmpOp = tmpOp->getNextOp();
 1055|      0|                    break;
 1056|     16|                case Op::O_FINITE_CLOSURE:
  ------------------
  |  Branch (1056:17): [True: 16, False: 164]
  ------------------
 1057|     16|                {
 1058|     16|                    XMLInt32 id = tmpOp->getData();
 1059|       |                    // if id is not -1, it's a closure with a child token having a minumum length,
 1060|       |                    // where id is the index of the fOffsets array where its status is stored
 1061|     16|                    if (id >= 0) {
  ------------------
  |  Branch (1061:25): [True: 0, False: 16]
  ------------------
 1062|      0|                        int prevOffset = context->fOffsets[id];
 1063|      0|                        if (prevOffset < 0 || prevOffset != (int)offset) {
  ------------------
  |  Branch (1063:29): [True: 0, False: 0]
  |  Branch (1063:47): [True: 0, False: 0]
  ------------------
 1064|      0|                            context->fOffsets[id] = (int)offset;
 1065|      0|                        }
 1066|      0|                        else {
 1067|       |                            // the status didn't change, we haven't found other copies; move on to the next match
 1068|      0|                            context->fOffsets[id] = -1;
 1069|      0|                            tmpOp = tmpOp->getNextOp();
 1070|      0|                            break;
 1071|      0|                        }
 1072|      0|                    }
 1073|       |
 1074|       |                    // match the subitems until they do
 1075|     16|                    int ret;
 1076|    116|                    while((ret = match(context, tmpOp->getChild(), offset)) != -1)
  ------------------
  |  Branch (1076:27): [True: 100, False: 16]
  ------------------
 1077|    100|                    {
 1078|    100|                        if(offset == (XMLSize_t)ret)
  ------------------
  |  Branch (1078:28): [True: 0, False: 100]
  ------------------
 1079|      0|                            break;
 1080|    100|                        offset = ret;
 1081|    100|                    }
 1082|       |
 1083|     16|                    if (id >= 0) {
  ------------------
  |  Branch (1083:25): [True: 0, False: 16]
  ------------------
 1084|       |                        // loop has ended, reset the status for this closure
 1085|      0|                        context->fOffsets[id] = -1;
 1086|      0|                    }
 1087|     16|                    tmpOp = tmpOp->getNextOp();
 1088|     16|                }
 1089|      0|                break;
 1090|      0|                case Op::O_FINITE_NONGREEDYCLOSURE:
  ------------------
  |  Branch (1090:17): [True: 0, False: 180]
  ------------------
 1091|      0|                {
 1092|      0|                    int ret = match(context,tmpOp->getNextOp(),offset);
 1093|      0|                    if (ret >= 0)
  ------------------
  |  Branch (1093:25): [True: 0, False: 0]
  ------------------
 1094|      0|                        doReturn = ret;
 1095|      0|                    else
 1096|      0|                    {
 1097|       |                        // match the subitems until they do
 1098|      0|                        int ret;
 1099|      0|                        while((ret = match(context, tmpOp->getChild(), offset)) != -1)
  ------------------
  |  Branch (1099:31): [True: 0, False: 0]
  ------------------
 1100|      0|                        {
 1101|      0|                            if(offset == (XMLSize_t)ret)
  ------------------
  |  Branch (1101:32): [True: 0, False: 0]
  ------------------
 1102|      0|                                break;
 1103|      0|                            offset = ret;
 1104|      0|                        }
 1105|      0|                        tmpOp = tmpOp->getNextOp();
 1106|      0|                    }
 1107|      0|                }
 1108|      0|                break;
 1109|      0|                case Op::O_CLOSURE:
  ------------------
  |  Branch (1109:17): [True: 0, False: 180]
  ------------------
 1110|      0|                {
 1111|      0|                    XMLInt32 id = tmpOp->getData();
 1112|       |                    // if id is not -1, it's a closure with a child token having a minumum length,
 1113|       |                    // where id is the index of the fOffsets array where its status is stored
 1114|      0|                    if (id >= 0) {
  ------------------
  |  Branch (1114:25): [True: 0, False: 0]
  ------------------
 1115|      0|                        int prevOffset = context->fOffsets[id];
 1116|      0|                        if (prevOffset < 0 || prevOffset != (int)offset) {
  ------------------
  |  Branch (1116:29): [True: 0, False: 0]
  |  Branch (1116:47): [True: 0, False: 0]
  ------------------
 1117|      0|                            context->fOffsets[id] = (int)offset;
 1118|      0|                        }
 1119|      0|                        else {
 1120|       |                            // the status didn't change, we haven't found other copies; move on to the next match
 1121|      0|                            context->fOffsets[id] = -1;
 1122|      0|                            tmpOp = tmpOp->getNextOp();
 1123|      0|                            break;
 1124|      0|                        }
 1125|      0|                    }
 1126|       |
 1127|      0|                    if(opStack!=NULL)
  ------------------
  |  Branch (1127:24): [True: 0, False: 0]
  ------------------
 1128|      0|                    {
 1129|      0|                        opStack->push(RE_RuntimeContext(tmpOp, offset));
 1130|      0|                        tmpOp = tmpOp->getChild();
 1131|      0|                    }
 1132|      0|                    else
 1133|      0|                    {
 1134|      0|                        int ret = match(context, tmpOp->getChild(), offset);
 1135|      0|                        if (id >= 0) {
  ------------------
  |  Branch (1135:29): [True: 0, False: 0]
  ------------------
 1136|      0|                            context->fOffsets[id] = -1;
 1137|      0|                        }
 1138|      0|                        if (ret >= 0)
  ------------------
  |  Branch (1138:29): [True: 0, False: 0]
  ------------------
 1139|      0|                            doReturn = ret;
 1140|      0|                        else
 1141|      0|                            tmpOp = tmpOp->getNextOp();
 1142|      0|                    }
 1143|      0|                }
 1144|      0|                break;
 1145|      0|                case Op::O_QUESTION:
  ------------------
  |  Branch (1145:17): [True: 0, False: 180]
  ------------------
 1146|      0|                {
 1147|      0|                    if(opStack!=NULL)
  ------------------
  |  Branch (1147:24): [True: 0, False: 0]
  ------------------
 1148|      0|                    {
 1149|      0|                        opStack->push(RE_RuntimeContext(tmpOp, offset));
 1150|      0|                        tmpOp = tmpOp->getChild();
 1151|      0|                    }
 1152|      0|                    else
 1153|      0|                    {
 1154|      0|                        int ret = match(context, tmpOp->getChild(), offset);
 1155|      0|                        if (ret >= 0)
  ------------------
  |  Branch (1155:29): [True: 0, False: 0]
  ------------------
 1156|      0|                            doReturn = ret;
 1157|      0|                        else
 1158|      0|                            tmpOp = tmpOp->getNextOp();
 1159|      0|                    }
 1160|      0|                }
 1161|      0|                break;
 1162|      0|                case Op::O_NONGREEDYCLOSURE:
  ------------------
  |  Branch (1162:17): [True: 0, False: 180]
  ------------------
 1163|      0|                case Op::O_NONGREEDYQUESTION:
  ------------------
  |  Branch (1163:17): [True: 0, False: 180]
  ------------------
 1164|      0|                {
 1165|      0|                    int ret = match(context,tmpOp->getNextOp(),offset);
 1166|      0|                    if (ret >= 0)
  ------------------
  |  Branch (1166:25): [True: 0, False: 0]
  ------------------
 1167|      0|                        doReturn = ret;
 1168|      0|                    else
 1169|      0|                        tmpOp = tmpOp->getChild();
 1170|      0|                }
 1171|      0|                break;
 1172|     16|                case Op::O_UNION:
  ------------------
  |  Branch (1172:17): [True: 16, False: 164]
  ------------------
 1173|     16|                    doReturn = matchUnion(context, tmpOp, offset);
 1174|     16|                    break;
 1175|      0|                case Op::O_CAPTURE:
  ------------------
  |  Branch (1175:17): [True: 0, False: 180]
  ------------------
 1176|      0|                    if (context->fMatch != 0 && tmpOp->getData() != 0)
  ------------------
  |  Branch (1176:25): [True: 0, False: 0]
  |  Branch (1176:49): [True: 0, False: 0]
  ------------------
 1177|      0|                        doReturn = matchCapture(context, tmpOp, offset);
 1178|      0|                    else
 1179|      0|                        tmpOp = tmpOp->getNextOp();
 1180|      0|                    break;
 1181|    180|            }
 1182|    180|        }
 1183|    180|        if (doReturn != -5) {
  ------------------
  |  Branch (1183:13): [True: 43, False: 137]
  ------------------
 1184|     43|            if (opStack==NULL || opStack->size() == 0)
  ------------------
  |  Branch (1184:17): [True: 43, False: 0]
  |  Branch (1184:34): [True: 0, False: 0]
  ------------------
 1185|     43|                return doReturn;
 1186|      0|            RE_RuntimeContext ctx = opStack->pop();
 1187|      0|            tmpOp = ctx.op_;
 1188|      0|            offset = ctx.offs_;
 1189|      0|            if (tmpOp->getOpType() == Op::O_CLOSURE) {
  ------------------
  |  Branch (1189:17): [True: 0, False: 0]
  ------------------
 1190|      0|                XMLInt32 id = tmpOp->getData();
 1191|      0|                if (id >= 0) {
  ------------------
  |  Branch (1191:21): [True: 0, False: 0]
  ------------------
 1192|       |                    // loop has ended, reset the status for this closure
 1193|      0|                    context->fOffsets[id] = -1;
 1194|      0|                }
 1195|      0|            }
 1196|      0|            if (tmpOp->getOpType() == Op::O_CLOSURE || tmpOp->getOpType() == Op::O_QUESTION) {
  ------------------
  |  Branch (1196:17): [True: 0, False: 0]
  |  Branch (1196:56): [True: 0, False: 0]
  ------------------
 1197|      0|                if (doReturn >= 0)
  ------------------
  |  Branch (1197:21): [True: 0, False: 0]
  ------------------
 1198|      0|                    return doReturn;
 1199|      0|            }
 1200|      0|            tmpOp = tmpOp->getNextOp();
 1201|      0|        }
 1202|    180|    }
 1203|       |
 1204|    116|    return (int)offset;
 1205|    159|}
_ZNK11xercesc_3_217RegularExpression10matchRangeEPNS0_7ContextEPKNS_2OpERmb:
 1251|    148|{
 1252|    148|    if (offset >= context->fLimit)
  ------------------
  |  Branch (1252:9): [True: 16, False: 132]
  ------------------
 1253|     16|        return false;
 1254|       |
 1255|    132|    XMLInt32 strCh = 0;
 1256|       |
 1257|    132|    if (!context->nextCh(strCh, offset))
  ------------------
  |  Branch (1257:9): [True: 0, False: 132]
  ------------------
 1258|      0|        return false;
 1259|       |
 1260|    132|    RangeToken* tok = (RangeToken *) op->getToken();
 1261|    132|    bool match = false;
 1262|       |
 1263|    132|    if (ignoreCase) {
  ------------------
  |  Branch (1263:9): [True: 0, False: 132]
  ------------------
 1264|      0|        tok = tok->getCaseInsensitiveToken(fTokenFactory);
 1265|      0|    }
 1266|       |
 1267|    132|    match = tok->match(strCh);
 1268|       |
 1269|    132|    if (!match)
  ------------------
  |  Branch (1269:9): [True: 11, False: 121]
  ------------------
 1270|     11|        return false;
 1271|       |
 1272|    121|    ++offset;
 1273|    121|    return true;
 1274|    132|}
_ZNK11xercesc_3_217RegularExpression10matchUnionEPNS0_7ContextEPKNS_2OpEm:
 1385|     16|{
 1386|     16|    XMLSize_t opSize = op->getSize();
 1387|       |
 1388|     16|    Context bestResultContext;
 1389|     16|    int bestResult=-1;
 1390|     27|    for(XMLSize_t i=0; i < opSize; i++) {
  ------------------
  |  Branch (1390:24): [True: 27, False: 0]
  ------------------
 1391|     27|        Context tmpContext(context);
 1392|     27|        int ret = match(&tmpContext, op->elementAt(i), offset);
 1393|     27|        if (ret >= 0 && (XMLSize_t)ret <= context->fLimit && ret>bestResult)
  ------------------
  |  Branch (1393:13): [True: 16, False: 11]
  |  Branch (1393:25): [True: 16, False: 0]
  |  Branch (1393:62): [True: 16, False: 0]
  ------------------
 1394|     16|        {
 1395|     16|            bestResult=ret;
 1396|     16|            bestResultContext=tmpContext;
 1397|       |            // exit early, if we reached the end of the string
 1398|     16|            if((XMLSize_t)ret == context->fLimit)
  ------------------
  |  Branch (1398:16): [True: 16, False: 0]
  ------------------
 1399|     16|                break;
 1400|     16|        }
 1401|     27|    }
 1402|     16|    if(bestResult!=-1)
  ------------------
  |  Branch (1402:8): [True: 16, False: 0]
  ------------------
 1403|     16|        *context=bestResultContext;
 1404|     16|    return bestResult;
 1405|     16|}
_ZN11xercesc_3_217RegularExpression12parseOptionsEPKDs:
 1409|      4|{
 1410|       |
 1411|      4|    if (options == 0)
  ------------------
  |  Branch (1411:9): [True: 0, False: 4]
  ------------------
 1412|      0|        return 0;
 1413|       |
 1414|      4|    int opts = 0;
 1415|      4|    XMLSize_t length = XMLString::stringLen(options);
 1416|       |
 1417|      8|    for (XMLSize_t i=0; i < length; i++) {
  ------------------
  |  Branch (1417:25): [True: 4, False: 4]
  ------------------
 1418|       |
 1419|      4|        int v = getOptionValue(options[i]);
 1420|       |
 1421|      4|        if (v == 0)
  ------------------
  |  Branch (1421:13): [True: 0, False: 4]
  ------------------
 1422|      0|            ThrowXMLwithMemMgr1(ParseException, XMLExcepts::Regex_UnknownOption, options, fMemoryManager);
  ------------------
  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
 1423|       |
 1424|      4|        opts |= v;
 1425|      4|    }
 1426|       |
 1427|      4|    return opts;
 1428|      4|}
_ZN11xercesc_3_217RegularExpression7compileEPKNS_5TokenE:
 1430|      4|void RegularExpression::compile(const Token* const token) {
 1431|       |
 1432|      4|    if (fOperations != 0)
  ------------------
  |  Branch (1432:9): [True: 0, False: 4]
  ------------------
 1433|      0|        return;
 1434|       |
 1435|      4|    fNoClosures = 0;
 1436|      4|    fOperations = compile(token, 0, false);
 1437|      4|}
_ZN11xercesc_3_217RegularExpression7compileEPKNS_5TokenEPNS_2OpEb:
 1441|     59|{
 1442|       |
 1443|     59|    Op* ret = 0;
 1444|       |
 1445|     59|    const Token::tokType tokenType = token->getTokenType();
 1446|       |
 1447|     59|    switch(tokenType) {
 1448|      0|    case Token::T_DOT:
  ------------------
  |  Branch (1448:5): [True: 0, False: 59]
  ------------------
 1449|      0|        ret = fOpFactory.createDotOp();
 1450|      0|        ret->setNextOp(next);
 1451|      0|        break;
 1452|      2|    case Token::T_CHAR:
  ------------------
  |  Branch (1452:5): [True: 2, False: 57]
  ------------------
 1453|      2|        ret = fOpFactory.createCharOp(token->getChar());
 1454|      2|        ret->setNextOp(next);
 1455|      2|        break;
 1456|      0|    case Token::T_ANCHOR:
  ------------------
  |  Branch (1456:5): [True: 0, False: 59]
  ------------------
 1457|      0|        ret = fOpFactory.createAnchorOp(token->getChar());
 1458|      0|        ret->setNextOp(next);
 1459|      0|        break;
 1460|     37|    case Token::T_RANGE:
  ------------------
  |  Branch (1460:5): [True: 37, False: 22]
  ------------------
 1461|     37|    case Token::T_NRANGE:
  ------------------
  |  Branch (1461:5): [True: 0, False: 59]
  ------------------
 1462|     37|        ret = fOpFactory.createRangeOp(token);
 1463|     37|        ret->setNextOp(next);
 1464|     37|        break;
 1465|      0|    case Token::T_STRING:
  ------------------
  |  Branch (1465:5): [True: 0, False: 59]
  ------------------
 1466|      0|        ret = fOpFactory.createStringOp(token->getString());
 1467|      0|        ret->setNextOp(next);
 1468|      0|        break;
 1469|      0|    case Token::T_BACKREFERENCE:
  ------------------
  |  Branch (1469:5): [True: 0, False: 59]
  ------------------
 1470|      0|        ret = fOpFactory.createBackReferenceOp(token->getReferenceNo());
 1471|      0|        ret->setNextOp(next);
 1472|      0|        break;
 1473|      1|    case Token::T_EMPTY:
  ------------------
  |  Branch (1473:5): [True: 1, False: 58]
  ------------------
 1474|      1|        ret = next;
 1475|      1|        break;
 1476|      6|    case Token::T_CONCAT:
  ------------------
  |  Branch (1476:5): [True: 6, False: 53]
  ------------------
 1477|      6|        ret = compileConcat(token, next, reverse);
 1478|      6|        break;
 1479|      1|    case Token::T_UNION:
  ------------------
  |  Branch (1479:5): [True: 1, False: 58]
  ------------------
 1480|      1|        ret = compileUnion(token, next, reverse);
 1481|      1|        break;
 1482|      8|    case Token::T_CLOSURE:
  ------------------
  |  Branch (1482:5): [True: 8, False: 51]
  ------------------
 1483|      8|    case Token::T_NONGREEDYCLOSURE:
  ------------------
  |  Branch (1483:5): [True: 0, False: 59]
  ------------------
 1484|      8|        ret = compileClosure(token, next, reverse, tokenType);
 1485|      8|        break;
 1486|      4|    case Token::T_PAREN:
  ------------------
  |  Branch (1486:5): [True: 4, False: 55]
  ------------------
 1487|      4|        ret = compileParenthesis(token, next, reverse);
 1488|      4|        break;
 1489|      0|    default:
  ------------------
  |  Branch (1489:5): [True: 0, False: 59]
  ------------------
 1490|      0|        ThrowXMLwithMemMgr(RuntimeException, XMLExcepts::Regex_UnknownTokenType, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
 1491|      0|        break; // this line to be deleted
 1492|     59|    }
 1493|       |
 1494|     59|    return ret;
 1495|     59|}
_ZN11xercesc_3_217RegularExpression7prepareEv:
 1500|      4|void RegularExpression::prepare() {
 1501|       |
 1502|      4|    compile(fTokenTree);
 1503|       |
 1504|      4|    fMinLength = fTokenTree->getMinLength();
 1505|      4|    fFirstChar = 0;
 1506|       |
 1507|      4|    if (!isSet(fOptions, PROHIBIT_HEAD_CHARACTER_OPTIMIZATION) &&
  ------------------
  |  Branch (1507:9): [True: 4, False: 0]
  ------------------
 1508|      4|        !isSet(fOptions, XMLSCHEMA_MODE))                            {
  ------------------
  |  Branch (1508:9): [True: 0, False: 4]
  ------------------
 1509|       |
 1510|      0|        RangeToken* rangeTok = fTokenFactory->createRange();
 1511|      0|        Token::firstCharacterOptions result = fTokenTree->analyzeFirstCharacter(rangeTok, fOptions, fTokenFactory);
 1512|       |
 1513|      0|        if (result == Token::FC_TERMINAL) {
  ------------------
  |  Branch (1513:13): [True: 0, False: 0]
  ------------------
 1514|       |
 1515|      0|            rangeTok->compactRanges();
 1516|      0|            fFirstChar = rangeTok;
 1517|      0|        }
 1518|       |
 1519|      0|        rangeTok->createMap();
 1520|       |
 1521|      0|        if (isSet(fOptions, IGNORE_CASE))
  ------------------
  |  Branch (1521:13): [True: 0, False: 0]
  ------------------
 1522|      0|        {
 1523|      0|            rangeTok->getCaseInsensitiveToken(fTokenFactory);
 1524|      0|        }
 1525|      0|    }
 1526|       |
 1527|      4|    if (fOperations != 0 && fOperations->getNextOp() == 0 &&
  ------------------
  |  Branch (1527:9): [True: 4, False: 0]
  |  Branch (1527:29): [True: 1, False: 3]
  ------------------
 1528|      4|        (fOperations->getOpType() == Op::O_STRING ||
  ------------------
  |  Branch (1528:10): [True: 0, False: 1]
  ------------------
 1529|      1|         fOperations->getOpType() == Op::O_CHAR) &&
  ------------------
  |  Branch (1529:10): [True: 0, False: 1]
  ------------------
 1530|      4|         !isSet(fOptions, IGNORE_CASE) )                      {
  ------------------
  |  Branch (1530:10): [True: 0, False: 0]
  ------------------
 1531|       |
 1532|      0|        fFixedStringOnly = true;
 1533|       |
 1534|      0|        if (fOperations->getOpType() == Op::O_STRING) {
  ------------------
  |  Branch (1534:13): [True: 0, False: 0]
  ------------------
 1535|      0|            fMemoryManager->deallocate(fFixedString);//delete [] fFixedString;
 1536|      0|            fFixedString = XMLString::replicate(fOperations->getLiteral(), fMemoryManager);
 1537|      0|        }
 1538|      0|        else{
 1539|       |
 1540|      0|            XMLInt32 ch = fOperations->getData();
 1541|       |
 1542|      0|            if ( ch >= 0x10000) { // add as constant
  ------------------
  |  Branch (1542:18): [True: 0, False: 0]
  ------------------
 1543|      0|                fMemoryManager->deallocate(fFixedString);//delete [] fFixedString;
 1544|      0|                fFixedString = RegxUtil::decomposeToSurrogates(ch, fMemoryManager);
 1545|      0|            }
 1546|      0|            else {
 1547|       |
 1548|      0|                XMLCh* dummyStr = (XMLCh*) fMemoryManager->allocate(2 * sizeof(XMLCh));//new XMLCh[2];
 1549|      0|                dummyStr[0] = (XMLCh) fOperations->getData();
 1550|      0|                dummyStr[1] = chNull;
 1551|      0|                fMemoryManager->deallocate(fFixedString);//delete [] fFixedString;
 1552|      0|                fFixedString = dummyStr;
 1553|      0|            }
 1554|      0|        }
 1555|       |
 1556|      0|        fBMPattern = new (fMemoryManager) BMPattern(fFixedString, 256,
 1557|      0|                                                    isSet(fOptions, IGNORE_CASE), fMemoryManager);
 1558|      0|    }
 1559|      4|    else if (!isSet(fOptions, XMLSCHEMA_MODE) &&
  ------------------
  |  Branch (1559:14): [True: 0, False: 4]
  ------------------
 1560|      4|             !isSet(fOptions, PROHIBIT_FIXED_STRING_OPTIMIZATION) &&
  ------------------
  |  Branch (1560:14): [True: 0, False: 0]
  ------------------
 1561|      4|             !isSet(fOptions, IGNORE_CASE)) {
  ------------------
  |  Branch (1561:14): [True: 0, False: 0]
  ------------------
 1562|       |
 1563|      0|        int fixedOpts = 0;
 1564|      0|        Token* tok = fTokenTree->findFixedString(fOptions, fixedOpts);
 1565|       |
 1566|      0|        fMemoryManager->deallocate(fFixedString);//delete [] fFixedString;
 1567|       |
 1568|      0|        fFixedString = (tok == 0) ? 0
  ------------------
  |  Branch (1568:24): [True: 0, False: 0]
  ------------------
 1569|      0|            : XMLString::replicate(tok->getString(), fMemoryManager);
 1570|       |
 1571|      0|        if (fFixedString != 0 && XMLString::stringLen(fFixedString) < 2) {
  ------------------
  |  Branch (1571:13): [True: 0, False: 0]
  |  Branch (1571:34): [True: 0, False: 0]
  ------------------
 1572|       |
 1573|      0|            fMemoryManager->deallocate(fFixedString);//delete [] fFixedString;
 1574|      0|            fFixedString = 0;
 1575|      0|        }
 1576|       |
 1577|      0|        if (fFixedString != 0) {
  ------------------
  |  Branch (1577:13): [True: 0, False: 0]
  ------------------
 1578|       |
 1579|      0|            fBMPattern = new (fMemoryManager) BMPattern(fFixedString, 256,
 1580|      0|                                                        isSet(fixedOpts, IGNORE_CASE), fMemoryManager);
 1581|      0|        }
 1582|      0|    }
 1583|      4|}

_ZN11xercesc_3_217RegularExpression5isSetEii:
  624|    197|  inline bool RegularExpression::isSet(const int options, const int flag) {
  625|       |
  626|    197|      return (options & flag) == flag;
  627|    197|  }
_ZN11xercesc_3_217RegularExpression12compileUnionEPKNS_5TokenEPNS_2OpEb:
  632|      1|                                             const bool reverse) {
  633|       |
  634|      1|      XMLSize_t tokSize = token->size();
  635|      1|      UnionOp* uniOp = fOpFactory.createUnionOp(tokSize);
  636|       |
  637|      3|      for (XMLSize_t i=0; i<tokSize; i++) {
  ------------------
  |  Branch (637:27): [True: 2, False: 1]
  ------------------
  638|       |
  639|      2|          uniOp->addElement(compile(token->getChild(i), next, reverse));
  640|      2|      }
  641|       |
  642|      1|      return uniOp;
  643|      1|  }
_ZN11xercesc_3_217RegularExpression18compileParenthesisEPKNS_5TokenEPNS_2OpEb:
  648|      4|                                                   const bool reverse) {
  649|       |
  650|      4|      if (token->getNoParen() == 0)
  ------------------
  |  Branch (650:11): [True: 4, False: 0]
  ------------------
  651|      4|          return compile(token->getChild(0), next, reverse);
  652|       |
  653|      0|      Op* captureOp    = 0;
  654|       |
  655|      0|      if (reverse) {
  ------------------
  |  Branch (655:11): [True: 0, False: 0]
  ------------------
  656|       |
  657|      0|          captureOp = fOpFactory.createCaptureOp(token->getNoParen(), next);
  658|      0|          captureOp = compile(token->getChild(0), captureOp, reverse);
  659|       |
  660|      0|          return fOpFactory.createCaptureOp(-token->getNoParen(), captureOp);
  661|      0|      }
  662|       |
  663|      0|      captureOp = fOpFactory.createCaptureOp(-token->getNoParen(), next);
  664|      0|      captureOp = compile(token->getChild(0), captureOp, reverse);
  665|       |
  666|      0|      return fOpFactory.createCaptureOp(token->getNoParen(), captureOp);
  667|      0|  }
_ZN11xercesc_3_217RegularExpression13compileConcatEPKNS_5TokenEPNS_2OpEb:
  671|      6|                                              const bool reverse) {
  672|       |
  673|      6|      Op* ret = next;
  674|      6|      XMLSize_t tokSize = token->size();
  675|       |
  676|      6|      if (!reverse) {
  ------------------
  |  Branch (676:11): [True: 6, False: 0]
  ------------------
  677|       |
  678|     19|          for (XMLSize_t i= tokSize; i>0; i--) {
  ------------------
  |  Branch (678:38): [True: 13, False: 6]
  ------------------
  679|     13|              ret = compile(token->getChild(i-1), ret, false);
  680|     13|          }
  681|      6|      }
  682|      0|      else {
  683|       |
  684|      0|          for (XMLSize_t i= 0; i< tokSize; i++) {
  ------------------
  |  Branch (684:32): [True: 0, False: 0]
  ------------------
  685|      0|              ret = compile(token->getChild(i), ret, true);
  686|      0|          }
  687|      0|      }
  688|       |
  689|      6|      return ret;
  690|      6|  }
_ZN11xercesc_3_217RegularExpression14compileClosureEPKNS_5TokenEPNS_2OpEbNS1_7tokTypeE:
  695|      8|                                               const Token::tokType tkType) {
  696|       |
  697|      8|      Op*    ret      = 0;
  698|      8|      Token* childTok = token->getChild(0);
  699|      8|      int    min      = token->getMin();
  700|      8|      int    max      = token->getMax();
  701|       |
  702|      8|      if (min >= 0 && min == max) {
  ------------------
  |  Branch (702:11): [True: 4, False: 4]
  |  Branch (702:23): [True: 0, False: 4]
  ------------------
  703|       |
  704|      0|          ret = next;
  705|      0|          for (int i=0; i< min; i++) {
  ------------------
  |  Branch (705:25): [True: 0, False: 0]
  ------------------
  706|      0|              ret = compile(childTok, ret, reverse);
  707|      0|          }
  708|       |
  709|      0|          return ret;
  710|      0|      }
  711|       |
  712|      8|      if (min > 0 && max > 0)
  ------------------
  |  Branch (712:11): [True: 4, False: 4]
  |  Branch (712:22): [True: 4, False: 0]
  ------------------
  713|      4|          max -= min;
  714|       |
  715|      8|      if (max > 0) {
  ------------------
  |  Branch (715:11): [True: 4, False: 4]
  ------------------
  716|       |
  717|      4|          ret = next;
  718|     32|          for (int i=0; i<max; i++) {
  ------------------
  |  Branch (718:25): [True: 28, False: 4]
  ------------------
  719|       |
  720|     28|              ChildOp* childOp = fOpFactory.createQuestionOp(
  721|     28|                  tkType == Token::T_NONGREEDYCLOSURE);
  722|       |
  723|     28|              childOp->setNextOp(next);
  724|     28|              childOp->setChild(compile(childTok, ret, reverse));
  725|     28|              ret = childOp;
  726|     28|          }
  727|      4|      }
  728|      4|      else {
  729|       |
  730|      4|          ChildOp* childOp = 0;
  731|       |
  732|      4|          if (tkType == Token::T_NONGREEDYCLOSURE) {
  ------------------
  |  Branch (732:15): [True: 0, False: 4]
  ------------------
  733|      0|              childOp = fOpFactory.createNonGreedyClosureOp();
  734|      0|          }
  735|      4|          else {
  736|       |
  737|      4|              if (childTok->getMinLength() == 0)
  ------------------
  |  Branch (737:19): [True: 0, False: 4]
  ------------------
  738|      0|                  childOp = fOpFactory.createClosureOp(fNoClosures++);
  739|      4|              else
  740|      4|                  childOp = fOpFactory.createClosureOp(-1);
  741|      4|          }
  742|       |
  743|      4|          childOp->setNextOp(next);
  744|      4|          if(next==NULL || !doTokenOverlap(next, childTok))
  ------------------
  |  Branch (744:14): [True: 4, False: 0]
  |  Branch (744:28): [True: 0, False: 0]
  ------------------
  745|      4|          {
  746|      4|              childOp->setOpType(tkType == Token::T_NONGREEDYCLOSURE?Op::O_FINITE_NONGREEDYCLOSURE:Op::O_FINITE_CLOSURE);
  ------------------
  |  Branch (746:34): [True: 0, False: 4]
  ------------------
  747|      4|              childOp->setChild(compile(childTok, NULL, reverse));
  748|      4|          }
  749|      0|          else
  750|      0|          {
  751|      0|              childOp->setChild(compile(childTok, childOp, reverse));
  752|      0|          }
  753|      4|          ret = childOp;
  754|      4|      }
  755|       |
  756|      8|      if (min > 0) {
  ------------------
  |  Branch (756:11): [True: 4, False: 4]
  ------------------
  757|       |
  758|      8|          for (int i=0; i< min; i++) {
  ------------------
  |  Branch (758:25): [True: 4, False: 4]
  ------------------
  759|      4|              ret = compile(childTok, ret, reverse);
  760|      4|          }
  761|      4|      }
  762|       |
  763|      8|      return ret;
  764|      8|  }

_ZN11xercesc_3_210RegxParserC2EPNS_13MemoryManagerE:
   51|      4|    :fMemoryManager(manager),
   52|      4|     fHasBackReferences(false),
   53|      4|     fOptions(0),
   54|      4|     fOffset(0),
   55|      4|     fNoGroups(1),
   56|      4|     fParseContext(regexParserStateNormal),
   57|      4|     fStringLen(0),
   58|      4|     fState(REGX_T_EOF),
   59|      4|     fCharData(0),
   60|      4|     fString(0),
   61|      4|     fReferences(0),
   62|      4|     fTokenFactory(0)
   63|      4|{
   64|      4|}
_ZN11xercesc_3_210RegxParserD2Ev:
   66|      4|RegxParser::~RegxParser() {
   67|       |
   68|      4|    fMemoryManager->deallocate(fString);//delete [] fString;
   69|      4|    delete fReferences;
   70|      4|}
_ZN11xercesc_3_210RegxParser5parseEPKDsi:
   75|      4|Token* RegxParser::parse(const XMLCh* const regxStr, const int options) {
   76|       |
   77|       |    // if TokenFactory is not set do nothing.
   78|       |    // REVISIT - should we throw an exception
   79|      4|    if (fTokenFactory == 0) {
  ------------------
  |  Branch (79:9): [True: 0, False: 4]
  ------------------
   80|      0|        return 0;
   81|      0|    }
   82|       |
   83|      4|    fOptions = options;
   84|      4|    fOffset = 0;
   85|      4|    fNoGroups = 1;
   86|      4|    fHasBackReferences = false;
   87|      4|    setParseContext(regexParserStateNormal);
   88|      4|    if (fString)
  ------------------
  |  Branch (88:9): [True: 0, False: 4]
  ------------------
   89|      0|        fMemoryManager->deallocate(fString);//delete [] fString;
   90|      4|    fString = XMLString::replicate(regxStr, fMemoryManager);
   91|       |
   92|      4|    if (isSet(RegularExpression::EXTENDED_COMMENT)) {
  ------------------
  |  Branch (92:9): [True: 0, False: 4]
  ------------------
   93|       |
   94|      0|        if (fString)
  ------------------
  |  Branch (94:13): [True: 0, False: 0]
  ------------------
   95|      0|            fMemoryManager->deallocate(fString);//delete [] fString;
   96|      0|        fString = RegxUtil::stripExtendedComment(regxStr, fMemoryManager);
   97|      0|    }
   98|       |
   99|      4|    fStringLen = XMLString::stringLen(fString);
  100|      4|    processNext();
  101|       |
  102|      4|    Token* retTok = parseRegx();
  103|       |
  104|      4|    if (fOffset != fStringLen) {
  ------------------
  |  Branch (104:9): [True: 0, False: 4]
  ------------------
  105|      0|        XMLCh value1[65];
  106|      0|        XMLString::sizeToText(fOffset, value1, 64, 10, fMemoryManager);
  107|      0|        ThrowXMLwithMemMgr2(ParseException,XMLExcepts::Parser_Parse1, value1, fString, fMemoryManager);
  ------------------
  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  ------------------
  108|      0|    }
  109|       |
  110|      4|    if (fReferences != 0) {
  ------------------
  |  Branch (110:9): [True: 0, False: 4]
  ------------------
  111|       |
  112|      0|        XMLSize_t refSize = fReferences->size();
  113|      0|        for (XMLSize_t i = 0; i < refSize; i++) {
  ------------------
  |  Branch (113:31): [True: 0, False: 0]
  ------------------
  114|       |
  115|      0|            if (fNoGroups <= fReferences->elementAt(i)->fReferenceNo) {
  ------------------
  |  Branch (115:17): [True: 0, False: 0]
  ------------------
  116|      0|                ThrowXMLwithMemMgr(ParseException,XMLExcepts::Parser_Parse2, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  117|      0|            }
  118|      0|        }
  119|       |
  120|      0|        fReferences->removeAllElements();
  121|      0|    }
  122|       |
  123|      4|    return retTok;
  124|      4|}
_ZN11xercesc_3_210RegxParser11processNextEv:
  127|     71|void RegxParser::processNext() {
  128|       |
  129|     71|    if (fOffset >= fStringLen) {
  ------------------
  |  Branch (129:9): [True: 4, False: 67]
  ------------------
  130|       |
  131|      4|        fCharData = -1;
  132|      4|        fState = REGX_T_EOF;
  133|      4|        return;
  134|      4|    }
  135|       |
  136|     67|    parserState nextState;
  137|     67|    XMLCh ch = fString[fOffset++];
  138|     67|    fCharData = ch;
  139|       |
  140|     67|    if (fParseContext == regexParserStateInBrackets) {
  ------------------
  |  Branch (140:9): [True: 41, False: 26]
  ------------------
  141|       |
  142|     41|        switch (ch) {
  143|      1|        case chBackSlash:
  ------------------
  |  Branch (143:9): [True: 1, False: 40]
  ------------------
  144|      1|            nextState = REGX_T_BACKSOLIDUS;
  145|       |
  146|      1|            if (fOffset >= fStringLen) {
  ------------------
  |  Branch (146:17): [True: 0, False: 1]
  ------------------
  147|      0|                ThrowXMLwithMemMgr(ParseException,XMLExcepts::Parser_Next1, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  148|      0|            }
  149|       |
  150|      1|            fCharData = fString[fOffset++];
  151|      1|            break;
  152|     11|        case chDash:
  ------------------
  |  Branch (152:9): [True: 11, False: 30]
  ------------------
  153|     11|            if (fOffset < fStringLen && fString[fOffset] == chOpenSquare) {
  ------------------
  |  Branch (153:17): [True: 11, False: 0]
  |  Branch (153:41): [True: 0, False: 11]
  ------------------
  154|       |
  155|      0|                fOffset++;
  156|      0|                nextState = REGX_T_XMLSCHEMA_CC_SUBTRACTION;
  157|      0|            }
  158|     11|            else {
  159|     11|                nextState = REGX_T_CHAR;
  160|     11|            }
  161|     11|            break;
  162|     29|        default:
  ------------------
  |  Branch (162:9): [True: 29, False: 12]
  ------------------
  163|     29|            if (RegxUtil::isHighSurrogate(ch) && fOffset < fStringLen) {
  ------------------
  |  Branch (163:17): [True: 0, False: 29]
  |  Branch (163:50): [True: 0, False: 0]
  ------------------
  164|       |
  165|      0|                XMLCh lowCh = fString[fOffset];
  166|      0|                if (RegxUtil::isLowSurrogate(lowCh)) {
  ------------------
  |  Branch (166:21): [True: 0, False: 0]
  ------------------
  167|      0|                    fCharData = RegxUtil::composeFromSurrogate(ch, lowCh);
  168|      0|                    fOffset++;
  169|      0|                }
  170|      0|                else {
  171|      0|                    throw XMLErrs::Expected2ndSurrogateChar;
  172|      0|                }
  173|      0|            }
  174|       |
  175|     29|            nextState = REGX_T_CHAR;
  176|     41|        }
  177|       |
  178|     41|        fState = nextState;
  179|     41|        return;
  180|     41|    }
  181|       |
  182|     26|    switch (ch) {
  183|       |
  184|      0|    case chPipe:
  ------------------
  |  Branch (184:5): [True: 0, False: 26]
  ------------------
  185|      0|        nextState = REGX_T_OR;
  186|      0|        break;
  187|      2|    case chAsterisk:
  ------------------
  |  Branch (187:5): [True: 2, False: 24]
  ------------------
  188|      2|        nextState = REGX_T_STAR;
  189|      2|        break;
  190|      2|    case chPlus:
  ------------------
  |  Branch (190:5): [True: 2, False: 24]
  ------------------
  191|      2|        nextState = REGX_T_PLUS;
  192|      2|        break;
  193|      1|    case chQuestion:
  ------------------
  |  Branch (193:5): [True: 1, False: 25]
  ------------------
  194|      1|        nextState = REGX_T_QUESTION;
  195|      1|        break;
  196|      4|    case chCloseParen:
  ------------------
  |  Branch (196:5): [True: 4, False: 22]
  ------------------
  197|      4|        nextState = REGX_T_RPAREN;
  198|      4|        break;
  199|      0|    case chPeriod:
  ------------------
  |  Branch (199:5): [True: 0, False: 26]
  ------------------
  200|      0|        nextState = REGX_T_DOT;
  201|      0|        break;
  202|      6|    case chOpenSquare:
  ------------------
  |  Branch (202:5): [True: 6, False: 20]
  ------------------
  203|      6|        nextState = REGX_T_LBRACKET;
  204|      6|        break;
  205|      0|    case chCaret:
  ------------------
  |  Branch (205:5): [True: 0, False: 26]
  ------------------
  206|      0|        nextState = REGX_T_CARET;
  207|      0|        break;
  208|      0|    case chDollarSign:
  ------------------
  |  Branch (208:5): [True: 0, False: 26]
  ------------------
  209|      0|        nextState = REGX_T_DOLLAR;
  210|      0|        break;
  211|      4|    case chOpenParen:
  ------------------
  |  Branch (211:5): [True: 4, False: 22]
  ------------------
  212|      4|        nextState = REGX_T_LPAREN;
  213|      4|        break;
  214|      1|    case chBackSlash:
  ------------------
  |  Branch (214:5): [True: 1, False: 25]
  ------------------
  215|      1|        nextState = REGX_T_BACKSOLIDUS;
  216|      1|        if (fOffset >= fStringLen) {
  ------------------
  |  Branch (216:13): [True: 0, False: 1]
  ------------------
  217|      0|            ThrowXMLwithMemMgr(ParseException,XMLExcepts::Parser_Next1, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  218|      0|        }
  219|       |
  220|      1|        fCharData = fString[fOffset++];
  221|      1|        break;
  222|      6|    default:
  ------------------
  |  Branch (222:5): [True: 6, False: 20]
  ------------------
  223|      6|        nextState = REGX_T_CHAR;
  224|      6|        if (RegxUtil::isHighSurrogate(ch) && fOffset < fStringLen) {
  ------------------
  |  Branch (224:13): [True: 0, False: 6]
  |  Branch (224:46): [True: 0, False: 0]
  ------------------
  225|       |
  226|      0|                XMLCh lowCh = fString[fOffset];
  227|      0|                if (RegxUtil::isLowSurrogate(lowCh)) {
  ------------------
  |  Branch (227:21): [True: 0, False: 0]
  ------------------
  228|      0|                    fCharData = RegxUtil::composeFromSurrogate(ch, lowCh);
  229|      0|                    fOffset++;
  230|      0|                }
  231|      0|                else {
  232|      0|                    throw XMLErrs::Expected2ndSurrogateChar;
  233|      0|                }
  234|      0|            }
  235|     26|    }
  236|       |
  237|     26|    fState = nextState;
  238|     26|}
_ZN11xercesc_3_210RegxParser9parseRegxEb:
  241|      8|Token* RegxParser::parseRegx(const bool matchingRParen) {
  242|       |
  243|      8|    Token* tok = parseTerm(matchingRParen);
  244|      8|    Token* parentTok = 0;
  245|       |
  246|      8|    while (fState == REGX_T_OR) {
  ------------------
  |  Branch (246:12): [True: 0, False: 8]
  ------------------
  247|       |
  248|      0|        processNext();
  249|      0|        if (parentTok == 0) {
  ------------------
  |  Branch (249:13): [True: 0, False: 0]
  ------------------
  250|       |
  251|      0|            parentTok = fTokenFactory->createUnion();
  252|      0|            parentTok->addChild(tok, fTokenFactory);
  253|      0|            tok = parentTok;
  254|      0|        }
  255|       |
  256|      0|        tok->addChild(parseTerm(matchingRParen), fTokenFactory);
  257|      0|    }
  258|       |
  259|      8|    return tok;
  260|      8|}
_ZN11xercesc_3_210RegxParser9parseTermEb:
  263|      8|Token* RegxParser::parseTerm(const bool matchingRParen) {
  264|       |
  265|      8|    parserState state = fState;
  266|       |
  267|      8|    if (state == REGX_T_OR || state == REGX_T_EOF
  ------------------
  |  Branch (267:9): [True: 0, False: 8]
  |  Branch (267:31): [True: 0, False: 8]
  ------------------
  268|      8|        || (state == REGX_T_RPAREN && matchingRParen)) {
  ------------------
  |  Branch (268:13): [True: 0, False: 8]
  |  Branch (268:39): [True: 0, False: 0]
  ------------------
  269|      0|        return fTokenFactory->createToken(Token::T_EMPTY);
  270|      0|    }
  271|      8|    else {
  272|       |
  273|      8|        Token* tok = parseFactor();
  274|      8|        Token* concatTok = 0;
  275|       |
  276|     13|        while ((state = fState) != REGX_T_OR && state != REGX_T_EOF
  ------------------
  |  Branch (276:16): [True: 13, False: 0]
  |  Branch (276:49): [True: 9, False: 4]
  ------------------
  277|     13|               && (state != REGX_T_RPAREN || !matchingRParen))
  ------------------
  |  Branch (277:20): [True: 5, False: 4]
  |  Branch (277:46): [True: 0, False: 4]
  ------------------
  278|      5|        {
  279|      5|            if (concatTok == 0) {
  ------------------
  |  Branch (279:17): [True: 5, False: 0]
  ------------------
  280|       |
  281|      5|                concatTok = fTokenFactory->createUnion(true);
  282|      5|                concatTok->addChild(tok, fTokenFactory);
  283|      5|                tok = concatTok;
  284|      5|            }
  285|      5|            concatTok->addChild(parseFactor(), fTokenFactory);
  286|      5|        }
  287|       |
  288|      8|        return tok;
  289|      8|    }
  290|      8|}
_ZN11xercesc_3_210RegxParser11parseFactorEv:
  399|     13|Token* RegxParser::parseFactor() {
  400|       |
  401|     13|    Token* tok = parseAtom();
  402|       |
  403|     13|    switch(fState) {
  404|       |
  405|      2|    case REGX_T_STAR:
  ------------------
  |  Branch (405:5): [True: 2, False: 11]
  ------------------
  406|      2|        return processStar(tok);
  407|      2|    case REGX_T_PLUS:
  ------------------
  |  Branch (407:5): [True: 2, False: 11]
  ------------------
  408|      2|        return processPlus(tok);
  409|      1|    case REGX_T_QUESTION:
  ------------------
  |  Branch (409:5): [True: 1, False: 12]
  ------------------
  410|      1|        return processQuestion(tok);
  411|      4|    case REGX_T_CHAR:
  ------------------
  |  Branch (411:5): [True: 4, False: 9]
  ------------------
  412|      4|        if (fCharData == chOpenCurly && fOffset < fStringLen) {
  ------------------
  |  Branch (412:13): [True: 4, False: 0]
  |  Branch (412:41): [True: 4, False: 0]
  ------------------
  413|       |
  414|      4|            int min = 0;
  415|      4|            int max = -1;
  416|      4|            XMLInt32 ch = fString[fOffset++];
  417|       |
  418|      4|            if (ch >= chDigit_0 && ch <= chDigit_9) {
  ------------------
  |  Branch (418:17): [True: 4, False: 0]
  |  Branch (418:36): [True: 4, False: 0]
  ------------------
  419|       |
  420|      4|                min = ch - chDigit_0;
  421|      4|                while (fOffset < fStringLen
  ------------------
  |  Branch (421:24): [True: 4, False: 0]
  ------------------
  422|      4|                       && (ch = fString[fOffset++]) >= chDigit_0
  ------------------
  |  Branch (422:27): [True: 0, False: 4]
  ------------------
  423|      4|                       && ch <= chDigit_9) {
  ------------------
  |  Branch (423:27): [True: 0, False: 0]
  ------------------
  424|       |
  425|      0|                    min = min*10 + ch - chDigit_0;
  426|      0|                }
  427|       |
  428|      4|                if (min < 0)
  ------------------
  |  Branch (428:21): [True: 0, False: 4]
  ------------------
  429|      0|                    ThrowXMLwithMemMgr1(ParseException, XMLExcepts::Parser_Quantifier5, fString, fMemoryManager);
  ------------------
  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
  430|      4|            }
  431|      0|            else {
  432|      0|                ThrowXMLwithMemMgr1(ParseException, XMLExcepts::Parser_Quantifier1, fString, fMemoryManager);
  ------------------
  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
  433|      0|            }
  434|       |
  435|      4|            max = min;
  436|       |
  437|      4|            if (ch == chComma) {
  ------------------
  |  Branch (437:17): [True: 4, False: 0]
  ------------------
  438|       |
  439|      4|                if (fOffset >= fStringLen) {
  ------------------
  |  Branch (439:21): [True: 0, False: 4]
  ------------------
  440|      0|                    ThrowXMLwithMemMgr1(ParseException, XMLExcepts::Parser_Quantifier3, fString, fMemoryManager);
  ------------------
  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
  441|      0|                }
  442|      4|                else if ((ch = fString[fOffset++]) >= chDigit_0 && ch <= chDigit_9) {
  ------------------
  |  Branch (442:26): [True: 4, False: 0]
  |  Branch (442:68): [True: 4, False: 0]
  ------------------
  443|       |
  444|      4|                    max = ch - chDigit_0;
  445|      4|                    while (fOffset < fStringLen
  ------------------
  |  Branch (445:28): [True: 4, False: 0]
  ------------------
  446|      4|                           && (ch = fString[fOffset++]) >= chDigit_0
  ------------------
  |  Branch (446:31): [True: 4, False: 0]
  ------------------
  447|      4|                           && ch <= chDigit_9) {
  ------------------
  |  Branch (447:31): [True: 0, False: 4]
  ------------------
  448|       |
  449|      0|                        max = max*10 + ch - chDigit_0;
  450|      0|                    }
  451|       |
  452|      4|                    if (max < 0)
  ------------------
  |  Branch (452:25): [True: 0, False: 4]
  ------------------
  453|      0|                        ThrowXMLwithMemMgr1(ParseException, XMLExcepts::Parser_Quantifier5, fString, fMemoryManager);
  ------------------
  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
  454|      4|                    else if (min > max)
  ------------------
  |  Branch (454:30): [True: 0, False: 4]
  ------------------
  455|      0|                        ThrowXMLwithMemMgr1(ParseException, XMLExcepts::Parser_Quantifier4, fString, fMemoryManager);
  ------------------
  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
  456|      4|                }
  457|      0|                else {
  458|      0|                    max = -1;
  459|      0|                }
  460|      4|            }
  461|       |
  462|      4|            if (ch != chCloseCurly)  {
  ------------------
  |  Branch (462:17): [True: 0, False: 4]
  ------------------
  463|      0|                ThrowXMLwithMemMgr1(ParseException, XMLExcepts::Parser_Quantifier2, fString, fMemoryManager);
  ------------------
  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
  464|      0|            }
  465|       |
  466|      4|            if (checkQuestion(fOffset)) {
  ------------------
  |  Branch (466:17): [True: 0, False: 4]
  ------------------
  467|       |
  468|      0|                tok = fTokenFactory->createClosure(tok, true);
  469|      0|                fOffset++;
  470|      0|            }
  471|      4|            else {
  472|      4|                tok = fTokenFactory->createClosure(tok);
  473|      4|            }
  474|       |
  475|      4|            tok->setMin(min);
  476|      4|            tok->setMax(max);
  477|      4|            processNext();
  478|      4|        }
  479|      4|        break;
  480|      4|    default:
  ------------------
  |  Branch (480:5): [True: 4, False: 9]
  ------------------
  481|      4|        break;
  482|     13|    }
  483|       |
  484|      8|    return tok;
  485|     13|}
_ZN11xercesc_3_210RegxParser9parseAtomEv:
  488|     13|Token* RegxParser::parseAtom() {
  489|       |
  490|     13|    Token* tok = 0;
  491|       |
  492|     13|    switch(fState) {
  493|       |
  494|      4|    case REGX_T_LPAREN:
  ------------------
  |  Branch (494:5): [True: 4, False: 9]
  ------------------
  495|      4|        return processParen();
  496|      0|    case REGX_T_DOT:
  ------------------
  |  Branch (496:5): [True: 0, False: 13]
  ------------------
  497|      0|        processNext();
  498|      0|        tok = fTokenFactory->getDot();
  499|      0|        break;
  500|      0|    case REGX_T_CARET:
  ------------------
  |  Branch (500:5): [True: 0, False: 13]
  ------------------
  501|      0|        return processCaret();
  502|      0|    case REGX_T_DOLLAR:
  ------------------
  |  Branch (502:5): [True: 0, False: 13]
  ------------------
  503|      0|        return processDollar();
  504|      6|    case REGX_T_LBRACKET:
  ------------------
  |  Branch (504:5): [True: 6, False: 7]
  ------------------
  505|      6|        return parseCharacterClass(true);
  506|      1|    case REGX_T_BACKSOLIDUS:
  ------------------
  |  Branch (506:5): [True: 1, False: 12]
  ------------------
  507|      1|        switch(fCharData) {
  508|       |
  509|      0|        case chLatin_d:
  ------------------
  |  Branch (509:9): [True: 0, False: 1]
  ------------------
  510|      0|        case chLatin_D:
  ------------------
  |  Branch (510:9): [True: 0, False: 1]
  ------------------
  511|      0|        case chLatin_w:
  ------------------
  |  Branch (511:9): [True: 0, False: 1]
  ------------------
  512|      0|        case chLatin_W:
  ------------------
  |  Branch (512:9): [True: 0, False: 1]
  ------------------
  513|      0|        case chLatin_s:
  ------------------
  |  Branch (513:9): [True: 0, False: 1]
  ------------------
  514|      0|        case chLatin_S:
  ------------------
  |  Branch (514:9): [True: 0, False: 1]
  ------------------
  515|      1|        case chLatin_c:
  ------------------
  |  Branch (515:9): [True: 1, False: 0]
  ------------------
  516|      1|        case chLatin_C:
  ------------------
  |  Branch (516:9): [True: 0, False: 1]
  ------------------
  517|      1|        case chLatin_i:
  ------------------
  |  Branch (517:9): [True: 0, False: 1]
  ------------------
  518|      1|        case chLatin_I:
  ------------------
  |  Branch (518:9): [True: 0, False: 1]
  ------------------
  519|      1|            tok = getTokenForShorthand(fCharData);
  520|      1|            processNext();
  521|      1|            return tok;
  522|      0|        case chDigit_0:
  ------------------
  |  Branch (522:9): [True: 0, False: 1]
  ------------------
  523|      0|        case chDigit_1:
  ------------------
  |  Branch (523:9): [True: 0, False: 1]
  ------------------
  524|      0|        case chDigit_2:
  ------------------
  |  Branch (524:9): [True: 0, False: 1]
  ------------------
  525|      0|        case chDigit_3:
  ------------------
  |  Branch (525:9): [True: 0, False: 1]
  ------------------
  526|      0|        case chDigit_4:
  ------------------
  |  Branch (526:9): [True: 0, False: 1]
  ------------------
  527|      0|        case chDigit_5:
  ------------------
  |  Branch (527:9): [True: 0, False: 1]
  ------------------
  528|      0|        case chDigit_6:
  ------------------
  |  Branch (528:9): [True: 0, False: 1]
  ------------------
  529|      0|        case chDigit_7:
  ------------------
  |  Branch (529:9): [True: 0, False: 1]
  ------------------
  530|      0|        case chDigit_8:
  ------------------
  |  Branch (530:9): [True: 0, False: 1]
  ------------------
  531|      0|        case chDigit_9:
  ------------------
  |  Branch (531:9): [True: 0, False: 1]
  ------------------
  532|      0|            return processBackReference();
  533|      0|        case chLatin_p:
  ------------------
  |  Branch (533:9): [True: 0, False: 1]
  ------------------
  534|      0|        case chLatin_P:
  ------------------
  |  Branch (534:9): [True: 0, False: 1]
  ------------------
  535|      0|            {                
  536|      0|                tok = processBacksolidus_pP(fCharData);
  537|      0|                if (tok == 0) {
  ------------------
  |  Branch (537:21): [True: 0, False: 0]
  ------------------
  538|      0|                    ThrowXMLwithMemMgr(ParseException,XMLExcepts::Parser_Atom5, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  539|      0|                }
  540|      0|            }
  541|      0|            break;
  542|      0|        default:
  ------------------
  |  Branch (542:9): [True: 0, False: 1]
  ------------------
  543|      0|            {
  544|      0|                XMLInt32 ch = decodeEscaped();
  545|      0|                if (ch < 0x10000) {
  ------------------
  |  Branch (545:21): [True: 0, False: 0]
  ------------------
  546|      0|                    tok = fTokenFactory->createChar(ch);
  547|      0|                }
  548|      0|                else {
  549|       |
  550|      0|                    XMLCh* surrogateStr = RegxUtil::decomposeToSurrogates(ch, fMemoryManager);
  551|      0|                    ArrayJanitor<XMLCh> janSurrogate(surrogateStr, fMemoryManager);
  552|      0|                    tok = fTokenFactory->createString(surrogateStr);
  553|      0|                }
  554|      0|            }
  555|      0|            break;
  556|      1|        } // end switch
  557|       |
  558|      0|        processNext();
  559|      0|        break;
  560|      2|    case REGX_T_CHAR:
  ------------------
  |  Branch (560:5): [True: 2, False: 11]
  ------------------
  561|      2|        if (fCharData == chOpenCurly
  ------------------
  |  Branch (561:13): [True: 0, False: 2]
  ------------------
  562|      2|            || fCharData == chCloseCurly
  ------------------
  |  Branch (562:16): [True: 0, False: 2]
  ------------------
  563|      2|            || fCharData == chCloseSquare)
  ------------------
  |  Branch (563:16): [True: 0, False: 2]
  ------------------
  564|      0|            ThrowXMLwithMemMgr(ParseException,XMLExcepts::Parser_Atom4, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  565|       |
  566|      2|        tok = fTokenFactory->createChar(fCharData);
  567|      2|        processNext();
  568|      2|        break;
  569|      0|    default:
  ------------------
  |  Branch (569:5): [True: 0, False: 13]
  ------------------
  570|      0|        ThrowXMLwithMemMgr(ParseException,XMLExcepts::Parser_Atom4, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  571|     13|    } //end switch
  572|       |
  573|      2|    return tok;
  574|     13|}
_ZN11xercesc_3_210RegxParser19parseCharacterClassEb:
  601|      6|RangeToken* RegxParser::parseCharacterClass(const bool useNRange) {
  602|       |
  603|      6|    setParseContext(regexParserStateInBrackets);
  604|      6|    processNext();
  605|       |
  606|      6|    RangeToken* tok = 0;
  607|      6|    bool isNRange = false;
  608|       |
  609|      6|    if (getState() == REGX_T_CHAR && getCharData() == chCaret) {
  ------------------
  |  Branch (609:9): [True: 6, False: 0]
  |  Branch (609:38): [True: 0, False: 6]
  ------------------
  610|      0|        isNRange = true;
  611|      0|        processNext();
  612|      0|    }
  613|      6|    tok = fTokenFactory->createRange();
  614|       |
  615|      6|    parserState type;
  616|      6|    bool firstLoop = true;
  617|      6|    bool wasDecoded;
  618|       |
  619|     19|    while ( (type = getState()) != REGX_T_EOF) {
  ------------------
  |  Branch (619:13): [True: 19, False: 0]
  ------------------
  620|       |
  621|     19|        wasDecoded = false;
  622|       |
  623|       |        // single range | from-to-range | subtraction
  624|     19|        if (type == REGX_T_CHAR && getCharData() == chCloseSquare && !firstLoop)
  ------------------
  |  Branch (624:13): [True: 18, False: 1]
  |  Branch (624:36): [True: 6, False: 12]
  |  Branch (624:70): [True: 6, False: 0]
  ------------------
  625|      6|            break;
  626|       |
  627|     13|        XMLInt32 ch = getCharData();
  628|     13|        bool     end = false;
  629|       |
  630|     13|        if (type == REGX_T_BACKSOLIDUS) {
  ------------------
  |  Branch (630:13): [True: 1, False: 12]
  ------------------
  631|       |
  632|      1|            switch(ch) {
  633|      0|            case chLatin_d:
  ------------------
  |  Branch (633:13): [True: 0, False: 1]
  ------------------
  634|      0|            case chLatin_D:
  ------------------
  |  Branch (634:13): [True: 0, False: 1]
  ------------------
  635|      0|            case chLatin_w:
  ------------------
  |  Branch (635:13): [True: 0, False: 1]
  ------------------
  636|      0|            case chLatin_W:
  ------------------
  |  Branch (636:13): [True: 0, False: 1]
  ------------------
  637|      0|            case chLatin_s:
  ------------------
  |  Branch (637:13): [True: 0, False: 1]
  ------------------
  638|      0|            case chLatin_S:
  ------------------
  |  Branch (638:13): [True: 0, False: 1]
  ------------------
  639|      0|            case chLatin_i:
  ------------------
  |  Branch (639:13): [True: 0, False: 1]
  ------------------
  640|      0|            case chLatin_I:
  ------------------
  |  Branch (640:13): [True: 0, False: 1]
  ------------------
  641|      0|            case chLatin_c:
  ------------------
  |  Branch (641:13): [True: 0, False: 1]
  ------------------
  642|      0|            case chLatin_C:
  ------------------
  |  Branch (642:13): [True: 0, False: 1]
  ------------------
  643|      0|                {
  644|      0|                    tok->mergeRanges(getTokenForShorthand(ch));
  645|      0|                    end = true;
  646|      0|                }
  647|      0|                break;
  648|      0|            case chLatin_p:
  ------------------
  |  Branch (648:13): [True: 0, False: 1]
  ------------------
  649|      0|            case chLatin_P:
  ------------------
  |  Branch (649:13): [True: 0, False: 1]
  ------------------
  650|      0|                {                    
  651|      0|                    RangeToken* tok2 = processBacksolidus_pP(ch);
  652|       |
  653|      0|                    if (tok2 == 0) {
  ------------------
  |  Branch (653:25): [True: 0, False: 0]
  ------------------
  654|      0|                        ThrowXMLwithMemMgr(ParseException,XMLExcepts::Parser_Atom5, getMemoryManager());
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  655|      0|                    }
  656|       |
  657|      0|                    tok->mergeRanges(tok2);
  658|      0|                    end = true;
  659|      0|                }
  660|      0|                break;
  661|      1|            case chDash:
  ------------------
  |  Branch (661:13): [True: 1, False: 0]
  ------------------
  662|      1|                wasDecoded = true;
  663|       |                // fall thru to default.
  664|      1|            default:
  ------------------
  |  Branch (664:13): [True: 0, False: 1]
  ------------------
  665|      1|                ch = decodeEscaped();
  666|      1|            }
  667|      1|        } // end if REGX_T_BACKSOLIDUS
  668|     12|        else if (type == REGX_T_XMLSCHEMA_CC_SUBTRACTION && !firstLoop) {
  ------------------
  |  Branch (668:18): [True: 0, False: 12]
  |  Branch (668:61): [True: 0, False: 0]
  ------------------
  669|       |
  670|      0|            if (isNRange)
  ------------------
  |  Branch (670:17): [True: 0, False: 0]
  ------------------
  671|      0|            {
  672|      0|                tok = RangeToken::complementRanges(tok, fTokenFactory, fMemoryManager);
  673|      0|                isNRange=false;
  674|      0|            }
  675|      0|            RangeToken* rangeTok = parseCharacterClass(false);
  676|      0|            tok->subtractRanges(rangeTok);
  677|       |
  678|      0|            if (getState() != REGX_T_CHAR || getCharData() != chCloseSquare) {
  ------------------
  |  Branch (678:17): [True: 0, False: 0]
  |  Branch (678:46): [True: 0, False: 0]
  ------------------
  679|      0|                ThrowXMLwithMemMgr(ParseException,XMLExcepts::Parser_CC5, getMemoryManager());
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  680|      0|            }
  681|      0|            break;
  682|      0|        } // end if REGX_T_XMLSCHEMA...
  683|       |
  684|     13|        processNext();
  685|       |
  686|     13|        if (!end) {
  ------------------
  |  Branch (686:13): [True: 13, False: 0]
  ------------------
  687|       |
  688|     13|            if (type == REGX_T_CHAR
  ------------------
  |  Branch (688:17): [True: 12, False: 1]
  ------------------
  689|     13|                && (ch == chOpenSquare
  ------------------
  |  Branch (689:21): [True: 0, False: 12]
  ------------------
  690|     12|                    || ch == chCloseSquare
  ------------------
  |  Branch (690:24): [True: 0, False: 12]
  ------------------
  691|     12|                    || (ch == chDash && getCharData() == chCloseSquare && firstLoop))) {
  ------------------
  |  Branch (691:25): [True: 0, False: 12]
  |  Branch (691:41): [True: 0, False: 0]
  |  Branch (691:75): [True: 0, False: 0]
  ------------------
  692|       |                // if regex = [-] then invalid...
  693|       |                // '[', ']', '-' not allowed and should be escaped
  694|      0|                XMLCh chStr[] = { (XMLCh)ch, chNull };
  695|      0|                ThrowXMLwithMemMgr2(ParseException,XMLExcepts::Parser_CC6, chStr, chStr, getMemoryManager());
  ------------------
  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  ------------------
  696|      0|            }
  697|     13|            if (ch == chDash && getCharData() == chDash && getState() != REGX_T_BACKSOLIDUS && !wasDecoded) {
  ------------------
  |  Branch (697:17): [True: 1, False: 12]
  |  Branch (697:33): [True: 0, False: 1]
  |  Branch (697:60): [True: 0, False: 0]
  |  Branch (697:96): [True: 0, False: 0]
  ------------------
  698|      0|                XMLCh chStr[] = { (XMLCh)ch, chNull };
  699|      0|                ThrowXMLwithMemMgr2(ParseException,XMLExcepts::Parser_CC6, chStr, chStr, getMemoryManager());
  ------------------
  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  ------------------
  700|      0|            }
  701|       |
  702|     13|            if (getState() != REGX_T_CHAR || getCharData() != chDash) {
  ------------------
  |  Branch (702:17): [True: 1, False: 12]
  |  Branch (702:46): [True: 1, False: 11]
  ------------------
  703|      2|                tok->addRange(ch, ch);
  704|      2|            }
  705|     11|            else {
  706|       |
  707|     11|                processNext();
  708|     11|                if ((type = getState()) == REGX_T_EOF)
  ------------------
  |  Branch (708:21): [True: 0, False: 11]
  ------------------
  709|      0|                    ThrowXMLwithMemMgr(ParseException,XMLExcepts::Parser_CC2, getMemoryManager());
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  710|       |
  711|     11|                if (type == REGX_T_CHAR && getCharData() == chCloseSquare) {
  ------------------
  |  Branch (711:21): [True: 11, False: 0]
  |  Branch (711:44): [True: 0, False: 11]
  ------------------
  712|      0|                    tok->addRange(ch, ch);
  713|      0|                    tok->addRange(chDash, chDash);
  714|      0|                }
  715|     11|                else if (type == REGX_T_XMLSCHEMA_CC_SUBTRACTION) {
  ------------------
  |  Branch (715:26): [True: 0, False: 11]
  ------------------
  716|       |
  717|      0|                    static const XMLCh dashStr[] = { chDash, chNull};
  718|      0|                    ThrowXMLwithMemMgr2(ParseException, XMLExcepts::Parser_CC6, dashStr, dashStr, getMemoryManager());
  ------------------
  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  ------------------
  719|      0|                }
  720|     11|                else {
  721|       |
  722|     11|                    XMLInt32 rangeEnd = getCharData();
  723|     11|                    XMLCh rangeEndStr[] = { (XMLCh)rangeEnd, chNull };
  724|       |
  725|     11|                    if (type == REGX_T_CHAR) {
  ------------------
  |  Branch (725:25): [True: 11, False: 0]
  ------------------
  726|       |
  727|     11|                        if (rangeEnd == chOpenSquare
  ------------------
  |  Branch (727:29): [True: 0, False: 11]
  ------------------
  728|     11|                            || rangeEnd == chCloseSquare
  ------------------
  |  Branch (728:32): [True: 0, False: 11]
  ------------------
  729|     11|                            || rangeEnd == chDash)
  ------------------
  |  Branch (729:32): [True: 0, False: 11]
  ------------------
  730|       |                            // '[', ']', '-' not allowed and should be escaped
  731|      0|                            ThrowXMLwithMemMgr2(ParseException, XMLExcepts::Parser_CC6, rangeEndStr, rangeEndStr, getMemoryManager());
  ------------------
  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  ------------------
  732|     11|                    }
  733|      0|                    else if (type == REGX_T_BACKSOLIDUS) {
  ------------------
  |  Branch (733:30): [True: 0, False: 0]
  ------------------
  734|      0|                        rangeEnd = decodeEscaped();
  735|      0|                    }
  736|       |
  737|     11|                    processNext();
  738|       |
  739|     11|                    if (ch > rangeEnd) {
  ------------------
  |  Branch (739:25): [True: 0, False: 11]
  ------------------
  740|      0|                        XMLCh chStr[] = { (XMLCh)ch, chNull };
  741|      0|                        ThrowXMLwithMemMgr2(ParseException,XMLExcepts::Parser_Ope3, rangeEndStr, chStr, getMemoryManager());
  ------------------
  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  ------------------
  742|      0|                    }
  743|       |
  744|     11|                    tok->addRange(ch, rangeEnd);
  745|     11|                }
  746|     11|            }
  747|     13|        }
  748|     13|        firstLoop = false;
  749|     13|    }
  750|       |
  751|      6|    if (getState() == REGX_T_EOF)
  ------------------
  |  Branch (751:9): [True: 0, False: 6]
  ------------------
  752|      0|        ThrowXMLwithMemMgr(ParseException,XMLExcepts::Parser_CC2, getMemoryManager());
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  753|       |
  754|      6|    if (isNRange)
  ------------------
  |  Branch (754:9): [True: 0, False: 6]
  ------------------
  755|      0|    {
  756|      0|        if(useNRange)
  ------------------
  |  Branch (756:12): [True: 0, False: 0]
  ------------------
  757|      0|            tok->setTokenType(Token::T_NRANGE);
  758|      0|        else
  759|      0|            tok = RangeToken::complementRanges(tok, fTokenFactory, fMemoryManager);
  760|      0|    }
  761|       |
  762|      6|    tok->sortRanges();
  763|      6|    tok->compactRanges();
  764|       |
  765|       |    // If the case-insensitive option is enabled, we need to
  766|       |    // have the new RangeToken instance build its internal
  767|       |    // case-insensitive RangeToken.
  768|      6|    if (RegularExpression::isSet(fOptions, RegularExpression::IGNORE_CASE))
  ------------------
  |  Branch (768:9): [True: 0, False: 6]
  ------------------
  769|      0|    {
  770|      0|        tok->getCaseInsensitiveToken(fTokenFactory);
  771|      0|    }
  772|       |
  773|      6|    setParseContext(regexParserStateNormal);
  774|      6|    processNext();
  775|       |
  776|      6|    return tok;
  777|      6|}
_ZN11xercesc_3_210RegxParser20getTokenForShorthandEi:
  780|      1|RangeToken* RegxParser::getTokenForShorthand(const XMLInt32 ch) {
  781|       |
  782|      1|    switch(ch) {
  ------------------
  |  Branch (782:12): [True: 0, False: 1]
  ------------------
  783|      0|    case chLatin_d:
  ------------------
  |  Branch (783:5): [True: 0, False: 1]
  ------------------
  784|      0|        return fTokenFactory->getRange(fgUniDecimalDigit);
  785|       |        //return fTokenFactory->getRange(fgXMLDigit);
  786|      0|    case chLatin_D:
  ------------------
  |  Branch (786:5): [True: 0, False: 1]
  ------------------
  787|      0|        return fTokenFactory->getRange(fgUniDecimalDigit, true);
  788|       |        //return fTokenFactory->getRange(fgXMLDigit, true);
  789|      0|    case chLatin_w:
  ------------------
  |  Branch (789:5): [True: 0, False: 1]
  ------------------
  790|      0|        return fTokenFactory->getRange(fgXMLWord);
  791|      0|    case chLatin_W:
  ------------------
  |  Branch (791:5): [True: 0, False: 1]
  ------------------
  792|      0|        return fTokenFactory->getRange(fgXMLWord, true);
  793|      0|    case chLatin_s:
  ------------------
  |  Branch (793:5): [True: 0, False: 1]
  ------------------
  794|      0|        return fTokenFactory->getRange(fgXMLSpace);
  795|      0|    case chLatin_S:
  ------------------
  |  Branch (795:5): [True: 0, False: 1]
  ------------------
  796|      0|        return fTokenFactory->getRange(fgXMLSpace, true);
  797|      1|    case chLatin_c:
  ------------------
  |  Branch (797:5): [True: 1, False: 0]
  ------------------
  798|      1|        return fTokenFactory->getRange(fgXMLNameChar);
  799|      0|    case chLatin_C:
  ------------------
  |  Branch (799:5): [True: 0, False: 1]
  ------------------
  800|      0|        return fTokenFactory->getRange(fgXMLNameChar, true);
  801|      0|    case chLatin_i:
  ------------------
  |  Branch (801:5): [True: 0, False: 1]
  ------------------
  802|      0|        return fTokenFactory->getRange(fgXMLInitialNameChar);
  803|      0|    case chLatin_I:
  ------------------
  |  Branch (803:5): [True: 0, False: 1]
  ------------------
  804|      0|        return fTokenFactory->getRange(fgXMLInitialNameChar, true);
  805|       |//    default:
  806|       |//        ThrowXMLwithMemMgr(RuntimeException, "Invalid shorthand {0}", chAsString)
  807|      1|    }
  808|       |
  809|      0|    return 0;
  810|      1|}

_ZN11xercesc_3_210RegxParser15setTokenFactoryEPNS_12TokenFactoryE:
  238|      4|inline void RegxParser::setTokenFactory(TokenFactory* const tokFactory) {
  239|       |
  240|      4|    fTokenFactory = tokFactory;
  241|      4|}
_ZNK11xercesc_3_210RegxParser10getNoParenEv:
  201|      4|inline int RegxParser::getNoParen() const {
  202|       |
  203|      4|    return fNoGroups;
  204|      4|}
_ZNK11xercesc_3_210RegxParser17hasBackReferencesEv:
  211|      4|inline bool RegxParser::hasBackReferences() const {
  212|       |
  213|      4|    return fHasBackReferences;
  214|      4|}
_ZNK11xercesc_3_210RegxParser8getStateEv:
  191|     60|inline RegxParser::parserState RegxParser::getState() const {
  192|       |
  193|     60|    return fState;
  194|     60|}
_ZNK11xercesc_3_210RegxParser11getCharDataEv:
  196|     73|inline XMLInt32 RegxParser::getCharData() const {
  197|       |
  198|     73|    return fCharData;
  199|     73|}
_ZNK11xercesc_3_210RegxParser15getTokenFactoryEv:
  216|     11|inline TokenFactory* RegxParser::getTokenFactory() const {
  217|       |
  218|     11|    return fTokenFactory;
  219|     11|}
_ZN11xercesc_3_210RegxParser15setParseContextENS0_18parserStateContextE:
  233|     16|inline void RegxParser::setParseContext(const RegxParser::parserStateContext value) {
  234|       |
  235|     16|    fParseContext = value;
  236|     16|}
_ZN11xercesc_3_210RegxParser5isSetEi:
  251|      4|inline bool RegxParser::isSet(const int flag) {
  252|       |
  253|      4|    return (fOptions & flag) == flag;
  254|      4|}

_ZN11xercesc_3_28RegxUtil14isLowSurrogateEDs:
   75|    132|inline bool RegxUtil::isLowSurrogate(const XMLCh ch) {
   76|       |
   77|    132|    return (ch & 0xFC00) == 0xDC00;
   78|    132|}
_ZN11xercesc_3_28RegxUtil15isHighSurrogateEDs:
   80|    167|inline bool RegxUtil::isHighSurrogate(const XMLCh ch) {
   81|       |
   82|    167|    return (ch & 0xFC00) == 0xD800;
   83|    167|}

_ZN11xercesc_3_25TokenC2ENS0_7tokTypeEPNS_13MemoryManagerE:
   41|    318|             : fTokenType(tkType) 
   42|    318|             , fMemoryManager(manager)
   43|    318|{
   44|       |
   45|    318|}
_ZNK11xercesc_3_25Token12getMinLengthEv:
   55|     31|XMLSize_t Token::getMinLength() const {
   56|       |
   57|     31|    switch (fTokenType) {
  ------------------
  |  Branch (57:13): [True: 0, False: 31]
  ------------------
   58|       |
   59|      6|    case T_CONCAT:
  ------------------
  |  Branch (59:5): [True: 6, False: 25]
  ------------------
   60|      6|        {
   61|      6|            XMLSize_t sum = 0;
   62|      6|            XMLSize_t childSize = size();
   63|       |
   64|     19|            for (XMLSize_t i=0; i<childSize; i++) {
  ------------------
  |  Branch (64:33): [True: 13, False: 6]
  ------------------
   65|     13|                sum += getChild(i)->getMinLength();
   66|     13|            }
   67|      6|            return sum;
   68|      0|        }
   69|      1|    case T_UNION:
  ------------------
  |  Branch (69:5): [True: 1, False: 30]
  ------------------
   70|      1|        {
   71|      1|            XMLSize_t childSize = size();
   72|       |
   73|      1|            if (childSize == 0) {
  ------------------
  |  Branch (73:17): [True: 0, False: 1]
  ------------------
   74|      0|                return 0;
   75|      0|            }
   76|      1|            XMLSize_t ret = getChild(0)->getMinLength();
   77|       |
   78|      2|            for (XMLSize_t i=1; i < childSize; i++) {
  ------------------
  |  Branch (78:33): [True: 1, False: 1]
  ------------------
   79|       |
   80|      1|                XMLSize_t min = getChild(i)->getMinLength();
   81|      1|                if (min < ret)
  ------------------
  |  Branch (81:21): [True: 1, False: 0]
  ------------------
   82|      1|                    ret = min;
   83|      1|            }
   84|      1|            return ret;
   85|      1|        }
   86|      8|    case T_CLOSURE:
  ------------------
  |  Branch (86:5): [True: 8, False: 23]
  ------------------
   87|      8|    case T_NONGREEDYCLOSURE:
  ------------------
  |  Branch (87:5): [True: 0, False: 31]
  ------------------
   88|      8|        if (getMin() >= 0)
  ------------------
  |  Branch (88:13): [True: 4, False: 4]
  ------------------
   89|      4|            return getMin() * getChild(0)->getMinLength();
   90|       |
   91|      4|        return 0;
   92|      1|    case T_EMPTY:
  ------------------
  |  Branch (92:5): [True: 1, False: 30]
  ------------------
   93|      1|    case T_ANCHOR:
  ------------------
  |  Branch (93:5): [True: 0, False: 31]
  ------------------
   94|      1|        return 0;
   95|      0|    case T_DOT:
  ------------------
  |  Branch (95:5): [True: 0, False: 31]
  ------------------
   96|      2|    case T_CHAR:
  ------------------
  |  Branch (96:5): [True: 2, False: 29]
  ------------------
   97|     11|    case T_RANGE:
  ------------------
  |  Branch (97:5): [True: 9, False: 22]
  ------------------
   98|     11|    case T_NRANGE:
  ------------------
  |  Branch (98:5): [True: 0, False: 31]
  ------------------
   99|     11|        return 1;
  100|      4|    case T_PAREN:
  ------------------
  |  Branch (100:5): [True: 4, False: 27]
  ------------------
  101|      4|        return getChild(0)->getMinLength();
  102|      0|    case T_BACKREFERENCE:
  ------------------
  |  Branch (102:5): [True: 0, False: 31]
  ------------------
  103|      0|        return 0; // *****  - REVISIT
  104|      0|    case T_STRING:
  ------------------
  |  Branch (104:5): [True: 0, False: 31]
  ------------------
  105|      0|        return XMLString::stringLen(getString());
  106|       |//    default:
  107|       |//        throw;
  108|     31|    }
  109|       |
  110|       |    // We should not get here, but we have it to make some compilers happy
  111|      0|    return (XMLSize_t)-1;
  112|     31|}

_ZNK11xercesc_3_25Token12getTokenTypeEv:
  148|    382|inline Token::tokType Token::getTokenType() const {
  149|       |
  150|    382|    return fTokenType;
  151|    382|}

_ZN11xercesc_3_212TokenFactoryC2EPNS_13MemoryManagerE:
   41|      5|    fTokens(new (manager) RefVectorOf<Token> (16, true, manager))
   42|      5|    , fEmpty(0)
   43|      5|    , fLineBegin(0)
   44|      5|    , fLineEnd(0)
   45|      5|    , fDot(0)
   46|      5|    , fMemoryManager(manager)
   47|      5|{
   48|       |
   49|      5|}
_ZN11xercesc_3_212TokenFactory11createTokenENS_5Token7tokTypeE:
   60|      1|Token* TokenFactory::createToken(const Token::tokType tkType) {
   61|       |
   62|      1|    if (tkType == Token::T_EMPTY && fEmpty != 0)
  ------------------
  |  Branch (62:9): [True: 1, False: 0]
  |  Branch (62:37): [True: 0, False: 1]
  ------------------
   63|      0|        return fEmpty;
   64|       |
   65|      1|    Token* tmpTok = new (fMemoryManager) Token(tkType, fMemoryManager);
   66|       |
   67|      1|    if (tkType == Token::T_EMPTY) {
  ------------------
  |  Branch (67:9): [True: 1, False: 0]
  ------------------
   68|      1|        fEmpty = tmpTok;
   69|      1|    }
   70|       |
   71|      1|    fTokens->addElement(tmpTok);
   72|       |
   73|      1|    return tmpTok;
   74|      1|}
_ZN11xercesc_3_212TokenFactory17createParenthesisEPNS_5TokenEi:
   78|      4|                                            const int noGroups) {
   79|       |
   80|      4|    ParenToken* tmpTok = new (fMemoryManager) ParenToken(Token::T_PAREN, token, noGroups, fMemoryManager);
   81|       |
   82|      4|    fTokens->addElement(tmpTok);
   83|      4|    return tmpTok;
   84|      4|}
_ZN11xercesc_3_212TokenFactory13createClosureEPNS_5TokenEb:
   87|      8|                                          bool isNonGreedy) {
   88|       |
   89|      8|    ClosureToken* tmpTok = isNonGreedy ? new (fMemoryManager) ClosureToken(Token::T_NONGREEDYCLOSURE, token, fMemoryManager)
  ------------------
  |  Branch (89:28): [True: 0, False: 8]
  ------------------
   90|      8|                                       : new (fMemoryManager) ClosureToken(Token::T_CLOSURE, token, fMemoryManager);
   91|       |    
   92|      8|    fTokens->addElement(tmpTok);
   93|      8|    return tmpTok;
   94|      8|}
_ZN11xercesc_3_212TokenFactory12createConcatEPNS_5TokenES2_:
   97|      2|                                        Token* const token2) {
   98|       |
   99|      2|    ConcatToken* tmpTok = new (fMemoryManager) ConcatToken(token1, token2, fMemoryManager);
  100|       |    
  101|      2|    fTokens->addElement(tmpTok);
  102|      2|    return tmpTok;
  103|      2|}
_ZN11xercesc_3_212TokenFactory11createUnionEb:
  105|      6|UnionToken* TokenFactory::createUnion(const bool isConcat) {
  106|       |
  107|      6|    UnionToken* tmpTok = isConcat ? new (fMemoryManager) UnionToken(Token::T_CONCAT, fMemoryManager)
  ------------------
  |  Branch (107:26): [True: 5, False: 1]
  ------------------
  108|      6|                                  : new (fMemoryManager) UnionToken(Token::T_UNION, fMemoryManager);
  109|       |
  110|      6|    fTokens->addElement(tmpTok);
  111|      6|    return tmpTok;
  112|      6|}
_ZN11xercesc_3_212TokenFactory11createRangeEb:
  114|    295|RangeToken* TokenFactory::createRange(const bool isNegRange){
  115|       |
  116|       |
  117|    295|    RangeToken* tmpTok = isNegRange ? new (fMemoryManager) RangeToken(Token::T_NRANGE, fMemoryManager)
  ------------------
  |  Branch (117:26): [True: 0, False: 295]
  ------------------
  118|    295|                                   : new (fMemoryManager) RangeToken(Token::T_RANGE, fMemoryManager);
  119|       |
  120|    295|    fTokens->addElement(tmpTok);
  121|    295|    return tmpTok;
  122|    295|}
_ZN11xercesc_3_212TokenFactory10createCharEjb:
  124|      2|CharToken* TokenFactory::createChar(const XMLUInt32 ch, const bool isAnchor) {
  125|       |
  126|      2|    CharToken* tmpTok = isAnchor ? new (fMemoryManager) CharToken(Token::T_ANCHOR, ch, fMemoryManager)
  ------------------
  |  Branch (126:25): [True: 0, False: 2]
  ------------------
  127|      2|                                : new (fMemoryManager) CharToken(Token::T_CHAR, ch, fMemoryManager);
  128|       |
  129|      2|    fTokens->addElement(tmpTok);
  130|      2|    return tmpTok;
  131|      2|}
_ZN11xercesc_3_212TokenFactory14staticGetRangeEPKDsb:
  153|      2|                                   const bool complement) {
  154|       |
  155|      2|    return RangeTokenMap::instance()->getRange(keyword, complement);
  156|      2|}

_ZN11xercesc_3_212TokenFactory8getRangeEPKDsb:
  118|      1|{
  119|      1|    return staticGetRange(name, complement);
  120|      1|}
_ZNK11xercesc_3_212TokenFactory16getMemoryManagerEv:
  123|     13|{
  124|     13|    return fMemoryManager;
  125|     13|}

_ZN11xercesc_3_219UnicodeRangeFactoryC2Ev:
   83|      1|{
   84|      1|}
_ZN11xercesc_3_219UnicodeRangeFactory11buildRangesEPNS_13RangeTokenMapE:
   93|      1|void UnicodeRangeFactory::buildRanges(RangeTokenMap *rangeTokMap) {
   94|       |
   95|      1|    if (fRangesCreated)
  ------------------
  |  Branch (95:9): [True: 0, False: 1]
  ------------------
   96|      0|        return;
   97|       |
   98|      1|    if (!fKeywordsInitialized) {
  ------------------
  |  Branch (98:9): [True: 0, False: 1]
  ------------------
   99|      0|        initializeKeywordMap(rangeTokMap);
  100|      0|    }
  101|       |
  102|      1|    TokenFactory* tokFactory = rangeTokMap->getTokenFactory();
  103|      1|    RangeToken* ranges[UNICATEGSIZE];
  104|      1|    RangeToken* tok;
  105|       |
  106|     38|    for (int i=0; i < UNICATEGSIZE; i++) {
  ------------------
  |  Branch (106:19): [True: 37, False: 1]
  ------------------
  107|     37|        ranges[i] = tokFactory->createRange();
  108|     37|    }
  109|       |
  110|  65.5k|    for (int j=0; j < 0x10000; j++) {
  ------------------
  |  Branch (110:19): [True: 65.5k, False: 1]
  ------------------
  111|       |
  112|  65.5k|        unsigned short charType = XMLUniCharacter::getType(j);
  113|       |
  114|  65.5k|        ranges[charType]->addRange(j, j);
  115|  65.5k|        charType = getUniCategory(charType);
  116|  65.5k|        ranges[charType]->addRange(j, j);
  117|  65.5k|    }
  118|       |
  119|      1|    ranges[XMLUniCharacter::UNASSIGNED]->addRange(0x10000, Token::UTF16_MAX);
  120|       |
  121|     38|    for (int k=0; k < UNICATEGSIZE; k++) {
  ------------------
  |  Branch (121:19): [True: 37, False: 1]
  ------------------
  122|     37|        tok = RangeToken::complementRanges(ranges[k], tokFactory);
  123|       |        // build the internal map.
  124|     37|        tok->createMap();
  125|     37|        rangeTokMap->setRangeToken(uniCategNames[k], ranges[k]);
  126|     37|        rangeTokMap->setRangeToken(uniCategNames[k], tok , true);
  127|     37|    }
  128|       |
  129|       |    // Create all range
  130|      1|    tok = tokFactory->createRange();
  131|      1|    tok->addRange(0, Token::UTF16_MAX);
  132|       |    // build the internal map.
  133|      1|    tok->createMap();
  134|      1|    rangeTokMap->setRangeToken(fgUniAll, tok);
  135|       |
  136|       |    // Create alpha range
  137|      1|    tok = tokFactory->createRange();
  138|      1|    tok->mergeRanges(ranges[XMLUniCharacter::UPPERCASE_LETTER]);
  139|      1|    tok->mergeRanges(ranges[XMLUniCharacter::LOWERCASE_LETTER]);
  140|      1|    tok->mergeRanges(ranges[XMLUniCharacter::OTHER_LETTER]);
  141|       |    // build the internal map.
  142|      1|    tok->createMap();
  143|      1|    rangeTokMap->setRangeToken(fgUniIsAlpha, tok);
  144|       |
  145|       |    // Create alpha-num range
  146|      1|    RangeToken* alnumTok = tokFactory->createRange();
  147|      1|    alnumTok->mergeRanges(tok);
  148|      1|    alnumTok->mergeRanges(ranges[XMLUniCharacter::DECIMAL_DIGIT_NUMBER]);
  149|       |    // build the internal map.
  150|      1|    alnumTok->createMap();
  151|      1|    rangeTokMap->setRangeToken(fgUniIsAlnum, alnumTok);
  152|       |
  153|       |    // Create word range
  154|      1|    tok = tokFactory->createRange();
  155|      1|    tok->mergeRanges(alnumTok);
  156|      1|    tok->addRange(chUnderscore, chUnderscore);
  157|       |    // build the internal map.
  158|      1|    tok->createMap();
  159|      1|    rangeTokMap->setRangeToken(fgUniIsWord, tok);
  160|       |
  161|      1|    tok = RangeToken::complementRanges(tok, tokFactory);
  162|       |    // build the internal map.
  163|      1|    tok->createMap();
  164|      1|    rangeTokMap->setRangeToken(fgUniIsWord, tok , true);
  165|       |
  166|       |    // Create assigned range
  167|      1|    tok = RangeToken::complementRanges(
  168|      1|                ranges[XMLUniCharacter::UNASSIGNED],
  169|      1|                tokFactory,
  170|      1|                tokFactory->getMemoryManager());
  171|       |    // build the internal map.
  172|      1|    tok->createMap();
  173|      1|    rangeTokMap->setRangeToken(fgUniAssigned,tok);
  174|       |
  175|       |    // Create space range
  176|      1|    tok = tokFactory->createRange();
  177|      1|    tok->mergeRanges(ranges[XMLUniCharacter::SPACE_SEPARATOR]);
  178|      1|    tok->mergeRanges(ranges[XMLUniCharacter::LINE_SEPARATOR]);
  179|       |    //tok->mergeRanges(ranges[XMLUniCharacter::PARAGRAPH_SEPARATOR]);
  180|       |    // build the internal map.
  181|      1|    tok->createMap();
  182|      1|    rangeTokMap->setRangeToken(fgUniIsSpace, tok);
  183|       |
  184|      1|    tok = RangeToken::complementRanges(tok, tokFactory);
  185|       |    // build the internal map.
  186|      1|    tok->createMap();
  187|      1|    rangeTokMap->setRangeToken(fgUniIsSpace, tok , true);
  188|       |
  189|      1|    RangeToken* const dummyToken =
  190|      1|        tokFactory->createRange();
  191|       |
  192|      1|    dummyToken->addRange(-1, -2);
  193|      1|    dummyToken->createMap();
  194|       |
  195|       |    // build the internal maps.
  196|     38|    for (int l=0; l < UNICATEGSIZE; l++) {
  ------------------
  |  Branch (196:19): [True: 37, False: 1]
  ------------------
  197|     37|        ranges[l]->createMap();
  198|     37|        ranges[l]->setCaseInsensitiveToken(dummyToken);
  199|     37|    }
  200|       |
  201|      1|    fRangesCreated = true;
  202|      1|}
_ZN11xercesc_3_219UnicodeRangeFactory20initializeKeywordMapEPNS_13RangeTokenMapE:
  207|      1|void UnicodeRangeFactory::initializeKeywordMap(RangeTokenMap *rangeTokMap) {
  208|       |
  209|      1|    if (fKeywordsInitialized)
  ------------------
  |  Branch (209:9): [True: 0, False: 1]
  ------------------
  210|      0|        return;
  211|       |
  212|     38|    for (int k=0; k < UNICATEGSIZE; k++) {
  ------------------
  |  Branch (212:19): [True: 37, False: 1]
  ------------------
  213|     37|        rangeTokMap->addKeywordMap(uniCategNames[k], fgUnicodeCategory);
  214|     37|    }
  215|       |
  216|      1|    rangeTokMap->addKeywordMap(fgUniAll, fgUnicodeCategory);
  217|      1|    rangeTokMap->addKeywordMap(fgUniIsAlpha, fgUnicodeCategory);
  218|      1|    rangeTokMap->addKeywordMap(fgUniIsAlnum, fgUnicodeCategory);
  219|      1|    rangeTokMap->addKeywordMap(fgUniIsWord, fgUnicodeCategory);
  220|      1|    rangeTokMap->addKeywordMap(fgUniAssigned, fgUnicodeCategory);
  221|      1|    rangeTokMap->addKeywordMap(fgUniIsSpace, fgUnicodeCategory);
  222|       |
  223|      1|    fKeywordsInitialized = true;
  224|      1|}
_ZN11xercesc_3_219UnicodeRangeFactory14getUniCategoryEt:
  230|   131k|{
  231|   131k|    switch(type) {
  ------------------
  |  Branch (231:12): [True: 0, False: 131k]
  ------------------
  232|  1.41k|    case XMLUniCharacter::UPPERCASE_LETTER:
  ------------------
  |  Branch (232:5): [True: 1.41k, False: 129k]
  ------------------
  233|  3.18k|    case XMLUniCharacter::LOWERCASE_LETTER:
  ------------------
  |  Branch (233:5): [True: 1.77k, False: 129k]
  ------------------
  234|  3.24k|    case XMLUniCharacter::TITLECASE_LETTER:
  ------------------
  |  Branch (234:5): [True: 62, False: 131k]
  ------------------
  235|  3.47k|    case XMLUniCharacter::MODIFIER_LETTER:
  ------------------
  |  Branch (235:5): [True: 228, False: 130k]
  ------------------
  236|  91.7k|    case XMLUniCharacter::OTHER_LETTER:
  ------------------
  |  Branch (236:5): [True: 88.2k, False: 42.8k]
  ------------------
  237|  91.7k|        return CHAR_LETTER;
  238|  1.06k|    case XMLUniCharacter::NON_SPACING_MARK:
  ------------------
  |  Branch (238:5): [True: 1.06k, False: 130k]
  ------------------
  239|  1.32k|    case XMLUniCharacter::COMBINING_SPACING_MARK:
  ------------------
  |  Branch (239:5): [True: 262, False: 130k]
  ------------------
  240|  1.34k|    case XMLUniCharacter::ENCLOSING_MARK:
  ------------------
  |  Branch (240:5): [True: 20, False: 131k]
  ------------------
  241|  1.34k|        return CHAR_MARK;
  242|    416|    case XMLUniCharacter::DECIMAL_DIGIT_NUMBER:
  ------------------
  |  Branch (242:5): [True: 416, False: 130k]
  ------------------
  243|    520|    case XMLUniCharacter::LETTER_NUMBER:
  ------------------
  |  Branch (243:5): [True: 104, False: 130k]
  ------------------
  244|  1.00k|    case XMLUniCharacter::OTHER_NUMBER:
  ------------------
  |  Branch (244:5): [True: 484, False: 130k]
  ------------------
  245|  1.00k|        return CHAR_NUMBER;
  246|     36|    case XMLUniCharacter::SPACE_SEPARATOR:
  ------------------
  |  Branch (246:5): [True: 36, False: 131k]
  ------------------
  247|     38|    case XMLUniCharacter::LINE_SEPARATOR:
  ------------------
  |  Branch (247:5): [True: 2, False: 131k]
  ------------------
  248|     40|    case XMLUniCharacter::PARAGRAPH_SEPARATOR:
  ------------------
  |  Branch (248:5): [True: 2, False: 131k]
  ------------------
  249|     40|        return CHAR_SEPARATOR;
  250|    130|    case XMLUniCharacter::CONTROL:
  ------------------
  |  Branch (250:5): [True: 130, False: 130k]
  ------------------
  251|    196|    case XMLUniCharacter::FORMAT:
  ------------------
  |  Branch (251:5): [True: 66, False: 131k]
  ------------------
  252|  4.29k|    case XMLUniCharacter::SURROGATE:
  ------------------
  |  Branch (252:5): [True: 4.09k, False: 126k]
  ------------------
  253|  17.0k|    case XMLUniCharacter::PRIVATE_USE:
  ------------------
  |  Branch (253:5): [True: 12.8k, False: 118k]
  ------------------
  254|  29.8k|    case XMLUniCharacter::UNASSIGNED:
  ------------------
  |  Branch (254:5): [True: 12.7k, False: 118k]
  ------------------
  255|  29.8k|        return CHAR_OTHER;
  256|     24|    case XMLUniCharacter::CONNECTOR_PUNCTUATION:
  ------------------
  |  Branch (256:5): [True: 24, False: 131k]
  ------------------
  257|     58|    case XMLUniCharacter::DASH_PUNCTUATION:
  ------------------
  |  Branch (257:5): [True: 34, False: 131k]
  ------------------
  258|    188|    case XMLUniCharacter::START_PUNCTUATION:
  ------------------
  |  Branch (258:5): [True: 130, False: 130k]
  ------------------
  259|    316|    case XMLUniCharacter::END_PUNCTUATION:
  ------------------
  |  Branch (259:5): [True: 128, False: 130k]
  ------------------
  260|    714|    case XMLUniCharacter::OTHER_PUNCTUATION:
  ------------------
  |  Branch (260:5): [True: 398, False: 130k]
  ------------------
  261|    726|    case XMLUniCharacter::INITIAL_PUNCTUATION:
  ------------------
  |  Branch (261:5): [True: 12, False: 131k]
  ------------------
  262|    734|    case XMLUniCharacter::FINAL_PUNCTUATION:
  ------------------
  |  Branch (262:5): [True: 8, False: 131k]
  ------------------
  263|    734|        return CHAR_PUNCTUATION;
  264|  1.77k|    case XMLUniCharacter::MATH_SYMBOL:
  ------------------
  |  Branch (264:5): [True: 1.77k, False: 129k]
  ------------------
  265|  1.85k|    case XMLUniCharacter::CURRENCY_SYMBOL:
  ------------------
  |  Branch (265:5): [True: 72, False: 131k]
  ------------------
  266|  1.99k|    case XMLUniCharacter::MODIFIER_SYMBOL:
  ------------------
  |  Branch (266:5): [True: 148, False: 130k]
  ------------------
  267|  6.44k|    case XMLUniCharacter::OTHER_SYMBOL:
  ------------------
  |  Branch (267:5): [True: 4.44k, False: 126k]
  ------------------
  268|  6.44k|        return CHAR_SYMBOL;
  269|   131k|    }
  270|       |
  271|      0|    return 0;
  272|   131k|}

_ZN11xercesc_3_210UnionTokenC2ENS_5Token7tokTypeEPNS_13MemoryManagerE:
   42|      6|    : Token(tkType, manager)
   43|      6|    , fChildren(0)
   44|      6|{
   45|       |
   46|      6|}
_ZN11xercesc_3_210UnionToken8addChildEPNS_5TokenEPNS_12TokenFactoryE:
   57|     14|void UnionToken::addChild(Token* const child, TokenFactory* const tokFactory) {
   58|       |
   59|     14|    if (child == 0)
  ------------------
  |  Branch (59:9): [True: 0, False: 14]
  ------------------
   60|      0|        return;
   61|       |
   62|     14|    if (fChildren == 0)
  ------------------
  |  Branch (62:9): [True: 6, False: 8]
  ------------------
   63|      6|        fChildren = new (tokFactory->getMemoryManager()) RefVectorOf<Token>(INITIALSIZE, false, tokFactory->getMemoryManager());
   64|       |
   65|     14|    if (getTokenType() == T_UNION) {
  ------------------
  |  Branch (65:9): [True: 2, False: 12]
  ------------------
   66|       |
   67|      2|        fChildren->addElement(child);
   68|      2|        return;
   69|      2|    }
   70|       |
   71|     12|    Token::tokType childType = child->getTokenType();
   72|     12|    if (childType == T_CONCAT) {
  ------------------
  |  Branch (72:9): [True: 1, False: 11]
  ------------------
   73|       |
   74|      1|        XMLSize_t childSize = child->size();
   75|      3|        for (XMLSize_t i = 0; i < childSize; i++) {
  ------------------
  |  Branch (75:31): [True: 2, False: 1]
  ------------------
   76|       |
   77|      2|            addChild(child->getChild(i), tokFactory);
   78|      2|        }
   79|       |
   80|      1|        return;
   81|      1|    }
   82|       |
   83|     11|    XMLSize_t childrenSize = fChildren->size();
   84|     11|    if (childrenSize == 0) {
  ------------------
  |  Branch (84:9): [True: 5, False: 6]
  ------------------
   85|       |
   86|      5|        fChildren->addElement(child);
   87|      5|        return;
   88|      5|    }
   89|       |
   90|      6|    Token* previousTok = fChildren->elementAt(childrenSize - 1);
   91|      6|    Token::tokType previousType = previousTok->getTokenType();
   92|       |
   93|      6|    if (!((previousType == T_CHAR || previousType == T_STRING)
  ------------------
  |  Branch (93:12): [True: 2, False: 4]
  |  Branch (93:38): [True: 0, False: 4]
  ------------------
   94|      6|          && (childType == T_CHAR || childType == T_STRING))) {
  ------------------
  |  Branch (94:15): [True: 0, False: 2]
  |  Branch (94:38): [True: 0, False: 2]
  ------------------
   95|       |
   96|      6|        fChildren->addElement(child);
   97|      6|        return;
   98|      6|    }
   99|       |
  100|       |    // Continue
  101|      0|    XMLBuffer stringBuf(1023, tokFactory->getMemoryManager());
  102|       |
  103|      0|    if (previousType == T_CHAR) {
  ------------------
  |  Branch (103:9): [True: 0, False: 0]
  ------------------
  104|       |
  105|      0|        XMLInt32 ch = previousTok->getChar();
  106|       |
  107|      0|        if (ch >= 0x10000) {
  ------------------
  |  Branch (107:13): [True: 0, False: 0]
  ------------------
  108|       |
  109|      0|            XMLCh* chSurrogate = RegxUtil::decomposeToSurrogates(ch, tokFactory->getMemoryManager());
  110|      0|            stringBuf.append(chSurrogate);
  111|      0|            tokFactory->getMemoryManager()->deallocate(chSurrogate);//delete [] chSurrogate;
  112|      0|        }
  113|      0|        else {
  114|      0|            stringBuf.append((XMLCh) ch);
  115|      0|        }
  116|       |
  117|      0|        previousTok = tokFactory->createString(0);
  118|      0|        fChildren->setElementAt(previousTok, childrenSize - 1);
  119|      0|    }
  120|      0|    else {
  121|      0|        stringBuf.append(previousTok->getString());
  122|      0|    }
  123|       |
  124|      0|    if (childType == T_CHAR) {
  ------------------
  |  Branch (124:9): [True: 0, False: 0]
  ------------------
  125|       |
  126|      0|        XMLInt32 ch = child->getChar();
  127|       |
  128|      0|        if (ch >= 0x10000) {
  ------------------
  |  Branch (128:13): [True: 0, False: 0]
  ------------------
  129|       |
  130|      0|            XMLCh* chSurrogate = RegxUtil::decomposeToSurrogates(ch, tokFactory->getMemoryManager());
  131|      0|            stringBuf.append(chSurrogate);
  132|      0|            tokFactory->getMemoryManager()->deallocate(chSurrogate);//delete [] chSurrogate;
  133|      0|        }
  134|      0|        else {
  135|      0|            stringBuf.append((XMLCh) ch);
  136|      0|        }
  137|      0|    }
  138|      0|    else {
  139|      0|        stringBuf.append(child->getString());
  140|      0|    }
  141|       |
  142|      0|    ((StringToken*) previousTok)->setString(stringBuf.getRawBuffer());
  143|      0|}

_ZNK11xercesc_3_210UnionToken4sizeEv:
   75|     12|inline XMLSize_t UnionToken::size() const {
   76|       |
   77|     12|    return fChildren == 0 ? 0 : fChildren->size();
  ------------------
  |  Branch (77:12): [True: 0, False: 12]
  ------------------
   78|     12|}
_ZNK11xercesc_3_210UnionToken8getChildEm:
   80|     26|inline Token* UnionToken::getChild(const XMLSize_t index) const {
   81|       |
   82|     26|    return fChildren->elementAt(index);
   83|     26|}

_ZN11xercesc_3_215XMLRangeFactoryC2Ev:
   75|      1|{
   76|       |
   77|      1|}
_ZN11xercesc_3_215XMLRangeFactory11buildRangesEPNS_13RangeTokenMapE:
   86|      1|void XMLRangeFactory::buildRanges(RangeTokenMap *rangeTokMap) {
   87|       |
   88|      1|    if (fRangesCreated)
  ------------------
  |  Branch (88:9): [True: 0, False: 1]
  ------------------
   89|      0|        return;
   90|       |
   91|      1|    if (!fKeywordsInitialized) {
  ------------------
  |  Branch (91:9): [True: 0, False: 1]
  ------------------
   92|      0|        initializeKeywordMap(rangeTokMap);
   93|      0|    }
   94|       |
   95|      1|    TokenFactory* tokFactory = rangeTokMap->getTokenFactory();
   96|       |
   97|       |    // Create space ranges
   98|      1|    unsigned int wsTblLen = getTableLen(gWhitespaceChars);
   99|      1|    RangeToken* tok = tokFactory->createRange();
  100|      1|    XMLInt32* wsRange = (XMLInt32*) XMLPlatformUtils::fgMemoryManager->allocate
  101|      1|    (
  102|      1|        wsTblLen * sizeof(XMLInt32)
  103|      1|    );//new XMLInt32[wsTblLen];
  104|       |
  105|      1|    tok->setRangeValues(wsRange, wsTblLen);
  106|      1|    setupRange(wsRange, gWhitespaceChars, 0);
  107|       |    // Build the internal map.
  108|      1|    tok->createMap();
  109|      1|    rangeTokMap->setRangeToken(fgXMLSpace, tok);
  110|       |
  111|      1|    tok = RangeToken::complementRanges(tok, tokFactory);
  112|       |    // Build the internal map.
  113|      1|    tok->createMap();
  114|      1|    rangeTokMap->setRangeToken(fgXMLSpace, tok , true);
  115|       |
  116|       |    // Create digits ranges
  117|      1|    tok = tokFactory->createRange();
  118|      1|    unsigned int digitTblLen = getTableLen(gDigitChars);
  119|      1|    XMLInt32* digitRange = (XMLInt32*) XMLPlatformUtils::fgMemoryManager->allocate
  120|      1|    (
  121|      1|        digitTblLen * sizeof(XMLInt32)
  122|      1|    );//new XMLInt32[digitTblLen];
  123|       |
  124|      1|    tok->setRangeValues(digitRange, digitTblLen);
  125|      1|    setupRange(digitRange, gDigitChars, 0);
  126|       |    // Build the internal map.
  127|      1|    tok->createMap();
  128|      1|    rangeTokMap->setRangeToken(fgXMLDigit, tok);
  129|       |
  130|      1|    tok = RangeToken::complementRanges(tok, tokFactory);
  131|       |    // Build the internal map.
  132|      1|    tok->createMap();
  133|      1|    rangeTokMap->setRangeToken(fgXMLDigit, tok , true);
  134|       |
  135|       |    // Build word ranges
  136|      1|    unsigned int baseTblLen = getTableLen(gBaseChars);
  137|      1|    unsigned int ideoTblLen = getTableLen(gIdeographicChars);
  138|      1|    unsigned int wordRangeLen = baseTblLen + ideoTblLen + digitTblLen;
  139|      1|    XMLInt32* wordRange = (XMLInt32*) XMLPlatformUtils::fgMemoryManager->allocate
  140|      1|    (
  141|      1|        wordRangeLen * sizeof(XMLInt32)
  142|      1|    );//new XMLInt32[wordRangeLen];
  143|      1|    ArrayJanitor<XMLInt32> janWordRange(wordRange, XMLPlatformUtils::fgMemoryManager);
  144|       |
  145|      1|    setupRange(wordRange, gBaseChars, 0);
  146|      1|    setupRange(wordRange, gIdeographicChars, baseTblLen);
  147|      1|    memcpy(wordRange + baseTblLen + ideoTblLen, digitRange, digitTblLen * sizeof(XMLInt32));
  148|       |
  149|       |    // Create NameChar ranges
  150|      1|    tok = tokFactory->createRange();
  151|      1|    unsigned int combTblLen = getTableLen(gCombiningChars);
  152|      1|    unsigned int extTblLen = getTableLen(gExtenderChars);
  153|      1|    unsigned int nameTblLen = wordRangeLen + combTblLen + extTblLen;
  154|      1|    XMLInt32* nameRange = (XMLInt32*) XMLPlatformUtils::fgMemoryManager->allocate
  155|      1|    (
  156|      1|        (nameTblLen + 8) * sizeof(XMLInt32)
  157|      1|    );//new XMLInt32[nameTblLen + 8];
  158|       |
  159|      1|    tok->setRangeValues(nameRange, nameTblLen + 8);
  160|      1|    memcpy(nameRange, wordRange, wordRangeLen * sizeof(XMLInt32));
  161|      1|    setupRange(nameRange, gCombiningChars, wordRangeLen);
  162|      1|    setupRange(nameRange, gExtenderChars, wordRangeLen + combTblLen);
  163|      1|    nameRange[nameTblLen++] = chDash;
  164|      1|    nameRange[nameTblLen++] = chDash;
  165|      1|    nameRange[nameTblLen++] = chColon;
  166|      1|    nameRange[nameTblLen++] = chColon;
  167|      1|    nameRange[nameTblLen++] = chPeriod;
  168|      1|    nameRange[nameTblLen++] = chPeriod;
  169|      1|    nameRange[nameTblLen++] = chUnderscore;
  170|      1|    nameRange[nameTblLen++] = chUnderscore;
  171|      1|    tok->sortRanges();
  172|      1|    tok->compactRanges();
  173|       |    // Build the internal map.
  174|      1|    tok->createMap();
  175|      1|    rangeTokMap->setRangeToken(fgXMLNameChar, tok);
  176|       |
  177|      1|    tok = RangeToken::complementRanges(tok, tokFactory);
  178|       |    // Build the internal map.
  179|      1|    tok->createMap();
  180|      1|    rangeTokMap->setRangeToken(fgXMLNameChar, tok , true);
  181|       |
  182|       |    // Create initialNameChar ranges
  183|      1|    tok = tokFactory->createRange();
  184|      1|    unsigned int initialNameTblLen = baseTblLen + ideoTblLen;
  185|      1|    XMLInt32* initialNameRange = (XMLInt32*) XMLPlatformUtils::fgMemoryManager->allocate
  186|      1|    (
  187|      1|        (initialNameTblLen + 4) * sizeof(XMLInt32)
  188|      1|    );//new XMLInt32[initialNameTblLen + 4];
  189|       |
  190|      1|    tok->setRangeValues(initialNameRange, initialNameTblLen + 4);
  191|      1|    memcpy(initialNameRange, wordRange, initialNameTblLen * sizeof(XMLInt32));
  192|      1|    initialNameRange[initialNameTblLen++] = chColon;
  193|      1|    initialNameRange[initialNameTblLen++] = chColon;
  194|      1|    initialNameRange[initialNameTblLen++] = chUnderscore;
  195|      1|    initialNameRange[initialNameTblLen++] = chUnderscore;
  196|      1|    tok->sortRanges();
  197|      1|    tok->compactRanges();
  198|       |    // Build the internal map.
  199|      1|    tok->createMap();
  200|      1|    rangeTokMap->setRangeToken(fgXMLInitialNameChar, tok);
  201|       |
  202|      1|    tok = RangeToken::complementRanges(tok, tokFactory);
  203|       |    // Build the internal map.
  204|      1|    tok->createMap();
  205|      1|    rangeTokMap->setRangeToken(fgXMLInitialNameChar, tok , true);
  206|       |
  207|       |    // Create word range
  208|       |    // \w = [#x0000-#x10FFFF]-[\p{P}\p{Z}\p{C}] (all characters except the set of "punctuation", "separator" and "other" characters) 
  209|      1|    tok = tokFactory->createRange();
  210|  65.5k|    for(int i=0; i<=0xFFFF; i++)
  ------------------
  |  Branch (210:18): [True: 65.5k, False: 1]
  ------------------
  211|  65.5k|    {
  212|  65.5k|        unsigned short chType=UnicodeRangeFactory::getUniCategory(XMLUniCharacter::getType(i));
  213|  65.5k|        if(chType == UnicodeRangeFactory::CHAR_PUNCTUATION || 
  ------------------
  |  Branch (213:12): [True: 367, False: 65.1k]
  ------------------
  214|  65.5k|           chType == UnicodeRangeFactory::CHAR_SEPARATOR || 
  ------------------
  |  Branch (214:12): [True: 20, False: 65.1k]
  ------------------
  215|  65.5k|           chType == UnicodeRangeFactory::CHAR_OTHER)
  ------------------
  |  Branch (215:12): [True: 14.9k, False: 50.2k]
  ------------------
  216|  15.2k|            tok->addRange(i, i);
  217|  65.5k|    }
  218|      1|    tok->sortRanges();
  219|      1|    tok->compactRanges();
  220|       |    // Build the internal map.
  221|      1|    tok->createMap();
  222|      1|    rangeTokMap->setRangeToken(fgXMLWord, tok , true);
  223|       |
  224|      1|    tok = RangeToken::complementRanges(tok, tokFactory);
  225|       |    // Build the internal map.
  226|      1|    tok->createMap();
  227|      1|    rangeTokMap->setRangeToken(fgXMLWord, tok);
  228|       |
  229|       |
  230|      1|    fRangesCreated = true;
  231|      1|}
_ZN11xercesc_3_215XMLRangeFactory20initializeKeywordMapEPNS_13RangeTokenMapE:
  236|      1|void XMLRangeFactory::initializeKeywordMap(RangeTokenMap *rangeTokMap) {
  237|       |
  238|      1|    if (fKeywordsInitialized)
  ------------------
  |  Branch (238:9): [True: 0, False: 1]
  ------------------
  239|      0|        return;
  240|       |
  241|      1|    rangeTokMap->addKeywordMap(fgXMLSpace, fgXMLCategory);
  242|      1|    rangeTokMap->addKeywordMap(fgXMLDigit, fgXMLCategory);
  243|      1|    rangeTokMap->addKeywordMap(fgXMLWord, fgXMLCategory);
  244|      1|    rangeTokMap->addKeywordMap(fgXMLNameChar, fgXMLCategory);
  245|      1|    rangeTokMap->addKeywordMap(fgXMLInitialNameChar, fgXMLCategory);
  246|       |
  247|      1|    fKeywordsInitialized = true;
  248|      1|}
XMLRangeFactory.cpp:_ZN11xercesc_3_2L11getTableLenEPKDs:
   64|      6|static unsigned int getTableLen(const XMLCh* const theTable) {
   65|       |
   66|      6|    XMLSize_t rangeLen = XMLString::stringLen(theTable);
   67|       |
   68|      6|    return (unsigned int)(rangeLen + 2*XMLString::stringLen(theTable + rangeLen + 1));
   69|      6|}
XMLRangeFactory.cpp:_ZN11xercesc_3_2L10setupRangeEPiPKDsj:
   42|      6|                       unsigned int startingIndex) {
   43|       |
   44|      6|    const XMLCh* pchCur = theTable;
   45|       |
   46|       |    // Do the ranges first
   47|    478|    while (*pchCur)
  ------------------
  |  Branch (47:12): [True: 472, False: 6]
  ------------------
   48|    472|    {
   49|    472|        rangeMap[startingIndex++] = *pchCur++;
   50|    472|    }
   51|       |
   52|       |    // Skip the range terminator
   53|      6|    pchCur++;
   54|       |
   55|       |    // And then the singles until we hit its terminator
   56|    100|    while (*pchCur) {
  ------------------
  |  Branch (56:12): [True: 94, False: 6]
  ------------------
   57|       |
   58|     94|        const XMLCh chSingle = *pchCur++;
   59|     94|        rangeMap[startingIndex++] = chSingle;
   60|     94|        rangeMap[startingIndex++] = chSingle;
   61|     94|    }
   62|      6|}

_ZN11xercesc_3_215XMLUniCharacter7getTypeEDs:
   43|   131k|unsigned short XMLUniCharacter::getType(const XMLCh ch) {
   44|       |
   45|       |#if XERCES_USE_TRANSCODER_ICU
   46|       |    return (unsigned short) u_charType(ch);
   47|       |#else
   48|   131k|    return (unsigned short) fgUniCharsTable[ch];
   49|   131k|#endif
   50|   131k|}

_ZN11xercesc_3_29DTDAttDefC2EPNS_13MemoryManagerE:
   36|    212|    XMLAttDef(XMLAttDef::CData, XMLAttDef::Implied, manager)
   37|    212|   , fElemId(XMLElementDecl::fgInvalidElemId)
   38|    212|    , fName(0)
   39|    212|{
   40|    212|}
_ZN11xercesc_3_29DTDAttDefC2EPKDsNS_9XMLAttDef8AttTypesENS3_11DefAttTypesEPNS_13MemoryManagerE:
   46|  14.1k|    XMLAttDef(type, defType, manager)
   47|  14.1k|    , fElemId(XMLElementDecl::fgInvalidElemId)
   48|  14.1k|    , fName(0)
   49|  14.1k|{
   50|  14.1k|    fName = XMLString::replicate(attName, getMemoryManager());
   51|  14.1k|}
_ZN11xercesc_3_29DTDAttDefD2Ev:
   68|  14.4k|{
   69|  14.4k|    getMemoryManager()->deallocate(fName); //delete [] fName;
   70|  14.4k|}
_ZN11xercesc_3_29DTDAttDef7setNameEPKDs:
   77|  8.28k|{
   78|  8.28k|    getMemoryManager()->deallocate(fName); //delete [] fName;
   79|  8.28k|    fName = XMLString::replicate(newName, getMemoryManager());
   80|  8.28k|}

_ZNK11xercesc_3_29DTDAttDef11getFullNameEv:
  117|  6.85M|{
  118|  6.85M|    return fName;
  119|  6.85M|}
_ZN11xercesc_3_29DTDAttDef9setElemIdEm:
  134|  14.1k|{
  135|  14.1k|    fElemId = newId;
  136|  14.1k|}

_ZN11xercesc_3_213DTDAttDefListC2EPNS_14RefHashTableOfINS_9DTDAttDefENS_12StringHasherEEEPNS_13MemoryManagerE:
   36|  27.6k|: XMLAttDefList(manager)
   37|  27.6k|,fEnum(0)
   38|  27.6k|,fList(listToUse)
   39|  27.6k|,fArray(0)
   40|  27.6k|,fSize(0)
   41|  27.6k|,fCount(0)
   42|  27.6k|{
   43|  27.6k|    fEnum = new (getMemoryManager()) RefHashTableOfEnumerator<DTDAttDef>(listToUse, false, manager);
   44|  27.6k|    fArray = (DTDAttDef **)(manager->allocate( sizeof(DTDAttDef*) << 1));
   45|  27.6k|    fSize = 2;
   46|  27.6k|}
_ZN11xercesc_3_213DTDAttDefListD2Ev:
   49|  27.6k|{
   50|  27.6k|    delete fEnum;
   51|  27.6k|    (getMemoryManager())->deallocate(fArray);
   52|  27.6k|}
_ZNK11xercesc_3_213DTDAttDefList14getAttDefCountEv:
  102|  11.0M|{
  103|  11.0M|    return fCount;
  104|  11.0M|}
_ZN11xercesc_3_213DTDAttDefList9getAttDefEm:
  110|  5.53M|{
  111|  5.53M|    if(index >= fCount)
  ------------------
  |  Branch (111:8): [True: 0, False: 5.53M]
  ------------------
  112|      0|        ThrowXMLwithMemMgr(ArrayIndexOutOfBoundsException, XMLExcepts::AttrList_BadIndex, getMemoryManager());
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  113|  5.53M|    return *(fArray[index]);
  114|  5.53M|}

_ZN11xercesc_3_213DTDAttDefList9addAttDefEPNS_9DTDAttDefE:
  146|  14.1k|{
  147|  14.1k|    if(fCount == fSize)
  ------------------
  |  Branch (147:8): [True: 2.10k, False: 12.0k]
  ------------------
  148|  2.10k|    {
  149|       |        // need to grow fArray
  150|  2.10k|        fSize <<= 1;
  151|  2.10k|        DTDAttDef** newArray = (DTDAttDef **)((getMemoryManager())->allocate( sizeof(DTDAttDef*) * fSize ));
  152|  2.10k|        memcpy(newArray, fArray, fCount * sizeof(DTDAttDef *));
  153|  2.10k|        (getMemoryManager())->deallocate(fArray);
  154|  2.10k|        fArray = newArray;
  155|  2.10k|    }
  156|  14.1k|    fArray[fCount++] = toAdd;
  157|  14.1k|}

_ZN11xercesc_3_214DTDElementDeclC2EPKDsjNS0_10ModelTypesEPNS_13MemoryManagerE:
   60|  37.1k|    XMLElementDecl(manager)
   61|  37.1k|    , fModelType(type)
   62|  37.1k|    , fAttDefs(0)
   63|  37.1k|    , fAttList(0)
   64|  37.1k|    , fContentSpec(0)
   65|  37.1k|    , fContentModel(0)
   66|  37.1k|    , fFormattedModel(0)
   67|  37.1k|{
   68|  37.1k|    setElementName(elemRawName, uriId);
   69|  37.1k|}
_ZN11xercesc_3_214DTDElementDeclD2Ev:
   86|  37.1k|{
   87|  37.1k|    delete fAttDefs;
   88|  37.1k|    delete fAttList;
   89|  37.1k|    delete fContentSpec;
   90|  37.1k|    delete fContentModel;
   91|  37.1k|    getMemoryManager()->deallocate(fFormattedModel);//delete [] fFormattedModel;
   92|  37.1k|}
_ZNK11xercesc_3_214DTDElementDecl13getAttDefListEv:
  100|  5.53M|{
  101|  5.53M|    if (!fAttList)
  ------------------
  |  Branch (101:9): [True: 25.5k, False: 5.51M]
  ------------------
  102|  25.5k|    {
  103|       |        // If the att def list is not made yet, then fault it in too
  104|  25.5k|        if (!fAttDefs)
  ------------------
  |  Branch (104:13): [True: 25.5k, False: 0]
  ------------------
  105|  25.5k|            faultInAttDefList();
  106|       |
  107|  25.5k|        ((DTDElementDecl*)this)->fAttList = new (getMemoryManager()) DTDAttDefList(fAttDefs,getMemoryManager());
  108|  25.5k|    }
  109|       |
  110|  5.53M|    return *fAttList;
  111|  5.53M|}
_ZNK11xercesc_3_214DTDElementDecl15getCharDataOptsEv:
  115|  9.66M|{
  116|  9.66M|    XMLElementDecl::CharDataOpts retVal;
  117|  9.66M|    switch(fModelType)
  118|  9.66M|    {
  119|  14.5k|        case Children :
  ------------------
  |  Branch (119:9): [True: 14.5k, False: 9.65M]
  ------------------
  120|  14.5k|            retVal = XMLElementDecl::SpacesOk;
  121|  14.5k|            break;
  122|       |
  123|    286|        case Empty :
  ------------------
  |  Branch (123:9): [True: 286, False: 9.66M]
  ------------------
  124|    286|            retVal = XMLElementDecl::NoCharData;
  125|    286|            break;
  126|       |
  127|  9.65M|        default :
  ------------------
  |  Branch (127:9): [True: 9.65M, False: 14.8k]
  ------------------
  128|  9.65M|            retVal = XMLElementDecl::AllCharData;
  129|  9.65M|            break;
  130|  9.66M|    }
  131|  9.66M|    return retVal;
  132|  9.66M|}
_ZNK11xercesc_3_214DTDElementDecl10hasAttDefsEv:
  136|  17.0M|{
  137|       |    // If the collection hasn't been faulted in, then no att defs
  138|  17.0M|    if (!fAttDefs)
  ------------------
  |  Branch (138:9): [True: 4.33M, False: 12.6M]
  ------------------
  139|  4.33M|        return false;
  140|       |
  141|  12.6M|    return !fAttDefs->isEmpty();
  142|  17.0M|}
_ZN11xercesc_3_214DTDElementDecl14setContentSpecEPNS_15ContentSpecNodeE:
  146|  5.36k|{
  147|  5.36k|    delete fContentSpec;
  148|  5.36k|    fContentSpec = toAdopt;
  149|       |
  150|       |    //reset Content Model
  151|  5.36k|    setContentModel(0);
  152|       |
  153|  5.36k|}
_ZNK11xercesc_3_214DTDElementDecl24getFormattedContentModelEv:
  157|  20.8k|{
  158|       |    //
  159|       |    //  If its not already built, then call the protected virtual method
  160|       |    //  to allow the derived class to build it (since only it knows.)
  161|       |    //  Otherwise, just return the previously formatted methods.
  162|       |    //
  163|       |    //  Since we are faulting this in, within a const getter, we have to
  164|       |    //  cast off the const-ness.
  165|       |    //
  166|  20.8k|    if (!fFormattedModel)
  ------------------
  |  Branch (166:9): [True: 1.36k, False: 19.4k]
  ------------------
  167|  1.36k|        ((DTDElementDecl*)this)->fFormattedModel = formatContentModel();
  168|       |
  169|  20.8k|    return fFormattedModel;
  170|  20.8k|}
_ZN11xercesc_3_214DTDElementDecl9getAttDefEPKDs:
  187|  5.47M|{
  188|       |    // If no list, then return a null
  189|  5.47M|    if (!fAttDefs)
  ------------------
  |  Branch (189:9): [True: 5.60k, False: 5.46M]
  ------------------
  190|  5.60k|        return 0;
  191|       |
  192|  5.46M|    return fAttDefs->get(attName);
  193|  5.47M|}
_ZN11xercesc_3_214DTDElementDecl9addAttDefEPNS_9DTDAttDefE:
  200|  14.1k|{
  201|       |    // Fault in the att list if required
  202|  14.1k|    if (!fAttDefs)
  ------------------
  |  Branch (202:9): [True: 2.10k, False: 12.0k]
  ------------------
  203|  2.10k|            faultInAttDefList();
  204|       |
  205|       |    // Tell this guy the element id of its parent (us)
  206|  14.1k|    toAdd->setElemId(getId());
  207|       |
  208|  14.1k|    fAttDefs->put((void*)(toAdd->getFullName()), toAdd);
  209|       |    // update and/or create fAttList
  210|  14.1k|    if(!fAttList)
  ------------------
  |  Branch (210:8): [True: 2.10k, False: 12.0k]
  ------------------
  211|  2.10k|        ((DTDElementDecl*)this)->fAttList = new (getMemoryManager()) DTDAttDefList(fAttDefs,getMemoryManager());
  212|  14.1k|    fAttList->addAttDef(toAdd);
  213|  14.1k|}
_ZNK11xercesc_3_214DTDElementDecl18formatContentModelEv:
  220|  1.36k|{
  221|  1.36k|    XMLCh* newValue = 0;
  222|  1.36k|    if (fModelType == Any)
  ------------------
  |  Branch (222:9): [True: 0, False: 1.36k]
  ------------------
  223|      0|    {
  224|      0|        newValue = XMLString::replicate(XMLUni::fgAnyString, getMemoryManager());
  225|      0|    }
  226|  1.36k|     else if (fModelType == Empty)
  ------------------
  |  Branch (226:15): [True: 17, False: 1.34k]
  ------------------
  227|     17|    {
  228|     17|        newValue = XMLString::replicate(XMLUni::fgEmptyString, getMemoryManager());
  229|     17|    }
  230|  1.34k|     else
  231|  1.34k|    {
  232|       |        //
  233|       |        //  Use a temp XML buffer to format into. Content models could be
  234|       |        //  pretty long, but very few will be longer than one K. The buffer
  235|       |        //  will expand to handle the more pathological ones.
  236|       |        //
  237|  1.34k|        XMLBuffer bufFmt(1023, getMemoryManager());
  238|  1.34k|        getContentSpec()->formatSpec(bufFmt);
  239|  1.34k|        newValue = XMLString::replicate(bufFmt.getRawBuffer(), getMemoryManager());
  240|  1.34k|    }
  241|  1.36k|    return newValue;
  242|  1.36k|}
_ZN11xercesc_3_214DTDElementDecl16makeContentModelEv:
  245|  1.92k|{
  246|  1.92k|    XMLContentModel* cmRet = 0;
  247|  1.92k|    if (fModelType == Mixed_Simple)
  ------------------
  |  Branch (247:9): [True: 83, False: 1.83k]
  ------------------
  248|     83|    {
  249|       |        //
  250|       |        //  Just create a mixel content model object. This type of
  251|       |        //  content model is optimized for mixed content validation.
  252|       |        //
  253|     83|        cmRet = new (getMemoryManager()) MixedContentModel(true, this->getContentSpec(), false, getMemoryManager());
  254|     83|    }
  255|  1.83k|     else if (fModelType == Children)
  ------------------
  |  Branch (255:15): [True: 1.83k, False: 0]
  ------------------
  256|  1.83k|    {
  257|       |        //
  258|       |        //  This method will create an optimal model for the complexity
  259|       |        //  of the element's defined model. If its simple, it will create
  260|       |        //  a SimpleContentModel object. If its a simple list, it will
  261|       |        //  create a SimpleListContentModel object. If its complex, it
  262|       |        //  will create a DFAContentModel object.
  263|       |        //
  264|  1.83k|        cmRet = createChildModel();
  265|  1.83k|    }
  266|      0|     else
  267|      0|    {
  268|      0|        ThrowXMLwithMemMgr(RuntimeException, XMLExcepts::CM_MustBeMixedOrChildren, getMemoryManager());
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  269|      0|    }
  270|  1.92k|    return cmRet;
  271|  1.92k|}
_ZN11xercesc_3_214DTDElementDecl16createChildModelEv:
  275|  1.83k|{
  276|       |    // Get the content spec node of the element
  277|  1.83k|    ContentSpecNode* specNode = getContentSpec();
  278|       |
  279|  1.83k|    if(!specNode)
  ------------------
  |  Branch (279:8): [True: 0, False: 1.83k]
  ------------------
  280|      0|        ThrowXMLwithMemMgr(RuntimeException, XMLExcepts::CM_UnknownCMSpecType, getMemoryManager());
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  281|       |
  282|       |    //
  283|       |    //  Do a sanity check that the node does not have a PCDATA id. Since,
  284|       |    //  if it was, it should have already gotten taken by the Mixed model.
  285|       |    //
  286|  1.83k|    if (specNode->getElement()) {
  ------------------
  |  Branch (286:9): [True: 87, False: 1.75k]
  ------------------
  287|     87|        if (specNode->getElement()->getURI() == XMLElementDecl::fgPCDataElemId)
  ------------------
  |  Branch (287:13): [True: 0, False: 87]
  ------------------
  288|      0|            ThrowXMLwithMemMgr(RuntimeException, XMLExcepts::CM_NoPCDATAHere, getMemoryManager());
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  289|     87|    }
  290|       |
  291|       |    //
  292|       |    //  According to the type of node, we will create the correct type of
  293|       |    //  content model.
  294|       |    //
  295|  1.83k|    if (specNode->getType() == ContentSpecNode::Leaf)
  ------------------
  |  Branch (295:9): [True: 87, False: 1.75k]
  ------------------
  296|     87|    {
  297|       |        // Create a simple content model
  298|     87|        return new (getMemoryManager()) SimpleContentModel
  299|     87|        (
  300|     87|            true
  301|     87|            , specNode->getElement()
  302|     87|            , 0
  303|     87|            , ContentSpecNode::Leaf
  304|     87|            , getMemoryManager()
  305|     87|        );
  306|     87|    }
  307|  1.75k|     else if ((specNode->getType() == ContentSpecNode::Choice)
  ------------------
  |  Branch (307:15): [True: 220, False: 1.53k]
  ------------------
  308|  1.75k|          ||  (specNode->getType() == ContentSpecNode::Sequence))
  ------------------
  |  Branch (308:15): [True: 716, False: 816]
  ------------------
  309|    936|    {
  310|       |        //
  311|       |        //  Lets see if both of the children are leafs. If so, then it has to
  312|       |        //  be a simple content model
  313|       |        //
  314|    936|        if ((specNode->getFirst()->getType() == ContentSpecNode::Leaf)
  ------------------
  |  Branch (314:13): [True: 808, False: 128]
  ------------------
  315|    936|        &&  (specNode->getSecond()->getType() == ContentSpecNode::Leaf))
  ------------------
  |  Branch (315:13): [True: 104, False: 704]
  ------------------
  316|    104|        {
  317|    104|            return new (getMemoryManager()) SimpleContentModel
  318|    104|            (
  319|    104|                true
  320|    104|                , specNode->getFirst()->getElement()
  321|    104|                , specNode->getSecond()->getElement()
  322|    104|                , specNode->getType()
  323|    104|                , getMemoryManager()
  324|    104|            );
  325|    104|        }
  326|    936|    }
  327|    816|     else if ((specNode->getType() == ContentSpecNode::OneOrMore)
  ------------------
  |  Branch (327:15): [True: 294, False: 522]
  ------------------
  328|    816|          ||  (specNode->getType() == ContentSpecNode::ZeroOrMore)
  ------------------
  |  Branch (328:15): [True: 460, False: 62]
  ------------------
  329|    816|          ||  (specNode->getType() == ContentSpecNode::ZeroOrOne))
  ------------------
  |  Branch (329:15): [True: 62, False: 0]
  ------------------
  330|    816|    {
  331|       |        //
  332|       |        //  Its a repetition, so see if its one child is a leaf. If so its a
  333|       |        //  repetition of a single element, so we can do a simple content
  334|       |        //  model for that.
  335|       |        //
  336|    816|        if (specNode->getFirst()->getType() == ContentSpecNode::Leaf)
  ------------------
  |  Branch (336:13): [True: 175, False: 641]
  ------------------
  337|    175|        {
  338|    175|            return new (getMemoryManager()) SimpleContentModel
  339|    175|            (
  340|    175|                true
  341|    175|                , specNode->getFirst()->getElement()
  342|    175|                , 0
  343|    175|                , specNode->getType()
  344|    175|                , getMemoryManager()
  345|    175|            );
  346|    175|        }
  347|    816|    }
  348|      0|     else
  349|      0|    {
  350|      0|        ThrowXMLwithMemMgr(RuntimeException, XMLExcepts::CM_UnknownCMSpecType, getMemoryManager());
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  351|      0|    }
  352|       |
  353|       |    // Its not any simple type of content, so create a DFA based content model
  354|  1.47k|    return new (getMemoryManager()) DFAContentModel
  355|  1.47k|    (
  356|  1.47k|        true
  357|  1.47k|        , this->getContentSpec()
  358|  1.47k|        , getMemoryManager()
  359|  1.47k|    );
  360|  1.83k|}
_ZNK11xercesc_3_214DTDElementDecl17faultInAttDefListEv:
  364|  27.6k|{
  365|       |    // Use a hash modulus of 29 and tell it owns its elements
  366|  27.6k|    ((DTDElementDecl*)this)->fAttDefs = new (getMemoryManager()) RefHashTableOf<DTDAttDef>(29, true, getMemoryManager());
  367|  27.6k|}

_ZN11xercesc_3_214DTDElementDecl14getContentSpecEv:
  190|  3.39k|{
  191|  3.39k|    return fContentSpec;
  192|  3.39k|}
_ZNK11xercesc_3_214DTDElementDecl14getContentSpecEv:
  195|  1.34k|{
  196|  1.34k|    return fContentSpec;
  197|  1.34k|}
_ZN11xercesc_3_214DTDElementDecl15getContentModelEv:
  200|  28.9k|{
  201|  28.9k|    if (!fContentModel)
  ------------------
  |  Branch (201:9): [True: 1.92k, False: 27.0k]
  ------------------
  202|  1.92k|        fContentModel = makeContentModel();
  203|  28.9k|    return fContentModel;
  204|  28.9k|}
_ZN11xercesc_3_214DTDElementDecl15setContentModelEPNS_15XMLContentModelE:
  208|  5.36k|{
  209|  5.36k|    delete fContentModel;
  210|  5.36k|    fContentModel = newModelToAdopt;
  211|       |
  212|       |    // reset formattedModel
  213|  5.36k|    if (fFormattedModel)
  ------------------
  |  Branch (213:9): [True: 0, False: 5.36k]
  ------------------
  214|      0|    {
  215|      0|        getMemoryManager()->deallocate(fFormattedModel);
  216|      0|        fFormattedModel = 0;
  217|      0|    }
  218|  5.36k|}
_ZNK11xercesc_3_214DTDElementDecl6getKeyEv:
  224|  74.0k|{
  225|  74.0k|    return getFullName();
  226|  74.0k|}
_ZNK11xercesc_3_214DTDElementDecl12getModelTypeEv:
  232|  5.71M|{
  233|  5.71M|    return fModelType;
  234|  5.71M|}
_ZN11xercesc_3_214DTDElementDecl12setModelTypeENS0_10ModelTypesE:
  241|  6.29k|{
  242|  6.29k|    fModelType = toSet;
  243|  6.29k|}

_ZNK11xercesc_3_213DTDEntityDecl22getDeclaredInIntSubsetEv:
  169|  5.15k|{
  170|  5.15k|    return fDeclaredInIntSubset;
  171|  5.15k|}
_ZNK11xercesc_3_213DTDEntityDecl16getIsSpecialCharEv:
  179|   449k|{
  180|   449k|    return fIsSpecialChar;
  181|   449k|}
_ZN11xercesc_3_213DTDEntityDecl22setDeclaredInIntSubsetEb:
  188|  5.43k|{
  189|  5.43k|    fDeclaredInIntSubset = newValue;
  190|  5.43k|}
_ZN11xercesc_3_213DTDEntityDecl14setIsParameterEb:
  193|  9.86k|{
  194|  9.86k|    fIsParameter = newValue;
  195|  9.86k|}
_ZN11xercesc_3_213DTDEntityDeclC2EPKDsDsbb:
  153|      5|    XMLEntityDecl(entName, value, XMLPlatformUtils::fgMemoryManager)
  154|      5|    , fDeclaredInIntSubset(fromIntSubset)
  155|      5|    , fIsParameter(false)
  156|      5|    , fIsSpecialChar(specialChar)
  157|      5|{
  158|      5|}
_ZN11xercesc_3_213DTDEntityDeclC2EPNS_13MemoryManagerE:
  120|    190|    XMLEntityDecl(manager)
  121|    190|    , fDeclaredInIntSubset(false)
  122|    190|    , fIsParameter(false)
  123|    190|    , fIsSpecialChar(false)
  124|    190|{
  125|    190|}
_ZN11xercesc_3_213DTDEntityDeclC2EPKDsbPNS_13MemoryManagerE:
  131|  5.43k|    XMLEntityDecl(entName, manager)
  132|  5.43k|    , fDeclaredInIntSubset(fromIntSubset)
  133|  5.43k|    , fIsParameter(false)
  134|  5.43k|    , fIsSpecialChar(false)
  135|  5.43k|{
  136|  5.43k|}

_ZN11xercesc_3_214XMLInitializer20initializeDTDGrammarEv:
   42|      1|{
   43|      1|    DTDGrammar::fDefaultEntities = new NameIdPool<DTDEntityDecl>(11, 12);
   44|       |
   45|       |    // Add the default entity entries for the character refs that must
   46|       |    // always be present. We indicate that they are from the internal
   47|       |    // subset. They aren't really, but they have to look that way so
   48|       |    // that they are still valid for use within a standalone document.
   49|       |    //
   50|       |    // We also mark them as special char entities, which allows them
   51|       |    // to be used in places whether other non-numeric general entities
   52|       |    // cannot.
   53|       |    //
   54|      1|    if (DTDGrammar::fDefaultEntities)
  ------------------
  |  Branch (54:9): [True: 1, False: 0]
  ------------------
   55|      1|    {
   56|      1|        DTDGrammar::fDefaultEntities->put(new DTDEntityDecl(XMLUni::fgAmp, chAmpersand, true, true));
   57|      1|        DTDGrammar::fDefaultEntities->put(new DTDEntityDecl(XMLUni::fgLT, chOpenAngle, true, true));
   58|      1|        DTDGrammar::fDefaultEntities->put(new DTDEntityDecl(XMLUni::fgGT, chCloseAngle, true, true));
   59|      1|        DTDGrammar::fDefaultEntities->put(new DTDEntityDecl(XMLUni::fgQuot, chDoubleQuote, true, true));
   60|      1|        DTDGrammar::fDefaultEntities->put(new DTDEntityDecl(XMLUni::fgApos, chSingleQuote, true, true));
   61|      1|    }
   62|      1|}
_ZN11xercesc_3_210DTDGrammarC2EPNS_13MemoryManagerE:
   74|  7.12k|    fMemoryManager(manager)
   75|  7.12k|    , fElemDeclPool(0)
   76|  7.12k|    , fElemNonDeclPool(0)
   77|  7.12k|    , fEntityDeclPool(0)
   78|  7.12k|    , fNotationDeclPool(0)
   79|  7.12k|    , fGramDesc(0)
   80|  7.12k|    , fValidated(false)
   81|  7.12k|{
   82|       |    //
   83|       |    //  Init all the pool members.
   84|       |    //
   85|       |    //  <TBD> Investigate what the optimum values would be for the various
   86|       |    //  pools.
   87|       |    //
   88|  7.12k|    fElemDeclPool = new (fMemoryManager) NameIdPool<DTDElementDecl>(109, 128, fMemoryManager);
   89|       |    // should not need this in the common situation where grammars
   90|       |    // are built once and then read - NG
   91|       |    //fElemNonDeclPool = new (fMemoryManager) NameIdPool<DTDElementDecl>(29, 128, fMemoryManager);
   92|  7.12k|    fEntityDeclPool = new (fMemoryManager) NameIdPool<DTDEntityDecl>(109, 128, fMemoryManager);
   93|  7.12k|    fNotationDeclPool = new (fMemoryManager) NameIdPool<XMLNotationDecl>(109, 128, fMemoryManager);
   94|       |
   95|       |    //REVISIT: use grammarPool to create
   96|  7.12k|    fGramDesc = new (fMemoryManager) XMLDTDDescriptionImpl(XMLUni::fgDTDEntityString, fMemoryManager);
   97|  7.12k|}
_ZN11xercesc_3_210DTDGrammarD2Ev:
  100|  7.12k|{
  101|  7.12k|    delete fElemDeclPool;
  102|  7.12k|    if(fElemNonDeclPool)
  ------------------
  |  Branch (102:8): [True: 0, False: 7.12k]
  ------------------
  103|      0|    {
  104|      0|        delete fElemNonDeclPool;
  105|      0|    }
  106|  7.12k|    delete fEntityDeclPool;
  107|  7.12k|    delete fNotationDeclPool;
  108|  7.12k|    delete fGramDesc;
  109|  7.12k|}
_ZNK11xercesc_3_210DTDGrammar21getGrammarDescriptionEv:
  201|  7.12k|{
  202|  7.12k|    return fGramDesc;
  203|  7.12k|}

_ZNK11xercesc_3_210DTDGrammar14getGrammarTypeEv:
  287|  9.68M|inline Grammar::GrammarType DTDGrammar::getGrammarType() const {
  288|  9.68M|    return Grammar::DTDGrammarType;
  289|  9.68M|}
_ZNK11xercesc_3_210DTDGrammar12getValidatedEv:
  380|  3.58k|{
  381|  3.58k|    return fValidated;
  382|  3.58k|}
_ZN11xercesc_3_210DTDGrammar11getElemDeclEjPKDsS2_j:
  328|  20.1M|{
  329|  20.1M|    XMLElementDecl* elemDecl = fElemDeclPool->getByKey(qName);
  330|       |
  331|  20.1M|    if (!elemDecl && fElemNonDeclPool)
  ------------------
  |  Branch (331:9): [True: 4.36M, False: 15.8M]
  |  Branch (331:22): [True: 0, False: 4.36M]
  ------------------
  332|      0|        elemDecl = fElemNonDeclPool->getByKey(qName);
  333|       |
  334|  20.1M|    return elemDecl;
  335|  20.1M|}
_ZN11xercesc_3_210DTDGrammar15getNotationDeclEPKDs:
  370|  5.52k|{
  371|  5.52k|    return fNotationDeclPool->getByKey(notName);
  372|  5.52k|}
_ZN11xercesc_3_210DTDGrammar11putElemDeclEPNS_14XMLElementDeclEb:
  352|  32.8k|{
  353|  32.8k|    if (notDeclared)
  ------------------
  |  Branch (353:9): [True: 0, False: 32.8k]
  ------------------
  354|      0|    {
  355|      0|        if(!fElemNonDeclPool)
  ------------------
  |  Branch (355:12): [True: 0, False: 0]
  ------------------
  356|      0|            fElemNonDeclPool = new (fMemoryManager) NameIdPool<DTDElementDecl>(29, 128, fMemoryManager);
  357|      0|        return fElemNonDeclPool->put((DTDElementDecl*) elemDecl);
  358|      0|    }
  359|       |
  360|  32.8k|    return fElemDeclPool->put((DTDElementDecl*) elemDecl);
  361|  32.8k|}
_ZNK11xercesc_3_210DTDGrammar15putNotationDeclEPNS_15XMLNotationDeclE:
  375|  1.88k|{
  376|  1.88k|    return fNotationDeclPool->put(notationDecl);
  377|  1.88k|}
_ZN11xercesc_3_210DTDGrammar12setValidatedEb:
  385|  3.58k|{
  386|  3.58k|    fValidated = newState;
  387|  3.58k|}
_ZNK11xercesc_3_210DTDGrammar17getElemEnumeratorEv:
  227|  3.58k|{
  228|  3.58k|    return NameIdPoolEnumerator<DTDElementDecl>(fElemDeclPool, fMemoryManager);
  229|  3.58k|}
_ZNK11xercesc_3_210DTDGrammar19getEntityEnumeratorEv:
  233|  3.58k|{
  234|  3.58k|    return NameIdPoolEnumerator<DTDEntityDecl>(fEntityDeclPool, fMemoryManager);
  235|  3.58k|}
_ZN11xercesc_3_210DTDGrammar13getEntityDeclEPKDs:
  255|  3.09M|{
  256|  3.09M|    DTDEntityDecl* decl = fDefaultEntities->getByKey(entName);
  257|       |
  258|  3.09M|    if (!decl)
  ------------------
  |  Branch (258:9): [True: 3.00M, False: 90.4k]
  ------------------
  259|  3.00M|        return fEntityDeclPool->getByKey(entName);
  260|       |
  261|  90.4k|    return decl;
  262|  3.09M|}
_ZNK11xercesc_3_210DTDGrammar13putEntityDeclEPNS_13DTDEntityDeclE:
  279|  3.93k|{
  280|  3.93k|    return fEntityDeclPool->put(entityDecl);
  281|  3.93k|}

_ZN11xercesc_3_210DTDScannerC2EPNS_10DTDGrammarEPNS_14DocTypeHandlerEPNS_13MemoryManagerES6_:
  109|  6.03k|    fMemoryManager(manager)
  110|  6.03k|    , fGrammarPoolMemoryManager(grammarPoolMemoryManager)
  111|  6.03k|    , fDocTypeHandler(docTypeHandler)
  112|  6.03k|    , fDumAttDef(0)
  113|  6.03k|    , fDumElemDecl(0)
  114|  6.03k|    , fDumEntityDecl(0)
  115|  6.03k|    , fInternalSubset(false)
  116|  6.03k|    , fNextAttrId(1)
  117|  6.03k|    , fDTDGrammar(dtdGrammar)
  118|  6.03k|    , fBufMgr(0)
  119|  6.03k|    , fReaderMgr(0)
  120|  6.03k|    , fScanner(0)
  121|  6.03k|    , fPEntityDeclPool(0)
  122|  6.03k|    , fEmptyNamespaceId(0)
  123|  6.03k|    , fDocTypeReaderId(0)
  124|  6.03k|{
  125|  6.03k|    fPEntityDeclPool = new (fMemoryManager) NameIdPool<DTDEntityDecl>(109, 128, fMemoryManager);
  126|  6.03k|}
_ZN11xercesc_3_210DTDScannerD2Ev:
  129|  6.03k|{
  130|  6.03k|    delete fDumAttDef;
  131|  6.03k|    delete fDumElemDecl;
  132|  6.03k|    delete fDumEntityDecl;
  133|  6.03k|    delete fPEntityDeclPool;
  134|  6.03k|}
_ZN11xercesc_3_210DTDScanner14setScannerInfoEPNS_10XMLScannerEPNS_9ReaderMgrEPNS_12XMLBufferMgrE:
  142|  6.03k|{
  143|       |    // We don't own any of these, we just reference them
  144|  6.03k|    fScanner = owningScanner;
  145|  6.03k|    fReaderMgr = readerMgr;
  146|  6.03k|    fBufMgr = bufMgr;
  147|       |
  148|  6.03k|    if (fScanner->getDoNamespaces())
  ------------------
  |  Branch (148:9): [True: 0, False: 6.03k]
  ------------------
  149|      0|        fEmptyNamespaceId = fScanner->getEmptyNamespaceId();
  150|  6.03k|    else
  151|  6.03k|        fEmptyNamespaceId = 0;
  152|       |
  153|  6.03k|    fDocTypeReaderId = fReaderMgr->getCurrentReaderNum();
  154|  6.03k|}
_ZN11xercesc_3_210DTDScanner13checkForPERefEbb:
  162|  3.61M|{
  163|  3.61M|    bool gotSpace = false;
  164|       |
  165|       |    //
  166|       |    //  See if we have any spaces up front. If so, then skip them and set
  167|       |    //  the gotSpaces flag.
  168|       |    //
  169|  3.61M|    if (fReaderMgr->skippedSpace())
  ------------------
  |  Branch (169:9): [True: 92.0k, False: 3.52M]
  ------------------
  170|  92.0k|    {
  171|  92.0k|        fReaderMgr->skipPastSpaces();
  172|  92.0k|        gotSpace = true;
  173|  92.0k|    }
  174|       |
  175|       |    // If the next char is a percent, then expand the PERef
  176|  3.61M|    if (!fReaderMgr->skippedChar(chPercent))
  ------------------
  |  Branch (176:9): [True: 3.61M, False: 10]
  ------------------
  177|  3.61M|       return gotSpace;
  178|       |
  179|     13|    while (true)
  ------------------
  |  Branch (179:12): [Folded - Ignored]
  ------------------
  180|      3|    {
  181|      3|       if (!expandPERef(false, inLiteral, inMarkup, false))
  ------------------
  |  Branch (181:12): [True: 0, False: 3]
  ------------------
  182|      0|          fScanner->emitError(XMLErrs::ExpectedEntityRefName);
  183|       |       // And skip any more spaces in the expanded value
  184|      3|       if (fReaderMgr->skippedSpace())
  ------------------
  |  Branch (184:12): [True: 0, False: 3]
  ------------------
  185|      0|       {
  186|      0|          fReaderMgr->skipPastSpaces();
  187|      0|          gotSpace = true;
  188|      0|       }
  189|      3|       if (!fReaderMgr->skippedChar(chPercent))
  ------------------
  |  Branch (189:12): [True: 0, False: 3]
  ------------------
  190|      0|          break;
  191|      3|    }
  192|     10|    return gotSpace;
  193|  3.61M|}
_ZN11xercesc_3_210DTDScanner11expandPERefEbbbb:
  200|  5.98k|{
  201|  5.98k|    fScanner->setHasNoDTD(false);
  202|  5.98k|    XMLBufBid bbName(fBufMgr);
  203|       |
  204|       |    //
  205|       |    //  If we are in the internal subset and in markup, then this is
  206|       |    //  an error but we go ahead and do it anyway.
  207|       |    //
  208|  5.98k|    if (fInternalSubset && inMarkup)
  ------------------
  |  Branch (208:9): [True: 5.98k, False: 0]
  |  Branch (208:28): [True: 8, False: 5.97k]
  ------------------
  209|      8|        fScanner->emitError(XMLErrs::PERefInMarkupInIntSubset);
  210|       |
  211|  5.98k|    if (!fReaderMgr->getName(bbName.getBuffer()))
  ------------------
  |  Branch (211:9): [True: 64, False: 5.92k]
  ------------------
  212|     64|    {
  213|     64|        fScanner->emitError(XMLErrs::ExpectedPEName);
  214|       |
  215|       |        // Skip the semicolon if that's what we ended up on
  216|     64|        fReaderMgr->skippedChar(chSemiColon);
  217|     64|        return false;
  218|     64|    }
  219|       |
  220|       |    // If no terminating semicolon, emit an error but try to keep going
  221|  5.92k|    if (!fReaderMgr->skippedChar(chSemiColon))
  ------------------
  |  Branch (221:9): [True: 60, False: 5.86k]
  ------------------
  222|     60|        fScanner->emitError(XMLErrs::UnterminatedEntityRef, bbName.getRawBuffer());
  223|       |
  224|       |    //
  225|       |    //  Look it up in the PE decl pool and see if it exists. If not, just
  226|       |    //  emit an error and continue.
  227|       |    //
  228|  5.92k|    XMLEntityDecl* decl = fPEntityDeclPool->getByKey(bbName.getRawBuffer());
  229|  5.92k|    if (!decl)
  ------------------
  |  Branch (229:9): [True: 2.01k, False: 3.91k]
  ------------------
  230|  2.01k|    {
  231|       |        // XML 1.0 Section 4.1
  232|  2.01k|        if (fScanner->getStandalone()) {
  ------------------
  |  Branch (232:13): [True: 1, False: 2.00k]
  ------------------
  233|       |            // no need to check fScanner->fHasNoDTD which is for sure false
  234|       |            // since we are in expandPERef already
  235|      1|            fScanner->emitError(XMLErrs::EntityNotFound, bbName.getRawBuffer());
  236|      1|        }
  237|  2.00k|        else {
  238|  2.00k|            if (fScanner->getValidationScheme() == XMLScanner::Val_Always)
  ------------------
  |  Branch (238:17): [True: 0, False: 2.00k]
  ------------------
  239|      0|                fScanner->getValidator()->emitError(XMLValid::VC_EntityNotFound, bbName.getRawBuffer());
  240|  2.00k|        }
  241|       |
  242|  2.01k|        return false;
  243|  2.01k|    }
  244|       |
  245|       |    //
  246|       |    // XML 1.0 Section 2.9
  247|       |    //  If we are a standalone document, then it has to have been declared
  248|       |    //  in the internal subset. Keep going though.
  249|       |    //
  250|  3.91k|    if (fScanner->getValidationScheme() == XMLScanner::Val_Always && fScanner->getStandalone() && !decl->getDeclaredInIntSubset())
  ------------------
  |  Branch (250:9): [True: 0, False: 3.91k]
  |  Branch (250:70): [True: 0, False: 0]
  |  Branch (250:99): [True: 0, False: 0]
  ------------------
  251|      0|        fScanner->getValidator()->emitError(XMLValid::VC_IllegalRefInStandalone, bbName.getRawBuffer());
  252|       |
  253|       |    //
  254|       |    //  Okee dokee, we found it. So create either a memory stream with
  255|       |    //  the entity value contents, or a file stream if its an external
  256|       |    //  entity.
  257|       |    //
  258|  3.91k|    if (decl->isExternal())
  ------------------
  |  Branch (258:9): [True: 59, False: 3.85k]
  ------------------
  259|     59|    {
  260|       |        // And now create a reader to read this entity
  261|     59|        InputSource* srcUsed;
  262|     59|        XMLReader* reader = fReaderMgr->createReader
  263|     59|        (
  264|     59|            decl->getBaseURI()
  265|     59|            , decl->getSystemId()
  266|     59|            , decl->getPublicId()
  267|     59|            , false
  268|     59|            , inLiteral ? XMLReader::RefFrom_Literal : XMLReader::RefFrom_NonLiteral
  ------------------
  |  Branch (268:15): [True: 0, False: 59]
  ------------------
  269|     59|            , XMLReader::Type_PE
  270|     59|            , XMLReader::Source_External
  271|     59|            , srcUsed
  272|     59|            , fScanner->getCalculateSrcOfs()
  273|     59|            , fScanner->getLowWaterMark()
  274|     59|            , fScanner->getDisableDefaultEntityResolution()
  275|     59|        );
  276|       |
  277|       |        // Put a janitor on the source so its cleaned up on exit
  278|     59|        Janitor<InputSource> janSrc(srcUsed);
  279|       |
  280|       |        // If the creation failed then throw an exception
  281|     59|        if (!reader)
  ------------------
  |  Branch (281:13): [True: 31, False: 28]
  ------------------
  282|     31|            ThrowXMLwithMemMgr1(RuntimeException, XMLExcepts::Gen_CouldNotOpenExtEntity, srcUsed ? srcUsed->getSystemId() : decl->getSystemId(), fMemoryManager);
  ------------------
  |  |  266|     62|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  |  |  ------------------
  |  |  |  Branch (266:87): [True: 31, False: 0]
  |  |  ------------------
  ------------------
  283|       |
  284|       |        // Set the 'throw at end' flag, to the one we were given
  285|     28|        reader->setThrowAtEnd(throwEndOfExt);
  286|       |
  287|       |        //
  288|       |        //  Push the reader. If its a recursive expansion, then emit an error
  289|       |        //  and return an failure.
  290|       |        //
  291|     28|        if (!fReaderMgr->pushReader(reader, decl))
  ------------------
  |  Branch (291:13): [True: 0, False: 28]
  ------------------
  292|      0|        {
  293|      0|            fScanner->emitError(XMLErrs::RecursiveEntity, decl->getName());
  294|      0|            return false;
  295|      0|        }
  296|       |
  297|       |        //
  298|       |        //  If the caller wants us to scan the external entity, then lets
  299|       |        //  do that now.
  300|       |        //
  301|     28|        if (scanExternal)
  ------------------
  |  Branch (301:13): [True: 0, False: 28]
  ------------------
  302|      0|        {
  303|      0|            XMLEntityHandler* entHandler = fScanner->getEntityHandler();
  304|       |
  305|       |            // If we have an entity handler, tell it we are starting this entity
  306|      0|            if (entHandler)
  ------------------
  |  Branch (306:17): [True: 0, False: 0]
  ------------------
  307|      0|                entHandler->startInputSource(*srcUsed);
  308|       |
  309|       |            //
  310|       |            //  Scan the external entity now. The parameter tells it that
  311|       |            //  it is not in an include section. Get the current reader
  312|       |            //  level so we can catch partial markup errors and be sure
  313|       |            //  to get back to here if we get an exception out of the
  314|       |            //  ext subset scan.
  315|       |            //
  316|      0|            const XMLSize_t readerNum = fReaderMgr->getCurrentReaderNum();
  317|      0|            try
  318|      0|            {
  319|      0|                scanExtSubsetDecl(false, false);
  320|      0|            }
  321|      0|            catch(const OutOfMemoryException&)
  322|      0|            {
  323|      0|                throw;
  324|      0|            }
  325|      0|            catch(...)
  326|      0|            {
  327|       |                // Pop the reader back to the original level
  328|      0|                fReaderMgr->cleanStackBackTo(readerNum);
  329|       |
  330|       |                // End the input source, even though its not happy
  331|      0|                if (entHandler)
  ------------------
  |  Branch (331:21): [True: 0, False: 0]
  ------------------
  332|      0|                    entHandler->endInputSource(*srcUsed);
  333|      0|                throw;
  334|      0|            }
  335|       |
  336|       |            // If we have an entity handler, tell it we are ending this entity
  337|      0|            if (entHandler)
  ------------------
  |  Branch (337:17): [True: 0, False: 0]
  ------------------
  338|      0|                entHandler->endInputSource(*srcUsed);
  339|      0|        }
  340|     28|        else {
  341|       |            // If it starts with the XML string, then parse a text decl
  342|     28|            if (fScanner->checkXMLDecl(true))
  ------------------
  |  Branch (342:17): [True: 0, False: 28]
  ------------------
  343|      0|                scanTextDecl();
  344|     28|        }
  345|     28|    }
  346|  3.85k|     else
  347|  3.85k|    {
  348|       |        // Create a reader over a memory stream over the entity value
  349|  3.85k|        XMLReader* valueReader = fReaderMgr->createIntEntReader
  350|  3.85k|        (
  351|  3.85k|            decl->getName()
  352|  3.85k|            , inLiteral ? XMLReader::RefFrom_Literal : XMLReader::RefFrom_NonLiteral
  ------------------
  |  Branch (352:15): [True: 0, False: 3.85k]
  ------------------
  353|  3.85k|            , XMLReader::Type_PE
  354|  3.85k|            , decl->getValue()
  355|  3.85k|            , decl->getValueLen()
  356|  3.85k|            , false
  357|  3.85k|        );
  358|       |
  359|       |        //
  360|       |        //  Trt to push the entity reader onto the reader manager stack,
  361|       |        //  where it will become the subsequent input. If it fails, that
  362|       |        //  means the entity is recursive, so issue an error. The reader
  363|       |        //  will have just been discarded, but we just keep going.
  364|       |        //
  365|  3.85k|        if (!fReaderMgr->pushReader(valueReader, decl))
  ------------------
  |  Branch (365:13): [True: 0, False: 3.85k]
  ------------------
  366|      0|            fScanner->emitError(XMLErrs::RecursiveEntity, decl->getName());
  367|  3.85k|    }
  368|       |
  369|  3.88k|    return true;
  370|  3.91k|}
_ZN11xercesc_3_210DTDScanner10scanAttDefERNS_14DTDElementDeclERNS_9XMLBufferE:
  404|  22.4k|{
  405|       |    // Check for PE ref or optional whitespace
  406|  22.4k|    checkForPERef(false, true);
  407|       |
  408|       |    // Get the name of the attribute
  409|  22.4k|    if (!fReaderMgr->getName(bufToUse))
  ------------------
  |  Branch (409:9): [True: 12, False: 22.4k]
  ------------------
  410|     12|    {
  411|     12|        fScanner->emitError(XMLErrs::ExpectedAttrName);
  412|     12|        return 0;
  413|     12|    }
  414|       |
  415|       |    //
  416|       |    //  Look up this attribute in the parent element's attribute list. If
  417|       |    //  it already exists, then use the dummy.
  418|       |    //
  419|  22.4k|    DTDAttDef* decl = parentElem.getAttDef(bufToUse.getRawBuffer());
  420|  22.4k|    if (decl)
  ------------------
  |  Branch (420:9): [True: 8.28k, False: 14.1k]
  ------------------
  421|  8.28k|    {
  422|       |        // It already exists, so put out a warning
  423|  8.28k|        fScanner->emitError
  424|  8.28k|        (
  425|  8.28k|            XMLErrs::AttListAlreadyExists
  426|  8.28k|            , bufToUse.getRawBuffer()
  427|  8.28k|            , parentElem.getFullName()
  428|  8.28k|        );
  429|       |
  430|       |        // Use the dummy decl to parse into and set its name to the name we got
  431|  8.28k|        if (!fDumAttDef)
  ------------------
  |  Branch (431:13): [True: 212, False: 8.07k]
  ------------------
  432|    212|        {
  433|    212|            fDumAttDef = new (fMemoryManager) DTDAttDef(fMemoryManager);
  434|    212|            fDumAttDef->setId(fNextAttrId++);
  435|    212|        }
  436|  8.28k|        fDumAttDef->setName(bufToUse.getRawBuffer());
  437|  8.28k|        decl = fDumAttDef;
  438|  8.28k|    }
  439|  14.1k|     else
  440|  14.1k|    {
  441|       |        //
  442|       |        //  It does not already exist so create a new one, give it the next
  443|       |        //  available unique id, and add it
  444|       |        //
  445|  14.1k|        decl = new (fGrammarPoolMemoryManager) DTDAttDef
  446|  14.1k|        (
  447|  14.1k|            bufToUse.getRawBuffer()
  448|  14.1k|            , XMLAttDef::CData
  449|  14.1k|            , XMLAttDef::Implied
  450|  14.1k|            , fGrammarPoolMemoryManager
  451|  14.1k|        );
  452|  14.1k|        decl->setId(fNextAttrId++);
  453|  14.1k|        decl->setExternalAttDeclaration(isReadingExternalEntity());
  454|  14.1k|        parentElem.addAttDef(decl);
  455|  14.1k|    }
  456|       |
  457|       |    // Set a flag to indicate whether we are doing a dummy parse
  458|  22.4k|    const bool isIgnored = (decl == fDumAttDef);
  459|       |
  460|       |    // Space is required here, so check for PE ref, and require space
  461|  22.4k|    if (!checkForPERef(false, true))
  ------------------
  |  Branch (461:9): [True: 86, False: 22.3k]
  ------------------
  462|     86|        fScanner->emitError(XMLErrs::ExpectedWhitespace);
  463|       |
  464|       |    //
  465|       |    //  Next has to be one of the attribute type strings. This tells us what
  466|       |    //  is to follow.
  467|       |    //
  468|  22.4k|    if (fReaderMgr->skippedString(XMLUni::fgCDATAString))
  ------------------
  |  Branch (468:9): [True: 188, False: 22.2k]
  ------------------
  469|    188|    {
  470|    188|        decl->setType(XMLAttDef::CData);
  471|    188|    }
  472|  22.2k|     else if (fReaderMgr->skippedString(XMLUni::fgIDString))
  ------------------
  |  Branch (472:15): [True: 4.05k, False: 18.2k]
  ------------------
  473|  4.05k|    {
  474|  4.05k|        if (!fReaderMgr->skippedString(XMLUni::fgRefString))
  ------------------
  |  Branch (474:13): [True: 802, False: 3.25k]
  ------------------
  475|    802|            decl->setType(XMLAttDef::ID);
  476|  3.25k|        else if (!fReaderMgr->skippedChar(chLatin_S))
  ------------------
  |  Branch (476:18): [True: 2.09k, False: 1.16k]
  ------------------
  477|  2.09k|            decl->setType(XMLAttDef::IDRef);
  478|  1.16k|        else
  479|  1.16k|            decl->setType(XMLAttDef::IDRefs);
  480|  4.05k|    }
  481|  18.2k|     else if (fReaderMgr->skippedString(XMLUni::fgEntitString))
  ------------------
  |  Branch (481:15): [True: 5.77k, False: 12.4k]
  ------------------
  482|  5.77k|    {
  483|  5.77k|        if (fReaderMgr->skippedChar(chLatin_Y))
  ------------------
  |  Branch (483:13): [True: 745, False: 5.02k]
  ------------------
  484|    745|        {
  485|    745|            decl->setType(XMLAttDef::Entity);
  486|    745|        }
  487|  5.02k|         else if (fReaderMgr->skippedString(XMLUni::fgIESString))
  ------------------
  |  Branch (487:19): [True: 5.02k, False: 2]
  ------------------
  488|  5.02k|        {
  489|  5.02k|            decl->setType(XMLAttDef::Entities);
  490|  5.02k|        }
  491|      2|         else
  492|      2|        {
  493|      2|            fScanner->emitError
  494|      2|            (
  495|      2|                XMLErrs::ExpectedAttributeType
  496|      2|                , decl->getFullName()
  497|      2|                , parentElem.getFullName()
  498|      2|            );
  499|      2|            return 0;
  500|      2|        }
  501|  5.77k|    }
  502|  12.4k|     else if (fReaderMgr->skippedString(XMLUni::fgNmTokenString))
  ------------------
  |  Branch (502:15): [True: 170, False: 12.2k]
  ------------------
  503|    170|    {
  504|    170|        if (fReaderMgr->skippedChar(chLatin_S))
  ------------------
  |  Branch (504:13): [True: 130, False: 40]
  ------------------
  505|    130|            decl->setType(XMLAttDef::NmTokens);
  506|     40|        else
  507|     40|            decl->setType(XMLAttDef::NmToken);
  508|    170|    }
  509|  12.2k|     else if (fReaderMgr->skippedString(XMLUni::fgNotationString))
  ------------------
  |  Branch (509:15): [True: 178, False: 12.1k]
  ------------------
  510|    178|    {
  511|       |        // Check for PE ref and require space
  512|    178|        if (!checkForPERef(false, true))
  ------------------
  |  Branch (512:13): [True: 1, False: 177]
  ------------------
  513|      1|            fScanner->emitError(XMLErrs::ExpectedWhitespace);
  514|       |
  515|    178|        decl->setType(XMLAttDef::Notation);
  516|    178|        if (!scanEnumeration(*decl, bufToUse, true))
  ------------------
  |  Branch (516:13): [True: 0, False: 178]
  ------------------
  517|      0|            return 0;
  518|       |
  519|       |        // Set the value as the enumeration for this decl
  520|    178|        decl->setEnumeration(bufToUse.getRawBuffer());
  521|    178|    }
  522|  12.1k|     else if (fReaderMgr->skippedChar(chOpenParen))
  ------------------
  |  Branch (522:15): [True: 11.9k, False: 124]
  ------------------
  523|  11.9k|    {
  524|  11.9k|        decl->setType(XMLAttDef::Enumeration);
  525|  11.9k|        if (!scanEnumeration(*decl, bufToUse, false))
  ------------------
  |  Branch (525:13): [True: 0, False: 11.9k]
  ------------------
  526|      0|            return 0;
  527|       |
  528|       |        // Set the value as the enumeration for this decl
  529|  11.9k|        decl->setEnumeration(bufToUse.getRawBuffer());
  530|  11.9k|    }
  531|    124|     else
  532|    124|    {
  533|    124|        fScanner->emitError
  534|    124|        (
  535|    124|            XMLErrs::ExpectedAttributeType
  536|    124|            , decl->getFullName()
  537|    124|            , parentElem.getFullName()
  538|    124|        );
  539|    124|        return 0;
  540|    124|    }
  541|       |
  542|       |    // Space is required here, so check for PE ref, and require space
  543|  22.3k|    if (!checkForPERef(false, true))
  ------------------
  |  Branch (543:9): [True: 18, False: 22.3k]
  ------------------
  544|     18|        fScanner->emitError(XMLErrs::ExpectedWhitespace);
  545|       |
  546|       |    // And then scan for the optional default value declaration
  547|  22.3k|    scanDefaultDecl(*decl);
  548|       |
  549|       |    // If validating, then do a couple of validation constraints
  550|  22.3k|    if (fScanner->getValidationScheme() == XMLScanner::Val_Always)
  ------------------
  |  Branch (550:9): [True: 0, False: 22.3k]
  ------------------
  551|      0|    {
  552|      0|        if (decl->getType() == XMLAttDef::ID)
  ------------------
  |  Branch (552:13): [True: 0, False: 0]
  ------------------
  553|      0|        {
  554|      0|            if ((decl->getDefaultType() != XMLAttDef::Implied)
  ------------------
  |  Branch (554:17): [True: 0, False: 0]
  ------------------
  555|      0|            &&  (decl->getDefaultType() != XMLAttDef::Required))
  ------------------
  |  Branch (555:17): [True: 0, False: 0]
  ------------------
  556|      0|            {
  557|      0|                fScanner->getValidator()->emitError(XMLValid::BadIDAttrDefType, decl->getFullName());
  558|      0|            }
  559|      0|        }
  560|       |
  561|       |        // if attdef is xml:space, check correct enumeration (default|preserve)
  562|      0|        const XMLCh fgXMLSpace[] = { chLatin_x, chLatin_m, chLatin_l, chColon, chLatin_s, chLatin_p, chLatin_a, chLatin_c, chLatin_e, chNull };
  563|       |
  564|      0|        if (XMLString::equals(decl->getFullName(),fgXMLSpace)) {
  ------------------
  |  Branch (564:13): [True: 0, False: 0]
  ------------------
  565|      0|            const XMLCh fgPreserve[] = { chLatin_p, chLatin_r, chLatin_e, chLatin_s, chLatin_e, chLatin_r, chLatin_v, chLatin_e, chNull };
  566|      0|            const XMLCh fgDefault[] = { chLatin_d, chLatin_e, chLatin_f, chLatin_a, chLatin_u, chLatin_l, chLatin_t, chNull };
  567|      0|            bool ok = false;
  568|      0|            if (decl->getType() == XMLAttDef::Enumeration) {
  ------------------
  |  Branch (568:17): [True: 0, False: 0]
  ------------------
  569|      0|                BaseRefVectorOf<XMLCh>* enumVector = XMLString::tokenizeString(decl->getEnumeration(), fMemoryManager);
  570|      0|                XMLSize_t size = enumVector->size();
  571|      0|                ok = (size == 1 &&
  ------------------
  |  Branch (571:23): [True: 0, False: 0]
  ------------------
  572|      0|                     (XMLString::equals(enumVector->elementAt(0), fgDefault) ||
  ------------------
  |  Branch (572:23): [True: 0, False: 0]
  ------------------
  573|      0|                      XMLString::equals(enumVector->elementAt(0), fgPreserve))) ||
  ------------------
  |  Branch (573:23): [True: 0, False: 0]
  ------------------
  574|      0|                     (size == 2 &&
  ------------------
  |  Branch (574:23): [True: 0, False: 0]
  ------------------
  575|      0|                     (XMLString::equals(enumVector->elementAt(0), fgDefault) &&
  ------------------
  |  Branch (575:23): [True: 0, False: 0]
  ------------------
  576|      0|                      XMLString::equals(enumVector->elementAt(1), fgPreserve))) ||
  ------------------
  |  Branch (576:23): [True: 0, False: 0]
  ------------------
  577|      0|                     (size == 2 &&
  ------------------
  |  Branch (577:23): [True: 0, False: 0]
  ------------------
  578|      0|                     (XMLString::equals(enumVector->elementAt(1), fgDefault) &&
  ------------------
  |  Branch (578:23): [True: 0, False: 0]
  ------------------
  579|      0|                      XMLString::equals(enumVector->elementAt(0), fgPreserve)));
  ------------------
  |  Branch (579:23): [True: 0, False: 0]
  ------------------
  580|      0|                delete enumVector;
  581|      0|            }
  582|      0|            if (!ok)
  ------------------
  |  Branch (582:17): [True: 0, False: 0]
  ------------------
  583|      0|                fScanner->getValidator()->emitError(XMLValid::IllegalXMLSpace);
  584|      0|        }
  585|      0|    }
  586|       |
  587|       |    // If we have a doc type handler, tell it about this attdef.
  588|  22.3k|    if (fDocTypeHandler)
  ------------------
  |  Branch (588:9): [True: 0, False: 22.3k]
  ------------------
  589|      0|        fDocTypeHandler->attDef(parentElem, *decl, isIgnored);
  590|  22.3k|    return decl;
  591|  22.4k|}
_ZN11xercesc_3_210DTDScanner15scanAttListDeclEv:
  595|  2.90k|{
  596|       |    // Space is required here, so check for a PE ref
  597|  2.90k|    if (!checkForPERef(false, true))
  ------------------
  |  Branch (597:9): [True: 1, False: 2.89k]
  ------------------
  598|      1|    {
  599|      1|        fScanner->emitError(XMLErrs::ExpectedWhitespace);
  600|      1|        fReaderMgr->skipPastChar(chCloseAngle);
  601|      1|        return;
  602|      1|    }
  603|       |
  604|       |    //
  605|       |    //  Next should be the name of the element it belongs to, so get a buffer
  606|       |    //  and get the name into it.
  607|       |    //
  608|  2.89k|    XMLBufBid bbName(fBufMgr);
  609|  2.89k|    if (!fReaderMgr->getName(bbName.getBuffer()))
  ------------------
  |  Branch (609:9): [True: 1, False: 2.89k]
  ------------------
  610|      1|    {
  611|      1|        fScanner->emitError(XMLErrs::ExpectedElementName);
  612|      1|        fReaderMgr->skipPastChar(chCloseAngle);
  613|      1|        return;
  614|      1|    }
  615|       |
  616|       |    //
  617|       |    //  Find this element's declaration. If it has not been declared yet,
  618|       |    //  we will force one into the list, but not mark it as declared.
  619|       |    //
  620|  2.89k|    DTDElementDecl* elemDecl = (DTDElementDecl*) fDTDGrammar->getElemDecl(fEmptyNamespaceId, 0, bbName.getRawBuffer(), Grammar::TOP_LEVEL_SCOPE);
  621|  2.89k|    if (!elemDecl)
  ------------------
  |  Branch (621:9): [True: 1.92k, False: 973]
  ------------------
  622|  1.92k|    {
  623|       |        //
  624|       |        //  Lets fault in a declaration and add it to the pool. We mark
  625|       |        //  it having been created because of an attlist. Later, if its
  626|       |        //  declared, this will be updated.
  627|       |        //
  628|  1.92k|        elemDecl = new (fGrammarPoolMemoryManager) DTDElementDecl
  629|  1.92k|        (
  630|  1.92k|            bbName.getRawBuffer()
  631|  1.92k|            , fEmptyNamespaceId
  632|  1.92k|            , DTDElementDecl::Any
  633|  1.92k|            , fGrammarPoolMemoryManager
  634|  1.92k|        );
  635|  1.92k|        elemDecl->setCreateReason(XMLElementDecl::AttList);
  636|  1.92k|        elemDecl->setExternalElemDeclaration(isReadingExternalEntity());
  637|  1.92k|        fDTDGrammar->putElemDecl((XMLElementDecl*) elemDecl);
  638|  1.92k|    }
  639|       |
  640|       |    // If we have a doc type handler, tell it the att list is starting
  641|  2.89k|    if (fDocTypeHandler)
  ------------------
  |  Branch (641:9): [True: 0, False: 2.89k]
  ------------------
  642|      0|        fDocTypeHandler->startAttList(*elemDecl);
  643|       |
  644|       |    //
  645|       |    //  Now we loop until we are done with all of the attributes in this
  646|       |    //  list. We need a buffer to use for local processing.
  647|       |    //
  648|  2.89k|    XMLBufBid   bbTmp(fBufMgr);
  649|  2.89k|    XMLBuffer&  tmpBuf = bbTmp.getBuffer();
  650|  2.89k|    bool        seenAnId = false;
  651|  36.0k|    while (true)
  ------------------
  |  Branch (651:12): [Folded - Ignored]
  ------------------
  652|  35.5k|    {
  653|       |        // Get the next char out and see what it tells us to do
  654|  35.5k|        const XMLCh nextCh = fReaderMgr->peekNextChar();
  655|       |
  656|       |        // Watch for EOF
  657|  35.5k|        if (!nextCh)
  ------------------
  |  Branch (657:13): [True: 22, False: 35.5k]
  ------------------
  658|     22|            ThrowXMLwithMemMgr(UnexpectedEOFException, XMLExcepts::Gen_UnexpectedEOF, fMemoryManager);
  ------------------
  |  |  264|     22|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  659|       |
  660|  35.5k|        if (nextCh == chCloseAngle)
  ------------------
  |  Branch (660:13): [True: 2.44k, False: 33.1k]
  ------------------
  661|  2.44k|        {
  662|       |            // We are done with this attribute list
  663|  2.44k|            fReaderMgr->getNextChar();
  664|  2.44k|            break;
  665|  2.44k|        }
  666|  33.1k|         else if (fReaderMgr->getCurrentReader()->isWhitespace(nextCh))
  ------------------
  |  Branch (666:19): [True: 10.6k, False: 22.4k]
  ------------------
  667|  10.6k|        {
  668|       |            //
  669|       |            //  If advanced callbacks are enabled and we have a doc
  670|       |            //  type handler, then gather up the white space and call
  671|       |            //  back on the doctype handler. Otherwise, just skip
  672|       |            //  whitespace.
  673|       |            //
  674|  10.6k|            if (fDocTypeHandler)
  ------------------
  |  Branch (674:17): [True: 0, False: 10.6k]
  ------------------
  675|      0|            {
  676|      0|                fReaderMgr->getSpaces(tmpBuf);
  677|      0|                fDocTypeHandler->doctypeWhitespace
  678|      0|                (
  679|      0|                    tmpBuf.getRawBuffer()
  680|      0|                    , tmpBuf.getLen()
  681|      0|                );
  682|      0|            }
  683|  10.6k|             else
  684|  10.6k|            {
  685|  10.6k|                fReaderMgr->skipPastSpaces();
  686|  10.6k|            }
  687|  10.6k|        }
  688|  22.4k|         else if (nextCh == chPercent)
  ------------------
  |  Branch (688:19): [True: 0, False: 22.4k]
  ------------------
  689|      0|        {
  690|       |            // Eat the percent and expand the ref
  691|      0|            fReaderMgr->getNextChar();
  692|      0|            expandPERef(false, false, true);
  693|      0|        }
  694|  22.4k|         else
  695|  22.4k|        {
  696|       |            //
  697|       |            //  It must be an attribute name, so scan it. We let
  698|       |            //  it use our local buffer for its name scanning.
  699|       |            //
  700|  22.4k|            XMLAttDef* attDef = scanAttDef(*elemDecl, tmpBuf);
  701|       |
  702|  22.4k|            if (!attDef)
  ------------------
  |  Branch (702:17): [True: 0, False: 22.4k]
  ------------------
  703|      0|            {
  704|      0|                fReaderMgr->skipPastChar(chCloseAngle);
  705|      0|                break;
  706|      0|            }
  707|       |
  708|       |            //
  709|       |            //  If we are validating and its an ID type, then we have to
  710|       |            //  make sure that we have not seen an id attribute yet. Set
  711|       |            //  the flag to say that we've seen one now also.
  712|       |            //
  713|  22.4k|            if (fScanner->getValidationScheme() == XMLScanner::Val_Always)
  ------------------
  |  Branch (713:17): [True: 0, False: 22.4k]
  ------------------
  714|      0|            {
  715|      0|                if (attDef->getType() == XMLAttDef::ID)
  ------------------
  |  Branch (715:21): [True: 0, False: 0]
  ------------------
  716|      0|                {
  717|      0|                    if (seenAnId)
  ------------------
  |  Branch (717:25): [True: 0, False: 0]
  ------------------
  718|      0|                        fScanner->getValidator()->emitError(XMLValid::MultipleIdAttrs, elemDecl->getFullName());
  719|      0|                    seenAnId = true;
  720|      0|                }
  721|      0|            }
  722|  22.4k|        }
  723|  35.5k|    }
  724|       |
  725|       |    // If we have a doc type handler, tell it the att list is ending
  726|  2.87k|    if (fDocTypeHandler)
  ------------------
  |  Branch (726:9): [True: 0, False: 2.87k]
  ------------------
  727|      0|        fDocTypeHandler->endAttList(*elemDecl);
  728|  2.87k|}
_ZN11xercesc_3_210DTDScanner12scanAttValueEPKDsRNS_9XMLBufferENS_9XMLAttDef8AttTypesE:
  746|  21.1k|{
  747|  21.1k|    enum States
  748|  21.1k|    {
  749|  21.1k|        InWhitespace
  750|  21.1k|        , InContent
  751|  21.1k|    };
  752|       |
  753|       |    // Reset the target buffer
  754|  21.1k|    toFill.reset();
  755|       |
  756|       |    // Get the next char which must be a single or double quote
  757|  21.1k|    XMLCh quoteCh;
  758|  21.1k|    if (!fReaderMgr->skipIfQuote(quoteCh))
  ------------------
  |  Branch (758:9): [True: 20, False: 21.1k]
  ------------------
  759|     20|        return false;
  760|       |
  761|       |    //
  762|       |    //  We have to get the current reader because we have to ignore closing
  763|       |    //  quotes until we hit the same reader again.
  764|       |    //
  765|  21.1k|    const XMLSize_t curReader = fReaderMgr->getCurrentReaderNum();
  766|       |
  767|       |    //
  768|       |    //  Loop until we get the attribute value. Note that we use a double
  769|       |    //  loop here to avoid the setup/teardown overhead of the exception
  770|       |    //  handler on every round.
  771|       |    //
  772|  21.1k|    XMLCh   nextCh;
  773|  21.1k|    XMLCh   secondCh = 0;
  774|  21.1k|    States  curState = InContent;
  775|  21.1k|    bool    firstNonWS = false;
  776|  21.1k|    bool    gotLeadingSurrogate = false;
  777|  21.1k|    bool    escaped;
  778|  21.1k|    while (true)
  ------------------
  |  Branch (778:12): [Folded - Ignored]
  ------------------
  779|  21.1k|    {
  780|  21.1k|    try
  781|  21.1k|    {
  782|  6.28M|        while(true)
  ------------------
  |  Branch (782:15): [Folded - Ignored]
  ------------------
  783|  6.28M|        {
  784|  6.28M|            nextCh = fReaderMgr->getNextChar();
  785|       |
  786|  6.28M|            if (!nextCh)
  ------------------
  |  Branch (786:17): [True: 117, False: 6.28M]
  ------------------
  787|    117|                ThrowXMLwithMemMgr(UnexpectedEOFException, XMLExcepts::Gen_UnexpectedEOF, fMemoryManager);
  ------------------
  |  |  264|    117|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  788|       |
  789|       |            // Check for our ending quote in the same entity
  790|  6.28M|            if (nextCh == quoteCh)
  ------------------
  |  Branch (790:17): [True: 30.2k, False: 6.25M]
  ------------------
  791|  30.2k|            {
  792|  30.2k|                if (curReader == fReaderMgr->getCurrentReaderNum())
  ------------------
  |  Branch (792:21): [True: 20.9k, False: 9.35k]
  ------------------
  793|  20.9k|                    return true;
  794|       |
  795|       |                // Watch for spillover into a previous entity
  796|  9.35k|                if (curReader > fReaderMgr->getCurrentReaderNum())
  ------------------
  |  Branch (796:21): [True: 5, False: 9.34k]
  ------------------
  797|      5|                {
  798|      5|                    fScanner->emitError(XMLErrs::PartialMarkupInEntity);
  799|      5|                    return false;
  800|      5|                }
  801|  9.35k|            }
  802|       |
  803|       |            //
  804|       |            //  Check for an entity ref now, before we let it affect our
  805|       |            //  whitespace normalization logic below. We ignore the empty flag
  806|       |            //  in this one.
  807|       |            //
  808|  6.26M|            escaped = false;
  809|  6.26M|            if (nextCh == chAmpersand)
  ------------------
  |  Branch (809:17): [True: 28.5k, False: 6.23M]
  ------------------
  810|  28.5k|            {
  811|  28.5k|                if (scanEntityRef(nextCh, secondCh, escaped) != EntityExp_Returned)
  ------------------
  |  Branch (811:21): [True: 25.8k, False: 2.73k]
  ------------------
  812|  25.8k|                {
  813|  25.8k|                    gotLeadingSurrogate = false;
  814|  25.8k|                    continue;
  815|  25.8k|                }
  816|  28.5k|            }
  817|  6.23M|            else if ((nextCh >= 0xD800) && (nextCh <= 0xDBFF))
  ------------------
  |  Branch (817:22): [True: 7.65k, False: 6.22M]
  |  Branch (817:44): [True: 3.54k, False: 4.10k]
  ------------------
  818|  3.54k|            {
  819|       |                // Check for correct surrogate pairs
  820|  3.54k|                if (gotLeadingSurrogate)
  ------------------
  |  Branch (820:21): [True: 1, False: 3.54k]
  ------------------
  821|      1|                    fScanner->emitError(XMLErrs::Expected2ndSurrogateChar);
  822|  3.54k|                else
  823|  3.54k|                    gotLeadingSurrogate = true;
  824|  3.54k|            }
  825|  6.23M|             else
  826|  6.23M|            {
  827|  6.23M|                if (gotLeadingSurrogate)
  ------------------
  |  Branch (827:21): [True: 3.54k, False: 6.22M]
  ------------------
  828|  3.54k|                {
  829|  3.54k|                    if ((nextCh < 0xDC00) || (nextCh > 0xDFFF))
  ------------------
  |  Branch (829:25): [True: 9, False: 3.53k]
  |  Branch (829:46): [True: 2, False: 3.53k]
  ------------------
  830|     11|                        fScanner->emitError(XMLErrs::Expected2ndSurrogateChar);
  831|  3.54k|                }
  832|       |                // Its got to at least be a valid XML character
  833|  6.22M|                else if (!fReaderMgr->getCurrentReader()->isXMLChar(nextCh))
  ------------------
  |  Branch (833:26): [True: 17, False: 6.22M]
  ------------------
  834|     17|                {
  835|     17|                    XMLCh tmpBuf[9];
  836|     17|                    XMLString::binToText
  837|     17|                    (
  838|     17|                        nextCh
  839|     17|                        , tmpBuf
  840|     17|                        , 8
  841|     17|                        , 16
  842|     17|                        , fMemoryManager
  843|     17|                    );
  844|     17|                    fScanner->emitError
  845|     17|                    (
  846|     17|                        XMLErrs::InvalidCharacterInAttrValue
  847|     17|                        , attrName
  848|     17|                        , tmpBuf
  849|     17|                    );
  850|     17|                }
  851|       |
  852|  6.23M|                gotLeadingSurrogate = false;
  853|  6.23M|            }
  854|       |
  855|       |            //
  856|       |            //  If its not escaped, then make sure its not a < character, which
  857|       |            //  is not allowed in attribute values.
  858|       |            //
  859|  6.23M|            if (!escaped && (nextCh == chOpenAngle))
  ------------------
  |  Branch (859:17): [True: 6.23M, False: 2.76k]
  |  Branch (859:29): [True: 13, False: 6.23M]
  ------------------
  860|     13|                fScanner->emitError(XMLErrs::BracketInAttrValue, attrName);
  861|       |
  862|       |            //
  863|       |            //  If the attribute is a CDATA type we do simple replacement of
  864|       |            //  tabs and new lines with spaces, if the character is not escaped
  865|       |            //  by way of a char ref.
  866|       |            //
  867|       |            //  Otherwise, we do the standard non-CDATA normalization of
  868|       |            //  compressing whitespace to single spaces and getting rid of
  869|       |            //  leading and trailing whitespace.
  870|       |            //
  871|  6.23M|            if (type == XMLAttDef::CData)
  ------------------
  |  Branch (871:17): [True: 2.03M, False: 4.20M]
  ------------------
  872|  2.03M|            {
  873|  2.03M|                if (!escaped)
  ------------------
  |  Branch (873:21): [True: 2.03M, False: 1.95k]
  ------------------
  874|  2.03M|                {
  875|  2.03M|                    if ((nextCh == 0x09) || (nextCh == 0x0A) || (nextCh == 0x0D))
  ------------------
  |  Branch (875:25): [True: 3.96k, False: 2.02M]
  |  Branch (875:45): [True: 8.79k, False: 2.01M]
  |  Branch (875:65): [True: 2.38k, False: 2.01M]
  ------------------
  876|  15.1k|                        nextCh = chSpace;
  877|  2.03M|                }
  878|  2.03M|            }
  879|  4.20M|             else
  880|  4.20M|            {
  881|  4.20M|                if (curState == InWhitespace)
  ------------------
  |  Branch (881:21): [True: 417k, False: 3.78M]
  ------------------
  882|   417k|                {
  883|   417k|                    if (!fReaderMgr->getCurrentReader()->isWhitespace(nextCh))
  ------------------
  |  Branch (883:25): [True: 264k, False: 153k]
  ------------------
  884|   264k|                    {
  885|   264k|                        if (firstNonWS)
  ------------------
  |  Branch (885:29): [True: 258k, False: 5.66k]
  ------------------
  886|   258k|                            toFill.append(chSpace);
  887|   264k|                        curState = InContent;
  888|   264k|                        firstNonWS = true;
  889|   264k|                    }
  890|   153k|                     else
  891|   153k|                    {
  892|   153k|                        continue;
  893|   153k|                    }
  894|   417k|                }
  895|  3.78M|                 else if (curState == InContent)
  ------------------
  |  Branch (895:27): [True: 3.78M, False: 105]
  ------------------
  896|  3.78M|                {
  897|  3.78M|                    if (fReaderMgr->getCurrentReader()->isWhitespace(nextCh))
  ------------------
  |  Branch (897:25): [True: 270k, False: 3.51M]
  ------------------
  898|   270k|                    {
  899|   270k|                        curState = InWhitespace;
  900|   270k|                        continue;
  901|   270k|                    }
  902|  3.51M|                    firstNonWS = true;
  903|  3.51M|                }
  904|  4.20M|            }
  905|       |
  906|       |            // Else add it to the buffer
  907|  5.81M|            toFill.append(nextCh);
  908|       |
  909|  5.81M|            if (secondCh)
  ------------------
  |  Branch (909:17): [True: 876, False: 5.81M]
  ------------------
  910|    876|            {
  911|    876|                toFill.append(secondCh);
  912|    876|                secondCh=0;
  913|    876|            }
  914|  5.81M|        }
  915|  21.1k|    }
  916|       |
  917|  21.1k|    catch(const EndOfEntityException&)
  918|  21.1k|    {
  919|       |        // Just eat it and continue.
  920|      0|        gotLeadingSurrogate = false;
  921|      0|        escaped = false;
  922|      0|    }
  923|  21.1k|    }
  924|      0|    return true;
  925|  21.1k|}
_ZN11xercesc_3_210DTDScanner11scanCharRefERDsS1_:
  929|  4.14k|{
  930|  4.14k|    bool gotOne = false;
  931|  4.14k|    unsigned int value = 0;
  932|       |
  933|       |    //
  934|       |    //  Set the radix. Its supposed to be a lower case x if hex. But, in
  935|       |    //  order to recover well, we check for an upper and put out an error
  936|       |    //  for that.
  937|       |    //
  938|  4.14k|    unsigned int radix = 10;
  939|       |
  940|  4.14k|    if (fReaderMgr->skippedChar(chLatin_x))
  ------------------
  |  Branch (940:9): [True: 3.48k, False: 658]
  ------------------
  941|  3.48k|    {
  942|  3.48k|        radix = 16;
  943|  3.48k|    }
  944|    658|     else if (fReaderMgr->skippedChar(chLatin_X))
  ------------------
  |  Branch (944:15): [True: 0, False: 658]
  ------------------
  945|      0|    {
  946|      0|        fScanner->emitError(XMLErrs::HexRadixMustBeLowerCase);
  947|      0|        radix = 16;
  948|      0|    }
  949|       |
  950|  18.4k|    while (true)
  ------------------
  |  Branch (950:12): [Folded - Ignored]
  ------------------
  951|  18.4k|    {
  952|  18.4k|        const XMLCh nextCh = fReaderMgr->peekNextChar();
  953|       |
  954|       |        // Watch for EOF
  955|  18.4k|        if (!nextCh)
  ------------------
  |  Branch (955:13): [True: 7, False: 18.4k]
  ------------------
  956|      7|            ThrowXMLwithMemMgr(UnexpectedEOFException, XMLExcepts::Gen_UnexpectedEOF, fMemoryManager);
  ------------------
  |  |  264|      7|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  957|       |
  958|       |        // Break out on the terminating semicolon
  959|  18.4k|        if (nextCh == chSemiColon)
  ------------------
  |  Branch (959:13): [True: 4.11k, False: 14.3k]
  ------------------
  960|  4.11k|        {
  961|  4.11k|            fReaderMgr->getNextChar();
  962|  4.11k|            break;
  963|  4.11k|        }
  964|       |
  965|       |        //
  966|       |        //  Convert this char to a binary value, or bail out if its not
  967|       |        //  one.
  968|       |        //
  969|  14.3k|        unsigned int nextVal;
  970|  14.3k|        if ((nextCh >= chDigit_0) && (nextCh <= chDigit_9))
  ------------------
  |  Branch (970:13): [True: 14.3k, False: 6]
  |  Branch (970:38): [True: 1.51k, False: 12.8k]
  ------------------
  971|  1.51k|            nextVal = (unsigned int)(nextCh - chDigit_0);
  972|  12.8k|        else if ((nextCh >= chLatin_A) && (nextCh <= chLatin_F))
  ------------------
  |  Branch (972:18): [True: 12.8k, False: 9]
  |  Branch (972:43): [True: 11.3k, False: 1.49k]
  ------------------
  973|  11.3k|            nextVal= (unsigned int)(10 + (nextCh - chLatin_A));
  974|  1.50k|        else if ((nextCh >= chLatin_a) && (nextCh <= chLatin_f))
  ------------------
  |  Branch (974:18): [True: 1.49k, False: 11]
  |  Branch (974:43): [True: 1.48k, False: 11]
  ------------------
  975|  1.48k|            nextVal = (unsigned int)(10 + (nextCh - chLatin_a));
  976|     22|        else
  977|     22|        {
  978|       |            //
  979|       |            //  If we got at least a sigit, then do an unterminated ref
  980|       |            //  error. Else, do an expected a numerical ref thing.
  981|       |            //
  982|     22|            if (gotOne)
  ------------------
  |  Branch (982:17): [True: 13, False: 9]
  ------------------
  983|     13|                fScanner->emitError(XMLErrs::UnterminatedCharRef);
  984|      9|            else
  985|      9|                fScanner->emitError(XMLErrs::ExpectedNumericalCharRef);
  986|       |
  987|     22|            return false;
  988|     22|        }
  989|       |
  990|       |        //
  991|       |        //  Make sure its valid for the radix. If not, then just eat the
  992|       |        //  digit and go on after issueing an error. Else, update the
  993|       |        //  running value with this new digit.
  994|       |        //
  995|  14.3k|        if (nextVal >= radix)
  ------------------
  |  Branch (995:13): [True: 1, False: 14.3k]
  ------------------
  996|      1|        {
  997|      1|            XMLCh tmpStr[2];
  998|      1|            tmpStr[0] = nextCh;
  999|      1|            tmpStr[1] = chNull;
 1000|      1|            fScanner->emitError(XMLErrs::BadDigitForRadix, tmpStr);
 1001|      1|        }
 1002|  14.3k|         else
 1003|  14.3k|        {
 1004|  14.3k|            value = (value * radix) + nextVal;
 1005|  14.3k|        }
 1006|       |
 1007|       |        // Indicate that we got at least one good digit
 1008|  14.3k|        gotOne = true;
 1009|       |
 1010|       |        // Eat the char we just processed
 1011|  14.3k|        fReaderMgr->getNextChar();
 1012|  14.3k|    }
 1013|       |
 1014|       |    // Return the char (or chars)
 1015|       |    // And check if the character expanded is valid or not
 1016|  4.11k|    if (value >= 0x10000 && value <= 0x10FFFF)
  ------------------
  |  Branch (1016:9): [True: 2.31k, False: 1.80k]
  |  Branch (1016:29): [True: 2.26k, False: 48]
  ------------------
 1017|  2.26k|    {
 1018|  2.26k|        value -= 0x10000;
 1019|  2.26k|        first  = XMLCh((value >> 10) + 0xD800);
 1020|  2.26k|        second = XMLCh((value & 0x3FF) + 0xDC00);
 1021|  2.26k|    }
 1022|  1.85k|    else if (value <= 0xFFFD)
  ------------------
  |  Branch (1022:14): [True: 1.80k, False: 49]
  ------------------
 1023|  1.80k|    {
 1024|  1.80k|        first  = XMLCh(value);
 1025|  1.80k|        second = 0;
 1026|  1.80k|        if (!fReaderMgr->getCurrentReader()->isXMLChar(first) && !fReaderMgr->getCurrentReader()->isControlChar(first)) {
  ------------------
  |  Branch (1026:13): [True: 119, False: 1.68k]
  |  Branch (1026:66): [True: 1, False: 118]
  ------------------
 1027|       |            // Character reference was not in the valid range
 1028|      1|            fScanner->emitError(XMLErrs::InvalidCharacterRef);
 1029|      1|            return false;
 1030|      1|        }
 1031|  1.80k|    }
 1032|     49|    else {
 1033|       |        // Character reference was not in the valid range
 1034|     49|        fScanner->emitError(XMLErrs::InvalidCharacterRef);
 1035|     49|        return false;
 1036|     49|    }
 1037|       |
 1038|  4.06k|    return true;
 1039|  4.11k|}
_ZN11xercesc_3_210DTDScanner12scanChildrenERKNS_14DTDElementDeclERNS_9XMLBufferERj:
 1044|  26.8k|{
 1045|  26.8k|    if (depth++ > CONTENTSPEC_DEPTH_LIMIT) {
  ------------------
  |  |   47|  26.8k|#define CONTENTSPEC_DEPTH_LIMIT 1000
  ------------------
  |  Branch (1045:9): [True: 1, False: 26.8k]
  ------------------
 1046|      1|        fScanner->emitError(XMLErrs::UnterminatedDOCTYPE);
 1047|      1|        return 0;
 1048|      1|    }
 1049|       |
 1050|       |    // Check for a PE ref here, but don't require spaces
 1051|  26.8k|    checkForPERef(false, true);
 1052|       |
 1053|  26.8k|    ValueStackOf<XMLSize_t>* arrNestedDecl=NULL;
 1054|       |    //
 1055|       |    //  We know that the caller just saw an opening parenthesis, so we need
 1056|       |    //  to parse until we hit the end of it; if we find several parenthesis,
 1057|       |    //  store them in an array to be processed later.
 1058|       |    //
 1059|       |    //  We have to check for one up front, since it could be something like
 1060|       |    //  (((a)*)) etc...
 1061|       |    //
 1062|  26.8k|    ContentSpecNode* curNode = 0;
 1063|  52.1k|    while(fReaderMgr->skippedChar(chOpenParen))
  ------------------
  |  Branch (1063:11): [True: 25.3k, False: 26.8k]
  ------------------
 1064|  25.3k|    {
 1065|       |        // to check entity nesting
 1066|  25.3k|        const XMLSize_t curReader = fReaderMgr->getCurrentReaderNum();
 1067|  25.3k|        if(arrNestedDecl==NULL)
  ------------------
  |  Branch (1067:12): [True: 4.36k, False: 20.9k]
  ------------------
 1068|  4.36k|            arrNestedDecl=new (fMemoryManager) ValueStackOf<XMLSize_t>(5, fMemoryManager);
 1069|  25.3k|        arrNestedDecl->push(curReader);
 1070|       |
 1071|       |        // Check for a PE ref here, but don't require spaces
 1072|  25.3k|        checkForPERef(false, true);
 1073|  25.3k|    }
 1074|       |
 1075|       |    // We must find a leaf node here, either standalone or nested in the parenthesis
 1076|  26.8k|    if (!fReaderMgr->getName(bufToUse))
  ------------------
  |  Branch (1076:9): [True: 31, False: 26.7k]
  ------------------
 1077|     31|    {
 1078|     31|        fScanner->emitError(XMLErrs::ExpectedElementName);
 1079|     31|        return 0;
 1080|     31|    }
 1081|       |
 1082|       |    //
 1083|       |    //  Create a leaf node for it. If we can find the element id for
 1084|       |    //  this element, then use it. Else, we have to fault in an element
 1085|       |    //  decl, marked as created because of being in a content model.
 1086|       |    //
 1087|  26.7k|    XMLElementDecl* decl = fDTDGrammar->getElemDecl(fEmptyNamespaceId, 0, bufToUse.getRawBuffer(), Grammar::TOP_LEVEL_SCOPE);
 1088|  26.7k|    if (!decl)
  ------------------
  |  Branch (1088:9): [True: 3.45k, False: 23.3k]
  ------------------
 1089|  3.45k|    {
 1090|  3.45k|        decl = new (fGrammarPoolMemoryManager) DTDElementDecl
 1091|  3.45k|        (
 1092|  3.45k|            bufToUse.getRawBuffer()
 1093|  3.45k|            , fEmptyNamespaceId
 1094|  3.45k|            , DTDElementDecl::Any
 1095|  3.45k|            , fGrammarPoolMemoryManager
 1096|  3.45k|        );
 1097|  3.45k|        decl->setCreateReason(XMLElementDecl::InContentModel);
 1098|  3.45k|        decl->setExternalElemDeclaration(isReadingExternalEntity());
 1099|  3.45k|        fDTDGrammar->putElemDecl(decl);
 1100|  3.45k|    }
 1101|  26.7k|    curNode = new (fGrammarPoolMemoryManager) ContentSpecNode
 1102|  26.7k|    (
 1103|  26.7k|        decl->getElementName()
 1104|  26.7k|        , fGrammarPoolMemoryManager
 1105|  26.7k|    );
 1106|       |
 1107|       |    // Check for a PE ref here, but don't require spaces
 1108|  26.7k|    const bool gotSpaces = checkForPERef(false, true);
 1109|       |
 1110|       |    // Check for a repetition character after the leaf
 1111|  26.7k|    XMLCh repCh = fReaderMgr->peekNextChar();
 1112|  26.7k|    ContentSpecNode* tmpNode = makeRepNode(repCh, curNode, fGrammarPoolMemoryManager);
 1113|  26.7k|    if (tmpNode != curNode)
  ------------------
  |  Branch (1113:9): [True: 3.52k, False: 23.2k]
  ------------------
 1114|  3.52k|    {
 1115|  3.52k|        if (gotSpaces)
  ------------------
  |  Branch (1115:13): [True: 0, False: 3.52k]
  ------------------
 1116|      0|        {
 1117|      0|            if (fScanner->emitErrorWillThrowException(XMLErrs::UnexpectedWhitespace))
  ------------------
  |  Branch (1117:17): [True: 0, False: 0]
  ------------------
 1118|      0|            {
 1119|      0|                delete tmpNode;
 1120|      0|            }
 1121|      0|            fScanner->emitError(XMLErrs::UnexpectedWhitespace);
 1122|      0|        }
 1123|  3.52k|        fReaderMgr->getNextChar();
 1124|  3.52k|        curNode = tmpNode;
 1125|  3.52k|    }
 1126|       |
 1127|  40.9k|    while(arrNestedDecl==NULL || !arrNestedDecl->empty())
  ------------------
  |  Branch (1127:11): [True: 25.9k, False: 14.9k]
  |  Branch (1127:34): [True: 14.9k, False: 0]
  ------------------
 1128|  40.9k|    {
 1129|       |        // Check for a PE ref here, but don't require spaces
 1130|  40.9k|        checkForPERef(false, true);
 1131|       |
 1132|       |        //
 1133|       |        //  Ok, the next character tells us what kind of content this particular
 1134|       |        //  model this particular parentesized section is. Its either a choice if
 1135|       |        //  we see ',', a sequence if we see '|', or a single leaf node if we see
 1136|       |        //  a closing paren.
 1137|       |        //
 1138|  40.9k|        const XMLCh opCh = fReaderMgr->peekNextChar();
 1139|       |
 1140|  40.9k|        if ((opCh != chComma)
  ------------------
  |  Branch (1140:13): [True: 28.5k, False: 12.4k]
  ------------------
 1141|  40.9k|        &&  (opCh != chPipe)
  ------------------
  |  Branch (1141:13): [True: 11.9k, False: 16.6k]
  ------------------
 1142|  40.9k|        &&  (opCh != chCloseParen))
  ------------------
  |  Branch (1142:13): [True: 59, False: 11.8k]
  ------------------
 1143|     59|        {
 1144|       |            // Not a legal char, so delete our node and return failure
 1145|     59|            delete curNode;
 1146|     59|            fScanner->emitError(XMLErrs::ExpectedSeqChoiceLeaf);
 1147|     59|            return 0;
 1148|     59|        }
 1149|       |
 1150|       |        //
 1151|       |        //  Create the head node of the correct type. We need this to remember
 1152|       |        //  the top of the local tree. If it was a single subexpr, then just
 1153|       |        //  set the head node to the current node. For the others, we'll build
 1154|       |        //  the tree off the second child as we move across.
 1155|       |        //
 1156|  40.8k|        ContentSpecNode* headNode = 0;
 1157|  40.8k|        ContentSpecNode::NodeTypes curType = ContentSpecNode::UnknownType;
 1158|  40.8k|        if (opCh == chComma)
  ------------------
  |  Branch (1158:13): [True: 12.4k, False: 28.4k]
  ------------------
 1159|  12.4k|        {
 1160|  12.4k|            curType = ContentSpecNode::Sequence;
 1161|  12.4k|            headNode = new (fGrammarPoolMemoryManager) ContentSpecNode
 1162|  12.4k|            (
 1163|  12.4k|                curType
 1164|  12.4k|                , curNode
 1165|  12.4k|                , 0
 1166|  12.4k|                , true
 1167|  12.4k|                , true
 1168|  12.4k|                , fGrammarPoolMemoryManager
 1169|  12.4k|            );
 1170|  12.4k|            curNode = headNode;
 1171|  12.4k|        }
 1172|  28.4k|         else if (opCh == chPipe)
  ------------------
  |  Branch (1172:19): [True: 16.6k, False: 11.8k]
  ------------------
 1173|  16.6k|        {
 1174|  16.6k|            curType = ContentSpecNode::Choice;
 1175|  16.6k|            headNode = new (fGrammarPoolMemoryManager) ContentSpecNode
 1176|  16.6k|            (
 1177|  16.6k|                curType
 1178|  16.6k|                , curNode
 1179|  16.6k|                , 0
 1180|  16.6k|                , true
 1181|  16.6k|                , true
 1182|  16.6k|                , fGrammarPoolMemoryManager
 1183|  16.6k|            );
 1184|  16.6k|            curNode = headNode;
 1185|  16.6k|        }
 1186|  11.8k|         else
 1187|  11.8k|        {
 1188|  11.8k|            headNode = curNode;
 1189|  11.8k|            fReaderMgr->getNextChar();
 1190|  11.8k|        }
 1191|       |
 1192|       |        //
 1193|       |        //  If it was a sequence or choice, we just loop until we get to the
 1194|       |        //  end of our section, adding each new leaf or sub expression to the
 1195|       |        //  right child of the current node, and making that new node the current
 1196|       |        //  node.
 1197|       |        //
 1198|  40.8k|        if ((opCh == chComma) || (opCh == chPipe))
  ------------------
  |  Branch (1198:13): [True: 12.4k, False: 28.4k]
  |  Branch (1198:34): [True: 16.6k, False: 11.8k]
  ------------------
 1199|  29.0k|        {
 1200|  29.0k|            ContentSpecNode* lastNode = 0;
 1201|  1.83M|            while (true)
  ------------------
  |  Branch (1201:20): [Folded - Ignored]
  ------------------
 1202|  1.83M|            {
 1203|       |                //
 1204|       |                //  The next thing must either be another | or , character followed
 1205|       |                //  by another leaf or subexpression, or a closing parenthesis, or a
 1206|       |                //  PE ref.
 1207|       |                //
 1208|  1.83M|                if (fReaderMgr->lookingAtChar(chPercent))
  ------------------
  |  Branch (1208:21): [True: 0, False: 1.83M]
  ------------------
 1209|      0|                {
 1210|      0|                    checkForPERef(false, true);
 1211|      0|                }
 1212|  1.83M|                 else if (fReaderMgr->skippedSpace())
  ------------------
  |  Branch (1212:27): [True: 1.78k, False: 1.83M]
  ------------------
 1213|  1.78k|                {
 1214|       |                    // Just skip whitespace
 1215|  1.78k|                    fReaderMgr->skipPastSpaces();
 1216|  1.78k|                }
 1217|  1.83M|                 else if (fReaderMgr->skippedChar(chCloseParen))
  ------------------
  |  Branch (1217:27): [True: 25.5k, False: 1.80M]
  ------------------
 1218|  25.5k|                {
 1219|       |                    //
 1220|       |                    //  We've hit the end of this section, so break out. But, we
 1221|       |                    //  need to see if we left a partial sequence of choice node
 1222|       |                    //  without a second node. If so, we have to undo that and
 1223|       |                    //  put its left child into the right node of the previous
 1224|       |                    //  node.
 1225|       |                    //
 1226|  25.5k|                    if ((curNode->getType() == ContentSpecNode::Choice)
  ------------------
  |  Branch (1226:25): [True: 15.7k, False: 9.80k]
  ------------------
 1227|  25.5k|                    ||  (curNode->getType() == ContentSpecNode::Sequence))
  ------------------
  |  Branch (1227:25): [True: 9.80k, False: 0]
  ------------------
 1228|  25.5k|                    {
 1229|  25.5k|                        if (!curNode->getSecond() && lastNode)
  ------------------
  |  Branch (1229:29): [True: 25.5k, False: 0]
  |  Branch (1229:54): [True: 25.5k, False: 0]
  ------------------
 1230|  25.5k|                        {
 1231|  25.5k|                            ContentSpecNode* saveFirst = curNode->orphanFirst();
 1232|  25.5k|                            lastNode->setSecond(saveFirst);
 1233|  25.5k|                            curNode = lastNode;
 1234|  25.5k|                        }
 1235|  25.5k|                    }
 1236|  25.5k|                    break;
 1237|  25.5k|                }
 1238|  1.80M|                 else if (fReaderMgr->skippedChar(opCh))
  ------------------
  |  Branch (1238:27): [True: 1.80M, False: 50]
  ------------------
 1239|  1.80M|                {
 1240|       |                    // Check for a PE ref here, but don't require spaces
 1241|  1.80M|                    checkForPERef(false, true);
 1242|       |
 1243|  1.80M|                    if (fReaderMgr->skippedChar(chOpenParen))
  ------------------
  |  Branch (1243:25): [True: 22.2k, False: 1.78M]
  ------------------
 1244|  22.2k|                    {
 1245|  22.2k|                        const XMLSize_t curReader = fReaderMgr->getCurrentReaderNum();
 1246|       |
 1247|       |                        // Recurse to handle this new guy
 1248|  22.2k|                        ContentSpecNode* subNode;
 1249|  22.2k|                        try {
 1250|  22.2k|                            subNode = scanChildren(elemDecl, bufToUse, depth);
 1251|  22.2k|                        }
 1252|  22.2k|                        catch (const XMLErrs::Codes)
 1253|  22.2k|                        {
 1254|  3.12k|                            delete headNode;
 1255|  3.12k|                            throw;
 1256|  3.12k|                        }
 1257|       |
 1258|       |                        // If it failed, we are done, clean up here and return failure
 1259|  18.8k|                        if (!subNode)
  ------------------
  |  Branch (1259:29): [True: 0, False: 18.8k]
  ------------------
 1260|      0|                        {
 1261|      0|                            delete headNode;
 1262|      0|                            return 0;
 1263|      0|                        }
 1264|       |
 1265|  18.8k|                        if (curReader != fReaderMgr->getCurrentReaderNum() && fScanner->getValidationScheme() == XMLScanner::Val_Always)
  ------------------
  |  Branch (1265:29): [True: 43, False: 18.8k]
  |  Branch (1265:79): [True: 0, False: 43]
  ------------------
 1266|      0|                            fScanner->getValidator()->emitError(XMLValid::PartialMarkupInPE);
 1267|       |
 1268|       |                        // Else patch it in and make it the new current
 1269|  18.8k|                        ContentSpecNode* newCur = new (fGrammarPoolMemoryManager) ContentSpecNode
 1270|  18.8k|                        (
 1271|  18.8k|                            curType
 1272|  18.8k|                            , subNode
 1273|  18.8k|                            , 0
 1274|  18.8k|                            , true
 1275|  18.8k|                            , true
 1276|  18.8k|                            , fGrammarPoolMemoryManager
 1277|  18.8k|                        );
 1278|  18.8k|                        curNode->setSecond(newCur);
 1279|  18.8k|                        lastNode = curNode;
 1280|  18.8k|                        curNode = newCur;
 1281|  18.8k|                    }
 1282|  1.78M|                     else
 1283|  1.78M|                    {
 1284|       |                        //
 1285|       |                        //  Got to be a leaf node, so get a name. If we cannot get
 1286|       |                        //  one, then clean up and get outa here.
 1287|       |                        //
 1288|  1.78M|                        if (!fReaderMgr->getName(bufToUse))
  ------------------
  |  Branch (1288:29): [True: 25, False: 1.78M]
  ------------------
 1289|     25|                        {
 1290|     25|                            delete headNode;
 1291|     25|                            fScanner->emitError(XMLErrs::ExpectedElementName);
 1292|     25|                            return 0;
 1293|     25|                        }
 1294|       |
 1295|       |                        //
 1296|       |                        //  Create a leaf node for it. If we can find the element
 1297|       |                        //  id for this element, then use it. Else, we have to
 1298|       |                        //  fault in an element decl, marked as created because
 1299|       |                        //  of being in a content model.
 1300|       |                        //
 1301|  1.78M|                        XMLElementDecl* decl = fDTDGrammar->getElemDecl(fEmptyNamespaceId, 0, bufToUse.getRawBuffer(), Grammar::TOP_LEVEL_SCOPE);
 1302|  1.78M|                        if (!decl)
  ------------------
  |  Branch (1302:29): [True: 17.6k, False: 1.76M]
  ------------------
 1303|  17.6k|                        {
 1304|  17.6k|                            decl = new (fGrammarPoolMemoryManager) DTDElementDecl
 1305|  17.6k|                            (
 1306|  17.6k|                                bufToUse.getRawBuffer()
 1307|  17.6k|                                , fEmptyNamespaceId
 1308|  17.6k|                                , DTDElementDecl::Any
 1309|  17.6k|                                , fGrammarPoolMemoryManager
 1310|  17.6k|                            );
 1311|  17.6k|                            decl->setCreateReason(XMLElementDecl::InContentModel);
 1312|  17.6k|                            decl->setExternalElemDeclaration(isReadingExternalEntity());
 1313|  17.6k|                            fDTDGrammar->putElemDecl(decl);
 1314|  17.6k|                        }
 1315|       |
 1316|  1.78M|                        ContentSpecNode* tmpLeaf = new (fGrammarPoolMemoryManager) ContentSpecNode
 1317|  1.78M|                        (
 1318|  1.78M|                            decl->getElementName()
 1319|  1.78M|                            , fGrammarPoolMemoryManager
 1320|  1.78M|                        );
 1321|       |
 1322|       |                        // Check for a repetition character after the leaf
 1323|  1.78M|                        const XMLCh repCh = fReaderMgr->peekNextChar();
 1324|  1.78M|                        ContentSpecNode* tmpLeaf2 = makeRepNode(repCh, tmpLeaf, fGrammarPoolMemoryManager);
 1325|  1.78M|                        if (tmpLeaf != tmpLeaf2)
  ------------------
  |  Branch (1325:29): [True: 20.7k, False: 1.76M]
  ------------------
 1326|  20.7k|                            fReaderMgr->getNextChar();
 1327|       |
 1328|       |                        //
 1329|       |                        //  Create a new sequence or choice node, with the leaf
 1330|       |                        //  (or rep surrounding it) we just got as its first node.
 1331|       |                        //  Make the new node the second node of the current node,
 1332|       |                        //  and then make it the current node.
 1333|       |                        //
 1334|  1.78M|                        ContentSpecNode* newCur = new (fGrammarPoolMemoryManager) ContentSpecNode
 1335|  1.78M|                        (
 1336|  1.78M|                            curType
 1337|  1.78M|                            , tmpLeaf2
 1338|  1.78M|                            , 0
 1339|  1.78M|                            , true
 1340|  1.78M|                            , true
 1341|  1.78M|                            , fGrammarPoolMemoryManager
 1342|  1.78M|                        );
 1343|  1.78M|                        curNode->setSecond(newCur);
 1344|  1.78M|                        lastNode = curNode;
 1345|  1.78M|                        curNode = newCur;
 1346|  1.78M|                    }
 1347|  1.80M|                }
 1348|     50|                 else
 1349|     50|                {
 1350|       |                    // Cannot be valid
 1351|     50|                    delete headNode;  // emitError may do a throw so need to clean-up first
 1352|     50|                    if (opCh == chComma)
  ------------------
  |  Branch (1352:25): [True: 30, False: 20]
  ------------------
 1353|     30|                    {
 1354|     30|                        fScanner->emitError(XMLErrs::ExpectedChoiceOrCloseParen);
 1355|     30|                    }
 1356|     20|                     else
 1357|     20|                    {
 1358|     20|                        fScanner->emitError
 1359|     20|                        (
 1360|     20|                            XMLErrs::ExpectedSeqOrCloseParen
 1361|     20|                            , elemDecl.getFullName()
 1362|     20|                        );
 1363|     20|                    }                
 1364|     50|                    return 0;
 1365|     50|                }
 1366|  1.83M|            }
 1367|  29.0k|        }
 1368|       |
 1369|       |        //
 1370|       |        //  We saw the terminating parenthesis so lets check for any repetition
 1371|       |        //  character, and create a node for that, making the head node the child
 1372|       |        //  of it.
 1373|       |        //
 1374|  37.4k|        const XMLCh repCh = fReaderMgr->peekNextChar();
 1375|  37.4k|        curNode = makeRepNode(repCh, headNode, fGrammarPoolMemoryManager);
 1376|  37.4k|        if (curNode != headNode)
  ------------------
  |  Branch (1376:13): [True: 29.6k, False: 7.75k]
  ------------------
 1377|  29.6k|            fReaderMgr->getNextChar();
 1378|       |
 1379|       |        // prepare for recursion
 1380|  37.4k|        if(arrNestedDecl==NULL)
  ------------------
  |  Branch (1380:12): [True: 23.2k, False: 14.1k]
  ------------------
 1381|  23.2k|            break;
 1382|  14.1k|        else
 1383|  14.1k|        {
 1384|       |            // If that failed, no need to go further, return failure
 1385|  14.1k|            if (!curNode)
  ------------------
  |  Branch (1385:17): [True: 0, False: 14.1k]
  ------------------
 1386|      0|                return 0;
 1387|       |
 1388|  14.1k|            const XMLSize_t curReader = arrNestedDecl->pop();
 1389|  14.1k|            if (curReader != fReaderMgr->getCurrentReaderNum() && fScanner->getValidationScheme() == XMLScanner::Val_Always)
  ------------------
  |  Branch (1389:17): [True: 108, False: 14.0k]
  |  Branch (1389:67): [True: 0, False: 108]
  ------------------
 1390|      0|                fScanner->getValidator()->emitError(XMLValid::PartialMarkupInPE);
 1391|       |
 1392|  14.1k|            if(arrNestedDecl->empty())
  ------------------
  |  Branch (1392:16): [True: 3.51k, False: 10.6k]
  ------------------
 1393|  3.51k|            {
 1394|  3.51k|                delete arrNestedDecl;
 1395|  3.51k|                arrNestedDecl=NULL;
 1396|  3.51k|            }
 1397|  14.1k|        }
 1398|  37.4k|    }
 1399|       |
 1400|  23.2k|    return curNode;
 1401|  26.7k|}
_ZN11xercesc_3_210DTDScanner11scanCommentEv:
 1412|    291|{
 1413|    291|    enum States
 1414|    291|    {
 1415|    291|        InText
 1416|    291|        , OneDash
 1417|    291|        , TwoDashes
 1418|    291|    };
 1419|       |
 1420|       |    // Get a buffer for this
 1421|    291|    XMLBufBid bbComment(fBufMgr);
 1422|       |
 1423|       |    //
 1424|       |    //  Get the comment text into a temp buffer. Be sure to use temp buffer
 1425|       |    //  two here, since its to be used for stuff that is potentially longer
 1426|       |    //  than just a name.
 1427|       |    //
 1428|    291|    bool   gotLeadingSurrogate = false;
 1429|    291|    States curState = InText;
 1430|  2.36M|    while (true)
  ------------------
  |  Branch (1430:12): [Folded - Ignored]
  ------------------
 1431|  2.36M|    {
 1432|       |        // Get the next character
 1433|  2.36M|        const XMLCh nextCh = fReaderMgr->getNextChar();
 1434|       |
 1435|       |        //  Watch for an end of file
 1436|  2.36M|        if (!nextCh)
  ------------------
  |  Branch (1436:13): [True: 45, False: 2.36M]
  ------------------
 1437|     45|        {
 1438|     45|            fScanner->emitError(XMLErrs::UnterminatedComment);
 1439|     45|            ThrowXMLwithMemMgr(UnexpectedEOFException, XMLExcepts::Gen_UnexpectedEOF, fMemoryManager);
  ------------------
  |  |  264|     45|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
 1440|     45|        }
 1441|       |
 1442|       |        // Check for correct surrogate pairs
 1443|  2.36M|        if ((nextCh >= 0xD800) && (nextCh <= 0xDBFF))
  ------------------
  |  Branch (1443:13): [True: 1.03k, False: 2.36M]
  |  Branch (1443:35): [True: 416, False: 614]
  ------------------
 1444|    416|        {
 1445|    416|            if (gotLeadingSurrogate)
  ------------------
  |  Branch (1445:17): [True: 2, False: 414]
  ------------------
 1446|      2|                fScanner->emitError(XMLErrs::Expected2ndSurrogateChar);
 1447|    414|            else
 1448|    414|                gotLeadingSurrogate = true;
 1449|    416|        }
 1450|  2.36M|        else
 1451|  2.36M|        {
 1452|  2.36M|            if (gotLeadingSurrogate)
  ------------------
  |  Branch (1452:17): [True: 412, False: 2.36M]
  ------------------
 1453|    412|            {
 1454|    412|                if ((nextCh < 0xDC00) || (nextCh > 0xDFFF))
  ------------------
  |  Branch (1454:21): [True: 8, False: 404]
  |  Branch (1454:42): [True: 4, False: 400]
  ------------------
 1455|     12|                    fScanner->emitError(XMLErrs::Expected2ndSurrogateChar);
 1456|    412|            }
 1457|       |            // Its got to at least be a valid XML character
 1458|  2.36M|            else if (!fReaderMgr->getCurrentReader()->isXMLChar(nextCh)) {
  ------------------
  |  Branch (1458:22): [True: 5, False: 2.36M]
  ------------------
 1459|       |
 1460|      5|                XMLCh tmpBuf[9];
 1461|      5|                XMLString::binToText
 1462|      5|                (
 1463|      5|                    nextCh
 1464|      5|                    , tmpBuf
 1465|      5|                    , 8
 1466|      5|                    , 16
 1467|      5|                    , fMemoryManager
 1468|      5|                );
 1469|      5|                fScanner->emitError(XMLErrs::InvalidCharacter, tmpBuf);
 1470|      5|            }
 1471|       |
 1472|  2.36M|            gotLeadingSurrogate = false;
 1473|  2.36M|        }
 1474|       |
 1475|  2.36M|        if (curState == InText)
  ------------------
  |  Branch (1475:13): [True: 1.58M, False: 779k]
  ------------------
 1476|  1.58M|        {
 1477|       |            // If its a dash, go to OneDash state. Otherwise take as text
 1478|  1.58M|            if (nextCh == chDash)
  ------------------
  |  Branch (1478:17): [True: 779k, False: 804k]
  ------------------
 1479|   779k|                curState = OneDash;
 1480|   804k|            else
 1481|   804k|                bbComment.append(nextCh);
 1482|  1.58M|        }
 1483|   779k|        else if (curState == OneDash)
  ------------------
  |  Branch (1483:18): [True: 779k, False: 246]
  ------------------
 1484|   779k|        {
 1485|       |            //
 1486|       |            //  If its another dash, then we change to the two dashes states.
 1487|       |            //  Otherwise, we have to put in the deficit dash and the new
 1488|       |            //  character and go back to InText.
 1489|       |            //
 1490|   779k|            if (nextCh == chDash)
  ------------------
  |  Branch (1490:17): [True: 227, False: 778k]
  ------------------
 1491|    227|            {
 1492|    227|                curState = TwoDashes;
 1493|    227|            }
 1494|   778k|            else
 1495|   778k|            {
 1496|   778k|                bbComment.append(chDash);
 1497|   778k|                bbComment.append(nextCh);
 1498|   778k|                curState = InText;
 1499|   778k|            }
 1500|   779k|        }
 1501|    246|        else if (curState == TwoDashes)
  ------------------
  |  Branch (1501:18): [True: 226, False: 20]
  ------------------
 1502|    226|        {
 1503|       |            // The next character must be the closing bracket
 1504|    226|            if (nextCh != chCloseAngle)
  ------------------
  |  Branch (1504:17): [True: 8, False: 218]
  ------------------
 1505|      8|            {
 1506|      8|                fScanner->emitError(XMLErrs::IllegalSequenceInComment);
 1507|      8|                fReaderMgr->skipPastChar(chCloseAngle);
 1508|      8|                return;
 1509|      8|            }
 1510|    218|            break;
 1511|    226|        }
 1512|  2.36M|    }
 1513|       |
 1514|       |    // If there is a doc type handler, then pass on the comment stuff
 1515|    238|    if (fDocTypeHandler)
  ------------------
  |  Branch (1515:9): [True: 0, False: 238]
  ------------------
 1516|      0|        fDocTypeHandler->doctypeComment(bbComment.getRawBuffer());
 1517|    238|}
_ZN11xercesc_3_210DTDScanner15scanContentSpecERNS_14DTDElementDeclE:
 1521|  6.30k|{
 1522|       |    //
 1523|       |    //  Check for for a couple of the predefined content type strings. If
 1524|       |    //  its not one of these, its got to be a parenthesized reg ex type
 1525|       |    //  expression.
 1526|       |    //
 1527|  6.30k|    if (fReaderMgr->skippedString(XMLUni::fgEmptyString))
  ------------------
  |  Branch (1527:9): [True: 126, False: 6.17k]
  ------------------
 1528|    126|    {
 1529|    126|        toFill.setModelType(DTDElementDecl::Empty);
 1530|    126|        return true;
 1531|    126|    }
 1532|       |
 1533|  6.17k|    if (fReaderMgr->skippedString(XMLUni::fgAnyString))
  ------------------
  |  Branch (1533:9): [True: 609, False: 5.56k]
  ------------------
 1534|    609|    {
 1535|    609|        toFill.setModelType(DTDElementDecl::Any);
 1536|    609|        return true;
 1537|    609|    }
 1538|       |
 1539|       |    // Its got to be a parenthesized regular expression
 1540|  5.56k|    if (!fReaderMgr->skippedChar(chOpenParen))
  ------------------
  |  Branch (1540:9): [True: 4, False: 5.56k]
  ------------------
 1541|      4|    {
 1542|      4|        fScanner->emitError
 1543|      4|        (
 1544|      4|            XMLErrs::ExpectedContentSpecExpr
 1545|      4|            , toFill.getFullName()
 1546|      4|        );
 1547|      4|        return false;
 1548|      4|    }
 1549|       |
 1550|       |    // Get the current reader id, so we can test for partial markup
 1551|  5.56k|    const XMLSize_t curReader = fReaderMgr->getCurrentReaderNum();
 1552|       |
 1553|       |    // We could have a PE ref here, but don't require space
 1554|  5.56k|    checkForPERef(false, true);
 1555|       |
 1556|       |    //
 1557|       |    //  Now we look for a PCDATA string. If its PCDATA, then it must be a
 1558|       |    //  MIXED model. Otherwise, it must be a regular list of children in
 1559|       |    //  a regular expression perhaps.
 1560|       |    //
 1561|  5.56k|    bool status;
 1562|  5.56k|    if (fReaderMgr->skippedString(XMLUni::fgPCDATAString))
  ------------------
  |  Branch (1562:9): [True: 947, False: 4.61k]
  ------------------
 1563|    947|    {
 1564|       |        // Set the model to mixed
 1565|    947|        toFill.setModelType(DTDElementDecl::Mixed_Simple);
 1566|    947|        status = scanMixed(toFill);
 1567|       |
 1568|       |        //
 1569|       |        //  If we are validating we have to check that there are no multiple
 1570|       |        //  uses of any child elements.
 1571|       |        //
 1572|    947|        if (fScanner->getValidationScheme() == XMLScanner::Val_Always)
  ------------------
  |  Branch (1572:13): [True: 0, False: 947]
  ------------------
 1573|      0|        {
 1574|      0|            if (((const MixedContentModel*)toFill.getContentModel())->hasDups())
  ------------------
  |  Branch (1574:17): [True: 0, False: 0]
  ------------------
 1575|      0|                fScanner->getValidator()->emitError(XMLValid::RepElemInMixed);
 1576|      0|        }
 1577|    947|    }
 1578|  4.61k|     else
 1579|  4.61k|    {
 1580|       |        //
 1581|       |        //  We have to do a recursive scan of the content model. Create a
 1582|       |        //  buffer for it to use, for efficiency. It returns the top ofthe
 1583|       |        //  content spec node tree, which we set if successful.
 1584|       |        //
 1585|  4.61k|        toFill.setModelType(DTDElementDecl::Children);
 1586|  4.61k|        XMLBufBid bbTmp(fBufMgr);
 1587|  4.61k|        unsigned int depth = 0;
 1588|  4.61k|        ContentSpecNode* resNode = scanChildren(toFill, bbTmp.getBuffer(), depth);
 1589|  4.61k|        status = (resNode != 0);
 1590|  4.61k|        if (status)
  ------------------
  |  Branch (1590:13): [True: 4.43k, False: 176]
  ------------------
 1591|  4.43k|            toFill.setContentSpec(resNode);
 1592|  4.61k|    }
 1593|       |
 1594|       |    // Make sure we are on the same reader as where we started
 1595|  5.56k|    if (curReader != fReaderMgr->getCurrentReaderNum() && fScanner->getValidationScheme() == XMLScanner::Val_Always)
  ------------------
  |  Branch (1595:9): [True: 4, False: 5.55k]
  |  Branch (1595:59): [True: 0, False: 4]
  ------------------
 1596|      0|        fScanner->getValidator()->emitError(XMLValid::PartialMarkupInPE);
 1597|       |
 1598|  5.56k|    return status;
 1599|  5.56k|}
_ZN11xercesc_3_210DTDScanner15scanDefaultDeclERNS_9DTDAttDefE:
 1603|  22.3k|{
 1604|  22.3k|    if (fReaderMgr->skippedString(XMLUni::fgRequiredString))
  ------------------
  |  Branch (1604:9): [True: 160, False: 22.1k]
  ------------------
 1605|    160|    {
 1606|    160|        toFill.setDefaultType(XMLAttDef::Required);
 1607|    160|        return;
 1608|    160|    }
 1609|       |
 1610|  22.1k|    if (fReaderMgr->skippedString(XMLUni::fgImpliedString))
  ------------------
  |  Branch (1610:9): [True: 977, False: 21.1k]
  ------------------
 1611|    977|    {
 1612|    977|        toFill.setDefaultType(XMLAttDef::Implied);
 1613|    977|        return;
 1614|    977|    }
 1615|       |
 1616|  21.1k|    if (fReaderMgr->skippedString(XMLUni::fgFixedString))
  ------------------
  |  Branch (1616:9): [True: 285, False: 20.8k]
  ------------------
 1617|    285|    {
 1618|       |        //
 1619|       |        //  There must be space before the fixed value. If there is not, then
 1620|       |        //  emit an error but keep going.
 1621|       |        //
 1622|    285|        if (!fReaderMgr->skippedSpace())
  ------------------
  |  Branch (1622:13): [True: 1, False: 284]
  ------------------
 1623|      1|            fScanner->emitError(XMLErrs::ExpectedWhitespace);
 1624|    284|        else
 1625|    284|            fReaderMgr->skipPastSpaces();
 1626|    285|        toFill.setDefaultType(XMLAttDef::Fixed);
 1627|    285|    }
 1628|  20.8k|     else
 1629|  20.8k|    {
 1630|  20.8k|        toFill.setDefaultType(XMLAttDef::Default);
 1631|  20.8k|    }
 1632|       |
 1633|       |    //
 1634|       |    //  If we got here, its fixed or default, so we need to get a value.
 1635|       |    //  If we don't, then emit an error but just set the default value to
 1636|       |    //  an empty string and try to keep going.
 1637|       |    //
 1638|       |    // Check for PE ref or optional whitespace
 1639|  21.1k|    checkForPERef(false, true);
 1640|       |
 1641|  21.1k|    XMLBufBid bbValue(fBufMgr);
 1642|  21.1k|    if (!scanAttValue(toFill.getFullName(), bbValue.getBuffer(), toFill.getType()))
  ------------------
  |  Branch (1642:9): [True: 20, False: 21.1k]
  ------------------
 1643|     20|        fScanner->emitError(XMLErrs::ExpectedDefAttrDecl);
 1644|       |
 1645|  21.1k|    toFill.setValue(bbValue.getRawBuffer());
 1646|  21.1k|}
_ZN11xercesc_3_210DTDScanner15scanElementDeclEv:
 1655|  6.31k|{
 1656|       |    //
 1657|       |    //  Space is legal (required actually) here so check for a PE ref. If
 1658|       |    //  we don't get our whitespace, then issue and error, but try to keep
 1659|       |    //  going.
 1660|       |    //
 1661|  6.31k|    if (!checkForPERef(false, true))
  ------------------
  |  Branch (1661:9): [True: 0, False: 6.31k]
  ------------------
 1662|      0|        fScanner->emitError(XMLErrs::ExpectedWhitespace);
 1663|       |
 1664|       |    // Get a buffer for the element name and scan in the name
 1665|  6.31k|    XMLBufBid bbName(fBufMgr);
 1666|  6.31k|    if (!fReaderMgr->getName(bbName.getBuffer()))
  ------------------
  |  Branch (1666:9): [True: 1, False: 6.31k]
  ------------------
 1667|      1|    {
 1668|      1|        fScanner->emitError(XMLErrs::ExpectedElementName);
 1669|      1|        fReaderMgr->skipPastChar(chCloseAngle);
 1670|      1|        return;
 1671|      1|    }
 1672|       |
 1673|       |    // Look this guy up in the element decl pool
 1674|  6.31k|    DTDElementDecl* decl = (DTDElementDecl*) fDTDGrammar->getElemDecl(fEmptyNamespaceId, 0, bbName.getRawBuffer(), Grammar::TOP_LEVEL_SCOPE);
 1675|       |
 1676|       |    //
 1677|       |    //  If it does not exist, then we need to create it. If it does and
 1678|       |    //  its marked as declared, then that's an error, but we still need to
 1679|       |    //  scan over the content model so use the dummy declaration that the
 1680|       |    //  parsing code can fill in.
 1681|       |    //
 1682|  6.31k|    if (decl)
  ------------------
  |  Branch (1682:9): [True: 3.49k, False: 2.81k]
  ------------------
 1683|  3.49k|    {
 1684|  3.49k|        if (decl->isDeclared())
  ------------------
  |  Branch (1684:13): [True: 3.42k, False: 75]
  ------------------
 1685|  3.42k|        {
 1686|  3.42k|            if (fScanner->getValidationScheme() == XMLScanner::Val_Always)
  ------------------
  |  Branch (1686:17): [True: 0, False: 3.42k]
  ------------------
 1687|      0|                fScanner->getValidator()->emitError(XMLValid::ElementAlreadyExists, bbName.getRawBuffer());
 1688|       |
 1689|  3.42k|            if (!fDumElemDecl)
  ------------------
  |  Branch (1689:17): [True: 176, False: 3.24k]
  ------------------
 1690|    176|                fDumElemDecl = new (fMemoryManager) DTDElementDecl
 1691|    176|                (
 1692|    176|                    bbName.getRawBuffer()
 1693|    176|                    , fEmptyNamespaceId
 1694|    176|                    , DTDElementDecl::Any
 1695|    176|                    , fMemoryManager
 1696|    176|                );
 1697|  3.24k|            else
 1698|  3.24k|                fDumElemDecl->setElementName(bbName.getRawBuffer(),fEmptyNamespaceId);
 1699|  3.42k|        }
 1700|  3.49k|    }
 1701|  2.81k|     else
 1702|  2.81k|    {
 1703|       |        //
 1704|       |        //  Create the new empty declaration to fill in and put it into
 1705|       |        //  the decl pool.
 1706|       |        //
 1707|  2.81k|        decl = new (fGrammarPoolMemoryManager) DTDElementDecl
 1708|  2.81k|        (
 1709|  2.81k|            bbName.getRawBuffer()
 1710|  2.81k|            , fEmptyNamespaceId
 1711|  2.81k|            , DTDElementDecl::Any
 1712|  2.81k|            , fGrammarPoolMemoryManager
 1713|  2.81k|        );
 1714|  2.81k|        fDTDGrammar->putElemDecl(decl);
 1715|  2.81k|    }
 1716|       |
 1717|       |    // Set a flag for whether we will ignore this one
 1718|  6.31k|    const bool isIgnored = (decl == fDumElemDecl);
 1719|       |
 1720|       |    // Mark this one if being externally declared
 1721|  6.31k|    decl->setExternalElemDeclaration(isReadingExternalEntity());
 1722|       |
 1723|       |    // Mark this one as being declared
 1724|  6.31k|    decl->setCreateReason(XMLElementDecl::Declared);
 1725|       |
 1726|       |    // Another check for a PE ref, with at least required whitespace
 1727|  6.31k|    if (!checkForPERef(false, true))
  ------------------
  |  Branch (1727:9): [True: 12, False: 6.30k]
  ------------------
 1728|     12|        fScanner->emitError(XMLErrs::ExpectedWhitespace);
 1729|       |
 1730|       |    // And now scan the content model for this guy.
 1731|  6.31k|    if (!scanContentSpec(*decl))
  ------------------
  |  Branch (1731:9): [True: 0, False: 6.31k]
  ------------------
 1732|      0|    {
 1733|      0|        fReaderMgr->skipPastChar(chCloseAngle);
 1734|      0|        return;
 1735|      0|    }
 1736|       |
 1737|       |    // Another check for a PE ref, but we don't require whitespace here
 1738|  6.31k|    checkForPERef(false, true);
 1739|       |
 1740|       |    // And we should have the ending angle bracket
 1741|  6.31k|    if (!fReaderMgr->skippedChar(chCloseAngle))
  ------------------
  |  Branch (1741:9): [True: 23, False: 6.28k]
  ------------------
 1742|     23|    {
 1743|     23|        fScanner->emitError(XMLErrs::UnterminatedElementDecl, bbName.getRawBuffer());
 1744|     23|        fReaderMgr->skipPastChar(chCloseAngle);
 1745|     23|    }
 1746|       |
 1747|       |    //
 1748|       |    //  If we have a DTD handler tell it about the new element decl. We
 1749|       |    //  tell it if its one that can be ignored, cause its an override of a
 1750|       |    //  previously existing decl. If it is being ignored, only call back
 1751|       |    //  if advanced callbacks are enabled.
 1752|       |    //
 1753|  6.31k|    if (fDocTypeHandler)
  ------------------
  |  Branch (1753:9): [True: 0, False: 6.31k]
  ------------------
 1754|      0|        fDocTypeHandler->elementDecl(*decl, isIgnored);
 1755|  6.31k|}
_ZN11xercesc_3_210DTDScanner14scanEntityDeclEv:
 1766|  9.87k|{
 1767|       |    //
 1768|       |    //  Space is required here, but we cannot check for a PE Ref since
 1769|       |    //  there could be a legal (no-ref) percent sign here. Since any
 1770|       |    //  entity that ended here would be illegal, we just skip spaces
 1771|       |    //  and then check for a percent.
 1772|       |    //
 1773|  9.87k|    if (!fReaderMgr->lookingAtSpace())
  ------------------
  |  Branch (1773:9): [True: 3, False: 9.87k]
  ------------------
 1774|      3|        fScanner->emitError(XMLErrs::ExpectedWhitespace);
 1775|  9.87k|    else
 1776|  9.87k|        fReaderMgr->skipPastSpaces();
 1777|  9.87k|    bool isPEDecl = fReaderMgr->skippedChar(chPercent);
 1778|       |
 1779|       |    //
 1780|       |    //  If a PE decl, then check if it is followed by a space; if it is so, 
 1781|       |    //  eat the percent and check for spaces or a PE ref on the other side of it. 
 1782|       |    //  Otherwise, it has to be an entity reference for a general entity.
 1783|       |    //
 1784|  9.87k|    if (isPEDecl)
  ------------------
  |  Branch (1784:9): [True: 3.07k, False: 6.79k]
  ------------------
 1785|  3.07k|    {
 1786|  3.07k|        if(!fReaderMgr->getCurrentReader()->isWhitespace(fReaderMgr->peekNextChar()))
  ------------------
  |  Branch (1786:12): [True: 1, False: 3.07k]
  ------------------
 1787|      1|        {
 1788|      1|            isPEDecl=false;
 1789|      2|            while (true)
  ------------------
  |  Branch (1789:20): [Folded - Ignored]
  ------------------
 1790|      1|            {
 1791|      1|               if (!expandPERef(false, false, true, false))
  ------------------
  |  Branch (1791:20): [True: 0, False: 1]
  ------------------
 1792|      0|                  fScanner->emitError(XMLErrs::ExpectedEntityRefName);
 1793|       |               // And skip any more spaces in the expanded value
 1794|      1|               if (fReaderMgr->skippedSpace())
  ------------------
  |  Branch (1794:20): [True: 0, False: 1]
  ------------------
 1795|      0|                  fReaderMgr->skipPastSpaces();
 1796|      1|               if (!fReaderMgr->skippedChar(chPercent))
  ------------------
  |  Branch (1796:20): [True: 0, False: 1]
  ------------------
 1797|      0|                  break;
 1798|      1|            }
 1799|      1|        }
 1800|  3.07k|        else if (!checkForPERef(false, true))
  ------------------
  |  Branch (1800:18): [True: 0, False: 3.07k]
  ------------------
 1801|      0|            fScanner->emitError(XMLErrs::ExpectedWhitespace);
 1802|  3.07k|    }
 1803|       |
 1804|       |    //
 1805|       |    //  Now lets get a name, which should be the name of the entity. We
 1806|       |    //  have to get a buffer for this.
 1807|       |    //
 1808|  9.87k|    XMLBufBid bbName(fBufMgr);
 1809|  9.87k|    if (!fReaderMgr->getName(bbName.getBuffer()))
  ------------------
  |  Branch (1809:9): [True: 8, False: 9.86k]
  ------------------
 1810|      8|    {
 1811|      8|        fScanner->emitError(XMLErrs::ExpectedPEName);
 1812|      8|        fReaderMgr->skipPastChar(chCloseAngle);
 1813|      8|        return;
 1814|      8|    }
 1815|       |
 1816|       |    // If namespaces are enabled, then no colons allowed
 1817|  9.86k|    if (fScanner->getDoNamespaces())
  ------------------
  |  Branch (1817:9): [True: 0, False: 9.86k]
  ------------------
 1818|      0|    {
 1819|      0|        if (XMLString::indexOf(bbName.getRawBuffer(), chColon) != -1)
  ------------------
  |  Branch (1819:13): [True: 0, False: 0]
  ------------------
 1820|      0|            fScanner->emitError(XMLErrs::ColonNotLegalWithNS);
 1821|      0|    }
 1822|       |
 1823|       |    //
 1824|       |    //  See if this entity already exists. If so, then the existing one
 1825|       |    //  takes precendence. So we use the local dummy decl to parse into
 1826|       |    //  and just ignore the results.
 1827|       |    //
 1828|  9.86k|    DTDEntityDecl* entityDecl;
 1829|  9.86k|    if (isPEDecl)
  ------------------
  |  Branch (1829:9): [True: 3.07k, False: 6.79k]
  ------------------
 1830|  3.07k|        entityDecl = fPEntityDeclPool->getByKey(bbName.getRawBuffer());
 1831|  6.79k|    else
 1832|  6.79k|        entityDecl = fDTDGrammar->getEntityDecl(bbName.getRawBuffer());
 1833|       |
 1834|  9.86k|    if (entityDecl)
  ------------------
  |  Branch (1834:9): [True: 4.42k, False: 5.44k]
  ------------------
 1835|  4.42k|    {
 1836|  4.42k|        if (!fDumEntityDecl)
  ------------------
  |  Branch (1836:13): [True: 190, False: 4.23k]
  ------------------
 1837|    190|            fDumEntityDecl = new (fMemoryManager) DTDEntityDecl(fMemoryManager);
 1838|  4.42k|        fDumEntityDecl->setName(bbName.getRawBuffer());
 1839|  4.42k|        entityDecl = fDumEntityDecl;
 1840|  4.42k|    }
 1841|  5.44k|     else
 1842|  5.44k|    {
 1843|       |        // Its not in existence already, then create an entity decl for it
 1844|  5.44k|        entityDecl = new (fGrammarPoolMemoryManager) DTDEntityDecl(bbName.getRawBuffer(), false, fGrammarPoolMemoryManager);
 1845|       |
 1846|       |        //
 1847|       |        //  Set the declaration location. The parameter indicates whether its
 1848|       |        //  declared in the content/internal subset, so we know whether or not
 1849|       |        //  its in the external subset.
 1850|       |        //
 1851|  5.44k|        entityDecl->setDeclaredInIntSubset(fInternalSubset);
 1852|       |
 1853|       |        // Add it to the appropriate entity decl pool
 1854|  5.44k|        if (isPEDecl)
  ------------------
  |  Branch (1854:13): [True: 1.50k, False: 3.93k]
  ------------------
 1855|  1.50k|            fPEntityDeclPool->put(entityDecl);
 1856|  3.93k|         else
 1857|  3.93k|            fDTDGrammar->putEntityDecl(entityDecl);
 1858|  5.44k|    }
 1859|       |
 1860|       |    // Set a flag that indicates whether we are ignoring this one
 1861|  9.86k|    const bool isIgnored = (entityDecl == fDumEntityDecl);
 1862|       |
 1863|       |    // Set the PE flag on it
 1864|  9.86k|    entityDecl->setIsParameter(isPEDecl);
 1865|       |
 1866|       |    //
 1867|       |    //  Space is legal (required actually) here so check for a PE ref. If
 1868|       |    //  we don't get our whitespace, then issue an error, but try to keep
 1869|       |    //  going.
 1870|       |    //
 1871|  9.86k|    if (!checkForPERef(false, true))
  ------------------
  |  Branch (1871:9): [True: 93, False: 9.77k]
  ------------------
 1872|     93|        fScanner->emitError(XMLErrs::ExpectedWhitespace);
 1873|       |
 1874|       |    // save the hasNoDTD status for Entity Constraint Checking
 1875|  9.86k|    bool hasNoDTD = fScanner->getHasNoDTD();
 1876|  9.86k|    if (hasNoDTD && isPEDecl)
  ------------------
  |  Branch (1876:9): [True: 6.01k, False: 3.85k]
  |  Branch (1876:21): [True: 1.60k, False: 4.40k]
  ------------------
 1877|  1.60k|        fScanner->setHasNoDTD(false);
 1878|       |
 1879|       |    // According to the type call the value scanning method
 1880|  9.86k|    if (!scanEntityDef(*entityDecl, isPEDecl))
  ------------------
  |  Branch (1880:9): [True: 0, False: 9.86k]
  ------------------
 1881|      0|    {
 1882|      0|        fReaderMgr->skipPastChar(chCloseAngle);
 1883|      0|        fScanner->setHasNoDTD(true);
 1884|      0|        fScanner->emitError(XMLErrs::ExpectedEntityValue);
 1885|      0|        return;
 1886|      0|    }
 1887|  9.86k|    if (hasNoDTD)
  ------------------
  |  Branch (1887:9): [True: 5.78k, False: 4.07k]
  ------------------
 1888|  5.78k|        fScanner->setHasNoDTD(true);
 1889|       |
 1890|       |    // Space is legal (but not required) here so check for a PE ref
 1891|  9.86k|    checkForPERef(false, true);
 1892|       |
 1893|       |    // And then we have to have the closing angle bracket
 1894|  9.86k|    if (!fReaderMgr->skippedChar(chCloseAngle))
  ------------------
  |  Branch (1894:9): [True: 25, False: 9.84k]
  ------------------
 1895|     25|    {
 1896|     25|        fScanner->emitError(XMLErrs::UnterminatedEntityDecl, entityDecl->getName());
 1897|     25|        fReaderMgr->skipPastChar(chCloseAngle);
 1898|     25|    }
 1899|       |
 1900|       |    //
 1901|       |    //  If we have a doc type handler, then call it. But only call it for
 1902|       |    //  ignored elements if advanced callbacks are enabled.
 1903|       |    //
 1904|  9.86k|    if (fDocTypeHandler)
  ------------------
  |  Branch (1904:9): [True: 0, False: 9.86k]
  ------------------
 1905|      0|        fDocTypeHandler->entityDecl(*entityDecl, isPEDecl, isIgnored);
 1906|  9.86k|}
_ZN11xercesc_3_210DTDScanner13scanEntityRefERDsS1_Rb:
 1927|  28.5k|{
 1928|       |    // Assume no escape and no second char
 1929|  28.5k|    escaped = false;
 1930|  28.5k|    secondCh = 0;
 1931|       |
 1932|       |    // We have to insure its all done in a single entity
 1933|  28.5k|    const XMLSize_t curReader = fReaderMgr->getCurrentReaderNum();
 1934|       |
 1935|       |    //
 1936|       |    //  If the next char is a pound, then its a character reference and we
 1937|       |    //  need to expand it always.
 1938|       |    //
 1939|  28.5k|    if (fReaderMgr->skippedChar(chPound))
  ------------------
  |  Branch (1939:9): [True: 2.30k, False: 26.2k]
  ------------------
 1940|  2.30k|    {
 1941|       |        //
 1942|       |        //  Its a character reference, so scan it and get back the numeric
 1943|       |        //  value it represents. If it fails, just return immediately.
 1944|       |        //
 1945|  2.30k|        if (!scanCharRef(firstCh, secondCh))
  ------------------
  |  Branch (1945:13): [True: 0, False: 2.30k]
  ------------------
 1946|      0|            return EntityExp_Failed;
 1947|       |
 1948|  2.30k|        if (curReader != fReaderMgr->getCurrentReaderNum())
  ------------------
  |  Branch (1948:13): [True: 0, False: 2.30k]
  ------------------
 1949|      0|            fScanner->emitError(XMLErrs::PartialMarkupInEntity);
 1950|       |
 1951|       |        // Its now escaped since it was a char ref
 1952|  2.30k|        escaped = true;
 1953|  2.30k|        return EntityExp_Returned;
 1954|  2.30k|    }
 1955|       |
 1956|       |    // Get the name of the general entity
 1957|  26.2k|    XMLBufBid bbName(fBufMgr);
 1958|  26.2k|    if (!fReaderMgr->getName(bbName.getBuffer()))
  ------------------
  |  Branch (1958:9): [True: 16, False: 26.2k]
  ------------------
 1959|     16|    {
 1960|     16|        fScanner->emitError(XMLErrs::ExpectedEntityRefName);
 1961|     16|        return EntityExp_Failed;
 1962|     16|    }
 1963|       |
 1964|       |    //
 1965|       |    //  Next char must be a semi-colon. But if its not, just emit
 1966|       |    //  an error and try to continue.
 1967|       |    //
 1968|  26.2k|    if (!fReaderMgr->skippedChar(chSemiColon))
  ------------------
  |  Branch (1968:9): [True: 10, False: 26.2k]
  ------------------
 1969|     10|        fScanner->emitError(XMLErrs::UnterminatedEntityRef, bbName.getRawBuffer());
 1970|       |
 1971|       |    // Make sure it was all in one entity reader
 1972|  26.2k|    if (curReader != fReaderMgr->getCurrentReaderNum())
  ------------------
  |  Branch (1972:9): [True: 1, False: 26.2k]
  ------------------
 1973|      1|        fScanner->emitError(XMLErrs::PartialMarkupInEntity);
 1974|       |
 1975|       |    // Look it up the name the general entity pool
 1976|  26.2k|    XMLEntityDecl* decl = fDTDGrammar->getEntityDecl(bbName.getRawBuffer());
 1977|       |
 1978|       |    // If it does not exist, then obviously an error
 1979|  26.2k|    if (!decl)
  ------------------
  |  Branch (1979:9): [True: 9.69k, False: 16.5k]
  ------------------
 1980|  9.69k|    {
 1981|       |        // XML 1.0 Section 4.1
 1982|  9.69k|        if (fScanner->getStandalone() || fScanner->getHasNoDTD()) {
  ------------------
  |  Branch (1982:13): [True: 2, False: 9.69k]
  |  Branch (1982:42): [True: 3, False: 9.69k]
  ------------------
 1983|      5|            fScanner->emitError(XMLErrs::EntityNotFound, bbName.getRawBuffer());
 1984|      5|        }
 1985|  9.69k|        else {
 1986|  9.69k|            if (fScanner->getValidationScheme() == XMLScanner::Val_Always)
  ------------------
  |  Branch (1986:17): [True: 0, False: 9.69k]
  ------------------
 1987|      0|                fScanner->getValidator()->emitError(XMLValid::VC_EntityNotFound, bbName.getRawBuffer());
 1988|  9.69k|        }
 1989|       |
 1990|  9.69k|        return EntityExp_Failed;
 1991|  9.69k|    }
 1992|       |
 1993|       |
 1994|       |    //
 1995|       |    // XML 1.0 Section 4.1
 1996|       |    //  If we are a standalone document, then it has to have been declared
 1997|       |    //  in the internal subset.
 1998|       |    //
 1999|  16.5k|    if (fScanner->getStandalone() && !decl->getDeclaredInIntSubset())
  ------------------
  |  Branch (1999:9): [True: 1.35k, False: 15.1k]
  |  Branch (1999:38): [True: 0, False: 1.35k]
  ------------------
 2000|      0|        fScanner->emitError(XMLErrs::IllegalRefInStandalone, bbName.getRawBuffer());
 2001|       |
 2002|       |    //
 2003|       |    //  If its a special char reference, then its escaped and we can return
 2004|       |    //  it directly.
 2005|       |    //
 2006|  16.5k|    if (decl->getIsSpecialChar())
  ------------------
  |  Branch (2006:9): [True: 386, False: 16.1k]
  ------------------
 2007|    386|    {
 2008|    386|        firstCh = decl->getValue()[0];
 2009|    386|        escaped = true;
 2010|    386|        return EntityExp_Returned;
 2011|    386|    }
 2012|       |
 2013|  16.1k|    if (decl->isExternal())
  ------------------
  |  Branch (2013:9): [True: 2, False: 16.1k]
  ------------------
 2014|      2|    {
 2015|       |        // If its unparsed, then its not valid here
 2016|       |        // XML 1.0 Section 4.4.4 the appearance of a reference to an unparsed entity is forbidden.
 2017|      2|        if (decl->isUnparsed())
  ------------------
  |  Branch (2017:13): [True: 1, False: 1]
  ------------------
 2018|      1|        {
 2019|      1|            fScanner->emitError(XMLErrs::NoUnparsedEntityRefs, bbName.getRawBuffer());
 2020|      1|            return EntityExp_Failed;
 2021|      1|        }
 2022|       |
 2023|       |        // We are in an attribute value, so not valid.
 2024|       |        // XML 1.0 Section 4.4.4 a reference to an external entity in an attribute value is forbidden.
 2025|      1|        fScanner->emitError(XMLErrs::NoExtRefsInAttValue);
 2026|       |
 2027|       |        // And now create a reader to read this entity
 2028|      1|        InputSource* srcUsed;
 2029|      1|        XMLReader* reader = fReaderMgr->createReader
 2030|      1|        (
 2031|      1|            decl->getBaseURI()
 2032|      1|            , decl->getSystemId()
 2033|      1|            , decl->getPublicId()
 2034|      1|            , false
 2035|      1|            , XMLReader::RefFrom_NonLiteral
 2036|      1|            , XMLReader::Type_General
 2037|      1|            , XMLReader::Source_External
 2038|      1|            , srcUsed
 2039|      1|            , fScanner->getCalculateSrcOfs()
 2040|      1|            , fScanner->getLowWaterMark()
 2041|      1|            , fScanner->getDisableDefaultEntityResolution()
 2042|      1|        );
 2043|       |
 2044|       |        // Put a janitor on the source so it gets cleaned up on exit
 2045|      1|        Janitor<InputSource> janSrc(srcUsed);
 2046|       |
 2047|       |        //
 2048|       |        //  If the creation failed then throw an exception
 2049|       |        //
 2050|      1|        if (!reader)
  ------------------
  |  Branch (2050:13): [True: 0, False: 1]
  ------------------
 2051|      0|            ThrowXMLwithMemMgr1(RuntimeException, XMLExcepts::Gen_CouldNotOpenExtEntity, srcUsed ? srcUsed->getSystemId() : decl->getSystemId(), fMemoryManager);
  ------------------
  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  |  |  ------------------
  |  |  |  Branch (266:87): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2052|       |
 2053|       |        //
 2054|       |        //  Push the reader. If its a recursive expansion, then emit an error
 2055|       |        //  and return an failure.
 2056|       |        //
 2057|      1|        if (!fReaderMgr->pushReader(reader, decl))
  ------------------
  |  Branch (2057:13): [True: 0, False: 1]
  ------------------
 2058|      0|        {
 2059|      0|            fScanner->emitError(XMLErrs::RecursiveEntity, decl->getName());
 2060|      0|            return EntityExp_Failed;
 2061|      0|        }
 2062|       |
 2063|       |        // If it starts with the XML string, then parse a text decl
 2064|      1|        if (fScanner->checkXMLDecl(true))
  ------------------
  |  Branch (2064:13): [True: 0, False: 1]
  ------------------
 2065|      0|            scanTextDecl();
 2066|      1|    }
 2067|  16.1k|     else
 2068|  16.1k|    {
 2069|       |        //
 2070|       |        //  Create a reader over a memory stream over the entity value
 2071|       |        //  We force it to assume UTF-16 by passing in an encoding
 2072|       |        //  string. This way it won't both trying to predecode the
 2073|       |        //  first line, looking for an XML/TextDecl.
 2074|       |        //
 2075|  16.1k|        XMLReader* valueReader = fReaderMgr->createIntEntReader
 2076|  16.1k|        (
 2077|  16.1k|            decl->getName()
 2078|  16.1k|            , XMLReader::RefFrom_NonLiteral
 2079|  16.1k|            , XMLReader::Type_General
 2080|  16.1k|            , decl->getValue()
 2081|  16.1k|            , decl->getValueLen()
 2082|  16.1k|            , false
 2083|  16.1k|        );
 2084|       |
 2085|       |        //
 2086|       |        //  Trt to push the entity reader onto the reader manager stack,
 2087|       |        //  where it will become the subsequent input. If it fails, that
 2088|       |        //  means the entity is recursive, so issue an error. The reader
 2089|       |        //  will have just been discarded, but we just keep going.
 2090|       |        //
 2091|  16.1k|        if (!fReaderMgr->pushReader(valueReader, decl))
  ------------------
  |  Branch (2091:13): [True: 8, False: 16.1k]
  ------------------
 2092|      8|            fScanner->emitError(XMLErrs::RecursiveEntity, decl->getName());
 2093|  16.1k|    }
 2094|       |
 2095|  16.1k|    return EntityExp_Pushed;
 2096|  16.1k|}
_ZN11xercesc_3_210DTDScanner17scanEntityLiteralERNS_9XMLBufferE:
 2106|  6.73k|{
 2107|  6.73k|    toFill.reset();
 2108|       |
 2109|       |    // Get the next char which must be a single or double quote
 2110|  6.73k|    XMLCh quoteCh;
 2111|  6.73k|    if (!fReaderMgr->skipIfQuote(quoteCh))
  ------------------
  |  Branch (2111:9): [True: 0, False: 6.73k]
  ------------------
 2112|      0|        return false;
 2113|       |
 2114|       |    // Get a buffer for pulling in entity names when we see GE refs
 2115|  6.73k|    XMLBufBid bbName(fBufMgr);
 2116|  6.73k|    XMLBuffer& nameBuf = bbName.getBuffer();
 2117|       |
 2118|       |    // Remember the current reader
 2119|  6.73k|    const XMLSize_t orgReader = fReaderMgr->getCurrentReaderNum();
 2120|       |
 2121|       |    //
 2122|       |    //  Loop until we see the ending quote character, handling any references
 2123|       |    //  in the process.
 2124|       |    //
 2125|  6.73k|    XMLCh   nextCh;
 2126|  6.73k|    XMLCh   secondCh = 0;
 2127|  6.73k|    bool    gotLeadingSurrogate = false;
 2128|  10.2M|    while (true)
  ------------------
  |  Branch (2128:12): [Folded - Ignored]
  ------------------
 2129|  10.2M|    {
 2130|  10.2M|        nextCh = fReaderMgr->getNextChar();
 2131|       |
 2132|       |        //
 2133|       |        //  Watch specifically for EOF and issue a more meaningful error
 2134|       |        //  if that occurs (since an unterminated quoted char can cause
 2135|       |        //  this easily.)
 2136|       |        //
 2137|  10.2M|        if (!nextCh)
  ------------------
  |  Branch (2137:13): [True: 64, False: 10.2M]
  ------------------
 2138|     64|        {
 2139|     64|            fScanner->emitError(XMLErrs::UnterminatedEntityLiteral);
 2140|     64|            ThrowXMLwithMemMgr(UnexpectedEOFException, XMLExcepts::Gen_UnexpectedEOF, fMemoryManager);
  ------------------
  |  |  264|     64|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
 2141|     64|        }
 2142|       |
 2143|       |        //
 2144|       |        //  Break out on our terminating quote char when we are back in the
 2145|       |        //  same reader. Otherwise, we might trigger on a nested quote char
 2146|       |        //  in an expanded entity.
 2147|       |        //
 2148|  10.2M|        if ((nextCh == quoteCh)
  ------------------
  |  Branch (2148:13): [True: 6.80k, False: 10.1M]
  ------------------
 2149|  10.2M|        &&  (fReaderMgr->getCurrentReaderNum() == orgReader))
  ------------------
  |  Branch (2149:13): [True: 6.55k, False: 251]
  ------------------
 2150|  6.55k|        {
 2151|  6.55k|            break;
 2152|  6.55k|        }
 2153|       |
 2154|  10.1M|        if (nextCh == chPercent)
  ------------------
  |  Branch (2154:13): [True: 4, False: 10.1M]
  ------------------
 2155|      4|        {
 2156|       |            //
 2157|       |            //  Put the PE's value on the reader stack and then jump back
 2158|       |            //  to the top to start processing it. The parameter indicates
 2159|       |            //  that it should not scan the reference's content as an external
 2160|       |            //  subset.
 2161|       |            //
 2162|      4|            expandPERef(false, true, true);
 2163|      4|            continue;
 2164|      4|        }
 2165|       |
 2166|       |        //
 2167|       |        //  Ok, now that all the other special stuff is checked, we can
 2168|       |        //  look for a general entity. In here, we cannot have a naked &
 2169|       |        //  and will only expand numerical char refs or the intrinsic char
 2170|       |        //  refs. Others will be left alone.
 2171|       |        //
 2172|  10.1M|        if (nextCh == chAmpersand)
  ------------------
  |  Branch (2172:13): [True: 32.3k, False: 10.1M]
  ------------------
 2173|  32.3k|        {
 2174|       |            //
 2175|       |            //  Here, we only expand numeric char refs, but not any general
 2176|       |            //  entities. However, the stupid XML spec requires that we check
 2177|       |            //  and make sure it does refer to a general entity if its not
 2178|       |            //  a char ref (i.e. no naked '&' chars.)
 2179|       |            //
 2180|  32.3k|            if (fReaderMgr->skippedChar(chPound))
  ------------------
  |  Branch (2180:17): [True: 1.84k, False: 30.4k]
  ------------------
 2181|  1.84k|            {
 2182|       |                // If it failed, then just jump back to the top and try to pick up
 2183|  1.84k|                if (!scanCharRef(nextCh, secondCh))
  ------------------
  |  Branch (2183:21): [True: 0, False: 1.84k]
  ------------------
 2184|      0|                {
 2185|      0|                    gotLeadingSurrogate = false;
 2186|      0|                    continue;
 2187|      0|                }
 2188|  1.84k|            }
 2189|  30.4k|             else
 2190|  30.4k|            {
 2191|  30.4k|                if (!fReaderMgr->getName(nameBuf))
  ------------------
  |  Branch (2191:21): [True: 6, False: 30.4k]
  ------------------
 2192|      6|                {
 2193|      6|                    fScanner->emitError(XMLErrs::ExpectedEntityRefName);
 2194|      6|                }
 2195|  30.4k|                 else
 2196|  30.4k|                {
 2197|       |                    //
 2198|       |                    //  Since we are not expanding any of this, we have to
 2199|       |                    //  put the amp and name into the target buffer as data.
 2200|       |                    //
 2201|  30.4k|                    toFill.append(chAmpersand);
 2202|  30.4k|                    toFill.append(nameBuf.getRawBuffer());
 2203|       |
 2204|       |                    // Make sure we skipped a trailing semicolon
 2205|  30.4k|                    if (!fReaderMgr->skippedChar(chSemiColon))
  ------------------
  |  Branch (2205:25): [True: 31, False: 30.4k]
  ------------------
 2206|     31|                    {
 2207|     31|                        fScanner->emitError
 2208|     31|                        (
 2209|     31|                            XMLErrs::UnterminatedEntityRef
 2210|     31|                            , nameBuf.getRawBuffer()
 2211|     31|                        );
 2212|     31|                    }
 2213|       |
 2214|       |                    // And make the new character the semicolon
 2215|  30.4k|                    nextCh = chSemiColon;
 2216|  30.4k|                }
 2217|       |
 2218|       |                // Either way here we reset the surrogate flag
 2219|  30.4k|                gotLeadingSurrogate = false;
 2220|  30.4k|            }
 2221|  32.3k|        }
 2222|  10.1M|        else if ((nextCh >= 0xD800) && (nextCh <= 0xDBFF))
  ------------------
  |  Branch (2222:18): [True: 30.6k, False: 10.1M]
  |  Branch (2222:40): [True: 15.2k, False: 15.4k]
  ------------------
 2223|  15.2k|        {
 2224|  15.2k|            if (gotLeadingSurrogate)
  ------------------
  |  Branch (2224:17): [True: 2, False: 15.2k]
  ------------------
 2225|      2|                fScanner->emitError(XMLErrs::Expected2ndSurrogateChar);
 2226|  15.2k|            else
 2227|  15.2k|                gotLeadingSurrogate = true;
 2228|  15.2k|        }
 2229|  10.1M|         else
 2230|  10.1M|        {
 2231|  10.1M|            if (gotLeadingSurrogate)
  ------------------
  |  Branch (2231:17): [True: 15.2k, False: 10.1M]
  ------------------
 2232|  15.2k|            {
 2233|  15.2k|                if ((nextCh < 0xDC00) || (nextCh > 0xDFFF))
  ------------------
  |  Branch (2233:21): [True: 1, False: 15.2k]
  |  Branch (2233:42): [True: 2, False: 15.2k]
  ------------------
 2234|      3|                    fScanner->emitError(XMLErrs::Expected2ndSurrogateChar);
 2235|  15.2k|            }
 2236|  10.1M|             else if (!fReaderMgr->getCurrentReader()->isXMLChar(nextCh))
  ------------------
  |  Branch (2236:23): [True: 3, False: 10.1M]
  ------------------
 2237|      3|            {
 2238|      3|                XMLCh tmpBuf[9];
 2239|      3|                XMLString::binToText
 2240|      3|                (
 2241|      3|                    nextCh
 2242|      3|                    , tmpBuf
 2243|      3|                    , 8
 2244|      3|                    , 16
 2245|      3|                    , fMemoryManager
 2246|      3|                );
 2247|      3|                fScanner->emitError(XMLErrs::InvalidCharacter, tmpBuf);
 2248|      3|                fReaderMgr->skipPastChar(quoteCh);
 2249|      3|                return false;
 2250|      3|            }
 2251|  10.1M|            gotLeadingSurrogate = false;
 2252|  10.1M|        }
 2253|       |
 2254|       |        // Looks ok, so add it to the literal
 2255|  10.1M|        toFill.append(nextCh);
 2256|       |
 2257|  10.1M|        if (secondCh)
  ------------------
  |  Branch (2257:13): [True: 1.39k, False: 10.1M]
  ------------------
 2258|  1.39k|        {
 2259|  1.39k|            toFill.append(secondCh);
 2260|  1.39k|            secondCh=0;
 2261|  1.39k|        }
 2262|  10.1M|    }
 2263|       |
 2264|       |    //
 2265|       |    //  If we got here and did not get back to the original reader level,
 2266|       |    //  then we propogated some entity out of the literal, so issue an
 2267|       |    //  error, but don't fail.
 2268|       |    //
 2269|  6.66k|    if (fReaderMgr->getCurrentReaderNum() != orgReader && fScanner->getValidationScheme() == XMLScanner::Val_Always)
  ------------------
  |  Branch (2269:9): [True: 0, False: 6.66k]
  |  Branch (2269:59): [True: 0, False: 0]
  ------------------
 2270|      0|        fScanner->getValidator()->emitError(XMLValid::PartialMarkupInPE);
 2271|       |
 2272|  6.66k|    return true;
 2273|  6.73k|}
_ZN11xercesc_3_210DTDScanner13scanEntityDefERNS_13DTDEntityDeclEb:
 2282|  9.76k|{
 2283|       |    // Its got to be an entity literal
 2284|  9.76k|    if (fReaderMgr->lookingAtChar(chSingleQuote)
  ------------------
  |  Branch (2284:9): [True: 4.95k, False: 4.81k]
  ------------------
 2285|  9.76k|    ||  fReaderMgr->lookingAtChar(chDoubleQuote))
  ------------------
  |  Branch (2285:9): [True: 1.78k, False: 3.03k]
  ------------------
 2286|  6.73k|    {
 2287|       |        // Get a buffer for the literal
 2288|  6.73k|        XMLBufBid bbValue(fBufMgr);
 2289|       |
 2290|  6.73k|        if (!scanEntityLiteral(bbValue.getBuffer()))
  ------------------
  |  Branch (2290:13): [True: 0, False: 6.73k]
  ------------------
 2291|      0|            return false;
 2292|       |
 2293|       |        // Set it on the entity decl
 2294|  6.73k|        decl.setValue(bbValue.getRawBuffer());
 2295|  6.73k|        return true;
 2296|  6.73k|    }
 2297|       |
 2298|       |    //
 2299|       |    //  Its got to be an external entity, so there must be an external id.
 2300|       |    //  Get buffers for them and scan an external id into them.
 2301|       |    //
 2302|  3.03k|    XMLBufBid bbPubId(fBufMgr);
 2303|  3.03k|    XMLBufBid bbSysId(fBufMgr);
 2304|  3.03k|    if (!scanId(bbPubId.getBuffer(), bbSysId.getBuffer(), IDType_External))
  ------------------
  |  Branch (2304:9): [True: 0, False: 3.03k]
  ------------------
 2305|      0|        return false;
 2306|       |
 2307|  3.03k|    decl.setIsExternal(true);
 2308|  3.03k|    ReaderMgr::LastExtEntityInfo lastInfo;
 2309|  3.03k|    fReaderMgr->getLastExtEntityInfo(lastInfo);
 2310|       |
 2311|       |    // Fill in the id fields of the decl with the info we got
 2312|  3.03k|    const XMLCh* publicId = bbPubId.getRawBuffer();
 2313|  3.03k|    const XMLCh* systemId = bbSysId.getRawBuffer();
 2314|  3.03k|    decl.setPublicId((publicId && *publicId) ? publicId : 0);
  ------------------
  |  Branch (2314:23): [True: 2.98k, False: 43]
  |  Branch (2314:35): [True: 717, False: 2.27k]
  ------------------
 2315|  3.03k|    decl.setSystemId((systemId && *systemId) ? systemId : 0);
  ------------------
  |  Branch (2315:23): [True: 2.98k, False: 43]
  |  Branch (2315:35): [True: 1.32k, False: 1.65k]
  ------------------
 2316|  3.03k|    decl.setBaseURI((lastInfo.systemId && *lastInfo.systemId) ? lastInfo.systemId : 0);
  ------------------
  |  Branch (2316:22): [True: 2.98k, False: 43]
  |  Branch (2316:43): [True: 2.98k, False: 0]
  ------------------
 2317|       |
 2318|       |    // If its a PE decl, we are done
 2319|  3.03k|    bool gotSpaces = checkForPERef(false, true);
 2320|  3.03k|    if (isPEDecl)
  ------------------
  |  Branch (2320:9): [True: 456, False: 2.57k]
  ------------------
 2321|    456|    {
 2322|       |        //
 2323|       |        //  Check for a common error here. NDATA is not allowed for PEs
 2324|       |        //  so check for the NDATA string. If found give a nice meaningful
 2325|       |        //  error and continue parsing to eat the NDATA text.
 2326|       |        //
 2327|    456|        if (gotSpaces)
  ------------------
  |  Branch (2327:13): [True: 105, False: 351]
  ------------------
 2328|    105|        {
 2329|    105|            if (fReaderMgr->skippedString(XMLUni::fgNDATAString))
  ------------------
  |  Branch (2329:17): [True: 1, False: 104]
  ------------------
 2330|      1|                fScanner->emitError(XMLErrs::NDATANotValidForPE);
 2331|    105|        }
 2332|    351|         else
 2333|    351|        {
 2334|    351|            return true;
 2335|    351|        }
 2336|    456|    }
 2337|       |
 2338|       |    // If looking at close angle now, we are done
 2339|  2.68k|    if (fReaderMgr->lookingAtChar(chCloseAngle))
  ------------------
  |  Branch (2339:9): [True: 1.77k, False: 909]
  ------------------
 2340|  1.77k|        return true;
 2341|       |
 2342|       |    // Else we had to have seem the whitespace
 2343|    909|    if (!gotSpaces)
  ------------------
  |  Branch (2343:9): [True: 18, False: 891]
  ------------------
 2344|     18|        fScanner->emitError(XMLErrs::ExpectedWhitespace);
 2345|       |
 2346|       |    // We now have to see a notation data string
 2347|    909|    if (!fReaderMgr->skippedString(XMLUni::fgNDATAString))
  ------------------
  |  Branch (2347:9): [True: 13, False: 896]
  ------------------
 2348|     13|        fScanner->emitError(XMLErrs::ExpectedNDATA);
 2349|       |
 2350|       |    // Space is required here, but try to go on if not
 2351|    909|    if (!checkForPERef(false, true))
  ------------------
  |  Branch (2351:9): [True: 4, False: 905]
  ------------------
 2352|      4|        fScanner->emitError(XMLErrs::ExpectedWhitespace);
 2353|       |
 2354|       |    // Get a name
 2355|    909|    XMLBufBid bbName(fBufMgr);
 2356|    909|    if (!fReaderMgr->getName(bbName.getBuffer()))
  ------------------
  |  Branch (2356:9): [True: 1, False: 908]
  ------------------
 2357|      1|    {
 2358|      1|        fScanner->emitError(XMLErrs::ExpectedNotationName);
 2359|      1|        return false;
 2360|      1|    }
 2361|       |
 2362|       |    // Set the decl's notation name
 2363|    908|    decl.setNotationName(bbName.getRawBuffer());
 2364|       |
 2365|    908|    return true;
 2366|    909|}
_ZN11xercesc_3_210DTDScanner15scanEnumerationERKNS_9DTDAttDefERNS_9XMLBufferEb:
 2380|  12.1k|{
 2381|       |    // Reset the passed buffer
 2382|  12.1k|    toFill.reset();
 2383|       |
 2384|       |    // Check for PE ref but don't require space
 2385|  12.1k|    checkForPERef(false, true);
 2386|       |
 2387|       |    // If this is a notation, we need an opening paren
 2388|  12.1k|    if (notation)
  ------------------
  |  Branch (2388:9): [True: 177, False: 11.9k]
  ------------------
 2389|    177|    {
 2390|    177|        if (!fReaderMgr->skippedChar(chOpenParen))
  ------------------
  |  Branch (2390:13): [True: 1, False: 176]
  ------------------
 2391|      1|            fScanner->emitError(XMLErrs::ExpectedOpenParen);
 2392|    177|    }
 2393|       |
 2394|       |    // We need a local buffer to use as well
 2395|  12.1k|    XMLBufBid bbTmp(fBufMgr);
 2396|       |
 2397|  96.7k|    while (true)
  ------------------
  |  Branch (2397:12): [Folded - Ignored]
  ------------------
 2398|  96.7k|    {
 2399|       |        // Space is allowed here for either type so check for PE ref
 2400|  96.7k|        checkForPERef(false, true);
 2401|       |
 2402|       |        // And then get either a name or a name token
 2403|  96.7k|        bool success;
 2404|  96.7k|        if (notation)
  ------------------
  |  Branch (2404:13): [True: 84.1k, False: 12.6k]
  ------------------
 2405|  84.1k|            success = fReaderMgr->getName(bbTmp.getBuffer());
 2406|  12.6k|        else
 2407|  12.6k|            success = fReaderMgr->getNameToken(bbTmp.getBuffer());
 2408|       |
 2409|  96.7k|        if (!success)
  ------------------
  |  Branch (2409:13): [True: 4, False: 96.7k]
  ------------------
 2410|      4|        {
 2411|      4|            fScanner->emitError
 2412|      4|            (
 2413|      4|                XMLErrs::ExpectedEnumValue
 2414|      4|                , attDef.getFullName()
 2415|      4|            );
 2416|      4|            return false;
 2417|      4|        }
 2418|       |
 2419|       |        // Append this value to the target value
 2420|  96.7k|        toFill.append(bbTmp.getRawBuffer(), bbTmp.getLen());
 2421|       |
 2422|       |        // Space is allowed here for either type so check for PE ref
 2423|  96.7k|        checkForPERef(false, true);
 2424|       |
 2425|       |        // Check for the terminating paren
 2426|  96.7k|        if (fReaderMgr->skippedChar(chCloseParen))
  ------------------
  |  Branch (2426:13): [True: 12.1k, False: 84.6k]
  ------------------
 2427|  12.1k|            break;
 2428|       |
 2429|       |        // And append a space separator
 2430|  84.6k|        toFill.append(chSpace);
 2431|       |
 2432|       |        // Check for the pipe character separator
 2433|  84.6k|        if (!fReaderMgr->skippedChar(chPipe))
  ------------------
  |  Branch (2433:13): [True: 18, False: 84.6k]
  ------------------
 2434|     18|        {
 2435|     18|            fScanner->emitError(XMLErrs::ExpectedEnumSepOrParen);
 2436|     18|            return false;
 2437|     18|        }
 2438|  84.6k|    }
 2439|  12.1k|    return true;
 2440|  12.1k|}
_ZN11xercesc_3_210DTDScanner6scanIdERNS_9XMLBufferES2_NS0_7IDTypesE:
 2706|  6.59k|{
 2707|       |    // Clean out both return buffers
 2708|  6.59k|    pubIdToFill.reset();
 2709|  6.59k|    sysIdToFill.reset();
 2710|       |
 2711|       |    //
 2712|       |    //  Check first for the system id first. If we find it, and system id
 2713|       |    //  is one of the legal values, then lets try to scan it.
 2714|       |    //
 2715|       |    // 'SYSTEM' S SystemLiteral
 2716|  6.59k|    if (fReaderMgr->skippedString(XMLUni::fgSysIDString))
  ------------------
  |  Branch (2716:9): [True: 1.94k, False: 4.65k]
  ------------------
 2717|  1.94k|    {
 2718|       |        // If they were looking for a public id, then we failed
 2719|  1.94k|        if (whatKind == IDType_Public)
  ------------------
  |  Branch (2719:13): [True: 0, False: 1.94k]
  ------------------
 2720|      0|        {
 2721|      0|            fScanner->emitError(XMLErrs::ExpectedPublicId);
 2722|      0|            return false;
 2723|      0|        }
 2724|       |
 2725|       |        // We must skip spaces
 2726|  1.94k|        bool skippedSomething;
 2727|  1.94k|        fReaderMgr->skipPastSpaces(skippedSomething);
 2728|  1.94k|        if (!skippedSomething)
  ------------------
  |  Branch (2728:13): [True: 1, False: 1.94k]
  ------------------
 2729|      1|        {
 2730|      1|            fScanner->emitError(XMLErrs::ExpectedWhitespace);
 2731|      1|            return false;
 2732|      1|        }
 2733|       |
 2734|       |        // Get the system literal value
 2735|  1.94k|        return scanSystemLiteral(sysIdToFill);
 2736|  1.94k|    }
 2737|       |
 2738|       |    // Now scan for public id
 2739|       |    // 'PUBLIC' S PubidLiteral S SystemLiteral
 2740|       |    //  or
 2741|       |    // 'PUBLIC' S PubidLiteral
 2742|       |
 2743|       |    // If we don't have any public id string => Error
 2744|  4.65k|    if (!fReaderMgr->skippedString(XMLUni::fgPubIDString)) {
  ------------------
  |  Branch (2744:9): [True: 45, False: 4.60k]
  ------------------
 2745|     45|        fScanner->emitError(XMLErrs::ExpectedSystemOrPublicId);
 2746|     45|        return false;
 2747|     45|    }
 2748|       |
 2749|       |    //
 2750|       |    //  So following this we must have whitespace, a public literal, whitespace,
 2751|       |    //  and a system literal.
 2752|       |    //
 2753|  4.60k|    bool skippedSomething;
 2754|  4.60k|    fReaderMgr->skipPastSpaces(skippedSomething);
 2755|  4.60k|    if (!skippedSomething)
  ------------------
  |  Branch (2755:9): [True: 0, False: 4.60k]
  ------------------
 2756|      0|    {
 2757|      0|        fScanner->emitError(XMLErrs::ExpectedWhitespace);
 2758|       |
 2759|       |        //
 2760|       |        //  Just in case, if they just forgot the whitespace but the next char
 2761|       |        //  is a single or double quote, then keep going.
 2762|       |        //
 2763|      0|        const XMLCh chPeek = fReaderMgr->peekNextChar();
 2764|      0|        if ((chPeek != chDoubleQuote) && (chPeek != chSingleQuote))
  ------------------
  |  Branch (2764:13): [True: 0, False: 0]
  |  Branch (2764:42): [True: 0, False: 0]
  ------------------
 2765|      0|            return false;
 2766|      0|    }
 2767|       |
 2768|  4.60k|    if (!scanPublicLiteral(pubIdToFill))
  ------------------
  |  Branch (2768:9): [True: 0, False: 4.60k]
  ------------------
 2769|      0|        return false;
 2770|       |
 2771|       |    // If they wanted a public id, then this is all
 2772|  4.60k|    if (whatKind == IDType_Public)
  ------------------
  |  Branch (2772:9): [True: 0, False: 4.60k]
  ------------------
 2773|      0|        return true;
 2774|       |
 2775|       |    // check if there is any space follows
 2776|  4.60k|    bool hasSpace;
 2777|  4.60k|    fReaderMgr->skipPastSpaces(hasSpace);
 2778|       |
 2779|       |    //
 2780|       |    //  In order to recover best here we need to see if
 2781|       |    //  the next thing is a quote or not
 2782|       |    //
 2783|  4.60k|    const XMLCh chPeek = fReaderMgr->peekNextChar();
 2784|  4.60k|    const bool bIsQuote =  ((chPeek == chDoubleQuote)
  ------------------
  |  Branch (2784:29): [True: 716, False: 3.89k]
  ------------------
 2785|  4.60k|                         || (chPeek == chSingleQuote));
  ------------------
  |  Branch (2785:29): [True: 1.08k, False: 2.80k]
  ------------------
 2786|       |
 2787|  4.60k|    if (!hasSpace)
  ------------------
  |  Branch (2787:9): [True: 2.42k, False: 2.18k]
  ------------------
 2788|  2.42k|    {
 2789|  2.42k|        if (whatKind == IDType_External)
  ------------------
  |  Branch (2789:13): [True: 6, False: 2.42k]
  ------------------
 2790|      6|        {
 2791|       |            //
 2792|       |            //  If its an external Id, then we need to see the system id.
 2793|       |            //  So, emit the error. But, if the next char is a quote, don't
 2794|       |            //  give up since its probably going to work. The user just
 2795|       |            //  missed the separating space. Otherwise, fail.
 2796|       |            //
 2797|      6|            fScanner->emitError(XMLErrs::ExpectedWhitespace);
 2798|      6|            if (!bIsQuote)
  ------------------
  |  Branch (2798:17): [True: 0, False: 6]
  ------------------
 2799|      0|                return false;
 2800|      6|        }
 2801|  2.42k|         else
 2802|  2.42k|        {
 2803|       |            //
 2804|       |            //  We can legally return here. But, if the next char is a quote,
 2805|       |            //  then that's probably not what was desired, since its probably
 2806|       |            //  just that space was forgotten and there really is a system
 2807|       |            //  id to follow.
 2808|       |            //
 2809|       |            //  So treat it like missing whitespace if so and keep going.
 2810|       |            //  Else, just return success.
 2811|       |            //
 2812|  2.42k|            if (bIsQuote)
  ------------------
  |  Branch (2812:17): [True: 2, False: 2.41k]
  ------------------
 2813|      2|                fScanner->emitError(XMLErrs::ExpectedWhitespace);
 2814|  2.41k|             else
 2815|  2.41k|                return true;
 2816|  2.42k|        }
 2817|  2.42k|    }
 2818|       |
 2819|  2.19k|    if (bIsQuote) {
  ------------------
  |  Branch (2819:9): [True: 1.72k, False: 467]
  ------------------
 2820|       |        // there is a quote coming, scan the system literal
 2821|  1.72k|        if (!scanSystemLiteral(sysIdToFill))
  ------------------
  |  Branch (2821:13): [True: 0, False: 1.72k]
  ------------------
 2822|      0|            return false;
 2823|  1.72k|    }
 2824|    467|    else {
 2825|       |        // no quote, if expecting exteral id, this is an error
 2826|    467|        if (whatKind == IDType_External)
  ------------------
  |  Branch (2826:13): [True: 5, False: 462]
  ------------------
 2827|      5|            fScanner->emitError(XMLErrs::ExpectedQuotedString);
 2828|    467|    }
 2829|       |
 2830|  2.19k|    return true;
 2831|  2.19k|}
_ZN11xercesc_3_210DTDScanner18scanInternalSubsetEv:
 2937|  5.32k|{
 2938|       |    // Indicate we are in the internal subset now
 2939|  5.32k|    FlagJanitor<bool> janContentFlag(&fInternalSubset, true);
 2940|       |
 2941|       |    // If we have a doc type handler, tell it the internal subset starts
 2942|  5.32k|    if (fDocTypeHandler)
  ------------------
  |  Branch (2942:9): [True: 0, False: 5.32k]
  ------------------
 2943|      0|        fDocTypeHandler->startIntSubset();
 2944|       |
 2945|       |    // Get a buffer for whitespace
 2946|  5.32k|    XMLBufBid bbSpace(fBufMgr);
 2947|       |
 2948|  5.32k|    bool noErrors = true;
 2949|  48.2k|    while (true)
  ------------------
  |  Branch (2949:12): [Folded - Ignored]
  ------------------
 2950|  46.5k|    {
 2951|  46.5k|        const XMLCh nextCh = fReaderMgr->peekNextChar();
 2952|       |
 2953|       |        //
 2954|       |        //  If we get an end of file marker, just unget it and return a
 2955|       |        //  failure status. The caller will then see the end of file and
 2956|       |        //  faill out correctly.
 2957|       |        //
 2958|  46.5k|        if (!nextCh)
  ------------------
  |  Branch (2958:13): [True: 501, False: 46.0k]
  ------------------
 2959|    501|            return false;
 2960|       |
 2961|       |        // Watch for the end of internal subset marker
 2962|  46.0k|        if (nextCh == chCloseSquare)
  ------------------
  |  Branch (2962:13): [True: 3.09k, False: 42.9k]
  ------------------
 2963|  3.09k|        {
 2964|  3.09k|            fReaderMgr->getNextChar();
 2965|  3.09k|            break;
 2966|  3.09k|        }
 2967|       |
 2968|  42.9k|        if (nextCh == chPercent)
  ------------------
  |  Branch (2968:13): [True: 5.97k, False: 36.9k]
  ------------------
 2969|  5.97k|        {
 2970|       |            //
 2971|       |            //  Expand (and scan if external) the reference value. Tell
 2972|       |            //  it to set the reader to cause an end of entity exception
 2973|       |            //  when this reader dies, which is what the scanExtSubset
 2974|       |            //  method wants (who is called to scan this.)
 2975|       |            //
 2976|  5.97k|            fReaderMgr->getNextChar();
 2977|  5.97k|            expandPERef(true, false, false, true);
 2978|  5.97k|        }
 2979|  36.9k|         else if (nextCh == chOpenAngle)
  ------------------
  |  Branch (2979:19): [True: 26.7k, False: 10.2k]
  ------------------
 2980|  26.7k|        {
 2981|       |            // Remember this reader before we start the scan, for checking
 2982|       |            // XML 1.0 P28a Well-formedness constraint: PE Between Declarations
 2983|  26.7k|            const XMLSize_t orgReader = fReaderMgr->getCurrentReaderNum();
 2984|  26.7k|            bool wasInPE = (fReaderMgr->getCurrentReader()->getType() == XMLReader::Type_PE);
 2985|       |
 2986|       |            // And scan this markup
 2987|  26.7k|            fReaderMgr->getNextChar();
 2988|  26.7k|            scanMarkupDecl(false);
 2989|       |
 2990|       |            // If we did not get back to entry level, then partial markup
 2991|  26.7k|            if (fReaderMgr->getCurrentReaderNum() != orgReader) {
  ------------------
  |  Branch (2991:17): [True: 1, False: 26.7k]
  ------------------
 2992|      1|                if (wasInPE)
  ------------------
  |  Branch (2992:21): [True: 1, False: 0]
  ------------------
 2993|      1|                    fScanner->emitError(XMLErrs::PEBetweenDecl);
 2994|      0|                else if (fScanner->getValidationScheme() == XMLScanner::Val_Always)
  ------------------
  |  Branch (2994:26): [True: 0, False: 0]
  ------------------
 2995|      0|                    fScanner->getValidator()->emitError(XMLValid::PartialMarkupInPE);
 2996|      1|            }
 2997|  26.7k|        }
 2998|  10.2k|         else if (fReaderMgr->getCurrentReader()->isWhitespace(nextCh))
  ------------------
  |  Branch (2998:19): [True: 10.1k, False: 134]
  ------------------
 2999|  10.1k|        {
 3000|       |            //
 3001|       |            //  IF we are doing advanced callbacks and have a doc type
 3002|       |            //  handler, then get the whitespace and call the doc type
 3003|       |            //  handler with it. Otherwise, just skip whitespace.
 3004|       |            //
 3005|  10.1k|            if (fDocTypeHandler)
  ------------------
  |  Branch (3005:17): [True: 0, False: 10.1k]
  ------------------
 3006|      0|            {
 3007|      0|                fReaderMgr->getSpaces(bbSpace.getBuffer());
 3008|      0|                fDocTypeHandler->doctypeWhitespace
 3009|      0|                (
 3010|      0|                    bbSpace.getRawBuffer()
 3011|      0|                    , bbSpace.getLen()
 3012|      0|                );
 3013|      0|            }
 3014|  10.1k|             else
 3015|  10.1k|            {
 3016|  10.1k|                fReaderMgr->skipPastSpaces();
 3017|  10.1k|            }
 3018|  10.1k|        }
 3019|    134|         else
 3020|    134|        {
 3021|       |            // Not valid, so emit an error
 3022|    134|            XMLCh tmpBuf[9];
 3023|    134|            XMLString::binToText
 3024|    134|            (
 3025|    134|                fReaderMgr->getNextChar()
 3026|    134|                , tmpBuf
 3027|    134|                , 8
 3028|    134|                , 16
 3029|    134|                , fMemoryManager
 3030|    134|            );
 3031|    134|            fScanner->emitError
 3032|    134|            (
 3033|    134|                XMLErrs::InvalidCharacterInIntSubset
 3034|    134|                , tmpBuf
 3035|    134|            );
 3036|       |
 3037|       |            //
 3038|       |            //  If an '>', then probably an abnormally terminated
 3039|       |            //  internal subset so just return.
 3040|       |            //
 3041|    134|            if (nextCh == chCloseAngle)
  ------------------
  |  Branch (3041:17): [True: 0, False: 134]
  ------------------
 3042|      0|            {
 3043|      0|                noErrors = false;
 3044|      0|                break;
 3045|      0|            }
 3046|       |
 3047|       |            //
 3048|       |            //  Otherwise, try to sync back up by scanning forward for
 3049|       |            //  a reasonable start character.
 3050|       |            //
 3051|    134|            static const XMLCh toSkip[] =
 3052|    134|            {
 3053|    134|                chPercent, chCloseSquare, chOpenAngle, chNull
 3054|    134|            };
 3055|    134|            fReaderMgr->skipUntilInOrWS(toSkip);
 3056|    134|        }
 3057|  42.9k|    }
 3058|       |
 3059|       |    // If we have a doc type handler, tell it the internal subset ends
 3060|  4.82k|    if (fDocTypeHandler)
  ------------------
  |  Branch (3060:9): [True: 0, False: 4.82k]
  ------------------
 3061|      0|        fDocTypeHandler->endIntSubset();
 3062|       |
 3063|  4.82k|    return noErrors;
 3064|  5.32k|}
_ZN11xercesc_3_210DTDScanner14scanMarkupDeclEb:
 3072|  26.7k|{
 3073|       |    //
 3074|       |    //  We only have two valid first characters here. One is a ! which opens
 3075|       |    //  some markup decl. The other is a ?, which could begin either a PI
 3076|       |    //  or a text decl. If parseTextDecl is false, we cannot accept a text
 3077|       |    //  decl.
 3078|       |    //
 3079|  26.7k|    const XMLCh nextCh = fReaderMgr->getNextChar();
 3080|       |
 3081|  26.7k|    if (nextCh == chBang)
  ------------------
  |  Branch (3081:9): [True: 22.2k, False: 4.43k]
  ------------------
 3082|  22.2k|    {
 3083|  22.2k|        if (fReaderMgr->skippedChar(chDash))
  ------------------
  |  Branch (3083:13): [True: 293, False: 22.0k]
  ------------------
 3084|    293|        {
 3085|    293|            if (fReaderMgr->skippedChar(chDash))
  ------------------
  |  Branch (3085:17): [True: 291, False: 2]
  ------------------
 3086|    291|            {
 3087|    291|                scanComment();
 3088|    291|            }
 3089|      2|             else
 3090|      2|            {
 3091|      2|                fScanner->emitError(XMLErrs::CommentsMustStartWith);
 3092|      2|                fReaderMgr->skipPastChar(chCloseAngle);
 3093|      2|            }
 3094|    293|        }
 3095|  22.0k|         else if (fReaderMgr->skippedChar(chOpenSquare))
  ------------------
  |  Branch (3095:19): [True: 0, False: 22.0k]
  ------------------
 3096|      0|        {
 3097|       |            //
 3098|       |            //  Its a conditional section. This is only valid in the external
 3099|       |            //  subset, so issue an error if we aren't there.
 3100|       |            //
 3101|      0|            if (fInternalSubset)
  ------------------
  |  Branch (3101:17): [True: 0, False: 0]
  ------------------
 3102|      0|            {
 3103|      0|                fScanner->emitError(XMLErrs::ConditionalSectInIntSubset);
 3104|      0|                fReaderMgr->skipPastChar(chCloseAngle);
 3105|      0|                return;
 3106|      0|            }
 3107|       |
 3108|       |            // A PE ref can happen here, but space is not required
 3109|      0|            checkForPERef(false, true);
 3110|       |
 3111|      0|            if (fReaderMgr->skippedString(XMLUni::fgIncludeString))
  ------------------
  |  Branch (3111:17): [True: 0, False: 0]
  ------------------
 3112|      0|            {
 3113|      0|                checkForPERef(false, true);
 3114|       |
 3115|       |                // Check for the following open square bracket
 3116|      0|                if (!fReaderMgr->skippedChar(chOpenSquare))
  ------------------
  |  Branch (3116:21): [True: 0, False: 0]
  ------------------
 3117|      0|                    fScanner->emitError(XMLErrs::ExpectedINCLUDEBracket);
 3118|       |
 3119|       |                // Get the reader we started this on
 3120|      0|                const XMLSize_t orgReader = fReaderMgr->getCurrentReaderNum();
 3121|       |
 3122|      0|                checkForPERef(false, true);
 3123|       |
 3124|       |                //
 3125|       |                //  Recurse back to the ext subset call again, telling it its
 3126|       |                //  in an include section.
 3127|       |                //
 3128|      0|                scanExtSubsetDecl(true, false);
 3129|       |
 3130|       |                //
 3131|       |                //  And see if we got back to the same level. If not, then its
 3132|       |                //  a partial markup error.
 3133|       |                //
 3134|      0|                if (fReaderMgr->getCurrentReaderNum() != orgReader && fScanner->getValidationScheme() == XMLScanner::Val_Always)
  ------------------
  |  Branch (3134:21): [True: 0, False: 0]
  |  Branch (3134:71): [True: 0, False: 0]
  ------------------
 3135|      0|                    fScanner->getValidator()->emitError(XMLValid::PartialMarkupInPE);
 3136|       |
 3137|      0|            }
 3138|      0|             else if (fReaderMgr->skippedString(XMLUni::fgIgnoreString))
  ------------------
  |  Branch (3138:23): [True: 0, False: 0]
  ------------------
 3139|      0|            {
 3140|      0|                checkForPERef(false, true);
 3141|       |
 3142|       |                // Check for the following open square bracket
 3143|      0|                if (!fReaderMgr->skippedChar(chOpenSquare))
  ------------------
  |  Branch (3143:21): [True: 0, False: 0]
  ------------------
 3144|      0|                    fScanner->emitError(XMLErrs::ExpectedINCLUDEBracket);
 3145|       |
 3146|       |                // Get the reader we started this on
 3147|      0|                const XMLSize_t orgReader = fReaderMgr->getCurrentReaderNum();
 3148|       |
 3149|       |                // And scan over the ignored part
 3150|      0|                scanIgnoredSection();
 3151|       |
 3152|       |                //
 3153|       |                //  And see if we got back to the same level. If not, then its
 3154|       |                //  a partial markup error.
 3155|       |                //
 3156|      0|                if (fReaderMgr->getCurrentReaderNum() != orgReader && fScanner->getValidationScheme() == XMLScanner::Val_Always)
  ------------------
  |  Branch (3156:21): [True: 0, False: 0]
  |  Branch (3156:71): [True: 0, False: 0]
  ------------------
 3157|      0|                    fScanner->getValidator()->emitError(XMLValid::PartialMarkupInPE);
 3158|       |
 3159|      0|            }
 3160|      0|             else
 3161|      0|            {
 3162|      0|                fScanner->emitError(XMLErrs::ExpectedIncOrIgn);
 3163|      0|                fReaderMgr->skipPastChar(chCloseAngle);
 3164|      0|            }
 3165|      0|        }
 3166|  22.0k|         else if (fReaderMgr->skippedString(XMLUni::fgAttListString))
  ------------------
  |  Branch (3166:19): [True: 2.90k, False: 19.1k]
  ------------------
 3167|  2.90k|        {
 3168|  2.90k|            scanAttListDecl();
 3169|  2.90k|        }
 3170|  19.1k|         else if (fReaderMgr->skippedString(XMLUni::fgElemString))
  ------------------
  |  Branch (3170:19): [True: 6.31k, False: 12.7k]
  ------------------
 3171|  6.31k|        {
 3172|  6.31k|            scanElementDecl();
 3173|  6.31k|        }
 3174|  12.7k|         else if (fReaderMgr->skippedString(XMLUni::fgEntityString))
  ------------------
  |  Branch (3174:19): [True: 9.87k, False: 2.91k]
  ------------------
 3175|  9.87k|        {
 3176|  9.87k|            scanEntityDecl();
 3177|  9.87k|        }
 3178|  2.91k|         else if (fReaderMgr->skippedString(XMLUni::fgNotationString))
  ------------------
  |  Branch (3178:19): [True: 2.87k, False: 44]
  ------------------
 3179|  2.87k|        {
 3180|  2.87k|            scanNotationDecl();
 3181|  2.87k|        }
 3182|     44|         else
 3183|     44|        {
 3184|     44|            fScanner->emitError(XMLErrs::ExpectedMarkupDecl);
 3185|     44|            fReaderMgr->skipPastChar(chCloseAngle);
 3186|     44|        }
 3187|  22.2k|    }
 3188|  4.43k|     else if (nextCh == chQuestion)
  ------------------
  |  Branch (3188:15): [True: 4.41k, False: 25]
  ------------------
 3189|  4.41k|    {
 3190|       |        // It could be a PI or the XML declaration. Check for Decl
 3191|  4.41k|        if (fScanner->checkXMLDecl(false))
  ------------------
  |  Branch (3191:13): [True: 0, False: 4.41k]
  ------------------
 3192|      0|        {
 3193|       |            // If we are not accepting text decls, its an error
 3194|      0|            if (parseTextDecl)
  ------------------
  |  Branch (3194:17): [True: 0, False: 0]
  ------------------
 3195|      0|            {
 3196|      0|                scanTextDecl();
 3197|      0|            }
 3198|      0|             else
 3199|      0|            {
 3200|       |                // Emit the error and skip past this markup
 3201|      0|                fScanner->emitError(XMLErrs::TextDeclNotLegalHere);
 3202|      0|                fReaderMgr->skipPastChar(chCloseAngle);
 3203|      0|            }
 3204|      0|        }
 3205|  4.41k|         else
 3206|  4.41k|        {
 3207|       |            // It has to be a PI
 3208|  4.41k|            scanPI();
 3209|  4.41k|        }
 3210|  4.41k|    }
 3211|     25|     else
 3212|     25|    {
 3213|       |        // Can't be valid so emit error and try to skip past end of this decl
 3214|     25|        fScanner->emitError(XMLErrs::ExpectedMarkupDecl);
 3215|     25|        fReaderMgr->skipPastChar(chCloseAngle);
 3216|     25|    }
 3217|  26.7k|}
_ZN11xercesc_3_210DTDScanner9scanMixedERNS_14DTDElementDeclE:
 3228|    947|{
 3229|       |    //
 3230|       |    //  The terminating star is only required if there is something more
 3231|       |    //  than (PCDATA).
 3232|       |    //
 3233|    947|    bool starRequired = false;
 3234|       |
 3235|       |    // Get a buffer to be used below to get element names
 3236|    947|    XMLBufBid bbName(fBufMgr);
 3237|    947|    XMLBuffer& nameBuf = bbName.getBuffer();
 3238|       |
 3239|       |    //
 3240|       |    //  Create an initial content spec node. Its just a leaf node with a
 3241|       |    //  PCDATA element id. This current node pointer will be pushed down the
 3242|       |    //  tree as we go.
 3243|       |    //
 3244|    947|    ContentSpecNode* curNode = new (fGrammarPoolMemoryManager) ContentSpecNode
 3245|    947|    (
 3246|    947|        new (fGrammarPoolMemoryManager) QName
 3247|    947|        (
 3248|    947|            XMLUni::fgZeroLenString
 3249|    947|            , XMLUni::fgZeroLenString
 3250|    947|            , XMLElementDecl::fgPCDataElemId
 3251|    947|            , fGrammarPoolMemoryManager
 3252|    947|        )
 3253|    947|        , false
 3254|    947|        , fGrammarPoolMemoryManager
 3255|    947|    );
 3256|       |
 3257|       |    //
 3258|       |    //  Set the initial leaf as the temporary head. If we hit the first choice
 3259|       |    //  node, it will be set up here. When done, this is the node that's set
 3260|       |    //  as the content spec for the element.
 3261|       |    //
 3262|    947|    ContentSpecNode* headNode = curNode;
 3263|       |
 3264|       |    // Remember the original node so we can sense the first choice node
 3265|    947|    ContentSpecNode* orgNode = curNode;
 3266|       |
 3267|       |    //
 3268|       |    //  We just loop around, getting the | character at the top and then
 3269|       |    //  looking for the next element name. We keep up with the last node
 3270|       |    //  and add each new one to its right node.
 3271|       |    //
 3272|  1.33M|    while (true)
  ------------------
  |  Branch (3272:12): [Folded - Ignored]
  ------------------
 3273|  1.33M|    {
 3274|       |        //
 3275|       |        //  First of all we check for some grunt work details of skipping
 3276|       |        //  whitespace, expand PE refs, and catching invalid reps.
 3277|       |        //
 3278|  1.33M|        if (fReaderMgr->lookingAtChar(chPercent))
  ------------------
  |  Branch (3278:13): [True: 0, False: 1.33M]
  ------------------
 3279|      0|        {
 3280|       |            // Expand it and continue
 3281|      0|            checkForPERef(false, true);
 3282|      0|        }
 3283|  1.33M|         else if (fReaderMgr->skippedChar(chAsterisk))
  ------------------
  |  Branch (3283:19): [True: 2, False: 1.33M]
  ------------------
 3284|      2|        {
 3285|       |            //
 3286|       |            //  Tell them they can't have reps in mixed model, but eat
 3287|       |            //  it and keep going if we are allowed to.
 3288|       |            //
 3289|      2|            if (fScanner->emitErrorWillThrowException(XMLErrs::NoRepInMixed))
  ------------------
  |  Branch (3289:17): [True: 2, False: 0]
  ------------------
 3290|      2|            {
 3291|      2|                delete headNode;
 3292|      2|            }
 3293|      2|            fScanner->emitError(XMLErrs::NoRepInMixed);
 3294|      2|        }
 3295|  1.33M|         else if (fReaderMgr->skippedSpace())
  ------------------
  |  Branch (3295:19): [True: 682, False: 1.33M]
  ------------------
 3296|    682|        {
 3297|       |            // Spaces are ok at this point, just eat them and continue
 3298|    682|            fReaderMgr->skipPastSpaces();
 3299|    682|        }
 3300|  1.33M|         else
 3301|  1.33M|        {
 3302|  1.33M|            if (!fReaderMgr->skippedChar(chPipe))
  ------------------
  |  Branch (3302:17): [True: 939, False: 1.33M]
  ------------------
 3303|    939|            {
 3304|       |                // Has to be the closing paren now.
 3305|    939|                if (!fReaderMgr->skippedChar(chCloseParen))
  ------------------
  |  Branch (3305:21): [True: 14, False: 925]
  ------------------
 3306|     14|                {
 3307|     14|                    delete headNode;
 3308|     14|                    fScanner->emitError(XMLErrs::UnterminatedContentModel, toFill.getElementName()->getLocalPart());                     
 3309|     14|                    return false;
 3310|     14|                }
 3311|       |
 3312|    925|                bool starSkipped = true;
 3313|    925|                if (!fReaderMgr->skippedChar(chAsterisk)) {
  ------------------
  |  Branch (3313:21): [True: 756, False: 169]
  ------------------
 3314|       |
 3315|    756|                    starSkipped = false;
 3316|       |
 3317|    756|                    if (starRequired)
  ------------------
  |  Branch (3317:25): [True: 3, False: 753]
  ------------------
 3318|      3|                    {
 3319|      3|                        if (fScanner->emitErrorWillThrowException(XMLErrs::ExpectedAsterisk))
  ------------------
  |  Branch (3319:29): [True: 3, False: 0]
  ------------------
 3320|      3|                        {
 3321|      3|                            delete headNode;
 3322|      3|                        }
 3323|      3|                        fScanner->emitError(XMLErrs::ExpectedAsterisk);
 3324|      3|                    }
 3325|    756|                }
 3326|       |
 3327|       |                //
 3328|       |                //  Create a zero or more node and make the original head
 3329|       |                //  node its first child.
 3330|       |                //
 3331|    925|                if (starRequired || starSkipped) {
  ------------------
  |  Branch (3331:21): [True: 153, False: 772]
  |  Branch (3331:37): [True: 19, False: 753]
  ------------------
 3332|    169|                    headNode = new (fGrammarPoolMemoryManager) ContentSpecNode
 3333|    169|                    (
 3334|    169|                        ContentSpecNode::ZeroOrMore
 3335|    169|                        , headNode
 3336|    169|                        , 0
 3337|    169|                        , true
 3338|    169|                        , true
 3339|    169|                        , fGrammarPoolMemoryManager
 3340|    169|                    );
 3341|    169|                }
 3342|       |
 3343|       |                // Store the head node as the content spec of the element.
 3344|    925|                toFill.setContentSpec(headNode);
 3345|    925|                break;
 3346|    939|            }
 3347|       |
 3348|       |            // Its more than just a PCDATA, so an ending star will be required now
 3349|  1.33M|            starRequired = true;
 3350|       |
 3351|       |            // Space is legal here so check for a PE ref, but don't require space
 3352|  1.33M|            checkForPERef(false, true);
 3353|       |
 3354|       |            // Get a name token
 3355|  1.33M|            if (!fReaderMgr->getName(nameBuf))
  ------------------
  |  Branch (3355:17): [True: 5, False: 1.33M]
  ------------------
 3356|      5|            {
 3357|      5|                delete headNode;
 3358|      5|                fScanner->emitError(XMLErrs::ExpectedElementName);
 3359|      5|                return false;
 3360|      5|            }
 3361|       |
 3362|       |            //
 3363|       |            //  Create a leaf node for it. If we can find the element id for
 3364|       |            //  this element, then use it. Else, we have to fault in an element
 3365|       |            //  decl, marked as created because of being in a content model.
 3366|       |            //
 3367|  1.33M|            XMLElementDecl* decl = fDTDGrammar->getElemDecl(fEmptyNamespaceId, 0, nameBuf.getRawBuffer(), Grammar::TOP_LEVEL_SCOPE);
 3368|  1.33M|            if (!decl)
  ------------------
  |  Branch (3368:17): [True: 967, False: 1.32M]
  ------------------
 3369|    967|            {
 3370|    967|                decl = new (fGrammarPoolMemoryManager) DTDElementDecl
 3371|    967|                (
 3372|    967|                    nameBuf.getRawBuffer()
 3373|    967|                    , fEmptyNamespaceId
 3374|    967|                    , DTDElementDecl::Any
 3375|    967|                    , fGrammarPoolMemoryManager
 3376|    967|                );
 3377|    967|                decl->setCreateReason(XMLElementDecl::InContentModel);
 3378|    967|                decl->setExternalElemDeclaration(isReadingExternalEntity());
 3379|    967|                fDTDGrammar->putElemDecl(decl);
 3380|    967|            }
 3381|       |
 3382|       |            //
 3383|       |            //  If the current node is the original node, this is the first choice
 3384|       |            //  node, so create an initial choice node with the current node and
 3385|       |            //  the new element id. Store this as the head node.
 3386|       |            //
 3387|       |            //  Otherwise, we have to steal the right node of the previous choice
 3388|       |            //  and weave in another choice node there, which has the old choice
 3389|       |            //  as its left and the new leaf as its right.
 3390|       |            //
 3391|  1.33M|            if (curNode == orgNode)
  ------------------
  |  Branch (3391:17): [True: 172, False: 1.33M]
  ------------------
 3392|    172|            {
 3393|    172|                curNode = new (fGrammarPoolMemoryManager) ContentSpecNode
 3394|    172|                (
 3395|    172|                    ContentSpecNode::Choice
 3396|    172|                    , curNode
 3397|    172|                    , new (fGrammarPoolMemoryManager) ContentSpecNode
 3398|    172|                      (
 3399|    172|                          decl->getElementName()
 3400|    172|                          , fGrammarPoolMemoryManager
 3401|    172|                      )
 3402|    172|                    , true
 3403|    172|                    , true
 3404|    172|                    , fGrammarPoolMemoryManager
 3405|    172|                );
 3406|       |
 3407|       |                // Remember the top node
 3408|    172|                headNode = curNode;
 3409|    172|            }
 3410|  1.33M|             else
 3411|  1.33M|            {
 3412|  1.33M|                ContentSpecNode* oldRight = curNode->orphanSecond();
 3413|  1.33M|                curNode->setSecond
 3414|  1.33M|                (
 3415|  1.33M|                    new (fGrammarPoolMemoryManager) ContentSpecNode
 3416|  1.33M|                    (
 3417|  1.33M|                        ContentSpecNode::Choice
 3418|  1.33M|                        , oldRight
 3419|  1.33M|                        , new (fGrammarPoolMemoryManager) ContentSpecNode
 3420|  1.33M|                          (
 3421|  1.33M|                              decl->getElementName()
 3422|  1.33M|                              , fGrammarPoolMemoryManager
 3423|  1.33M|                          )
 3424|  1.33M|                        , true
 3425|  1.33M|                        , true
 3426|  1.33M|                        , fGrammarPoolMemoryManager
 3427|  1.33M|                    )
 3428|  1.33M|                );
 3429|       |
 3430|       |                // Make the new right node the current node
 3431|  1.33M|                curNode = curNode->getSecond();
 3432|  1.33M|            }
 3433|  1.33M|        }
 3434|  1.33M|    }
 3435|       |
 3436|    928|    return true;
 3437|    947|}
_ZN11xercesc_3_210DTDScanner16scanNotationDeclEv:
 3446|  2.87k|{
 3447|       |    // Space is required here so check for a PE ref, and require space
 3448|  2.87k|    if (!checkForPERef(false, true))
  ------------------
  |  Branch (3448:9): [True: 0, False: 2.87k]
  ------------------
 3449|      0|    {
 3450|      0|        fScanner->emitError(XMLErrs::ExpectedWhitespace);
 3451|      0|        fReaderMgr->skipPastChar(chCloseAngle);
 3452|      0|        return;
 3453|      0|    }
 3454|       |
 3455|       |    //
 3456|       |    //  And now we get a name, which is the name of the notation. Get a
 3457|       |    //  buffer for the name.
 3458|       |    //
 3459|  2.87k|    XMLBufBid bbName(fBufMgr);
 3460|  2.87k|    if (!fReaderMgr->getName(bbName.getBuffer()))
  ------------------
  |  Branch (3460:9): [True: 3, False: 2.86k]
  ------------------
 3461|      3|    {
 3462|      3|        fScanner->emitError(XMLErrs::ExpectedNotationName);
 3463|      3|        fReaderMgr->skipPastChar(chCloseAngle);
 3464|      3|        return;
 3465|      3|    }
 3466|       |
 3467|       |    // If namespaces are enabled, then no colons allowed
 3468|  2.86k|    if (fScanner->getDoNamespaces())
  ------------------
  |  Branch (3468:9): [True: 0, False: 2.86k]
  ------------------
 3469|      0|    {
 3470|      0|        if (XMLString::indexOf(bbName.getRawBuffer(), chColon) != -1)
  ------------------
  |  Branch (3470:13): [True: 0, False: 0]
  ------------------
 3471|      0|            fScanner->emitError(XMLErrs::ColonNotLegalWithNS);
 3472|      0|    }
 3473|       |
 3474|       |    // Space is required here so check for a PE ref, and require space
 3475|  2.86k|    if (!checkForPERef(false, true))
  ------------------
  |  Branch (3475:9): [True: 21, False: 2.84k]
  ------------------
 3476|     21|    {
 3477|     21|        fScanner->emitError(XMLErrs::ExpectedWhitespace);
 3478|     21|        fReaderMgr->skipPastChar(chCloseAngle);
 3479|     21|        return;
 3480|     21|    }
 3481|       |
 3482|       |    //
 3483|       |    //  And scan an external or public id. We need buffers to use for both
 3484|       |    //  of these.
 3485|       |    //
 3486|  2.84k|    XMLBufBid bbPubId(fBufMgr);
 3487|  2.84k|    XMLBufBid bbSysId(fBufMgr);
 3488|  2.84k|    if (!scanId(bbPubId.getBuffer(), bbSysId.getBuffer(), IDType_Either))
  ------------------
  |  Branch (3488:9): [True: 0, False: 2.84k]
  ------------------
 3489|      0|    {
 3490|      0|        fReaderMgr->skipPastChar(chCloseAngle);
 3491|      0|        return;
 3492|      0|    }
 3493|       |
 3494|       |    // We can have an optional space or PE ref here
 3495|  2.84k|    checkForPERef(false, true);
 3496|       |
 3497|       |    //
 3498|       |    //  See if it already exists. If so, add it to the notatino decl pool.
 3499|       |    //  Otherwise, if advanced callbacks are on, create a temp one and
 3500|       |    //  call out for that one.
 3501|       |    //
 3502|  2.84k|    XMLNotationDecl* decl = fDTDGrammar->getNotationDecl(bbName.getRawBuffer());
 3503|  2.84k|    bool isIgnoring = (decl != 0);
 3504|  2.84k|    if (isIgnoring)
  ------------------
  |  Branch (3504:9): [True: 926, False: 1.92k]
  ------------------
 3505|    926|    {
 3506|    926|        fScanner->emitError(XMLErrs::NotationAlreadyExists, bbName.getRawBuffer());
 3507|    926|    }
 3508|  1.92k|     else
 3509|  1.92k|    {
 3510|       |        // Fill in a new notation declaration and add it to the pool
 3511|  1.92k|        const XMLCh* publicId = bbPubId.getRawBuffer();
 3512|  1.92k|        const XMLCh* systemId = bbSysId.getRawBuffer();
 3513|  1.92k|        ReaderMgr::LastExtEntityInfo lastInfo;
 3514|  1.92k|        fReaderMgr->getLastExtEntityInfo(lastInfo);
 3515|       |
 3516|  1.92k|        decl = new (fGrammarPoolMemoryManager) XMLNotationDecl
 3517|  1.92k|        (
 3518|  1.92k|            bbName.getRawBuffer()
 3519|  1.92k|            , (publicId && *publicId) ? publicId : 0
  ------------------
  |  Branch (3519:16): [True: 1.88k, False: 33]
  |  Branch (3519:28): [True: 61, False: 1.82k]
  ------------------
 3520|  1.92k|            , (systemId && *systemId) ? systemId : 0
  ------------------
  |  Branch (3520:16): [True: 1.88k, False: 33]
  |  Branch (3520:28): [True: 18, False: 1.87k]
  ------------------
 3521|  1.92k|            , (lastInfo.systemId && *lastInfo.systemId) ? lastInfo.systemId : 0
  ------------------
  |  Branch (3521:16): [True: 1.88k, False: 33]
  |  Branch (3521:37): [True: 1.88k, False: 0]
  ------------------
 3522|  1.92k|            , fGrammarPoolMemoryManager
 3523|  1.92k|        );
 3524|  1.92k|        fDTDGrammar->putNotationDecl(decl);
 3525|  1.92k|    }
 3526|       |
 3527|       |    //
 3528|       |    //  If we have a document type handler, then tell it about this. If we
 3529|       |    //  are ignoring it, only call out if advanced callbacks are enabled.
 3530|       |    //
 3531|  2.84k|    if (fDocTypeHandler)
  ------------------
  |  Branch (3531:9): [True: 0, False: 2.84k]
  ------------------
 3532|      0|    {
 3533|      0|        fDocTypeHandler->notationDecl
 3534|      0|        (
 3535|      0|            *decl
 3536|      0|            , isIgnoring
 3537|      0|        );
 3538|      0|    }
 3539|       |
 3540|       |    // And one more optional space or PE ref
 3541|  2.84k|    checkForPERef(false, true);
 3542|       |
 3543|       |    // And skip the terminating bracket
 3544|  2.84k|    if (!fReaderMgr->skippedChar(chCloseAngle))
  ------------------
  |  Branch (3544:9): [True: 41, False: 2.80k]
  ------------------
 3545|     41|        fScanner->emitError(XMLErrs::UnterminatedNotationDecl);
 3546|  2.84k|}
_ZN11xercesc_3_210DTDScanner6scanPIEv:
 3558|  4.41k|{
 3559|  4.41k|    const XMLCh* namePtr = 0;
 3560|  4.41k|    const XMLCh* targetPtr = 0;
 3561|       |
 3562|       |    //
 3563|       |    //  If there are any spaces here, then warn about it. If we aren't in
 3564|       |    //  'first error' mode, then we'll come back and can easily pick up
 3565|       |    //  again by just skipping them.
 3566|       |    //
 3567|  4.41k|    if (fReaderMgr->lookingAtSpace())
  ------------------
  |  Branch (3567:9): [True: 1, False: 4.40k]
  ------------------
 3568|      1|    {
 3569|      1|        fScanner->emitError(XMLErrs::PINameExpected);
 3570|      1|        fReaderMgr->skipPastSpaces();
 3571|      1|    }
 3572|       |
 3573|       |    // Get a buffer for the PI name and scan it in
 3574|  4.41k|    XMLBufBid bbName(fBufMgr);
 3575|  4.41k|    if (!fReaderMgr->getName(bbName.getBuffer()))
  ------------------
  |  Branch (3575:9): [True: 2, False: 4.40k]
  ------------------
 3576|      2|    {
 3577|      2|        fScanner->emitError(XMLErrs::PINameExpected);
 3578|      2|        fReaderMgr->skipPastChar(chCloseAngle);
 3579|      2|        return;
 3580|      2|    }
 3581|       |
 3582|       |    // Point the name pointer at the raw data
 3583|  4.40k|    namePtr = bbName.getRawBuffer();
 3584|       |
 3585|       |    // See if it issome form of 'xml' and emit a warning
 3586|       |    //if (!XMLString::compareIString(namePtr, XMLUni::fgXMLString))
 3587|  4.40k|    if (bbName.getLen() == 3 &&
  ------------------
  |  Branch (3587:9): [True: 2.87k, False: 1.53k]
  ------------------
 3588|  4.40k|        (((namePtr[0] == chLatin_x) || (namePtr[0] == chLatin_X)) &&
  ------------------
  |  Branch (3588:11): [True: 1.18k, False: 1.68k]
  |  Branch (3588:40): [True: 727, False: 958]
  ------------------
 3589|  2.87k|         ((namePtr[1] == chLatin_m) || (namePtr[1] == chLatin_M)) &&
  ------------------
  |  Branch (3589:11): [True: 692, False: 1.22k]
  |  Branch (3589:40): [True: 598, False: 626]
  ------------------
 3590|  2.87k|         ((namePtr[2] == chLatin_l) || (namePtr[2] == chLatin_L))))       
  ------------------
  |  Branch (3590:11): [True: 2, False: 1.28k]
  |  Branch (3590:40): [True: 0, False: 1.28k]
  ------------------
 3591|      2|        fScanner->emitError(XMLErrs::NoPIStartsWithXML);
 3592|       |
 3593|       |    // If namespaces are enabled, then no colons allowed
 3594|  4.40k|    if (fScanner->getDoNamespaces())
  ------------------
  |  Branch (3594:9): [True: 0, False: 4.40k]
  ------------------
 3595|      0|    {
 3596|      0|        if (XMLString::indexOf(namePtr, chColon) != -1)
  ------------------
  |  Branch (3596:13): [True: 0, False: 0]
  ------------------
 3597|      0|            fScanner->emitError(XMLErrs::ColonNotLegalWithNS);
 3598|      0|    }
 3599|       |
 3600|       |    //
 3601|       |    //  If we don't hit a space next, then the PI has no target. If we do
 3602|       |    //  then get out the target. Get a buffer for it as well
 3603|       |    //
 3604|  4.40k|    XMLBufBid bbTarget(fBufMgr);
 3605|  4.40k|    if (fReaderMgr->skippedSpace())
  ------------------
  |  Branch (3605:9): [True: 848, False: 3.56k]
  ------------------
 3606|    848|    {
 3607|       |        // Skip any leading spaces
 3608|    848|        fReaderMgr->skipPastSpaces();
 3609|       |
 3610|    848|        bool gotLeadingSurrogate = false;
 3611|       |
 3612|       |        // It does have a target, so lets move on to deal with that.
 3613|  2.54M|        while (1)
  ------------------
  |  Branch (3613:16): [Folded - Ignored]
  ------------------
 3614|  2.54M|        {
 3615|  2.54M|            const XMLCh nextCh = fReaderMgr->getNextChar();
 3616|       |
 3617|       |            // Watch for an end of file, which is always bad here
 3618|  2.54M|            if (!nextCh)
  ------------------
  |  Branch (3618:17): [True: 37, False: 2.54M]
  ------------------
 3619|     37|            {
 3620|     37|                fScanner->emitError(XMLErrs::UnterminatedPI);
 3621|     37|                ThrowXMLwithMemMgr(UnexpectedEOFException, XMLExcepts::Gen_UnexpectedEOF, fMemoryManager);
  ------------------
  |  |  264|     37|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
 3622|     37|            }
 3623|       |
 3624|       |            // Watch for potential terminating character
 3625|  2.54M|            if (nextCh == chQuestion)
  ------------------
  |  Branch (3625:17): [True: 2.24k, False: 2.54M]
  ------------------
 3626|  2.24k|            {
 3627|       |                // It must be followed by '>' to be a termination of the target
 3628|  2.24k|                if (fReaderMgr->skippedChar(chCloseAngle))
  ------------------
  |  Branch (3628:21): [True: 784, False: 1.45k]
  ------------------
 3629|    784|                    break;
 3630|  2.24k|            }
 3631|       |
 3632|       |            // Check for correct surrogate pairs
 3633|  2.54M|            if ((nextCh >= 0xD800) && (nextCh <= 0xDBFF))
  ------------------
  |  Branch (3633:17): [True: 1.12k, False: 2.54M]
  |  Branch (3633:39): [True: 486, False: 635]
  ------------------
 3634|    486|            {
 3635|    486|                if (gotLeadingSurrogate)
  ------------------
  |  Branch (3635:21): [True: 1, False: 485]
  ------------------
 3636|      1|                    fScanner->emitError(XMLErrs::Expected2ndSurrogateChar);
 3637|    485|                else
 3638|    485|                    gotLeadingSurrogate = true;
 3639|    486|            }
 3640|  2.54M|             else
 3641|  2.54M|            {
 3642|  2.54M|                if (gotLeadingSurrogate)
  ------------------
  |  Branch (3642:21): [True: 484, False: 2.54M]
  ------------------
 3643|    484|                {
 3644|    484|                    if ((nextCh < 0xDC00) || (nextCh > 0xDFFF))
  ------------------
  |  Branch (3644:25): [True: 12, False: 472]
  |  Branch (3644:46): [True: 7, False: 465]
  ------------------
 3645|     19|                        fScanner->emitError(XMLErrs::Expected2ndSurrogateChar);
 3646|    484|                }
 3647|       |                // Its got to at least be a valid XML character
 3648|  2.54M|                else if (!fReaderMgr->getCurrentReader()->isXMLChar(nextCh)) {
  ------------------
  |  Branch (3648:26): [True: 3, False: 2.54M]
  ------------------
 3649|       |
 3650|      3|                    XMLCh tmpBuf[9];
 3651|      3|                    XMLString::binToText
 3652|      3|                    (
 3653|      3|                        nextCh
 3654|      3|                        , tmpBuf
 3655|      3|                        , 8
 3656|      3|                        , 16
 3657|      3|                        , fMemoryManager
 3658|      3|                    );
 3659|      3|                    fScanner->emitError(XMLErrs::InvalidCharacter, tmpBuf);
 3660|      3|                }
 3661|       |
 3662|  2.54M|                gotLeadingSurrogate = false;
 3663|  2.54M|            }
 3664|  2.54M|            bbTarget.append(nextCh);
 3665|  2.54M|        }
 3666|    848|    }
 3667|  3.56k|     else
 3668|  3.56k|    {
 3669|       |        // No target, but make sure its terminated ok
 3670|  3.56k|        if (!fReaderMgr->skippedChar(chQuestion))
  ------------------
  |  Branch (3670:13): [True: 12, False: 3.54k]
  ------------------
 3671|     12|        {
 3672|     12|            fScanner->emitError(XMLErrs::UnterminatedPI);
 3673|     12|            fReaderMgr->skipPastChar(chCloseAngle);
 3674|     12|            return;
 3675|     12|        }
 3676|       |
 3677|  3.54k|        if (!fReaderMgr->skippedChar(chCloseAngle))
  ------------------
  |  Branch (3677:13): [True: 3, False: 3.54k]
  ------------------
 3678|      3|        {
 3679|      3|            fScanner->emitError(XMLErrs::UnterminatedPI);
 3680|      3|            fReaderMgr->skipPastChar(chCloseAngle);
 3681|      3|            return;
 3682|      3|        }
 3683|  3.54k|    }
 3684|       |
 3685|       |    // Point the target pointer at the raw data
 3686|  4.35k|    targetPtr = bbTarget.getRawBuffer();
 3687|       |
 3688|       |    //
 3689|       |    //  If we have a handler, then call it.
 3690|       |    //
 3691|  4.35k|    if (fDocTypeHandler)
  ------------------
  |  Branch (3691:9): [True: 0, False: 4.35k]
  ------------------
 3692|      0|    {
 3693|      0|        fDocTypeHandler->doctypePI
 3694|      0|        (
 3695|      0|            namePtr
 3696|      0|            , targetPtr
 3697|      0|        );
 3698|      0|    }
 3699|  4.35k|}
_ZN11xercesc_3_210DTDScanner17scanPublicLiteralERNS_9XMLBufferE:
 3708|  4.60k|{
 3709|  4.60k|    toFill.reset();
 3710|       |
 3711|       |    // Get the next char which must be a single or double quote
 3712|  4.60k|    XMLCh quoteCh;
 3713|  4.60k|    if (!fReaderMgr->skipIfQuote(quoteCh)) {
  ------------------
  |  Branch (3713:9): [True: 6, False: 4.60k]
  ------------------
 3714|      6|        fScanner->emitError(XMLErrs::ExpectedQuotedString);
 3715|      6|        return false;
 3716|      6|    }
 3717|       |
 3718|  1.88M|    while (true)
  ------------------
  |  Branch (3718:12): [Folded - Ignored]
  ------------------
 3719|  1.88M|    {
 3720|  1.88M|        const XMLCh nextCh = fReaderMgr->getNextChar();
 3721|       |
 3722|       |        // Watch for EOF
 3723|  1.88M|        if (!nextCh)
  ------------------
  |  Branch (3723:13): [True: 33, False: 1.88M]
  ------------------
 3724|     33|            ThrowXMLwithMemMgr(UnexpectedEOFException, XMLExcepts::Gen_UnexpectedEOF, fMemoryManager);
  ------------------
  |  |  264|     33|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
 3725|       |
 3726|  1.88M|        if (nextCh == quoteCh)
  ------------------
  |  Branch (3726:13): [True: 4.53k, False: 1.88M]
  ------------------
 3727|  4.53k|            break;
 3728|       |
 3729|       |        //
 3730|       |        //  If its not a valid public id char, then report it but keep going
 3731|       |        //  since that's the best recovery scheme.
 3732|       |        //
 3733|  1.88M|        if (!fReaderMgr->getCurrentReader()->isPublicIdChar(nextCh))
  ------------------
  |  Branch (3733:13): [True: 29, False: 1.88M]
  ------------------
 3734|     29|        {
 3735|     29|            XMLCh tmpBuf[9];
 3736|     29|            XMLString::binToText
 3737|     29|            (
 3738|     29|                nextCh
 3739|     29|                , tmpBuf
 3740|     29|                , 8
 3741|     29|                , 16
 3742|     29|                , fMemoryManager
 3743|     29|            );
 3744|     29|            fScanner->emitError(XMLErrs::InvalidPublicIdChar, tmpBuf);
 3745|     29|        }
 3746|       |
 3747|  1.88M|        toFill.append(nextCh);
 3748|  1.88M|    }
 3749|  4.57k|    return true;
 3750|  4.60k|}
_ZN11xercesc_3_210DTDScanner17scanSystemLiteralERNS_9XMLBufferE:
 3759|  3.66k|{
 3760|  3.66k|    toFill.reset();
 3761|       |
 3762|       |    // Get the next char which must be a single or double quote
 3763|  3.66k|    XMLCh quoteCh;
 3764|  3.66k|    if (!fReaderMgr->skipIfQuote(quoteCh)) {
  ------------------
  |  Branch (3764:9): [True: 3, False: 3.66k]
  ------------------
 3765|      3|        fScanner->emitError(XMLErrs::ExpectedQuotedString);
 3766|      3|        return false;
 3767|      3|    }
 3768|       |
 3769|  3.66k|	XMLCh nextCh;
 3770|       |    // Break out on terminating quote
 3771|  29.2M|    while ((nextCh=fReaderMgr->getNextChar())!=quoteCh)
  ------------------
  |  Branch (3771:12): [True: 29.2M, False: 3.64k]
  ------------------
 3772|  29.2M|    {
 3773|       |        // Watch for EOF
 3774|  29.2M|        if (!nextCh)
  ------------------
  |  Branch (3774:13): [True: 20, False: 29.2M]
  ------------------
 3775|     20|            ThrowXMLwithMemMgr(UnexpectedEOFException, XMLExcepts::Gen_UnexpectedEOF, fMemoryManager);
  ------------------
  |  |  264|     20|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
 3776|  29.2M|        toFill.append(nextCh);
 3777|  29.2M|    }
 3778|  3.64k|    return true;
 3779|  3.66k|}
DTDScanner.cpp:_ZN11xercesc_3_2L11makeRepNodeEDsPNS_15ContentSpecNodeEPNS_13MemoryManagerE:
   60|  1.84M|{
   61|  1.84M|    if (testCh == chQuestion)
  ------------------
  |  Branch (61:9): [True: 17.7k, False: 1.83M]
  ------------------
   62|  17.7k|    {
   63|  17.7k|        return new (manager) ContentSpecNode
   64|  17.7k|        (
   65|  17.7k|            ContentSpecNode::ZeroOrOne
   66|  17.7k|            , prevNode
   67|  17.7k|            , 0
   68|  17.7k|            , true
   69|  17.7k|            , true
   70|  17.7k|            , manager
   71|  17.7k|        );
   72|  17.7k|    }
   73|  1.83M|     else if (testCh == chPlus)
  ------------------
  |  Branch (73:15): [True: 17.5k, False: 1.81M]
  ------------------
   74|  17.5k|    {
   75|  17.5k|        return new (manager) ContentSpecNode
   76|  17.5k|        (
   77|  17.5k|            ContentSpecNode::OneOrMore
   78|  17.5k|            , prevNode
   79|  17.5k|            , 0
   80|  17.5k|            , true
   81|  17.5k|            , true
   82|  17.5k|            , manager
   83|  17.5k|        );
   84|  17.5k|    }
   85|  1.81M|     else if (testCh == chAsterisk)
  ------------------
  |  Branch (85:15): [True: 18.5k, False: 1.79M]
  ------------------
   86|  18.5k|    {
   87|  18.5k|        return new (manager) ContentSpecNode
   88|  18.5k|        (
   89|  18.5k|            ContentSpecNode::ZeroOrMore
   90|  18.5k|            , prevNode
   91|  18.5k|            , 0
   92|  18.5k|            , true
   93|  18.5k|            , true
   94|  18.5k|            , manager
   95|  18.5k|        );
   96|  18.5k|    }
   97|       |
   98|       |    // Just return the incoming node
   99|  1.79M|    return prevNode;
  100|  1.84M|}

_ZN11xercesc_3_210DTDScanner23isReadingExternalEntityEv:
  272|  44.5k|inline bool DTDScanner::isReadingExternalEntity() {
  273|  44.5k|    return (fDocTypeReaderId != fReaderMgr->getCurrentReaderNum());
  274|  44.5k|}

_ZN11xercesc_3_212DTDValidatorC2EPNS_16XMLErrorReporterE:
   40|  7.12k|    XMLValidator(errReporter)
   41|  7.12k|    , fDTDGrammar(0)
   42|  7.12k|{
   43|  7.12k|    reset();
   44|  7.12k|}
_ZN11xercesc_3_212DTDValidatorD2Ev:
   47|  7.12k|{
   48|  7.12k|}
_ZN11xercesc_3_212DTDValidator12checkContentEPNS_14XMLElementDeclEPPNS_5QNameEmPm:
   58|  5.66M|{
   59|       |    //
   60|       |    //  Look up the element id in our element decl pool. This will get us
   61|       |    //  the element decl in our own way of looking at them.
   62|       |    //
   63|  5.66M|    if (!elemDecl)
  ------------------
  |  Branch (63:9): [True: 0, False: 5.66M]
  ------------------
   64|      0|        ThrowXMLwithMemMgr(RuntimeException, XMLExcepts::Val_InvalidElemId, getScanner()->getMemoryManager());
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
   65|       |
   66|       |    //
   67|       |    //  Get the content spec type of this element. This will tell us what
   68|       |    //  to do to validate it.
   69|       |    //
   70|  5.66M|    const DTDElementDecl::ModelTypes modelType = ((DTDElementDecl*) elemDecl)->getModelType();
   71|       |
   72|  5.66M|    if (modelType == DTDElementDecl::Empty)
  ------------------
  |  Branch (72:9): [True: 553, False: 5.66M]
  ------------------
   73|    553|    {
   74|       |        //
   75|       |        //  We can do this one here. It cannot have any children. If it does
   76|       |        //  we return 0 as the index of the first bad child.
   77|       |        //
   78|    553|        if (childCount)
  ------------------
  |  Branch (78:13): [True: 226, False: 327]
  ------------------
   79|    226|        {
   80|    226|            *indexFailingChild=0;
   81|    226|            return false;
   82|    226|        }
   83|    553|    }
   84|  5.66M|     else if (modelType == DTDElementDecl::Any)
  ------------------
  |  Branch (84:15): [True: 5.63M, False: 28.9k]
  ------------------
   85|  5.63M|    {
   86|       |        // We pass no judgement on this one, anything goes
   87|  5.63M|    }
   88|  28.9k|     else if ((modelType == DTDElementDecl::Mixed_Simple)
  ------------------
  |  Branch (88:15): [True: 2.20k, False: 26.7k]
  ------------------
   89|  28.9k|          ||  (modelType == DTDElementDecl::Children))
  ------------------
  |  Branch (89:15): [True: 26.7k, False: 0]
  ------------------
   90|  28.9k|    {
   91|       |        // Get the element's content model or fault it in
   92|  28.9k|        const XMLContentModel* elemCM = elemDecl->getContentModel();
   93|       |
   94|       |        // Ask it to validate and return its return
   95|  28.9k|        return elemCM->validateContent(children, childCount, getScanner()->getEmptyNamespaceId(), indexFailingChild, getScanner()->getMemoryManager());
   96|  28.9k|    }
   97|      0|     else
   98|      0|    {
   99|      0|        ThrowXMLwithMemMgr(RuntimeException, XMLExcepts::CM_UnknownCMType, getScanner()->getMemoryManager());
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  100|      0|    }
  101|       |
  102|       |    // Went ok, so return success
  103|  5.63M|    return true;
  104|  5.66M|}
_ZN11xercesc_3_212DTDValidator5resetEv:
  113|  14.2k|{
  114|  14.2k|}
_ZN11xercesc_3_212DTDValidator17validateAttrValueEPKNS_9XMLAttDefEPKDsbPKNS_14XMLElementDeclE:
  129|  5.52M|{
  130|       |    //
  131|       |    //  Get quick refs to lost of of the stuff in the passed objects in
  132|       |    //  order to simplify the code below, which will reference them very
  133|       |    //  often.
  134|       |    //
  135|  5.52M|    const XMLAttDef::AttTypes       type = attDef->getType();
  136|  5.52M|    const XMLAttDef::DefAttTypes    defType = attDef->getDefaultType();
  137|  5.52M|    const XMLCh* const              valueText = attDef->getValue();
  138|  5.52M|    const XMLCh* const              fullName = attDef->getFullName();
  139|  5.52M|    const XMLCh* const              enumList = attDef->getEnumeration();
  140|  5.52M|    const bool                      isExternal = attDef->isExternal();
  141|       |
  142|       |    //
  143|       |    //  If the default type is fixed, then make sure the passed value maps
  144|       |    //  to the fixed value.
  145|       |    //  If during preContentValidation, the value we are validating is the fixed value itself
  146|       |    //  so no need to compare.
  147|       |    //  Only need to do this for regular attribute value validation
  148|       |    //
  149|  5.52M|    if (defType == XMLAttDef::Fixed && !preValidation)
  ------------------
  |  Branch (149:9): [True: 2.19k, False: 5.52M]
  |  Branch (149:40): [True: 2.05k, False: 144]
  ------------------
  150|  2.05k|    {
  151|  2.05k|        if (!XMLString::equals(attrValue, valueText))
  ------------------
  |  Branch (151:13): [True: 479, False: 1.57k]
  ------------------
  152|    479|            emitError(XMLValid::NotSameAsFixedValue, fullName, attrValue, valueText);
  153|  2.05k|    }
  154|       |
  155|       |    //
  156|       |    //  If its a CDATA attribute, then we are done with any DTD level
  157|       |    //  validation else do the rest.
  158|       |    //
  159|  5.52M|    if (type == XMLAttDef::CData)
  ------------------
  |  Branch (159:9): [True: 282, False: 5.52M]
  ------------------
  160|    282|        return;
  161|       |
  162|       |
  163|       |
  164|       |    // An empty string cannot be valid for any of the other types
  165|  5.52M|    if (!attrValue[0])
  ------------------
  |  Branch (165:9): [True: 3.41k, False: 5.52M]
  ------------------
  166|  3.41k|    {
  167|  3.41k|        emitError(XMLValid::InvalidEmptyAttValue, fullName);
  168|  3.41k|        return;
  169|  3.41k|    }
  170|       |
  171|       |    // See whether we are doing multiple values or not
  172|  5.52M|    const bool multipleValues =
  173|  5.52M|    (
  174|  5.52M|        (type == XMLAttDef::IDRefs)
  ------------------
  |  Branch (174:9): [True: 5.44M, False: 80.1k]
  ------------------
  175|  5.52M|        || (type == XMLAttDef::Entities)
  ------------------
  |  Branch (175:12): [True: 4.30k, False: 75.8k]
  ------------------
  176|  5.52M|        || (type == XMLAttDef::NmTokens)
  ------------------
  |  Branch (176:12): [True: 211, False: 75.5k]
  ------------------
  177|  5.52M|        || (type == XMLAttDef::Notation)
  ------------------
  |  Branch (177:12): [True: 319, False: 75.2k]
  ------------------
  178|  5.52M|        || (type == XMLAttDef::Enumeration)
  ------------------
  |  Branch (178:12): [True: 5.99k, False: 69.2k]
  ------------------
  179|  5.52M|    );
  180|       |
  181|       |    // And whether we must check for a first name char
  182|  5.52M|    const bool firstNameChar =
  183|  5.52M|    (
  184|  5.52M|        (type == XMLAttDef::ID)
  ------------------
  |  Branch (184:9): [True: 58.9k, False: 5.46M]
  ------------------
  185|  5.52M|        || (type == XMLAttDef::IDRef)
  ------------------
  |  Branch (185:12): [True: 1.62k, False: 5.46M]
  ------------------
  186|  5.52M|        || (type == XMLAttDef::IDRefs)
  ------------------
  |  Branch (186:12): [True: 5.44M, False: 19.5k]
  ------------------
  187|  5.52M|        || (type == XMLAttDef::Entity)
  ------------------
  |  Branch (187:12): [True: 8.70k, False: 10.8k]
  ------------------
  188|  5.52M|        || (type == XMLAttDef::Entities)
  ------------------
  |  Branch (188:12): [True: 4.30k, False: 6.52k]
  ------------------
  189|  5.52M|        || (type == XMLAttDef::Notation)
  ------------------
  |  Branch (189:12): [True: 319, False: 6.20k]
  ------------------
  190|  5.52M|    );
  191|       |
  192|       |    // Whether it requires ref checking stuff
  193|  5.52M|    const bool isARefType
  194|  5.52M|    (
  195|  5.52M|        (type == XMLAttDef::ID)
  ------------------
  |  Branch (195:9): [True: 58.9k, False: 5.46M]
  ------------------
  196|  5.52M|        || (type == XMLAttDef::IDRef)
  ------------------
  |  Branch (196:12): [True: 1.62k, False: 5.46M]
  ------------------
  197|  5.52M|        || (type == XMLAttDef::IDRefs)
  ------------------
  |  Branch (197:12): [True: 5.44M, False: 19.5k]
  ------------------
  198|  5.52M|    );
  199|       |
  200|       |    // Some trigger flags to avoid issuing redundant errors and whatnot    
  201|  5.52M|    bool alreadyCapped = false;
  202|       |
  203|       |    //
  204|       |    //  Make a copy of the text that we can mangle and get a pointer we can
  205|       |    //  move through the value
  206|       |    //
  207|       |
  208|       |    // Use a stack-based buffer, when possible...
  209|  5.52M|    XMLCh   tempBuffer[100];
  210|       |
  211|  5.52M|    XMLCh* pszTmpVal = 0;
  212|       |
  213|  5.52M|    ArrayJanitor<XMLCh> janTmpVal(0);
  214|       |
  215|  5.52M|    if (XMLString::stringLen(attrValue) < sizeof(tempBuffer) / sizeof(tempBuffer[0]))
  ------------------
  |  Branch (215:9): [True: 5.52M, False: 1.02k]
  ------------------
  216|  5.52M|    {
  217|  5.52M|        XMLString::copyString(tempBuffer, attrValue);
  218|  5.52M|        pszTmpVal = tempBuffer;
  219|  5.52M|    }
  220|  1.02k|    else
  221|  1.02k|    {
  222|  1.02k|        janTmpVal.reset(XMLString::replicate(attrValue, getScanner()->getMemoryManager()), getScanner()->getMemoryManager());
  223|  1.02k|        pszTmpVal = janTmpVal.get();
  224|  1.02k|    }
  225|       |
  226|       |    //  if the type is an enumeration, normalize it, unless standalone = yes is specified
  227|       |    //  "The standalone document declaration MUST have the value "no" if any external markup declarations contain declarations of:
  228|       |    //   - ...
  229|       |    //   - attributes with tokenized types, where the attribute appears in the document with a value such that normalization will 
  230|       |    //     produce a different value from that which would be produced in the absence of the declaration"
  231|  5.52M|    if (multipleValues && (!isExternal || !getScanner()->getStandalone()))
  ------------------
  |  Branch (231:9): [True: 5.45M, False: 69.2k]
  |  Branch (231:28): [True: 10.9k, False: 5.44M]
  |  Branch (231:43): [True: 5.44M, False: 312]
  ------------------
  232|  5.45M|        XMLString::collapseWS(pszTmpVal, getScanner()->getMemoryManager());
  233|       |
  234|  5.52M|    XMLCh* valPtr = pszTmpVal;
  235|       |
  236|  5.52M|    bool doNamespace = getScanner()->getDoNamespaces();
  237|       |
  238|  6.75M|    while (true)
  ------------------
  |  Branch (238:12): [Folded - Ignored]
  ------------------
  239|  6.75M|    {
  240|       |        //
  241|       |        //  Make sure the first character is a valid first name char, i.e.
  242|       |        //  if its a Name value. For NmToken values we don't treat the first
  243|       |        //  char any differently.
  244|       |        //
  245|  6.75M|        if (firstNameChar)
  ------------------
  |  Branch (245:13): [True: 6.74M, False: 9.07k]
  ------------------
  246|  6.74M|        {
  247|       |            // If its not, emit and error but try to keep going
  248|  6.74M|            if (!getReaderMgr()->getCurrentReader()->isFirstNameChar(*valPtr))
  ------------------
  |  Branch (248:17): [True: 5.45M, False: 1.28M]
  ------------------
  249|  5.45M|                emitError(XMLValid::AttrValNotName, valPtr, fullName);
  250|  6.74M|            valPtr++;
  251|  6.74M|        }
  252|       |
  253|       |        // Make sure all the remaining chars are valid name chars
  254|  13.8M|        while (*valPtr)
  ------------------
  |  Branch (254:16): [True: 12.5M, False: 1.28M]
  ------------------
  255|  12.5M|        {
  256|       |            //
  257|       |            //  If we hit a whitespace, its either a break between two
  258|       |            //  or more values, or an error if we have a single value.
  259|       |            //
  260|       |            //
  261|       |            //   XML1.0-3rd
  262|       |            //
  263|       |            //   [6]   Names   ::=   Name (#x20 Name)*
  264|       |            //   [8]   Nmtokens   ::=   Nmtoken (#x20 Nmtoken)*
  265|       |            //
  266|       |            //   only and only ONE #x20 is allowed to be the delimiter
  267|       |            //
  268|  12.5M|            if (*valPtr==chSpace)
  ------------------
  |  Branch (268:17): [True: 1.22M, False: 11.3M]
  ------------------
  269|  1.22M|            {
  270|  1.22M|                if (!multipleValues)
  ------------------
  |  Branch (270:21): [True: 517, False: 1.22M]
  ------------------
  271|    517|                {
  272|    517|                    emitError(XMLValid::NoMultipleValues, fullName);
  273|    517|                    return;
  274|    517|                }
  275|       |
  276|  1.22M|                break;
  277|  1.22M|            }
  278|       |
  279|       |            // Now this attribute can be of type
  280|       |            //     ID, IDREF, IDREFS, ENTITY, ENTITIES, NOTATION, NMTOKEN, NMTOKENS, ENUMERATION
  281|       |            //  All these must be valid XMLName
  282|       |            // If namespace is enabled, colon is not allowed in the first 6
  283|       |
  284|  11.3M|            if (doNamespace && *valPtr == chColon && firstNameChar)
  ------------------
  |  Branch (284:17): [True: 0, False: 11.3M]
  |  Branch (284:32): [True: 0, False: 0]
  |  Branch (284:54): [True: 0, False: 0]
  ------------------
  285|      0|                emitError(XMLValid::ColonNotValidWithNS);
  286|       |
  287|  11.3M|            if (!getReaderMgr()->getCurrentReader()->isNameChar(*valPtr))
  ------------------
  |  Branch (287:17): [True: 4.24M, False: 7.10M]
  ------------------
  288|  4.24M|            {
  289|  4.24M|                emitError(XMLValid::AttrValNotName, valPtr, fullName);
  290|  4.24M|                return;
  291|  4.24M|            }
  292|  7.10M|            valPtr++;
  293|  7.10M|        }
  294|       |
  295|       |        //
  296|       |        //  Cap it off at the current non-name char. If already capped,
  297|       |        //  then remember this.
  298|       |        //
  299|  2.51M|        if (!(*valPtr))
  ------------------
  |  Branch (299:13): [True: 1.28M, False: 1.22M]
  ------------------
  300|  1.28M|            alreadyCapped = true;
  301|  2.51M|        *valPtr = 0;
  302|       |
  303|       |        //
  304|       |        //  If this type of attribute requires that we track reference
  305|       |        //  stuff, then handle that.
  306|       |        //
  307|  2.51M|        if (isARefType)
  ------------------
  |  Branch (307:13): [True: 2.49M, False: 20.5k]
  ------------------
  308|  2.49M|        {
  309|  2.49M|            if ((type == XMLAttDef::ID)
  ------------------
  |  Branch (309:17): [True: 56.7k, False: 2.43M]
  ------------------
  310|  2.49M|            ||  (type == XMLAttDef::IDRef)
  ------------------
  |  Branch (310:17): [True: 1.54k, False: 2.43M]
  ------------------
  311|  2.49M|            ||  (type == XMLAttDef::IDRefs))
  ------------------
  |  Branch (311:17): [True: 2.43M, False: 0]
  ------------------
  312|  2.49M|            {
  313|  2.49M|                XMLRefInfo* find = getScanner()->getIDRefList()->get(pszTmpVal);
  314|  2.49M|                if (find)
  ------------------
  |  Branch (314:21): [True: 2.48M, False: 8.08k]
  ------------------
  315|  2.48M|                {
  316|  2.48M|                    if (find->getDeclared() && (type == XMLAttDef::ID))
  ------------------
  |  Branch (316:25): [True: 56.6k, False: 2.42M]
  |  Branch (316:48): [True: 56.5k, False: 25]
  ------------------
  317|  56.5k|                        emitError(XMLValid::ReusedIDValue, pszTmpVal);
  318|  2.48M|                }
  319|  8.08k|                 else
  320|  8.08k|                {
  321|  8.08k|                    find = new (getScanner()->getMemoryManager()) XMLRefInfo
  322|  8.08k|                    (
  323|  8.08k|                        pszTmpVal
  324|  8.08k|                        , false
  325|  8.08k|                        , false
  326|  8.08k|                        , getScanner()->getMemoryManager()
  327|  8.08k|                    );
  328|  8.08k|                    getScanner()->getIDRefList()->put((void*)find->getRefName(), find);
  329|  8.08k|                }
  330|       |
  331|       |                //
  332|       |                //  Mark it declared or used, which might be redundant in some cases
  333|       |                //  but not worth checking
  334|       |                //
  335|  2.49M|                if (type == XMLAttDef::ID)
  ------------------
  |  Branch (335:21): [True: 56.7k, False: 2.43M]
  ------------------
  336|  56.7k|                    find->setDeclared(true);
  337|  2.43M|                else {
  338|  2.43M|                    if (!preValidation) {
  ------------------
  |  Branch (338:25): [True: 2.43M, False: 2.81k]
  ------------------
  339|  2.43M|                        find->setUsed(true);
  340|  2.43M|                    }
  341|  2.43M|                }
  342|  2.49M|            }
  343|  2.49M|        }
  344|  20.5k|         else if (!preValidation && ((type == XMLAttDef::Entity) || (type == XMLAttDef::Entities)))
  ------------------
  |  Branch (344:19): [True: 19.0k, False: 1.53k]
  |  Branch (344:38): [True: 7.35k, False: 11.6k]
  |  Branch (344:69): [True: 4.10k, False: 7.58k]
  ------------------
  345|  11.4k|        {
  346|       |            //
  347|       |            //  If its refering to a entity, then look up the name in the
  348|       |            //  general entity pool. If not there, then its an error. If its
  349|       |            //  not an external unparsed entity, then its an error.
  350|       |            //
  351|       |            //  In case of pre-validation, the above errors should be ignored.
  352|       |            //
  353|  11.4k|            const XMLEntityDecl* decl = fDTDGrammar->getEntityDecl(pszTmpVal);
  354|  11.4k|            if (decl)
  ------------------
  |  Branch (354:17): [True: 2.71k, False: 8.74k]
  ------------------
  355|  2.71k|            {
  356|  2.71k|                if (!decl->isUnparsed())
  ------------------
  |  Branch (356:21): [True: 2.71k, False: 0]
  ------------------
  357|  2.71k|                    emitError(XMLValid::BadEntityRefAttr, pszTmpVal, fullName);
  358|  2.71k|            }
  359|  8.74k|             else
  360|  8.74k|            {
  361|  8.74k|                emitError
  362|  8.74k|                (
  363|  8.74k|                    XMLValid::UnknownEntityRefAttr
  364|  8.74k|                    , fullName
  365|  8.74k|                    , pszTmpVal
  366|  8.74k|                );
  367|  8.74k|            }
  368|  11.4k|        }
  369|  9.11k|         else if ((type == XMLAttDef::Notation) || (type == XMLAttDef::Enumeration))
  ------------------
  |  Branch (369:19): [True: 2.43k, False: 6.68k]
  |  Branch (369:52): [True: 5.72k, False: 955]
  ------------------
  370|  8.16k|        {
  371|       |            //
  372|       |            //  Make sure that this value maps to one of the enumeration or
  373|       |            //  notation values in the enumList parameter. We don't have to
  374|       |            //  look it up in the notation pool (if a notation) because we
  375|       |            //  will look up the enumerated values themselves. If they are in
  376|       |            //  the notation pool (after the DTD is parsed), then obviously
  377|       |            //  this value will be legal since it matches one of them.
  378|       |            //
  379|  8.16k|            if (!XMLString::isInList(pszTmpVal, enumList))
  ------------------
  |  Branch (379:17): [True: 7.32k, False: 833]
  ------------------
  380|  7.32k|                emitError(XMLValid::DoesNotMatchEnumList, pszTmpVal, fullName);
  381|  8.16k|        }
  382|       |
  383|       |        // If not doing multiple values, then we are done
  384|  2.51M|        if (!multipleValues)
  ------------------
  |  Branch (384:13): [True: 65.7k, False: 2.44M]
  ------------------
  385|  65.7k|            break;
  386|       |
  387|       |        //
  388|       |        //  If we are at the end, then break out now, else move up to the
  389|       |        //  next char and update the base pointer.
  390|       |        //
  391|  2.44M|        if (alreadyCapped)
  ------------------
  |  Branch (391:13): [True: 1.21M, False: 1.22M]
  ------------------
  392|  1.21M|            break;
  393|       |
  394|  1.22M|        valPtr++;
  395|  1.22M|        pszTmpVal = valPtr;
  396|  1.22M|    }
  397|       |
  398|  5.52M|}
_ZN11xercesc_3_212DTDValidator20preContentValidationEbb:
  405|  3.58k|{
  406|       |    //
  407|       |    //  Lets enumerate all of the elements in the element decl pool
  408|       |    //  and put out an error for any that did not get declared.
  409|       |    //  We also check all of the attributes as well.
  410|       |    //
  411|  3.58k|    NameIdPoolEnumerator<DTDElementDecl> elemEnum = fDTDGrammar->getElemEnumerator();
  412|  3.58k|    fDTDGrammar->setValidated(true);
  413|  30.2k|    while (elemEnum.hasMoreElements())
  ------------------
  |  Branch (413:12): [True: 26.6k, False: 3.58k]
  ------------------
  414|  26.6k|    {
  415|  26.6k|        const DTDElementDecl& curElem = elemEnum.nextElement();
  416|  26.6k|        const DTDElementDecl::CreateReasons reason = curElem.getCreateReason();
  417|       |
  418|       |        //
  419|       |        //  See if this element decl was ever marked as declared. If
  420|       |        //  not, then put out an error. In some cases its just
  421|       |        //  a warning, such as being referenced in a content model.
  422|       |        //
  423|  26.6k|        if (reason != XMLElementDecl::Declared)
  ------------------
  |  Branch (423:13): [True: 24.3k, False: 2.31k]
  ------------------
  424|  24.3k|        {
  425|  24.3k|            if (reason == XMLElementDecl::AttList)
  ------------------
  |  Branch (425:17): [True: 967, False: 23.3k]
  ------------------
  426|    967|            {
  427|    967|                getScanner()->emitError
  428|    967|                (
  429|    967|                    XMLErrs::UndeclaredElemInAttList
  430|    967|                    , curElem.getFullName()
  431|    967|                );
  432|    967|            }
  433|  23.3k|             else if (reason == XMLElementDecl::AsRootElem)
  ------------------
  |  Branch (433:23): [True: 3.52k, False: 19.8k]
  ------------------
  434|  3.52k|            {
  435|       |                // It's ok that the root element is not declared in the DTD
  436|       |                /*
  437|       |                emitError
  438|       |                (
  439|       |                    XMLValid::UndeclaredElemInDocType
  440|       |                    , curElem.getFullName()
  441|       |                );*/
  442|  3.52k|            }
  443|  19.8k|             else if (reason == XMLElementDecl::InContentModel)
  ------------------
  |  Branch (443:23): [True: 19.8k, False: 0]
  ------------------
  444|  19.8k|            {
  445|  19.8k|                getScanner()->emitError
  446|  19.8k|                (
  447|  19.8k|                    XMLErrs::UndeclaredElemInCM
  448|  19.8k|                    , curElem.getFullName()
  449|  19.8k|                );
  450|  19.8k|            }
  451|      0|            else
  452|      0|            {
  453|       |                #if defined(XERCES_DEBUG)
  454|       |                  if(reuseGrammar && reason == XMLElementDecl::JustFaultIn){
  455|       |                  }
  456|       |                  else
  457|       |                      ThrowXMLwithMemMgr(RuntimeException, XMLExcepts::DTD_UnknownCreateReason, getScanner()->getMemoryManager());
  458|       |                #endif
  459|      0|            }
  460|  24.3k|        }
  461|       |
  462|       |        //
  463|       |        //  Check all of the attributes of the current element.
  464|       |        //  We check for:
  465|       |        //
  466|       |        //  1) Multiple ID attributes
  467|       |        //  2) That all of the default values of attributes are
  468|       |        //      valid for their type.
  469|       |        //  3) That for any notation types, that their lists
  470|       |        //      of possible values refer to declared notations.
  471|       |        //
  472|       |        //  4) XML1.0(3rd edition)
  473|       |        //
  474|       |        //     Validity constraint: One Notation Per Element Type
  475|       |        //     An element type MUST NOT have more than one NOTATION attribute specified.
  476|       |        //
  477|       |        //     Validity constraint: No Notation on Empty Element
  478|       |        //     For compatibility, an attribute of type NOTATION MUST NOT be declared on an element declared EMPTY.
  479|       |        //
  480|       |        //     Validity constraint: No Duplicate Tokens
  481|       |        //     The notation names in a single NotationType attribute declaration, as well as 
  482|       |        //     the NmTokens in a single Enumeration attribute declaration, MUST all be distinct.
  483|       |        //
  484|       |
  485|  26.6k|        XMLAttDefList& attDefList = curElem.getAttDefList();
  486|  26.6k|        bool seenId = false;
  487|  26.6k|        bool seenNOTATION = false;
  488|  26.6k|        bool elemEmpty = (curElem.getModelType() == DTDElementDecl::Empty);
  489|       |
  490|  29.3k|        for(XMLSize_t i=0; i<attDefList.getAttDefCount(); i++)
  ------------------
  |  Branch (490:28): [True: 2.79k, False: 26.5k]
  ------------------
  491|  2.79k|        {
  492|  2.79k|            const XMLAttDef& curAttDef = attDefList.getAttDef(i);
  493|       |
  494|  2.79k|            if (curAttDef.getType() == XMLAttDef::ID)
  ------------------
  |  Branch (494:17): [True: 250, False: 2.54k]
  ------------------
  495|    250|            {
  496|    250|                if (seenId)
  ------------------
  |  Branch (496:21): [True: 34, False: 216]
  ------------------
  497|     34|                {
  498|     34|                    emitError
  499|     34|                    (
  500|     34|                        XMLValid::MultipleIdAttrs
  501|     34|                        , curElem.getFullName()
  502|     34|                    );
  503|     34|                    break;
  504|     34|                }
  505|       |
  506|    216|                seenId = true;
  507|    216|            }
  508|  2.54k|             else if (curAttDef.getType() == XMLAttDef::Notation)
  ------------------
  |  Branch (508:23): [True: 99, False: 2.44k]
  ------------------
  509|     99|            {
  510|     99|                if (seenNOTATION)
  ------------------
  |  Branch (510:21): [True: 12, False: 87]
  ------------------
  511|     12|                {
  512|     12|                    emitError
  513|     12|                    (
  514|     12|                        XMLValid::ElemOneNotationAttr
  515|     12|                      , curElem.getFullName()
  516|     12|                    );
  517|       |
  518|     12|                    break;
  519|     12|                }
  520|       |
  521|     87|                seenNOTATION = true;
  522|       |
  523|       |                // no notation attribute on empty element
  524|     87|                if (elemEmpty)
  ------------------
  |  Branch (524:21): [True: 1, False: 86]
  ------------------
  525|      1|                {
  526|      1|                    emitError
  527|      1|                   (
  528|      1|                      XMLValid::EmptyElemNotationAttr
  529|      1|                    , curElem.getFullName()
  530|      1|                    , curAttDef.getFullName()
  531|      1|                    );
  532|       |
  533|      1|                    break;
  534|      1|                }
  535|       |
  536|       |                //go through enumeration list to check
  537|       |                // distinct 
  538|       |                // notation declaration
  539|     86|                if (curAttDef.getEnumeration())
  ------------------
  |  Branch (539:21): [True: 86, False: 0]
  ------------------
  540|     86|                {
  541|     86|                    checkTokenList(curAttDef, true);
  542|     86|                }
  543|     86|             }
  544|  2.44k|             else if (curAttDef.getType() == XMLAttDef::Enumeration )
  ------------------
  |  Branch (544:23): [True: 1.18k, False: 1.25k]
  ------------------
  545|  1.18k|             {
  546|       |                //go through enumeration list to check
  547|       |                // distinct only
  548|  1.18k|                if (curAttDef.getEnumeration())
  ------------------
  |  Branch (548:21): [True: 1.18k, False: 0]
  ------------------
  549|  1.18k|                {
  550|  1.18k|                    checkTokenList(curAttDef, false);
  551|  1.18k|                }
  552|  1.18k|             }
  553|       |
  554|       |            // If it has a default/fixed value, then validate it
  555|  2.74k|            if (validateDefAttr && curAttDef.getValue())
  ------------------
  |  Branch (555:17): [True: 2.74k, False: 0]
  |  Branch (555:36): [True: 2.48k, False: 257]
  ------------------
  556|  2.48k|            {
  557|  2.48k|                validateAttrValue
  558|  2.48k|                (
  559|  2.48k|                    &curAttDef
  560|  2.48k|                    , curAttDef.getValue()
  561|  2.48k|                    , true
  562|  2.48k|                    , &curElem
  563|  2.48k|                );
  564|  2.48k|            }
  565|  2.74k|        }
  566|  26.6k|    }
  567|       |
  568|       |    //
  569|       |    //  And enumerate all of the general entities. If any of them
  570|       |    //  reference a notation, then make sure the notation exists.
  571|       |    //
  572|  3.58k|    NameIdPoolEnumerator<DTDEntityDecl> entEnum = fDTDGrammar->getEntityEnumerator();
  573|  5.05k|    while (entEnum.hasMoreElements())
  ------------------
  |  Branch (573:12): [True: 1.46k, False: 3.58k]
  ------------------
  574|  1.46k|    {
  575|  1.46k|        const DTDEntityDecl& curEntity = entEnum.nextElement();
  576|       |
  577|  1.46k|        if (!curEntity.getNotationName())
  ------------------
  |  Branch (577:13): [True: 1.36k, False: 101]
  ------------------
  578|  1.36k|            continue;
  579|       |
  580|       |        // It has a notation name, so look it up
  581|    101|        if (!fDTDGrammar->getNotationDecl(curEntity.getNotationName()))
  ------------------
  |  Branch (581:13): [True: 101, False: 0]
  ------------------
  582|    101|        {
  583|    101|            emitError
  584|    101|            (
  585|    101|                XMLValid::NotationNotDeclared
  586|    101|                , curEntity.getNotationName()
  587|    101|            );
  588|    101|        }
  589|    101|    }
  590|  3.58k|}
_ZN11xercesc_3_212DTDValidator14checkTokenListERKNS_9XMLAttDefEb:
  609|  1.27k|{
  610|       |
  611|  1.27k|    XMLCh* list = XMLString::replicate(curAttDef.getEnumeration(), getScanner()->getMemoryManager());
  612|  1.27k|    ArrayJanitor<XMLCh> janList(list, getScanner()->getMemoryManager());
  613|       |
  614|       |    //
  615|       |    //  Search forward for a space or a null. If a null,
  616|       |    //  we are done. If a space, cap it and look it up.
  617|       |    //
  618|  1.27k|    bool    breakFlag = false;
  619|  1.27k|    XMLCh*  listPtr = list;
  620|  1.27k|    XMLCh*  lastPtr = listPtr;
  621|  4.33k|    while (true)
  ------------------
  |  Branch (621:12): [Folded - Ignored]
  ------------------
  622|  4.33k|    {
  623|   141k|        while (*listPtr && (*listPtr != chSpace))
  ------------------
  |  Branch (623:16): [True: 139k, False: 1.27k]
  |  Branch (623:28): [True: 136k, False: 3.06k]
  ------------------
  624|   136k|            listPtr++;
  625|       |
  626|       |        //
  627|       |        //  If at the end, indicate we need to break after
  628|       |        //  this one. Else, cap it off here.
  629|       |        //
  630|  4.33k|        if (!*listPtr)
  ------------------
  |  Branch (630:13): [True: 1.27k, False: 3.06k]
  ------------------
  631|  1.27k|            breakFlag = true;
  632|  3.06k|        else
  633|  3.06k|            *listPtr++ = chNull;
  634|       |
  635|       |        //distinction check
  636|       |        //there should be no same token found in the remaining list
  637|  4.33k|        if (XMLString::isInList(lastPtr, listPtr))
  ------------------
  |  Branch (637:13): [True: 2.64k, False: 1.68k]
  ------------------
  638|  2.64k|        {
  639|  2.64k|            emitError
  640|  2.64k|                (
  641|  2.64k|                XMLValid::AttrDupToken
  642|  2.64k|                , curAttDef.getFullName()
  643|  2.64k|                , lastPtr
  644|  2.64k|                );
  645|  2.64k|        }
  646|       |
  647|  4.33k|        if (toValidateNotation && !fDTDGrammar->getNotationDecl(lastPtr))
  ------------------
  |  Branch (647:13): [True: 2.60k, False: 1.72k]
  |  Branch (647:35): [True: 2.28k, False: 327]
  ------------------
  648|  2.28k|        {
  649|  2.28k|            emitError
  650|  2.28k|                (
  651|  2.28k|                XMLValid::UnknownNotRefAttr
  652|  2.28k|                , curAttDef.getFullName()
  653|  2.28k|                , lastPtr
  654|  2.28k|                );
  655|  2.28k|        }
  656|       |
  657|       |        // Break out if we hit the end last time
  658|  4.33k|        if (breakFlag)
  ------------------
  |  Branch (658:13): [True: 1.27k, False: 3.06k]
  ------------------
  659|  1.27k|            break;
  660|       |
  661|       |        // Else move upwards and try again
  662|  3.06k|        lastPtr = listPtr;
  663|  3.06k|    }
  664|  1.27k|}

_ZN11xercesc_3_212DTDValidator10setGrammarEPNS_7GrammarE:
  130|  13.1k|inline void DTDValidator::setGrammar(Grammar* aGrammar) {
  131|  13.1k|    fDTDGrammar = (DTDGrammar*) aGrammar;
  132|  13.1k|}
_ZN11xercesc_3_212DTDValidator15validateElementEPKNS_14XMLElementDeclE:
  134|  16.9M|inline void DTDValidator::validateElement (const   XMLElementDecl*) {
  135|       |    // no special DTD Element validation
  136|  16.9M|}
_ZNK11xercesc_3_212DTDValidator10handlesDTDEv:
  142|  6.05k|{
  143|       |    // We definitely want to handle DTD scanning
  144|  6.05k|    return true;
  145|  6.05k|}

_ZN11xercesc_3_214DocTypeHandlerC2Ev:
   45|  7.12k|    {
   46|  7.12k|    }
_ZN11xercesc_3_214DocTypeHandlerD2Ev:
   49|  7.12k|    {
   50|  7.12k|    }

_ZN11xercesc_3_221XMLDTDDescriptionImplC2EPKDsPNS_13MemoryManagerE:
   35|  14.2k|:XMLDTDDescription(memMgr)
   36|  14.2k|,fSystemId(0)
   37|  14.2k|,fRootName(0)
   38|  14.2k|{
   39|  14.2k|    if (systemId)
  ------------------
  |  Branch (39:9): [True: 14.2k, False: 0]
  ------------------
   40|  14.2k|        fSystemId = XMLString::replicate(systemId, memMgr);
   41|  14.2k|}
_ZN11xercesc_3_221XMLDTDDescriptionImplD2Ev:
   44|  14.2k|{
   45|  14.2k|    if (fSystemId)
  ------------------
  |  Branch (45:9): [True: 14.2k, False: 0]
  ------------------
   46|  14.2k|        XMLGrammarDescription::getMemoryManager()->deallocate((void*)fSystemId);
   47|       |
   48|  14.2k|    if (fRootName)
  ------------------
  |  Branch (48:9): [True: 0, False: 14.2k]
  ------------------
   49|      0|        XMLGrammarDescription::getMemoryManager()->deallocate((void*)fRootName);
   50|  14.2k|}
_ZNK11xercesc_3_221XMLDTDDescriptionImpl13getGrammarKeyEv:
   53|  14.2k|{
   54|  14.2k|    return getSystemId();
   55|  14.2k|}
_ZNK11xercesc_3_221XMLDTDDescriptionImpl11getSystemIdEv:
   63|  14.2k|{ 
   64|  14.2k|    return fSystemId; 
   65|  14.2k|}

_ZN11xercesc_3_210CMBinaryOpC2ENS_15ContentSpecNode9NodeTypesEPNS_6CMNodeES4_jPNS_13MemoryManagerE:
   42|  1.74M|    CMNode(type, maxStates, manager)
   43|  1.74M|    , fLeftChild(leftToAdopt)
   44|  1.74M|    , fRightChild(rightToAdopt)
   45|  1.74M|{
   46|       |    // Insure that its one of the types we require
   47|  1.74M|    if (((type & 0x0f) != ContentSpecNode::Choice)
  ------------------
  |  Branch (47:9): [True: 1.36M, False: 377k]
  ------------------
   48|  1.74M|    &&  ((type & 0x0f) != ContentSpecNode::Sequence))
  ------------------
  |  Branch (48:9): [True: 0, False: 1.36M]
  ------------------
   49|      0|    {
   50|      0|        ThrowXMLwithMemMgr(RuntimeException, XMLExcepts::CM_BinOpHadUnaryType, manager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
   51|      0|    }
   52|       |    //
   53|       |    //  If its an alternation, then if either child is nullable then
   54|       |    //  this node is nullable. If its a concatenation, then both of
   55|       |    //  them have to be nullable.
   56|       |    //
   57|  1.74M|    if ((type & 0x0f) == ContentSpecNode::Choice)
  ------------------
  |  Branch (57:9): [True: 377k, False: 1.36M]
  ------------------
   58|   377k|        fIsNullable=(fLeftChild->isNullable() || fRightChild->isNullable());
  ------------------
  |  Branch (58:22): [True: 14.6k, False: 363k]
  |  Branch (58:50): [True: 125k, False: 237k]
  ------------------
   59|  1.36M|    else
   60|  1.36M|        fIsNullable=(fLeftChild->isNullable() && fRightChild->isNullable());
  ------------------
  |  Branch (60:22): [True: 12.5k, False: 1.35M]
  |  Branch (60:50): [True: 1.17k, False: 11.3k]
  ------------------
   61|  1.74M|}
_ZN11xercesc_3_210CMBinaryOpD2Ev:
   64|  1.74M|{
   65|  1.74M|    delete fLeftChild;
   66|  1.74M|    delete fRightChild;
   67|  1.74M|}
_ZN11xercesc_3_210CMBinaryOp11orphanChildEv:
   98|  1.74M|{
   99|  1.74M|    delete fLeftChild;
  100|  1.74M|    fLeftChild=0;
  101|  1.74M|    delete fRightChild;
  102|  1.74M|    fRightChild=0;
  103|  1.74M|}
_ZNK11xercesc_3_210CMBinaryOp12calcFirstPosERNS_10CMStateSetE:
  109|  1.74M|{
  110|  1.74M|    if ((getType() & 0x0f) == ContentSpecNode::Choice)
  ------------------
  |  Branch (110:9): [True: 377k, False: 1.36M]
  ------------------
  111|   377k|    {
  112|       |        // Its the the union of the first positions of our children.
  113|   377k|        toSet = fLeftChild->getFirstPos();
  114|   377k|        toSet |= fRightChild->getFirstPos();
  115|   377k|    }
  116|  1.36M|    else if ((getType() & 0x0f) == ContentSpecNode::Sequence)
  ------------------
  |  Branch (116:14): [True: 1.36M, False: 0]
  ------------------
  117|  1.36M|    {
  118|       |        //
  119|       |        //  If our left child is nullable, then its the union of our
  120|       |        //  children's first positions. Else is our left child's first
  121|       |        //  positions.
  122|       |        //
  123|  1.36M|        toSet = fLeftChild->getFirstPos();
  124|  1.36M|        if (fLeftChild->isNullable())
  ------------------
  |  Branch (124:13): [True: 12.5k, False: 1.35M]
  ------------------
  125|  12.5k|            toSet |= fRightChild->getFirstPos();
  126|  1.36M|    }
  127|  1.74M|}
_ZNK11xercesc_3_210CMBinaryOp11calcLastPosERNS_10CMStateSetE:
  130|  1.74M|{
  131|  1.74M|    if ((getType() & 0x0f) == ContentSpecNode::Choice)
  ------------------
  |  Branch (131:9): [True: 377k, False: 1.36M]
  ------------------
  132|   377k|    {
  133|       |        // Its the the union of the first positions of our children.
  134|   377k|        toSet = fLeftChild->getLastPos();
  135|   377k|        toSet |= fRightChild->getLastPos();
  136|   377k|    }
  137|  1.36M|    else if ((getType() & 0x0f) == ContentSpecNode::Sequence)
  ------------------
  |  Branch (137:14): [True: 1.36M, False: 0]
  ------------------
  138|  1.36M|    {
  139|       |        //
  140|       |        //  If our right child is nullable, then its the union of our
  141|       |        //  children's last positions. Else is our right child's last
  142|       |        //  positions.
  143|       |        //
  144|  1.36M|        toSet = fRightChild->getLastPos();
  145|  1.36M|        if (fRightChild->isNullable())
  ------------------
  |  Branch (145:13): [True: 3.68k, False: 1.36M]
  ------------------
  146|  3.68k|            toSet |= fLeftChild->getLastPos();
  147|  1.36M|    }
  148|  1.74M|}

_ZN11xercesc_3_26CMLeafD2Ev:
  177|  3.49M|{
  178|  3.49M|    if (fAdopt)
  ------------------
  |  Branch (178:9): [True: 1.47k, False: 3.49M]
  ------------------
  179|  1.47k|        delete fElement;
  180|  3.49M|}
_ZN11xercesc_3_26CMLeafC2EPNS_5QNameEjbjPNS_13MemoryManagerE:
  151|  1.47k|    CMNode(ContentSpecNode::Leaf, maxStates, manager)
  152|  1.47k|    , fElement(0)
  153|  1.47k|    , fPosition(position)
  154|  1.47k|    , fAdopt(adopt)
  155|  1.47k|{
  156|  1.47k|    if (!element)
  ------------------
  |  Branch (156:9): [True: 0, False: 1.47k]
  ------------------
  157|      0|    {
  158|      0|        fElement = new (fMemoryManager) QName
  159|      0|        (
  160|      0|              XMLUni::fgZeroLenString
  161|      0|            , XMLUni::fgZeroLenString
  162|      0|            , XMLElementDecl::fgInvalidElemId
  163|      0|            , fMemoryManager
  164|      0|        );
  165|       |        // We have to be responsible for this QName - override adopt parameter
  166|      0|        fAdopt = true;
  167|      0|    }
  168|  1.47k|    else
  169|  1.47k|    {
  170|  1.47k|        fElement = element;
  171|  1.47k|    }
  172|       |    // Leaf nodes are never nullable unless its an epsilon node
  173|  1.47k|    fIsNullable=(fPosition == epsilonNode);
  174|  1.47k|}
_ZN11xercesc_3_26CMLeaf10getElementEv:
  187|  78.2M|{
  188|  78.2M|    return fElement;
  189|  78.2M|}
_ZNK11xercesc_3_26CMLeaf11getPositionEv:
  197|  1.47k|{
  198|  1.47k|    return fPosition;
  199|  1.47k|}
_ZN11xercesc_3_26CMLeafC2EPNS_5QNameEjjPNS_13MemoryManagerE:
  121|  3.49M|    CMNode(ContentSpecNode::Leaf, maxStates, manager)
  122|  3.49M|    , fElement(0)
  123|  3.49M|    , fPosition(position)
  124|  3.49M|    , fAdopt(false)
  125|  3.49M|{
  126|  3.49M|    if (!element)
  ------------------
  |  Branch (126:9): [True: 0, False: 3.49M]
  ------------------
  127|      0|    {
  128|      0|        fElement = new (fMemoryManager) QName
  129|      0|        (
  130|      0|              XMLUni::fgZeroLenString
  131|      0|            , XMLUni::fgZeroLenString
  132|      0|            , XMLElementDecl::fgInvalidElemId
  133|      0|            , fMemoryManager
  134|      0|        );
  135|       |        // We have to be responsible for this QName - override default fAdopt
  136|      0|        fAdopt = true;
  137|      0|    }
  138|  3.49M|    else
  139|  3.49M|    {
  140|  3.49M|        fElement = element;
  141|  3.49M|    }
  142|       |    // Leaf nodes are never nullable unless its an epsilon node
  143|  3.49M|    fIsNullable=(fPosition == epsilonNode);
  144|  3.49M|}
_ZN11xercesc_3_26CMLeaf11orphanChildEv:
  219|  1.74M|{
  220|  1.74M|}
_ZNK11xercesc_3_26CMLeaf12calcFirstPosERNS_10CMStateSetE:
  226|  1.74M|{
  227|       |    // If we are an epsilon node, then the first pos is an empty set
  228|  1.74M|    if (isNullable())
  ------------------
  |  Branch (228:9): [True: 0, False: 1.74M]
  ------------------
  229|      0|    {
  230|      0|        toSet.zeroBits();
  231|      0|        return;
  232|      0|    }
  233|       |
  234|       |    // Otherwise, its just the one bit of our position
  235|  1.74M|    toSet.setBit(fPosition);
  236|  1.74M|}
_ZNK11xercesc_3_26CMLeaf11calcLastPosERNS_10CMStateSetE:
  239|  1.74M|{
  240|       |    // If we are an epsilon node, then the last pos is an empty set
  241|  1.74M|    if (isNullable())
  ------------------
  |  Branch (241:9): [True: 0, False: 1.74M]
  ------------------
  242|      0|    {
  243|      0|        toSet.zeroBits();
  244|      0|        return;
  245|      0|    }
  246|       |
  247|       |    // Otherwise, its just the one bit of our position
  248|  1.74M|    toSet.setBit(fPosition);
  249|  1.74M|}
_ZNK11xercesc_3_26CMLeaf16isRepeatableLeafEv:
  202|  21.2k|{
  203|  21.2k|    return false;
  204|  21.2k|}

_ZN11xercesc_3_26CMNodeD2Ev:
  143|  5.28M|{
  144|       |    // Clean up any position sets that got created
  145|  5.28M|    delete fFirstPos;
  146|  5.28M|    delete fLastPos;
  147|  5.28M|}
_ZNK11xercesc_3_26CMNode10isNullableEv:
  187|  8.36M|{
  188|  8.36M|    return fIsNullable;
  189|  8.36M|}
_ZN11xercesc_3_26CMNodeC2ENS_15ContentSpecNode9NodeTypesEjPNS_13MemoryManagerE:
  133|  5.28M|    fMemoryManager(manager)
  134|  5.28M|    , fType(type)
  135|  5.28M|    , fFirstPos(0)
  136|  5.28M|    , fLastPos(0)
  137|  5.28M|    , fMaxStates(maxStates)
  138|  5.28M|    , fIsNullable(false)
  139|  5.28M|{
  140|  5.28M|}
_ZN11xercesc_3_26CMNode10getLastPosEv:
  173|  7.11M|{
  174|       |    //
  175|       |    //  Fault in the state set if needed. Since we can't use mutable members
  176|       |    //  cast off the const'ness.
  177|       |    //
  178|  7.11M|    if (!fLastPos)
  ------------------
  |  Branch (178:9): [True: 3.53M, False: 3.57M]
  ------------------
  179|  3.53M|    {
  180|  3.53M|        fLastPos = new (fMemoryManager) CMStateSet(fMaxStates, fMemoryManager);
  181|  3.53M|        calcLastPos(*fLastPos);
  182|  3.53M|    }
  183|  7.11M|    return *fLastPos;
  184|  7.11M|}
_ZN11xercesc_3_26CMNode11getFirstPosEv:
  159|  7.12M|{
  160|       |    //
  161|       |    //  Fault in the state set if needed. Since we can't use mutable members
  162|       |    //  cast off the const'ness.
  163|       |    //
  164|  7.12M|    if (!fFirstPos)
  ------------------
  |  Branch (164:9): [True: 3.54M, False: 3.58M]
  ------------------
  165|  3.54M|    {
  166|  3.54M|        fFirstPos = new (fMemoryManager) CMStateSet(fMaxStates, fMemoryManager);
  167|  3.54M|        calcFirstPos(*fFirstPos);
  168|  3.54M|    }
  169|  7.12M|    return *fFirstPos;
  170|  7.12M|}
_ZNK11xercesc_3_26CMNode7getTypeEv:
  154|  6.22M|{
  155|  6.22M|    return fType;
  156|  6.22M|}

_ZN11xercesc_3_210CMStateSetD2Ev:
  146|  13.4M|    {
  147|  13.4M|        if(fDynamicBuffer)
  ------------------
  |  Branch (147:12): [True: 11.7M, False: 1.66M]
  ------------------
  148|  11.7M|        {
  149|   201M|            for(XMLSize_t index = 0; index < fDynamicBuffer->fArraySize; index++)
  ------------------
  |  Branch (149:38): [True: 189M, False: 11.7M]
  ------------------
  150|   189M|                if(fDynamicBuffer->fBitArray[index]!=NULL)
  ------------------
  |  Branch (150:20): [True: 15.2M, False: 174M]
  ------------------
  151|  15.2M|                    deallocateChunk(index);
  152|  11.7M|            fDynamicBuffer->fMemoryManager->deallocate(fDynamicBuffer->fBitArray);
  153|  11.7M|            fDynamicBuffer->fMemoryManager->deallocate(fDynamicBuffer);
  154|  11.7M|        }
  155|  13.4M|    }
_ZN11xercesc_3_210CMStateSet15deallocateChunkEm:
  499|  18.2M|    {
  500|  18.2M|#ifdef XERCES_HAVE_SSE2_INTRINSIC
  501|  18.2M|        if(XMLPlatformUtils::fgSSE2ok)
  ------------------
  |  Branch (501:12): [True: 18.2M, False: 0]
  ------------------
  502|  18.2M|            _mm_free(fDynamicBuffer->fBitArray[index]);
  503|      0|        else
  504|      0|#endif
  505|      0|            fDynamicBuffer->fMemoryManager->deallocate(fDynamicBuffer->fBitArray[index]);
  506|  18.2M|        fDynamicBuffer->fBitArray[index]=NULL;
  507|  18.2M|    }
_ZN11xercesc_3_210CMStateSetC2EmPNS_13MemoryManagerE:
   81|  13.4M|        fBitCount(bitCount)
   82|  13.4M|        , fDynamicBuffer(0)
   83|  13.4M|    {
   84|       |        //
   85|       |        //  See if we need to allocate the byte array or whether we can live
   86|       |        //  within the cached bit high performance scheme.
   87|       |        //
   88|  13.4M|        if (fBitCount > (CMSTATE_CACHED_INT32_SIZE * 32))
  ------------------
  |  |   49|  13.4M|#define CMSTATE_CACHED_INT32_SIZE  4
  ------------------
  |  Branch (88:13): [True: 11.7M, False: 1.66M]
  ------------------
   89|  11.7M|        {
   90|  11.7M|            fDynamicBuffer = (CMDynamicBuffer*)manager->allocate(sizeof(CMDynamicBuffer));
   91|  11.7M|            fDynamicBuffer->fMemoryManager = manager;
   92|       |            // allocate an array of vectors, each one containing CMSTATE_BITFIELD_CHUNK bits
   93|  11.7M|            fDynamicBuffer->fArraySize = fBitCount / CMSTATE_BITFIELD_CHUNK;
  ------------------
  |  |   52|  11.7M|#define CMSTATE_BITFIELD_CHUNK  1024
  ------------------
   94|  11.7M|            if (fBitCount % CMSTATE_BITFIELD_CHUNK)
  ------------------
  |  |   52|  11.7M|#define CMSTATE_BITFIELD_CHUNK  1024
  ------------------
  |  Branch (94:17): [True: 11.6M, False: 123k]
  ------------------
   95|  11.6M|                fDynamicBuffer->fArraySize++;
   96|  11.7M|            fDynamicBuffer->fBitArray = (XMLInt32**) fDynamicBuffer->fMemoryManager->allocate(fDynamicBuffer->fArraySize*sizeof(XMLInt32*));
   97|   201M|            for(XMLSize_t index = 0; index < fDynamicBuffer->fArraySize; index++)
  ------------------
  |  Branch (97:38): [True: 189M, False: 11.7M]
  ------------------
   98|   189M|                fDynamicBuffer->fBitArray[index]=NULL;
   99|  11.7M|        }
  100|  1.66M|        else
  101|  1.66M|        {
  102|  8.34M|            for (XMLSize_t index = 0; index < CMSTATE_CACHED_INT32_SIZE; index++)
  ------------------
  |  |   49|  8.34M|#define CMSTATE_CACHED_INT32_SIZE  4
  ------------------
  |  Branch (102:39): [True: 6.67M, False: 1.66M]
  ------------------
  103|  6.67M|                fBits[index] = 0;
  104|  1.66M|        }
  105|  13.4M|    }
_ZN11xercesc_3_220CMStateSetEnumeratorC2EPKNS_10CMStateSetEm:
  537|  47.0M|      fToEnum(toEnum),
  538|  47.0M|      fIndexCount((XMLSize_t)-1),
  539|  47.0M|      fLastValue(0)
  540|  47.0M|    {
  541|       |        // if a starting bit is specified, place fIndexCount at the beginning of the previous 32 bit area
  542|       |        // so the findNext moves to the one where 'start' is located
  543|  47.0M|        if(start > 32)
  ------------------
  |  Branch (543:12): [True: 33.2M, False: 13.7M]
  ------------------
  544|  33.2M|            fIndexCount = (start/32 - 1) * 32;
  545|  47.0M|        findNext();
  546|       |        // if we found data, and fIndexCount is still pointing to the area where 'start' is located, erase the bits before 'start'
  547|  47.0M|        if(hasMoreElements() && fIndexCount < start)
  ------------------
  |  Branch (547:12): [True: 33.2M, False: 13.7M]
  |  Branch (547:33): [True: 4.13M, False: 29.1M]
  ------------------
  548|  4.13M|        {
  549|  59.2M|            for(XMLSize_t i=0;i< (start - fIndexCount);i++)
  ------------------
  |  Branch (549:31): [True: 55.0M, False: 4.13M]
  ------------------
  550|  55.0M|            {
  551|  55.0M|                XMLInt32 mask=1UL << i;
  552|  55.0M|                if(fLastValue & mask)
  ------------------
  |  Branch (552:20): [True: 26.5M, False: 28.5M]
  ------------------
  553|  26.5M|                    fLastValue &= ~mask;
  554|  55.0M|            }
  555|       |            // in case the 32 bit area contained only bits before 'start', advance
  556|  4.13M|            if(fLastValue==0)
  ------------------
  |  Branch (556:16): [True: 1.17M, False: 2.95M]
  ------------------
  557|  1.17M|                findNext();
  558|  4.13M|        }
  559|  47.0M|    }
_ZN11xercesc_3_220CMStateSetEnumerator8findNextEv:
  585|  96.6M|    {
  586|  96.6M|        if(fToEnum->fDynamicBuffer==0)
  ------------------
  |  Branch (586:12): [True: 5.77M, False: 90.8M]
  ------------------
  587|  5.77M|        {
  588|  5.77M|            XMLSize_t nOffset=((fIndexCount==(XMLSize_t)-1)?0:(fIndexCount/32)+1);
  ------------------
  |  Branch (588:32): [True: 1.99M, False: 3.77M]
  ------------------
  589|  10.6M|            for(XMLSize_t index=nOffset;index<CMSTATE_CACHED_INT32_SIZE;index++)
  ------------------
  |  |   49|  10.6M|#define CMSTATE_CACHED_INT32_SIZE  4
  ------------------
  |  Branch (589:41): [True: 8.53M, False: 2.12M]
  ------------------
  590|  8.53M|            {
  591|  8.53M|                if(fToEnum->fBits[index]!=0)
  ------------------
  |  Branch (591:20): [True: 3.64M, False: 4.88M]
  ------------------
  592|  3.64M|                {
  593|  3.64M|                    fIndexCount=index*32;
  594|  3.64M|                    fLastValue=fToEnum->fBits[index];
  595|  3.64M|                    return;
  596|  3.64M|                }
  597|  8.53M|            }
  598|  5.77M|        }
  599|  90.8M|        else
  600|  90.8M|        {
  601|  90.8M|            XMLSize_t nOffset=((fIndexCount==(XMLSize_t)-1)?0:(fIndexCount/CMSTATE_BITFIELD_CHUNK));
  ------------------
  |  |   52|  79.0M|#define CMSTATE_BITFIELD_CHUNK  1024
  ------------------
  |  Branch (601:32): [True: 11.7M, False: 79.0M]
  ------------------
  602|  90.8M|            XMLSize_t nSubOffset=((fIndexCount==(XMLSize_t)-1)?0:((fIndexCount % CMSTATE_BITFIELD_CHUNK) /32)+1);
  ------------------
  |  |   52|  79.0M|#define CMSTATE_BITFIELD_CHUNK  1024
  ------------------
  |  Branch (602:35): [True: 11.7M, False: 79.0M]
  ------------------
  603|   576M|            for (XMLSize_t index = nOffset; index<fToEnum->fDynamicBuffer->fArraySize; index++)
  ------------------
  |  Branch (603:45): [True: 535M, False: 40.4M]
  ------------------
  604|   535M|            {
  605|   535M|                if(fToEnum->fDynamicBuffer->fBitArray[index]!=NULL)
  ------------------
  |  Branch (605:20): [True: 93.9M, False: 441M]
  ------------------
  606|  93.9M|                {
  607|  1.23G|                    for(XMLSize_t subIndex=nSubOffset;subIndex < CMSTATE_BITFIELD_INT32_SIZE; subIndex++)
  ------------------
  |  |   53|  1.23G|#define CMSTATE_BITFIELD_INT32_SIZE (1024 / 32)
  ------------------
  |  Branch (607:55): [True: 1.19G, False: 43.5M]
  ------------------
  608|  1.19G|                        if(fToEnum->fDynamicBuffer->fBitArray[index][subIndex]!=0)
  ------------------
  |  Branch (608:28): [True: 50.3M, False: 1.13G]
  ------------------
  609|  50.3M|                        {
  610|  50.3M|                            fIndexCount=index*CMSTATE_BITFIELD_CHUNK + subIndex*32;
  ------------------
  |  |   52|  50.3M|#define CMSTATE_BITFIELD_CHUNK  1024
  ------------------
  611|  50.3M|                            fLastValue=fToEnum->fDynamicBuffer->fBitArray[index][subIndex];
  612|  50.3M|                            return;
  613|  50.3M|                        }
  614|  93.9M|                }
  615|   485M|                nSubOffset = 0; // next chunks will be processed from the beginning
  616|   485M|            }
  617|  90.8M|        }
  618|  96.6M|    }
_ZN11xercesc_3_220CMStateSetEnumerator15hasMoreElementsEv:
  562|   294M|    {
  563|   294M|        return fLastValue!=0;
  564|   294M|    }
_ZN11xercesc_3_220CMStateSetEnumerator11nextElementEv:
  567|   212M|    {
  568|  3.45G|        for(int i=0;i<32;i++)
  ------------------
  |  Branch (568:21): [True: 3.45G, False: 0]
  ------------------
  569|  3.45G|        {
  570|  3.45G|            XMLInt32 mask=1UL << i;
  571|  3.45G|            if(fLastValue & mask)
  ------------------
  |  Branch (571:16): [True: 212M, False: 3.24G]
  ------------------
  572|   212M|            {
  573|   212M|                fLastValue &= ~mask;
  574|   212M|                unsigned int retVal=(unsigned int)fIndexCount+i;
  575|   212M|                if(fLastValue==0)
  ------------------
  |  Branch (575:20): [True: 48.4M, False: 163M]
  ------------------
  576|  48.4M|                    findNext();
  577|   212M|                return retVal;
  578|   212M|            }
  579|  3.45G|        }
  580|      0|        return 0;
  581|   212M|    }
_ZN11xercesc_3_210CMStateSetoRERKS0_:
  162|   324M|    {
  163|   324M|        if(fDynamicBuffer==0)
  ------------------
  |  Branch (163:12): [True: 31.0M, False: 293M]
  ------------------
  164|  31.0M|        {
  165|  31.0M|#ifdef XERCES_HAVE_SSE2_INTRINSIC
  166|  31.0M|            if(XMLPlatformUtils::fgSSE2ok)
  ------------------
  |  Branch (166:16): [True: 31.0M, False: 0]
  ------------------
  167|  31.0M|            {
  168|  31.0M|                __m128i xmm1 = _mm_loadu_si128(reinterpret_cast<const __m128i*>(fBits));
  169|  31.0M|                __m128i xmm2 = _mm_loadu_si128(reinterpret_cast<const __m128i*>(setToOr.fBits));
  170|  31.0M|                __m128i xmm3 = _mm_or_si128(xmm1, xmm2);     //  OR  4 32-bit words
  171|  31.0M|                _mm_storeu_si128(reinterpret_cast<__m128i*>(fBits), xmm3);
  172|  31.0M|            }
  173|      0|            else
  174|      0|#endif
  175|      0|            {
  176|      0|                for (XMLSize_t index = 0; index < CMSTATE_CACHED_INT32_SIZE; index++)
  ------------------
  |  |   49|      0|#define CMSTATE_CACHED_INT32_SIZE  4
  ------------------
  |  Branch (176:43): [True: 0, False: 0]
  ------------------
  177|      0|                    if(setToOr.fBits[index])
  ------------------
  |  Branch (177:24): [True: 0, False: 0]
  ------------------
  178|      0|                    {
  179|      0|                        if(fBits[index])
  ------------------
  |  Branch (179:28): [True: 0, False: 0]
  ------------------
  180|      0|                            fBits[index] |= setToOr.fBits[index];
  181|      0|                        else
  182|      0|                            fBits[index] = setToOr.fBits[index];
  183|      0|                    }
  184|      0|            }
  185|  31.0M|        }
  186|   293M|        else
  187|   293M|        {
  188|   828M|            for (XMLSize_t index = 0; index < fDynamicBuffer->fArraySize; index++)
  ------------------
  |  Branch (188:39): [True: 534M, False: 293M]
  ------------------
  189|   534M|            {
  190|   534M|                XMLInt32 *& other = setToOr.fDynamicBuffer->fBitArray[index];
  191|   534M|                if(other!=NULL)
  ------------------
  |  Branch (191:20): [True: 299M, False: 235M]
  ------------------
  192|   299M|                {
  193|       |                    // if we haven't allocated the subvector yet, allocate it and copy
  194|   299M|                    if(fDynamicBuffer->fBitArray[index]==NULL)
  ------------------
  |  Branch (194:24): [True: 11.3M, False: 288M]
  ------------------
  195|  11.3M|                    {
  196|  11.3M|                        allocateChunk(index);
  197|  11.3M|                        memcpy((void *) fDynamicBuffer->fBitArray[index],
  198|  11.3M|                               (const void *) other,
  199|  11.3M|                               CMSTATE_BITFIELD_INT32_SIZE * sizeof(XMLInt32));
  ------------------
  |  |   53|  11.3M|#define CMSTATE_BITFIELD_INT32_SIZE (1024 / 32)
  ------------------
  200|  11.3M|                    }
  201|   288M|                    else
  202|   288M|                    {
  203|       |                        // otherwise, merge them
  204|   288M|                        XMLInt32*& mine = fDynamicBuffer->fBitArray[index];
  205|   288M|#ifdef XERCES_HAVE_SSE2_INTRINSIC
  206|   288M|                        if(XMLPlatformUtils::fgSSE2ok)
  ------------------
  |  Branch (206:28): [True: 288M, False: 0]
  ------------------
  207|   288M|                        {
  208|  2.59G|                            for(XMLSize_t subIndex = 0; subIndex < CMSTATE_BITFIELD_INT32_SIZE; subIndex+=4)
  ------------------
  |  |   53|  2.59G|#define CMSTATE_BITFIELD_INT32_SIZE (1024 / 32)
  ------------------
  |  Branch (208:57): [True: 2.30G, False: 288M]
  ------------------
  209|  2.30G|                            {
  210|  2.30G|                               __m128i xmm1 = _mm_load_si128(reinterpret_cast<const __m128i*>(&other[subIndex]));
  211|  2.30G|                               __m128i xmm2 = _mm_load_si128(reinterpret_cast<const __m128i*>(&mine[subIndex]));
  212|  2.30G|                               __m128i xmm3 = _mm_or_si128(xmm1, xmm2);     //  OR  4 32-bit words
  213|  2.30G|                               _mm_store_si128(reinterpret_cast<__m128i*>(&mine[subIndex]), xmm3);
  214|  2.30G|                            }
  215|   288M|                        }
  216|      0|                        else
  217|      0|#endif
  218|      0|                        {
  219|      0|                            for(XMLSize_t subIndex = 0; subIndex < CMSTATE_BITFIELD_INT32_SIZE; subIndex++)
  ------------------
  |  |   53|      0|#define CMSTATE_BITFIELD_INT32_SIZE (1024 / 32)
  ------------------
  |  Branch (219:57): [True: 0, False: 0]
  ------------------
  220|      0|                                if(setToOr.fDynamicBuffer->fBitArray[index][subIndex])
  ------------------
  |  Branch (220:36): [True: 0, False: 0]
  ------------------
  221|      0|                                {
  222|      0|                                    if(fDynamicBuffer->fBitArray[index][subIndex])
  ------------------
  |  Branch (222:40): [True: 0, False: 0]
  ------------------
  223|      0|                                        fDynamicBuffer->fBitArray[index][subIndex] |= setToOr.fDynamicBuffer->fBitArray[index][subIndex];
  224|      0|                                    else
  225|      0|                                        fDynamicBuffer->fBitArray[index][subIndex] = setToOr.fDynamicBuffer->fBitArray[index][subIndex];
  226|      0|                                }
  227|      0|                        }
  228|   288M|                    }
  229|   299M|                }
  230|   534M|            }
  231|   293M|        }
  232|   324M|    }
_ZN11xercesc_3_210CMStateSet13allocateChunkEm:
  489|  18.2M|    {
  490|  18.2M|#ifdef XERCES_HAVE_SSE2_INTRINSIC
  491|  18.2M|        if(XMLPlatformUtils::fgSSE2ok)
  ------------------
  |  Branch (491:12): [True: 18.2M, False: 0]
  ------------------
  492|  18.2M|            fDynamicBuffer->fBitArray[index]=(XMLInt32*)_mm_malloc(CMSTATE_BITFIELD_INT32_SIZE * sizeof(XMLInt32), 16);
  ------------------
  |  |   53|  18.2M|#define CMSTATE_BITFIELD_INT32_SIZE (1024 / 32)
  ------------------
  493|      0|        else
  494|      0|#endif
  495|      0|            fDynamicBuffer->fBitArray[index]=(XMLInt32*)fDynamicBuffer->fMemoryManager->allocate(CMSTATE_BITFIELD_INT32_SIZE * sizeof(XMLInt32));
  ------------------
  |  |   53|      0|#define CMSTATE_BITFIELD_INT32_SIZE (1024 / 32)
  ------------------
  496|  18.2M|    }
_ZN11xercesc_3_210CMStateSetC2ERKS0_:
  108|  1.47k|        XMemory(toCopy)
  109|  1.47k|      , fBitCount(toCopy.fBitCount)
  110|  1.47k|      , fDynamicBuffer(0)
  111|  1.47k|    {
  112|       |        //
  113|       |        //  See if we need to allocate the byte array or whether we can live
  114|       |        //  within the cahced bit high performance scheme.
  115|       |        //
  116|  1.47k|        if (fBitCount > (CMSTATE_CACHED_INT32_SIZE * 32))
  ------------------
  |  |   49|  1.47k|#define CMSTATE_CACHED_INT32_SIZE  4
  ------------------
  |  Branch (116:13): [True: 697, False: 776]
  ------------------
  117|    697|        {
  118|    697|            fDynamicBuffer = (CMDynamicBuffer*) toCopy.fDynamicBuffer->fMemoryManager->allocate(sizeof(CMDynamicBuffer));
  119|    697|            fDynamicBuffer->fMemoryManager = toCopy.fDynamicBuffer->fMemoryManager;
  120|    697|            fDynamicBuffer->fArraySize = fBitCount / CMSTATE_BITFIELD_CHUNK;
  ------------------
  |  |   52|    697|#define CMSTATE_BITFIELD_CHUNK  1024
  ------------------
  121|    697|            if (fBitCount % CMSTATE_BITFIELD_CHUNK)
  ------------------
  |  |   52|    697|#define CMSTATE_BITFIELD_CHUNK  1024
  ------------------
  |  Branch (121:17): [True: 680, False: 17]
  ------------------
  122|    680|                fDynamicBuffer->fArraySize++;
  123|    697|            fDynamicBuffer->fBitArray = (XMLInt32**) fDynamicBuffer->fMemoryManager->allocate(fDynamicBuffer->fArraySize*sizeof(XMLInt32*));
  124|  2.86k|            for(XMLSize_t index = 0; index < fDynamicBuffer->fArraySize; index++)
  ------------------
  |  Branch (124:38): [True: 2.17k, False: 697]
  ------------------
  125|  2.17k|            {
  126|  2.17k|                if(toCopy.fDynamicBuffer->fBitArray[index]!=NULL)
  ------------------
  |  Branch (126:20): [True: 1.37k, False: 796]
  ------------------
  127|  1.37k|                {
  128|  1.37k|                    allocateChunk(index);
  129|  1.37k|                    memcpy((void *) fDynamicBuffer->fBitArray[index],
  130|  1.37k|                           (const void *) toCopy.fDynamicBuffer->fBitArray[index],
  131|  1.37k|                           CMSTATE_BITFIELD_INT32_SIZE * sizeof(XMLInt32));
  ------------------
  |  |   53|  1.37k|#define CMSTATE_BITFIELD_INT32_SIZE (1024 / 32)
  ------------------
  132|  1.37k|                }
  133|    796|                else
  134|    796|                    fDynamicBuffer->fBitArray[index]=NULL;
  135|  2.17k|            }
  136|    697|        }
  137|    776|        else
  138|    776|        {
  139|    776|            memcpy((void *) fBits,
  140|    776|                   (const void *) toCopy.fBits,
  141|    776|                   CMSTATE_CACHED_INT32_SIZE * sizeof(XMLInt32));
  ------------------
  |  |   49|    776|#define CMSTATE_CACHED_INT32_SIZE  4
  ------------------
  142|    776|        }
  143|  1.47k|    }
_ZNK11xercesc_3_210CMStateSet6getBitEm:
  352|   940M|    {
  353|   940M|        if (bitToGet >= fBitCount)
  ------------------
  |  Branch (353:13): [True: 0, False: 940M]
  ------------------
  354|      0|        {
  355|      0|            if(fDynamicBuffer)
  ------------------
  |  Branch (355:16): [True: 0, False: 0]
  ------------------
  356|      0|                ThrowXMLwithMemMgr(ArrayIndexOutOfBoundsException, XMLExcepts::Bitset_BadIndex, fDynamicBuffer->fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  357|      0|            else
  358|      0|                ThrowXML(ArrayIndexOutOfBoundsException, XMLExcepts::Bitset_BadIndex);
  ------------------
  |  |  254|      0|#define ThrowXML(type,code) throw type(__FILE__, __LINE__, code)
  ------------------
  359|      0|        }
  360|       |
  361|       |        // And access the right bit and byte
  362|   940M|        if(fDynamicBuffer==0)
  ------------------
  |  Branch (362:12): [True: 53.1M, False: 887M]
  ------------------
  363|  53.1M|        {
  364|  53.1M|            const XMLInt32 mask = 1UL << (bitToGet % 32);
  365|  53.1M|            const XMLSize_t byteOfs = bitToGet / 32;
  366|  53.1M|            return (fBits[byteOfs]!=0 && (fBits[byteOfs] & mask) != 0);
  ------------------
  |  Branch (366:21): [True: 50.7M, False: 2.36M]
  |  Branch (366:42): [True: 26.6M, False: 24.1M]
  ------------------
  367|  53.1M|        }
  368|   887M|        else
  369|   887M|        {
  370|   887M|            const XMLSize_t vectorOfs = bitToGet / CMSTATE_BITFIELD_CHUNK;
  ------------------
  |  |   52|   887M|#define CMSTATE_BITFIELD_CHUNK  1024
  ------------------
  371|   887M|            if(fDynamicBuffer->fBitArray[vectorOfs]==NULL)
  ------------------
  |  Branch (371:16): [True: 14.2M, False: 872M]
  ------------------
  372|  14.2M|                return false;
  373|   872M|            const XMLInt32 mask = 1UL << (bitToGet % 32);
  374|   872M|            const XMLSize_t byteOfs = (bitToGet % CMSTATE_BITFIELD_CHUNK) / 32;
  ------------------
  |  |   52|   872M|#define CMSTATE_BITFIELD_CHUNK  1024
  ------------------
  375|   872M|            return (fDynamicBuffer->fBitArray[vectorOfs][byteOfs]!=0 && (fDynamicBuffer->fBitArray[vectorOfs][byteOfs] & mask) != 0);
  ------------------
  |  Branch (375:21): [True: 344M, False: 527M]
  |  Branch (375:73): [True: 238M, False: 106M]
  ------------------
  376|   887M|        }
  377|   940M|    }
_ZN11xercesc_3_210CMStateSet8zeroBitsEv:
  440|  48.1M|    {
  441|  48.1M|        if(fDynamicBuffer==0)
  ------------------
  |  Branch (441:12): [True: 4.55M, False: 43.5M]
  ------------------
  442|  4.55M|        {
  443|  22.7M|            for (XMLSize_t index = 0; index < CMSTATE_CACHED_INT32_SIZE; index++)
  ------------------
  |  |   49|  22.7M|#define CMSTATE_CACHED_INT32_SIZE  4
  ------------------
  |  Branch (443:39): [True: 18.2M, False: 4.55M]
  ------------------
  444|  18.2M|                fBits[index] = 0;
  445|  4.55M|        }
  446|  43.5M|        else
  447|  43.5M|        {
  448|   653M|            for (XMLSize_t index = 0; index < fDynamicBuffer->fArraySize; index++)
  ------------------
  |  Branch (448:39): [True: 609M, False: 43.5M]
  ------------------
  449|       |                // delete this subentry
  450|   609M|                if(fDynamicBuffer->fBitArray[index]!=NULL)
  ------------------
  |  Branch (450:20): [True: 3.07M, False: 606M]
  ------------------
  451|  3.07M|                    deallocateChunk(index);
  452|  43.5M|        }
  453|  48.1M|    }
_ZNK11xercesc_3_210CMStateSet18getBitCountInRangeEmm:
  310|  52.7M|    {
  311|  52.7M|        XMLSize_t count = 0;
  312|  52.7M|        end /= 32;
  313|  52.7M|        if(fDynamicBuffer==0)
  ------------------
  |  Branch (313:12): [True: 6.06M, False: 46.7M]
  ------------------
  314|  6.06M|        {
  315|  6.06M|            if(end > CMSTATE_CACHED_INT32_SIZE)
  ------------------
  |  |   49|  6.06M|#define CMSTATE_CACHED_INT32_SIZE  4
  ------------------
  |  Branch (315:16): [True: 0, False: 6.06M]
  ------------------
  316|      0|                end = CMSTATE_CACHED_INT32_SIZE;
  ------------------
  |  |   49|      0|#define CMSTATE_CACHED_INT32_SIZE  4
  ------------------
  317|  9.17M|            for (XMLSize_t index = start / 32; index < end; index++)
  ------------------
  |  Branch (317:48): [True: 3.10M, False: 6.06M]
  ------------------
  318|  3.10M|            {
  319|  3.10M|                if (fBits[index] != 0)
  ------------------
  |  Branch (319:21): [True: 2.98M, False: 123k]
  ------------------
  320|  98.5M|                    for(int i=0;i<32;i++)
  ------------------
  |  Branch (320:33): [True: 95.5M, False: 2.98M]
  ------------------
  321|  95.5M|                    {
  322|  95.5M|                        const XMLInt32 mask = 1UL << i;
  323|  95.5M|                        if(fBits[index] & mask)
  ------------------
  |  Branch (323:28): [True: 44.7M, False: 50.7M]
  ------------------
  324|  44.7M|                            count++;
  325|  95.5M|                    }
  326|  3.10M|            }
  327|  6.06M|        }
  328|  46.7M|        else
  329|  46.7M|        {
  330|  46.7M|            if(end > fDynamicBuffer->fArraySize)
  ------------------
  |  Branch (330:16): [True: 41.4M, False: 5.30M]
  ------------------
  331|  41.4M|                end = fDynamicBuffer->fArraySize;
  332|   259M|            for (XMLSize_t index = start / 32; index < end; index++)
  ------------------
  |  Branch (332:48): [True: 213M, False: 46.7M]
  ------------------
  333|   213M|            {
  334|   213M|                if(fDynamicBuffer->fBitArray[index]==NULL)
  ------------------
  |  Branch (334:20): [True: 192M, False: 20.7M]
  ------------------
  335|   192M|                    continue;
  336|   685M|                for(XMLSize_t subIndex=0;subIndex < CMSTATE_BITFIELD_INT32_SIZE; subIndex++)
  ------------------
  |  |   53|   685M|#define CMSTATE_BITFIELD_INT32_SIZE (1024 / 32)
  ------------------
  |  Branch (336:42): [True: 665M, False: 20.7M]
  ------------------
  337|   665M|                {
  338|   665M|                    if (fDynamicBuffer->fBitArray[index][subIndex] != 0)
  ------------------
  |  Branch (338:25): [True: 60.9M, False: 604M]
  ------------------
  339|  2.01G|                        for(int i=0;i<32;i++)
  ------------------
  |  Branch (339:37): [True: 1.94G, False: 60.9M]
  ------------------
  340|  1.94G|                        {
  341|  1.94G|                            const XMLInt32 mask = 1UL << i;
  342|  1.94G|                            if(fDynamicBuffer->fBitArray[index][subIndex] & mask)
  ------------------
  |  Branch (342:32): [True: 738M, False: 1.21G]
  ------------------
  343|   738M|                                count++;
  344|  1.94G|                        }
  345|   665M|                }
  346|  20.7M|            }
  347|  46.7M|        }
  348|  52.7M|        return count;
  349|  52.7M|    }
_ZNK11xercesc_3_210CMStateSet7isEmptyEv:
  380|  52.7M|    {
  381|  52.7M|        if(fDynamicBuffer==0)
  ------------------
  |  Branch (381:12): [True: 6.06M, False: 46.7M]
  ------------------
  382|  6.06M|        {
  383|  15.9M|            for (XMLSize_t index = 0; index < CMSTATE_CACHED_INT32_SIZE; index++)
  ------------------
  |  |   49|  15.9M|#define CMSTATE_CACHED_INT32_SIZE  4
  ------------------
  |  Branch (383:39): [True: 13.5M, False: 2.43M]
  ------------------
  384|  13.5M|            {
  385|  13.5M|                if (fBits[index] != 0)
  ------------------
  |  Branch (385:21): [True: 3.62M, False: 9.90M]
  ------------------
  386|  3.62M|                    return false;
  387|  13.5M|            }
  388|  6.06M|        }
  389|  46.7M|        else
  390|  46.7M|        {
  391|   659M|            for (XMLSize_t index = 0; index < fDynamicBuffer->fArraySize; index++)
  ------------------
  |  Branch (391:39): [True: 618M, False: 40.6M]
  ------------------
  392|   618M|            {
  393|   618M|                if(fDynamicBuffer->fBitArray[index]==NULL)
  ------------------
  |  Branch (393:20): [True: 612M, False: 6.11M]
  ------------------
  394|   612M|                    continue;
  395|  57.8M|                for(XMLSize_t subIndex=0;subIndex < CMSTATE_BITFIELD_INT32_SIZE; subIndex++)
  ------------------
  |  |   53|  57.8M|#define CMSTATE_BITFIELD_INT32_SIZE (1024 / 32)
  ------------------
  |  Branch (395:42): [True: 57.8M, False: 0]
  ------------------
  396|  57.8M|                {
  397|  57.8M|                    if (fDynamicBuffer->fBitArray[index][subIndex] != 0)
  ------------------
  |  Branch (397:25): [True: 6.11M, False: 51.7M]
  ------------------
  398|  6.11M|                        return false;
  399|  57.8M|                }
  400|  6.11M|            }
  401|  46.7M|        }
  402|  43.0M|        return true;
  403|  52.7M|    }
_ZN11xercesc_3_210CMStateSet6setBitEm:
  406|  3.49M|    {
  407|  3.49M|        if (bitToSet >= fBitCount)
  ------------------
  |  Branch (407:13): [True: 0, False: 3.49M]
  ------------------
  408|      0|        {
  409|      0|            if(fDynamicBuffer)
  ------------------
  |  Branch (409:16): [True: 0, False: 0]
  ------------------
  410|      0|                ThrowXMLwithMemMgr(ArrayIndexOutOfBoundsException, XMLExcepts::Bitset_BadIndex, fDynamicBuffer->fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  411|      0|            else
  412|      0|                ThrowXML(ArrayIndexOutOfBoundsException, XMLExcepts::Bitset_BadIndex);
  ------------------
  |  |  254|      0|#define ThrowXML(type,code) throw type(__FILE__, __LINE__, code)
  ------------------
  413|      0|        }
  414|       |
  415|  3.49M|        const XMLInt32 mask = 1UL << (bitToSet % 32);
  416|       |
  417|       |        // And access the right bit and byte
  418|  3.49M|        if(fDynamicBuffer==0)
  ------------------
  |  Branch (418:12): [True: 56.8k, False: 3.43M]
  ------------------
  419|  56.8k|        {
  420|  56.8k|            const XMLSize_t byteOfs = bitToSet / 32;
  421|  56.8k|            fBits[byteOfs] &= ~mask;
  422|  56.8k|            fBits[byteOfs] |= mask;
  423|  56.8k|        }
  424|  3.43M|        else
  425|  3.43M|        {
  426|  3.43M|            const XMLSize_t vectorOfs = bitToSet / CMSTATE_BITFIELD_CHUNK;
  ------------------
  |  |   52|  3.43M|#define CMSTATE_BITFIELD_CHUNK  1024
  ------------------
  427|  3.43M|            if(fDynamicBuffer->fBitArray[vectorOfs]==NULL)
  ------------------
  |  Branch (427:16): [True: 3.43M, False: 0]
  ------------------
  428|  3.43M|            {
  429|  3.43M|                allocateChunk(vectorOfs);
  430|   113M|                for(XMLSize_t index=0;index < CMSTATE_BITFIELD_INT32_SIZE; index++)
  ------------------
  |  |   53|   113M|#define CMSTATE_BITFIELD_INT32_SIZE (1024 / 32)
  ------------------
  |  Branch (430:39): [True: 109M, False: 3.43M]
  ------------------
  431|   109M|                    fDynamicBuffer->fBitArray[vectorOfs][index]=0;
  432|  3.43M|            }
  433|  3.43M|            const XMLSize_t byteOfs = (bitToSet % CMSTATE_BITFIELD_CHUNK) / 32;
  ------------------
  |  |   52|  3.43M|#define CMSTATE_BITFIELD_CHUNK  1024
  ------------------
  434|  3.43M|            fDynamicBuffer->fBitArray[vectorOfs][byteOfs] &= ~mask;
  435|  3.43M|            fDynamicBuffer->fBitArray[vectorOfs][byteOfs] |= mask;
  436|  3.43M|        }
  437|  3.49M|    }
_ZNK11xercesc_3_210CMStateSet8hashCodeEv:
  456|  19.1M|    {
  457|  19.1M|        XMLSize_t hash = 0;
  458|  19.1M|        if(fDynamicBuffer==0)
  ------------------
  |  Branch (458:12): [True: 7.49M, False: 11.6M]
  ------------------
  459|  7.49M|        {
  460|  37.4M|            for (XMLSize_t index = 0; index<CMSTATE_CACHED_INT32_SIZE; index++)
  ------------------
  |  |   49|  37.4M|#define CMSTATE_CACHED_INT32_SIZE  4
  ------------------
  |  Branch (460:39): [True: 29.9M, False: 7.49M]
  ------------------
  461|  29.9M|                hash = fBits[index] + hash * 31;
  462|  7.49M|        }
  463|  11.6M|        else
  464|  11.6M|        {
  465|  54.1M|            for (XMLSize_t index = 0; index<fDynamicBuffer->fArraySize; index++)
  ------------------
  |  Branch (465:39): [True: 42.4M, False: 11.6M]
  ------------------
  466|  42.4M|            {
  467|  42.4M|                if(fDynamicBuffer->fBitArray[index]==NULL)
  ------------------
  |  Branch (467:20): [True: 29.9M, False: 12.4M]
  ------------------
  468|       |                    // simulates the iteration on the missing bits
  469|   989M|                    for(XMLSize_t subIndex=0;subIndex < CMSTATE_BITFIELD_INT32_SIZE; subIndex++)
  ------------------
  |  |   53|   989M|#define CMSTATE_BITFIELD_INT32_SIZE (1024 / 32)
  ------------------
  |  Branch (469:46): [True: 959M, False: 29.9M]
  ------------------
  470|   959M|                        hash *= 31;
  471|  12.4M|                else
  472|   412M|                    for(XMLSize_t subIndex=0;subIndex < CMSTATE_BITFIELD_INT32_SIZE; subIndex++)
  ------------------
  |  |   53|   412M|#define CMSTATE_BITFIELD_INT32_SIZE (1024 / 32)
  ------------------
  |  Branch (472:46): [True: 399M, False: 12.4M]
  ------------------
  473|   399M|                        hash = fDynamicBuffer->fBitArray[index][subIndex] + hash * 31;
  474|  42.4M|            }
  475|  11.6M|        }
  476|  19.1M|        return hash;
  477|  19.1M|    }
_ZNK11xercesc_3_210CMStateSeteqERKS0_:
  235|  24.9M|    {
  236|  24.9M|        if (fBitCount != setToCompare.fBitCount)
  ------------------
  |  Branch (236:13): [True: 0, False: 24.9M]
  ------------------
  237|      0|            return false;
  238|       |
  239|  24.9M|        if(fDynamicBuffer==0)
  ------------------
  |  Branch (239:12): [True: 6.12M, False: 18.8M]
  ------------------
  240|  6.12M|        {
  241|  14.7M|            for (XMLSize_t index = 0; index < CMSTATE_CACHED_INT32_SIZE; index++)
  ------------------
  |  |   49|  14.7M|#define CMSTATE_CACHED_INT32_SIZE  4
  ------------------
  |  Branch (241:39): [True: 12.6M, False: 2.11M]
  ------------------
  242|  12.6M|            {
  243|  12.6M|                if (fBits[index] != setToCompare.fBits[index])
  ------------------
  |  Branch (243:21): [True: 4.00M, False: 8.63M]
  ------------------
  244|  4.00M|                    return false;
  245|  12.6M|            }
  246|  6.12M|        }
  247|  18.8M|        else
  248|  18.8M|        {
  249|  37.0M|            for (XMLSize_t index = 0; index < fDynamicBuffer->fArraySize; index++)
  ------------------
  |  Branch (249:39): [True: 34.0M, False: 2.99M]
  ------------------
  250|  34.0M|            {
  251|  34.0M|                XMLInt32 *& other = setToCompare.fDynamicBuffer->fBitArray[index],
  252|  34.0M|                         *& mine = fDynamicBuffer->fBitArray[index];
  253|  34.0M|                if(mine==NULL && other==NULL)
  ------------------
  |  Branch (253:20): [True: 18.6M, False: 15.3M]
  |  Branch (253:34): [True: 15.1M, False: 3.58M]
  ------------------
  254|  15.1M|                    continue;
  255|  18.9M|                else if(mine==NULL || other==NULL) // the other should have been empty too
  ------------------
  |  Branch (255:25): [True: 3.58M, False: 15.3M]
  |  Branch (255:39): [True: 42.3k, False: 15.2M]
  ------------------
  256|  3.62M|                    return false;
  257|  15.2M|                else
  258|  15.2M|                {
  259|   212M|                    for(XMLSize_t subIndex = 0; subIndex < CMSTATE_BITFIELD_INT32_SIZE; subIndex++)
  ------------------
  |  |   53|   212M|#define CMSTATE_BITFIELD_INT32_SIZE (1024 / 32)
  ------------------
  |  Branch (259:49): [True: 209M, False: 3.07M]
  ------------------
  260|   209M|                        if(mine[subIndex]!=other[subIndex])
  ------------------
  |  Branch (260:28): [True: 12.2M, False: 197M]
  ------------------
  261|  12.2M|                            return false;
  262|  15.2M|                }
  263|  34.0M|            }
  264|  18.8M|        }
  265|  5.11M|        return true;
  266|  24.9M|    }
_ZN11xercesc_3_210CMStateSetaSERKS0_:
  269|  3.58M|    {
  270|  3.58M|        if (this == &srcSet)
  ------------------
  |  Branch (270:13): [True: 0, False: 3.58M]
  ------------------
  271|      0|            return *this;
  272|       |
  273|       |        // They have to be the same size
  274|  3.58M|        if (fBitCount != srcSet.fBitCount)
  ------------------
  |  Branch (274:13): [True: 0, False: 3.58M]
  ------------------
  275|      0|        {
  276|      0|            if(fDynamicBuffer)
  ------------------
  |  Branch (276:16): [True: 0, False: 0]
  ------------------
  277|      0|                ThrowXMLwithMemMgr(RuntimeException, XMLExcepts::Bitset_NotEqualSize, fDynamicBuffer->fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  278|      0|            else
  279|      0|                ThrowXML(RuntimeException, XMLExcepts::Bitset_NotEqualSize);
  ------------------
  |  |  254|      0|#define ThrowXML(type,code) throw type(__FILE__, __LINE__, code)
  ------------------
  280|      0|        }
  281|       |
  282|  3.58M|        if(fDynamicBuffer==0)
  ------------------
  |  Branch (282:12): [True: 72.3k, False: 3.51M]
  ------------------
  283|  72.3k|        {
  284|   361k|            for (XMLSize_t index = 0; index < CMSTATE_CACHED_INT32_SIZE; index++)
  ------------------
  |  |   49|   361k|#define CMSTATE_CACHED_INT32_SIZE  4
  ------------------
  |  Branch (284:39): [True: 289k, False: 72.3k]
  ------------------
  285|   289k|                fBits[index] = srcSet.fBits[index];
  286|  72.3k|        }
  287|  3.51M|        else
  288|  3.51M|        {
  289|  72.8M|            for (XMLSize_t index = 0; index < fDynamicBuffer->fArraySize; index++)
  ------------------
  |  Branch (289:39): [True: 69.3M, False: 3.51M]
  ------------------
  290|  69.3M|                if(srcSet.fDynamicBuffer->fBitArray[index]==NULL)
  ------------------
  |  Branch (290:20): [True: 65.8M, False: 3.52M]
  ------------------
  291|  65.8M|                {
  292|       |                    // delete this subentry
  293|  65.8M|                    if(fDynamicBuffer->fBitArray[index]!=NULL)
  ------------------
  |  Branch (293:24): [True: 0, False: 65.8M]
  ------------------
  294|      0|                        deallocateChunk(index);
  295|  65.8M|                }
  296|  3.52M|                else
  297|  3.52M|                {
  298|       |                    // if we haven't allocated the subvector yet, allocate it and copy
  299|  3.52M|                    if(fDynamicBuffer->fBitArray[index]==NULL)
  ------------------
  |  Branch (299:24): [True: 3.52M, False: 0]
  ------------------
  300|  3.52M|                        allocateChunk(index);
  301|  3.52M|                    memcpy((void *) fDynamicBuffer->fBitArray[index],
  302|  3.52M|                           (const void *) srcSet.fDynamicBuffer->fBitArray[index],
  303|  3.52M|                           CMSTATE_BITFIELD_INT32_SIZE * sizeof(XMLInt32));
  ------------------
  |  |   53|  3.52M|#define CMSTATE_BITFIELD_INT32_SIZE (1024 / 32)
  ------------------
  304|  3.52M|                }
  305|  3.51M|        }
  306|  3.58M|        return *this;
  307|  3.58M|    }

_ZN11xercesc_3_29CMUnaryOpC2ENS_15ContentSpecNode9NodeTypesEPNS_6CMNodeEjPNS_13MemoryManagerE:
   39|  48.0k|    CMNode(type, maxStates, manager)
   40|  48.0k|    , fChild(nodeToAdopt)
   41|  48.0k|{
   42|       |    // Insure that its one of the types we require
   43|  48.0k|    if ((type != ContentSpecNode::ZeroOrOne)
  ------------------
  |  Branch (43:9): [True: 33.8k, False: 14.1k]
  ------------------
   44|  48.0k|    &&  (type != ContentSpecNode::ZeroOrMore)
  ------------------
  |  Branch (44:9): [True: 16.0k, False: 17.7k]
  ------------------
   45|  48.0k|    &&  (type != ContentSpecNode::OneOrMore))
  ------------------
  |  Branch (45:9): [True: 0, False: 16.0k]
  ------------------
   46|      0|    {
   47|      0|        ThrowXMLwithMemMgr(RuntimeException, XMLExcepts::CM_UnaryOpHadBinType, manager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
   48|      0|    }
   49|  48.0k|    if (type == ContentSpecNode::OneOrMore)
  ------------------
  |  Branch (49:9): [True: 16.0k, False: 31.9k]
  ------------------
   50|  16.0k|        fIsNullable=fChild->isNullable();
   51|  31.9k|    else
   52|  31.9k|        fIsNullable=true;
   53|  48.0k|}
_ZN11xercesc_3_29CMUnaryOpD2Ev:
   56|  48.0k|{
   57|  48.0k|    delete fChild;
   58|  48.0k|}
_ZN11xercesc_3_29CMUnaryOp11orphanChildEv:
   79|  48.0k|{
   80|  48.0k|    delete fChild;
   81|  48.0k|    fChild=0;
   82|  48.0k|}
_ZNK11xercesc_3_29CMUnaryOp12calcFirstPosERNS_10CMStateSetE:
   88|  48.0k|{
   89|       |    // Its just based on our child node's first pos
   90|  48.0k|    toSet = fChild->getFirstPos();
   91|  48.0k|}
_ZNK11xercesc_3_29CMUnaryOp11calcLastPosERNS_10CMStateSetE:
   94|  48.0k|{
   95|       |    // Its just based on our child node's last pos
   96|  48.0k|    toSet = fChild->getLastPos();
   97|  48.0k|}

_ZN11xercesc_3_215ContentSpecNodeD2Ev:
   69|  6.35M|{
   70|       |    // Delete our children, avoiding recursive cleanup
   71|  6.35M|    if (fAdoptFirst && fFirst) {
  ------------------
  |  Branch (71:9): [True: 6.35M, False: 0]
  |  Branch (71:24): [True: 6.27k, False: 6.35M]
  ------------------
   72|  6.27k|		deleteChildNode(fFirst);
   73|  6.27k|    }
   74|       |
   75|  6.35M|    if (fAdoptSecond && fSecond) {
  ------------------
  |  Branch (75:9): [True: 6.35M, False: 0]
  |  Branch (75:25): [True: 2.04k, False: 6.35M]
  ------------------
   76|  2.04k|		deleteChildNode(fSecond);
   77|  2.04k|    }
   78|       |
   79|  6.35M|    delete fElement;
   80|  6.35M|}
_ZN11xercesc_3_215ContentSpecNode15deleteChildNodeEPS0_:
   83|  8.32k|{
   84|  8.32k|	ValueStackOf<ContentSpecNode*> toBeDeleted(10, fMemoryManager);
   85|  8.32k|	toBeDeleted.push(node);
   86|  12.6M|	while(!toBeDeleted.empty())
  ------------------
  |  Branch (86:8): [True: 12.6M, False: 8.32k]
  ------------------
   87|  12.6M|	{
   88|  12.6M|		ContentSpecNode* node = toBeDeleted.pop();
   89|  12.6M|		if(node==0)
  ------------------
  |  Branch (89:6): [True: 6.33M, False: 6.32M]
  ------------------
   90|  6.33M|			continue;
   91|  6.32M|		if(node->isFirstAdopted())
  ------------------
  |  Branch (91:6): [True: 6.32M, False: 0]
  ------------------
   92|  6.32M|			toBeDeleted.push(node->orphanFirst());
   93|  6.32M|		if(node->isSecondAdopted())
  ------------------
  |  Branch (93:6): [True: 6.32M, False: 0]
  ------------------
   94|  6.32M|			toBeDeleted.push(node->orphanSecond());
   95|  6.32M|		delete node;
   96|  6.32M|	}
   97|  8.32k|}
_ZNK11xercesc_3_215ContentSpecNode10formatSpecERNS_9XMLBufferE:
  261|  1.34k|{
  262|       |    // Clean out the buffer first
  263|  1.34k|    bufToFill.reset();
  264|       |
  265|  1.34k|    if (fType == ContentSpecNode::Leaf)
  ------------------
  |  Branch (265:9): [True: 87, False: 1.25k]
  ------------------
  266|     87|        bufToFill.append(chOpenParen);
  267|  1.34k|    formatNode
  268|  1.34k|    (
  269|  1.34k|        this
  270|  1.34k|		, bufToFill
  271|  1.34k|        , fMemoryManager
  272|  1.34k|    );
  273|  1.34k|    if (fType == ContentSpecNode::Leaf)
  ------------------
  |  Branch (273:9): [True: 87, False: 1.25k]
  ------------------
  274|     87|        bufToFill.append(chCloseParen);
  275|  1.34k|}
ContentSpecNode.cpp:_ZN11xercesc_3_2L10formatNodeEPKNS_15ContentSpecNodeERNS_9XMLBufferEPNS_13MemoryManagerE:
  122|  1.34k|{
  123|  1.34k|    if (!curNode)
  ------------------
  |  Branch (123:9): [True: 0, False: 1.34k]
  ------------------
  124|      0|        return;
  125|       |
  126|  1.34k|	ValueStackOf<formatNodeHolder> toBeProcessed(10, memMgr);
  127|  1.34k|	toBeProcessed.push(formatNodeHolder(curNode, ContentSpecNode::UnknownType, 0));
  128|       |
  129|  7.68M|	while(!toBeProcessed.empty())
  ------------------
  |  Branch (129:8): [True: 7.68M, False: 1.34k]
  ------------------
  130|  7.68M|	{
  131|  7.68M|		formatNodeHolder item=toBeProcessed.pop();
  132|  7.68M|		if(item.character!=0)
  ------------------
  |  Branch (132:6): [True: 2.60M, False: 5.07M]
  ------------------
  133|  2.60M|		{
  134|  2.60M|			bufToFill.append(item.character);
  135|  2.60M|			continue;
  136|  2.60M|		}
  137|  5.07M|		const ContentSpecNode* curNode = item.node;
  138|  5.07M|		if(!curNode)
  ------------------
  |  Branch (138:6): [True: 0, False: 5.07M]
  ------------------
  139|      0|			continue;
  140|  5.07M|		const ContentSpecNode::NodeTypes parentType = item.parentType; 
  141|  5.07M|		const ContentSpecNode* first = curNode->getFirst();
  142|  5.07M|		const ContentSpecNode* second = curNode->getSecond();
  143|  5.07M|		const ContentSpecNode::NodeTypes curType = curNode->getType();
  144|       |
  145|       |		// Get the type of the first node
  146|  5.07M|		const ContentSpecNode::NodeTypes firstType = first ?
  ------------------
  |  Branch (146:48): [True: 2.56M, False: 2.51M]
  ------------------
  147|  2.56M|													 first->getType() :
  148|  5.07M|													 ContentSpecNode::Leaf;
  149|       |
  150|       |		// Calculate the parens flag for the rep nodes
  151|  5.07M|		bool doRepParens = false;
  152|  5.07M|		if (((firstType != ContentSpecNode::Leaf)
  ------------------
  |  Branch (152:8): [True: 59.7k, False: 5.01M]
  ------------------
  153|  5.07M|				&& (parentType != ContentSpecNode::UnknownType))
  ------------------
  |  Branch (153:8): [True: 59.4k, False: 341]
  ------------------
  154|  5.07M|		||  ((firstType == ContentSpecNode::Leaf)
  ------------------
  |  Branch (154:8): [True: 5.01M, False: 341]
  ------------------
  155|  5.01M|				&& (parentType == ContentSpecNode::UnknownType)))
  ------------------
  |  Branch (155:8): [True: 1.00k, False: 5.01M]
  ------------------
  156|  60.4k|		{
  157|  60.4k|			doRepParens = true;
  158|  60.4k|		}
  159|       |
  160|       |		// Now handle our type
  161|  5.07M|		switch(curType & 0x0f)
  ------------------
  |  Branch (161:10): [True: 0, False: 5.07M]
  ------------------
  162|  5.07M|		{
  163|  2.51M|			case ContentSpecNode::Leaf :
  ------------------
  |  Branch (163:4): [True: 2.51M, False: 2.56M]
  ------------------
  164|  2.51M|				if (curNode->getElement()->getURI() == XMLElementDecl::fgPCDataElemId)
  ------------------
  |  Branch (164:9): [True: 33, False: 2.51M]
  ------------------
  165|     33|					bufToFill.append(XMLElementDecl::fgPCDataElemName);
  166|  2.51M|				else
  167|  2.51M|				{
  168|  2.51M|					bufToFill.append(curNode->getElement()->getRawName());
  169|       |					// show the + and * modifiers also when we have a non-infinite number of repetitions
  170|  2.51M|					if(curNode->getMinOccurs()==0 && (curNode->getMaxOccurs()==-1 || curNode->getMaxOccurs()>1))
  ------------------
  |  Branch (170:9): [True: 0, False: 2.51M]
  |  Branch (170:40): [True: 0, False: 0]
  |  Branch (170:71): [True: 0, False: 0]
  ------------------
  171|      0|						bufToFill.append(chAsterisk);
  172|  2.51M|					else if(curNode->getMinOccurs()==0 && curNode->getMaxOccurs()==1)
  ------------------
  |  Branch (172:14): [True: 0, False: 2.51M]
  |  Branch (172:44): [True: 0, False: 0]
  ------------------
  173|      0|						bufToFill.append(chQuestion);
  174|  2.51M|					else if(curNode->getMinOccurs()==1 && (curNode->getMaxOccurs()==-1 || curNode->getMaxOccurs()>1))
  ------------------
  |  Branch (174:14): [True: 2.51M, False: 0]
  |  Branch (174:45): [True: 0, False: 2.51M]
  |  Branch (174:76): [True: 0, False: 2.51M]
  ------------------
  175|      0|						bufToFill.append(chPlus);
  176|  2.51M|				}
  177|  2.51M|				break;
  178|       |
  179|  13.8k|			case ContentSpecNode::ZeroOrOne :
  ------------------
  |  Branch (179:4): [True: 13.8k, False: 5.06M]
  ------------------
  180|  13.8k|				if (doRepParens)
  ------------------
  |  Branch (180:9): [True: 7.73k, False: 6.06k]
  ------------------
  181|  7.73k|					bufToFill.append(chOpenParen);
  182|       |
  183|  13.8k|				toBeProcessed.push(formatNodeHolder(0, ContentSpecNode::UnknownType, chQuestion));
  184|  13.8k|				if (doRepParens)
  ------------------
  |  Branch (184:9): [True: 7.73k, False: 6.06k]
  ------------------
  185|  7.73k|					toBeProcessed.push(formatNodeHolder(0, ContentSpecNode::UnknownType, chCloseParen));
  186|  13.8k|				toBeProcessed.push(formatNodeHolder(first, curType, 0));
  187|  13.8k|				break;
  188|       |
  189|  14.6k|			case ContentSpecNode::ZeroOrMore :
  ------------------
  |  Branch (189:4): [True: 14.6k, False: 5.06M]
  ------------------
  190|  14.6k|				if (doRepParens)
  ------------------
  |  Branch (190:9): [True: 5.22k, False: 9.42k]
  ------------------
  191|  5.22k|					bufToFill.append(chOpenParen);
  192|       |
  193|  14.6k|				toBeProcessed.push(formatNodeHolder(0, ContentSpecNode::UnknownType, chAsterisk));
  194|  14.6k|				if (doRepParens)
  ------------------
  |  Branch (194:9): [True: 5.22k, False: 9.42k]
  ------------------
  195|  5.22k|					toBeProcessed.push(formatNodeHolder(0, ContentSpecNode::UnknownType, chCloseParen));
  196|  14.6k|				toBeProcessed.push(formatNodeHolder(first, curType, 0));
  197|  14.6k|				break;
  198|       |
  199|  15.9k|			case ContentSpecNode::OneOrMore :
  ------------------
  |  Branch (199:4): [True: 15.9k, False: 5.06M]
  ------------------
  200|  15.9k|				if (doRepParens)
  ------------------
  |  Branch (200:9): [True: 11.1k, False: 4.72k]
  ------------------
  201|  11.1k|					bufToFill.append(chOpenParen);
  202|       |
  203|  15.9k|				toBeProcessed.push(formatNodeHolder(0, ContentSpecNode::UnknownType, chPlus));
  204|  15.9k|				if (doRepParens)
  ------------------
  |  Branch (204:9): [True: 11.1k, False: 4.72k]
  ------------------
  205|  11.1k|					toBeProcessed.push(formatNodeHolder(0, ContentSpecNode::UnknownType, chCloseParen));
  206|  15.9k|				toBeProcessed.push(formatNodeHolder(first, curType, 0));
  207|  15.9k|				break;
  208|       |
  209|  1.48M|			case ContentSpecNode::Choice :
  ------------------
  |  Branch (209:4): [True: 1.48M, False: 3.59M]
  ------------------
  210|  1.48M|				if ((parentType & 0x0f) != (curType & 0x0f))
  ------------------
  |  Branch (210:9): [True: 13.4k, False: 1.47M]
  ------------------
  211|  13.4k|					bufToFill.append(chOpenParen);
  212|       |
  213|  1.48M|				if ((parentType & 0x0f) != (curType & 0x0f))
  ------------------
  |  Branch (213:9): [True: 13.4k, False: 1.47M]
  ------------------
  214|  13.4k|					toBeProcessed.push(formatNodeHolder(0, ContentSpecNode::UnknownType, chCloseParen));
  215|  1.48M|				if(second!=NULL)
  ------------------
  |  Branch (215:8): [True: 1.48M, False: 0]
  ------------------
  216|  1.48M|				{
  217|  1.48M|					toBeProcessed.push(formatNodeHolder(second, curType, 0));
  218|  1.48M|					toBeProcessed.push(formatNodeHolder(0, ContentSpecNode::UnknownType, chPipe));
  219|  1.48M|				}
  220|  1.48M|				toBeProcessed.push(formatNodeHolder(first, curType, 0));
  221|  1.48M|				break;
  222|       |
  223|  1.03M|			case ContentSpecNode::Sequence :
  ------------------
  |  Branch (223:4): [True: 1.03M, False: 4.04M]
  ------------------
  224|  1.03M|				if ((parentType & 0x0f) != (curType & 0x0f))
  ------------------
  |  Branch (224:9): [True: 6.90k, False: 1.02M]
  ------------------
  225|  6.90k|					bufToFill.append(chOpenParen);
  226|       |
  227|  1.03M|				if ((parentType & 0x0f) != (curType & 0x0f))
  ------------------
  |  Branch (227:9): [True: 6.90k, False: 1.02M]
  ------------------
  228|  6.90k|					toBeProcessed.push(formatNodeHolder(0, ContentSpecNode::UnknownType, chCloseParen));
  229|  1.03M|				if(second!=NULL)
  ------------------
  |  Branch (229:8): [True: 1.03M, False: 0]
  ------------------
  230|  1.03M|				{
  231|  1.03M|					toBeProcessed.push(formatNodeHolder(second, curType, 0));
  232|  1.03M|					toBeProcessed.push(formatNodeHolder(0, ContentSpecNode::UnknownType, chComma));
  233|  1.03M|				}
  234|  1.03M|				toBeProcessed.push(formatNodeHolder(first, curType, 0));
  235|  1.03M|				break;
  236|       |
  237|      0|			case ContentSpecNode::All :
  ------------------
  |  Branch (237:4): [True: 0, False: 5.07M]
  ------------------
  238|      0|				if ((parentType & 0x0f) != (curType & 0x0f))
  ------------------
  |  Branch (238:9): [True: 0, False: 0]
  ------------------
  239|      0|				{
  240|      0|					bufToFill.append(chLatin_A);
  241|      0|					bufToFill.append(chLatin_l);
  242|      0|					bufToFill.append(chLatin_l);
  243|      0|					bufToFill.append(chOpenParen);
  244|      0|				}
  245|       |
  246|      0|				if ((parentType & 0x0f) != (curType & 0x0f))
  ------------------
  |  Branch (246:9): [True: 0, False: 0]
  ------------------
  247|      0|					toBeProcessed.push(formatNodeHolder(0, ContentSpecNode::UnknownType, chCloseParen));
  248|      0|				toBeProcessed.push(formatNodeHolder(second, curType, 0));
  249|      0|				toBeProcessed.push(formatNodeHolder(0, ContentSpecNode::UnknownType, chComma));
  250|      0|				toBeProcessed.push(formatNodeHolder(first, curType, 0));
  251|      0|				break;
  252|  5.07M|		}
  253|  5.07M|	}
  254|  1.34k|}
_ZN11xercesc_3_216formatNodeHolderC2EPKNS_15ContentSpecNodeENS1_9NodeTypesEDs:
  102|  7.68M|	formatNodeHolder(const ContentSpecNode* n, const ContentSpecNode::NodeTypes p, XMLCh c) : node(n), parentType(p), character(c) {}

_ZN11xercesc_3_215ContentSpecNode10getElementEv:
  314|  4.63M|{
  315|  4.63M|    return fElement;
  316|  4.63M|}
_ZNK11xercesc_3_215ContentSpecNode10getElementEv:
  319|  5.03M|{
  320|  5.03M|    return fElement;
  321|  5.03M|}
_ZN11xercesc_3_215ContentSpecNode8getFirstEv:
  334|  10.1M|{
  335|  10.1M|    return fFirst;
  336|  10.1M|}
_ZNK11xercesc_3_215ContentSpecNode8getFirstEv:
  339|  5.07M|{
  340|  5.07M|    return fFirst;
  341|  5.07M|}
_ZN11xercesc_3_215ContentSpecNode9getSecondEv:
  344|  8.81M|{
  345|  8.81M|    return fSecond;
  346|  8.81M|}
_ZNK11xercesc_3_215ContentSpecNode9getSecondEv:
  349|  5.07M|{
  350|  5.07M|    return fSecond;
  351|  5.07M|}
_ZNK11xercesc_3_215ContentSpecNode7getTypeEv:
  354|  20.6M|{
  355|  20.6M|    return fType;
  356|  20.6M|}
_ZN11xercesc_3_215ContentSpecNode11orphanFirstEv:
  359|  6.34M|{
  360|  6.34M|    ContentSpecNode* retNode = fFirst;
  361|  6.34M|    fFirst = 0;
  362|  6.34M|    return retNode;
  363|  6.34M|}
_ZN11xercesc_3_215ContentSpecNode12orphanSecondEv:
  366|  7.65M|{
  367|  7.65M|    ContentSpecNode* retNode = fSecond;
  368|  7.65M|    fSecond = 0;
  369|  7.65M|    return retNode;
  370|  7.65M|}
_ZNK11xercesc_3_215ContentSpecNode12getMinOccursEv:
  373|  7.55M|{
  374|  7.55M|    return fMinOccurs;
  375|  7.55M|}
_ZNK11xercesc_3_215ContentSpecNode12getMaxOccursEv:
  378|  5.03M|{
  379|  5.03M|    return fMaxOccurs;
  380|  5.03M|}
_ZNK11xercesc_3_215ContentSpecNode14isFirstAdoptedEv:
  383|  6.32M|{
  384|  6.32M|    return fAdoptFirst;
  385|  6.32M|}
_ZNK11xercesc_3_215ContentSpecNode15isSecondAdoptedEv:
  388|  6.32M|{
  389|  6.32M|    return fAdoptSecond;
  390|  6.32M|}
_ZN11xercesc_3_215ContentSpecNode9setSecondEPS0_:
  412|  3.15M|{
  413|  3.15M|    if (fAdoptSecond)
  ------------------
  |  Branch (413:9): [True: 3.15M, False: 0]
  ------------------
  414|  3.15M|        delete fSecond;
  415|  3.15M|    fSecond = toAdopt;
  416|  3.15M|}
_ZN11xercesc_3_215ContentSpecNode7setTypeENS0_9NodeTypesE:
  419|      1|{
  420|      1|    fType = type;
  421|      1|}
_ZN11xercesc_3_215ContentSpecNode12setMinOccursEi:
  424|      1|{
  425|      1|    fMinOccurs = min;
  426|      1|}
_ZN11xercesc_3_215ContentSpecNode12setMaxOccursEi:
  429|      1|{
  430|      1|    fMaxOccurs = max;
  431|      1|}
_ZN11xercesc_3_215ContentSpecNodeC2EPNS_5QNameEbPNS_13MemoryManagerE:
  267|    948|    fMemoryManager(manager)
  268|    948|    , fElement(0)
  269|    948|    , fElementDecl(0)
  270|    948|    , fFirst(0)
  271|    948|    , fSecond(0)
  272|    948|    , fType(ContentSpecNode::Leaf)
  273|    948|    , fAdoptFirst(true)
  274|    948|    , fAdoptSecond(true)
  275|    948|    , fMinOccurs(1)
  276|    948|    , fMaxOccurs(1)
  277|    948|{
  278|    948|    if (copyQName)
  ------------------
  |  Branch (278:9): [True: 0, False: 948]
  ------------------
  279|      0|    {
  280|      0|        if (element)
  ------------------
  |  Branch (280:13): [True: 0, False: 0]
  ------------------
  281|      0|            fElement = new (fMemoryManager) QName(*element);
  282|      0|    }
  283|    948|    else
  284|    948|    {
  285|    948|        fElement = element;
  286|    948|    }
  287|    948|}
_ZN11xercesc_3_215ContentSpecNodeC2ENS0_9NodeTypesEPS0_S2_bbPNS_13MemoryManagerE:
  297|  3.21M|    fMemoryManager(manager)
  298|  3.21M|    , fElement(0)
  299|  3.21M|    , fElementDecl(0)
  300|  3.21M|    , fFirst(firstAdopt)
  301|  3.21M|    , fSecond(secondAdopt)
  302|  3.21M|    , fType(type)
  303|  3.21M|    , fAdoptFirst(adoptFirst)
  304|  3.21M|    , fAdoptSecond(adoptSecond)
  305|  3.21M|    , fMinOccurs(1)
  306|  3.21M|    , fMaxOccurs(1)
  307|  3.21M|{
  308|  3.21M|}
_ZN11xercesc_3_215ContentSpecNodeC2EPNS_5QNameEPNS_13MemoryManagerE:
  228|  3.14M|    fMemoryManager(manager)
  229|  3.14M|    , fElement(0)
  230|  3.14M|    , fElementDecl(0)
  231|  3.14M|    , fFirst(0)
  232|  3.14M|    , fSecond(0)
  233|  3.14M|    , fType(ContentSpecNode::Leaf)
  234|  3.14M|    , fAdoptFirst(true)
  235|  3.14M|    , fAdoptSecond(true)
  236|  3.14M|    , fMinOccurs(1)
  237|  3.14M|    , fMaxOccurs(1)
  238|  3.14M|{
  239|  3.14M|    if (element)
  ------------------
  |  Branch (239:9): [True: 3.14M, False: 0]
  ------------------
  240|  3.14M|        fElement = new (fMemoryManager) QName(*element);
  241|  3.14M|}

_ZN11xercesc_3_215DFAContentModelC2EbPNS_15ContentSpecNodeEPNS_13MemoryManagerE:
   70|  1.47k|    fElemMap(0)
   71|  1.47k|    , fElemMapType(0)
   72|  1.47k|    , fElemMapSize(0)
   73|  1.47k|    , fEmptyOk(false)
   74|  1.47k|    , fEOCPos(0)
   75|  1.47k|    , fFinalStateFlags(0)
   76|  1.47k|    , fFollowList(0)
   77|  1.47k|    , fHeadNode(0)
   78|  1.47k|    , fLeafCount(0)
   79|  1.47k|    , fLeafList(0)
   80|  1.47k|    , fLeafListType(0)
   81|  1.47k|    , fTransTable(0)
   82|  1.47k|    , fTransTableSize(0)
   83|  1.47k|    , fCountingStates(0)
   84|  1.47k|    , fDTD(dtd)
   85|  1.47k|    , fIsMixed(false)
   86|  1.47k|    , fLeafNameTypeVector(0)
   87|  1.47k|    , fMemoryManager(manager)
   88|  1.47k|{
   89|       |    // And build the DFA data structures
   90|  1.47k|    buildDFA(elemContentSpec);
   91|  1.47k|}
_ZN11xercesc_3_215DFAContentModelD2Ev:
  122|  1.47k|{
  123|       |    //
  124|       |    //  Clean up all the stuff that is not just temporary representation
  125|       |    //  data that was cleaned up after building the DFA.
  126|       |    //
  127|  1.47k|    fMemoryManager->deallocate(fFinalStateFlags); //delete [] fFinalStateFlags;
  128|       |
  129|  1.47k|    unsigned int index;
  130|  4.63M|    for (index = 0; index < fTransTableSize; index++)
  ------------------
  |  Branch (130:21): [True: 4.63M, False: 1.47k]
  ------------------
  131|  4.63M|        fMemoryManager->deallocate(fTransTable[index]); //delete [] fTransTable[index];
  132|  1.47k|    fMemoryManager->deallocate(fTransTable); //delete [] fTransTable;
  133|       |
  134|  1.47k|    if(fCountingStates)
  ------------------
  |  Branch (134:8): [True: 0, False: 1.47k]
  ------------------
  135|      0|    {
  136|      0|        for (unsigned int j = 0; j < fTransTableSize; ++j)
  ------------------
  |  Branch (136:34): [True: 0, False: 0]
  ------------------
  137|      0|            delete fCountingStates[j];
  138|      0|        fMemoryManager->deallocate(fCountingStates);
  139|      0|    }
  140|       |
  141|  1.74M|    for (index = 0; index < fLeafCount; index++)
  ------------------
  |  Branch (141:21): [True: 1.74M, False: 1.47k]
  ------------------
  142|  1.74M|        delete fElemMap[index];
  143|  1.47k|    fMemoryManager->deallocate(fElemMap); //delete [] fElemMap;
  144|       |
  145|  1.47k|    fMemoryManager->deallocate(fElemMapType); //delete [] fElemMapType;
  146|  1.47k|    fMemoryManager->deallocate(fLeafListType); //delete [] fLeafListType;
  147|       |
  148|  1.47k|    delete fLeafNameTypeVector;
  149|  1.47k|}
_ZNK11xercesc_3_215DFAContentModel15validateContentEPPNS_5QNameEmjPmPNS_13MemoryManagerE:
  161|  4.50k|{
  162|       |    //
  163|       |    //  If there are no children, then either we fail on the 0th element
  164|       |    //  or we return success. It depends upon whether this content model
  165|       |    //  accepts empty content, which we determined earlier.
  166|       |    //
  167|  4.50k|    if (!childCount)
  ------------------
  |  Branch (167:9): [True: 2.95k, False: 1.55k]
  ------------------
  168|  2.95k|    {
  169|       |        // success
  170|  2.95k|        if(fEmptyOk)
  ------------------
  |  Branch (170:12): [True: 882, False: 2.07k]
  ------------------
  171|    882|            return true;
  172|  2.07k|        *indexFailingChild=0;
  173|  2.07k|        return false;
  174|  2.95k|    }
  175|       |
  176|       |    //
  177|       |    //  Lets loop through the children in the array and move our way
  178|       |    //  through the states. Note that we use the fElemMap array to map
  179|       |    //  an element index to a state index.
  180|       |    //
  181|  1.55k|    unsigned int curState = 0;
  182|  1.55k|    unsigned int nextState = 0;
  183|  1.55k|    unsigned int loopCount = 0;
  184|  1.55k|    unsigned int childIndex = 0;
  185|  2.78k|    for (; childIndex < childCount; childIndex++)
  ------------------
  |  Branch (185:12): [True: 2.13k, False: 655]
  ------------------
  186|  2.13k|    {
  187|       |        // Get the current element index out
  188|  2.13k|        const QName* curElem = children[childIndex];
  189|  2.13k|        const XMLCh* curElemRawName = 0;
  190|  2.13k|        if (fDTD)
  ------------------
  |  Branch (190:13): [True: 2.13k, False: 0]
  ------------------
  191|  2.13k|            curElemRawName = curElem->getRawName();
  192|       |
  193|       |        // If this is text in a Schema mixed content model, skip it.
  194|  2.13k|        if ( fIsMixed &&
  ------------------
  |  Branch (194:14): [True: 0, False: 2.13k]
  ------------------
  195|  2.13k|            ( curElem->getURI() == XMLElementDecl::fgPCDataElemId))
  ------------------
  |  Branch (195:13): [True: 0, False: 0]
  ------------------
  196|      0|            continue;
  197|       |
  198|       |        // Look up this child in our element map
  199|  2.13k|        unsigned int elemIndex = 0;
  200|  6.42k|        for (; elemIndex < fElemMapSize; elemIndex++)
  ------------------
  |  Branch (200:16): [True: 5.53k, False: 896]
  ------------------
  201|  5.53k|        {
  202|  5.53k|            const QName* inElem  = fElemMap[elemIndex];
  203|  5.53k|            if (fDTD) {
  ------------------
  |  Branch (203:17): [True: 5.53k, False: 0]
  ------------------
  204|  5.53k|                if (XMLString::equals(inElem->getRawName(), curElemRawName)) {
  ------------------
  |  Branch (204:21): [True: 1.90k, False: 3.62k]
  ------------------
  205|  1.90k|                    nextState = fTransTable[curState][elemIndex];
  206|  1.90k|                    if (nextState != XMLContentModel::gInvalidTrans)
  ------------------
  |  Branch (206:25): [True: 1.23k, False: 670]
  ------------------
  207|  1.23k|                        break;
  208|  1.90k|                }
  209|  5.53k|            }
  210|      0|            else {
  211|      0|                ContentSpecNode::NodeTypes type = fElemMapType[elemIndex];
  212|      0|                if (type == ContentSpecNode::Leaf)
  ------------------
  |  Branch (212:21): [True: 0, False: 0]
  ------------------
  213|      0|                {
  214|      0|                    if ((inElem->getURI() == curElem->getURI()) &&
  ------------------
  |  Branch (214:25): [True: 0, False: 0]
  ------------------
  215|      0|                    (XMLString::equals(inElem->getLocalPart(), curElem->getLocalPart()))) {
  ------------------
  |  Branch (215:21): [True: 0, False: 0]
  ------------------
  216|      0|                        nextState = fTransTable[curState][elemIndex];
  217|      0|                        if (nextState != XMLContentModel::gInvalidTrans)
  ------------------
  |  Branch (217:29): [True: 0, False: 0]
  ------------------
  218|      0|                            break;
  219|      0|                    }
  220|      0|                }
  221|      0|                else if ((type & 0x0f)== ContentSpecNode::Any)
  ------------------
  |  Branch (221:26): [True: 0, False: 0]
  ------------------
  222|      0|                {
  223|      0|                    nextState = fTransTable[curState][elemIndex];
  224|      0|                    if (nextState != XMLContentModel::gInvalidTrans)
  ------------------
  |  Branch (224:25): [True: 0, False: 0]
  ------------------
  225|      0|                        break;
  226|      0|                }
  227|      0|                else if ((type & 0x0f) == ContentSpecNode::Any_NS)
  ------------------
  |  Branch (227:26): [True: 0, False: 0]
  ------------------
  228|      0|                {
  229|      0|                    if (inElem->getURI() == curElem->getURI())
  ------------------
  |  Branch (229:25): [True: 0, False: 0]
  ------------------
  230|      0|                    {
  231|      0|                        nextState = fTransTable[curState][elemIndex];
  232|      0|                        if (nextState != XMLContentModel::gInvalidTrans)
  ------------------
  |  Branch (232:29): [True: 0, False: 0]
  ------------------
  233|      0|                            break;
  234|      0|                    }
  235|      0|                }
  236|      0|                else if ((type & 0x0f) == ContentSpecNode::Any_Other)
  ------------------
  |  Branch (236:26): [True: 0, False: 0]
  ------------------
  237|      0|                {
  238|       |                    // Here we assume that empty string has id 1.
  239|       |                    //
  240|      0|                    unsigned int uriId = curElem->getURI();
  241|      0|                    if (uriId != 1 && uriId != inElem->getURI()) {
  ------------------
  |  Branch (241:25): [True: 0, False: 0]
  |  Branch (241:39): [True: 0, False: 0]
  ------------------
  242|      0|                        nextState = fTransTable[curState][elemIndex];
  243|      0|                        if (nextState != XMLContentModel::gInvalidTrans)
  ------------------
  |  Branch (243:29): [True: 0, False: 0]
  ------------------
  244|      0|                            break;
  245|      0|                    }
  246|      0|                }
  247|      0|            }
  248|  5.53k|        }//for elemIndex
  249|       |
  250|       |        // If "nextState" is -1, we found a match, but the transition is invalid
  251|  2.13k|        if (nextState == XMLContentModel::gInvalidTrans)
  ------------------
  |  Branch (251:13): [True: 670, False: 1.46k]
  ------------------
  252|    670|        {
  253|    670|            *indexFailingChild=childIndex;
  254|    670|            return false;
  255|    670|        }
  256|       |
  257|       |        // If we didn't find it, then obviously not valid
  258|  1.46k|        if (elemIndex == fElemMapSize)
  ------------------
  |  Branch (258:13): [True: 226, False: 1.23k]
  ------------------
  259|    226|        {
  260|    226|            *indexFailingChild=childIndex;
  261|    226|            return false;
  262|    226|        }
  263|       |
  264|  1.23k|        unsigned int nextLoop = 0;
  265|  1.23k|        if(!handleRepetitions(curElem, curState, loopCount, nextState, nextLoop, elemIndex, 0))
  ------------------
  |  Branch (265:12): [True: 0, False: 1.23k]
  ------------------
  266|      0|        {
  267|      0|            *indexFailingChild=childIndex;
  268|      0|            return false;
  269|      0|        }
  270|       |
  271|  1.23k|        curState = nextState;
  272|  1.23k|        loopCount = nextLoop;
  273|  1.23k|        nextState = 0;
  274|       |
  275|  1.23k|    }//for childIndex
  276|       |
  277|       |    //
  278|       |    //  We transitioned all the way through the input list. However, that
  279|       |    //  does not mean that we ended in a final state. So check whether
  280|       |    //  our ending state is a final state.
  281|       |    //
  282|    655|    if (!fFinalStateFlags[curState])
  ------------------
  |  Branch (282:9): [True: 196, False: 459]
  ------------------
  283|    196|    {
  284|    196|        *indexFailingChild=childIndex;
  285|    196|        return false;
  286|    196|    }
  287|       |
  288|       |    // verify if we exited before the minOccurs was satisfied
  289|    459|    if (fCountingStates != 0) {
  ------------------
  |  Branch (289:9): [True: 0, False: 459]
  ------------------
  290|      0|        Occurence* o = fCountingStates[curState];
  291|      0|        if (o != 0 && loopCount < (unsigned int)o->minOccurs) {
  ------------------
  |  Branch (291:13): [True: 0, False: 0]
  |  Branch (291:23): [True: 0, False: 0]
  ------------------
  292|       |            // not enough loops on the current state to be considered final.
  293|      0|            *indexFailingChild=childIndex;
  294|      0|            return false;
  295|      0|        }
  296|      0|    }
  297|       |
  298|       |    //success
  299|    459|    return true;
  300|    459|}
_ZNK11xercesc_3_215DFAContentModel17handleRepetitionsEPKNS_5QNameEjjRjS4_mPNS_27SubstitutionGroupComparatorE:
  446|  1.23k|{
  447|  1.23k|    nextLoop = 0;
  448|  1.23k|    if (fCountingStates != 0) {
  ------------------
  |  Branch (448:9): [True: 0, False: 1.23k]
  ------------------
  449|      0|        nextLoop = currentLoop;
  450|      0|        Occurence* o = fCountingStates[curState];
  451|      0|        if (o != 0) {
  ------------------
  |  Branch (451:13): [True: 0, False: 0]
  ------------------
  452|      0|            if (curState == nextState) {
  ------------------
  |  Branch (452:17): [True: 0, False: 0]
  ------------------
  453|      0|                if (++nextLoop > (unsigned int)o->maxOccurs && o->maxOccurs != -1) {
  ------------------
  |  Branch (453:21): [True: 0, False: 0]
  |  Branch (453:64): [True: 0, False: 0]
  ------------------
  454|       |                    // It's likely that we looped too many times on the current state
  455|       |                    // however it's possible that we actually matched another particle
  456|       |                    // which allows the same name.
  457|       |                    //
  458|       |                    // Consider:
  459|       |                    //
  460|       |                    // <xs:sequence>
  461|       |                    //  <xs:element name="foo" type="xs:string" minOccurs="3" maxOccurs="3"/>
  462|       |                    //  <xs:element name="foo" type="xs:string" fixed="bar"/>
  463|       |                    // </xs:sequence>
  464|       |                    //
  465|       |                    // and
  466|       |                    //
  467|       |                    // <xs:sequence>
  468|       |                    //  <xs:element name="foo" type="xs:string" minOccurs="3" maxOccurs="3"/>
  469|       |                    //  <xs:any namespace="##any" processContents="skip"/>
  470|       |                    // </xs:sequence>
  471|       |                    //
  472|       |                    // In the DFA there will be two transitions from the current state which
  473|       |                    // allow "foo". Note that this is not a UPA violation. The ambiguity of which
  474|       |                    // transition to take is resolved by the current value of the counter. Since
  475|       |                    // we've already seen enough instances of the first "foo" perhaps there is
  476|       |                    // another element declaration or wildcard deeper in the element map which
  477|       |                    // matches.
  478|      0|                    unsigned int tempNextState = 0;
  479|       |
  480|      0|                    while (++elemIndex < fElemMapSize) {
  ------------------
  |  Branch (480:28): [True: 0, False: 0]
  ------------------
  481|      0|                        QName* inElem  = fElemMap[elemIndex];
  482|      0|                        ContentSpecNode::NodeTypes type = fElemMapType[elemIndex];
  483|      0|                        if (type == ContentSpecNode::Leaf)
  ------------------
  |  Branch (483:29): [True: 0, False: 0]
  ------------------
  484|      0|                        {
  485|      0|                            if(comparator!=0) {
  ------------------
  |  Branch (485:32): [True: 0, False: 0]
  ------------------
  486|      0|                                if (comparator->isEquivalentTo(curElem, inElem) )
  ------------------
  |  Branch (486:37): [True: 0, False: 0]
  ------------------
  487|      0|                                {
  488|      0|                                    tempNextState = fTransTable[curState][elemIndex];
  489|      0|                                    if (tempNextState != XMLContentModel::gInvalidTrans)
  ------------------
  |  Branch (489:41): [True: 0, False: 0]
  ------------------
  490|      0|                                        break;
  491|      0|                                }
  492|      0|                            }
  493|      0|                            else if (fDTD) {
  ------------------
  |  Branch (493:38): [True: 0, False: 0]
  ------------------
  494|      0|                                if (XMLString::equals(inElem->getRawName(), curElem->getRawName())) {
  ------------------
  |  Branch (494:37): [True: 0, False: 0]
  ------------------
  495|      0|                                    tempNextState = fTransTable[curState][elemIndex];
  496|      0|                                    if (tempNextState != XMLContentModel::gInvalidTrans)
  ------------------
  |  Branch (496:41): [True: 0, False: 0]
  ------------------
  497|      0|                                        break;
  498|      0|                                }
  499|      0|                            }
  500|      0|                            else {
  501|      0|                                if ((inElem->getURI() == curElem->getURI()) &&
  ------------------
  |  Branch (501:37): [True: 0, False: 0]
  ------------------
  502|      0|                                (XMLString::equals(inElem->getLocalPart(), curElem->getLocalPart()))) {
  ------------------
  |  Branch (502:33): [True: 0, False: 0]
  ------------------
  503|      0|                                    tempNextState = fTransTable[curState][elemIndex];
  504|      0|                                    if (tempNextState != XMLContentModel::gInvalidTrans)
  ------------------
  |  Branch (504:41): [True: 0, False: 0]
  ------------------
  505|      0|                                        break;
  506|      0|                                }
  507|      0|                            }
  508|      0|                        }
  509|      0|                        else if ((type & 0x0f)== ContentSpecNode::Any)
  ------------------
  |  Branch (509:34): [True: 0, False: 0]
  ------------------
  510|      0|                        {
  511|      0|                            tempNextState = fTransTable[curState][elemIndex];
  512|      0|                            if (tempNextState != XMLContentModel::gInvalidTrans)
  ------------------
  |  Branch (512:33): [True: 0, False: 0]
  ------------------
  513|      0|                                break;
  514|      0|                        }
  515|      0|                        else if ((type & 0x0f) == ContentSpecNode::Any_NS)
  ------------------
  |  Branch (515:34): [True: 0, False: 0]
  ------------------
  516|      0|                        {
  517|      0|                            if (inElem->getURI() == curElem->getURI())
  ------------------
  |  Branch (517:33): [True: 0, False: 0]
  ------------------
  518|      0|                            {
  519|      0|                                tempNextState = fTransTable[curState][elemIndex];
  520|      0|                                if (tempNextState != XMLContentModel::gInvalidTrans)
  ------------------
  |  Branch (520:37): [True: 0, False: 0]
  ------------------
  521|      0|                                    break;
  522|      0|                            }
  523|      0|                        }
  524|      0|                        else if ((type & 0x0f) == ContentSpecNode::Any_Other)
  ------------------
  |  Branch (524:34): [True: 0, False: 0]
  ------------------
  525|      0|                        {
  526|       |                            // Here we assume that empty string has id 1.
  527|       |                            //
  528|      0|                            unsigned int uriId = curElem->getURI();
  529|      0|                            if (uriId != 1 && uriId != inElem->getURI())
  ------------------
  |  Branch (529:33): [True: 0, False: 0]
  |  Branch (529:47): [True: 0, False: 0]
  ------------------
  530|      0|                            {
  531|      0|                                tempNextState = fTransTable[curState][elemIndex];
  532|      0|                                if (tempNextState != XMLContentModel::gInvalidTrans)
  ------------------
  |  Branch (532:37): [True: 0, False: 0]
  ------------------
  533|      0|                                    break;
  534|      0|                            }
  535|      0|                        }
  536|      0|                    }
  537|       |
  538|       |                    // if we still can't find a match, report the error
  539|      0|                    if (elemIndex == fElemMapSize)
  ------------------
  |  Branch (539:25): [True: 0, False: 0]
  ------------------
  540|      0|                        return false;
  541|       |
  542|       |                    // if we found a match, set the next state and reset the
  543|       |                    // counter if the next state is a counting state.
  544|      0|                    nextState = tempNextState;
  545|      0|                    Occurence* o = fCountingStates[nextState];
  546|      0|                    if (o != 0) {
  ------------------
  |  Branch (546:25): [True: 0, False: 0]
  ------------------
  547|      0|                      nextLoop = (elemIndex == XMLSize_t (o->elemIndex)) ? 1 : 0;
  ------------------
  |  Branch (547:34): [True: 0, False: 0]
  ------------------
  548|      0|                    }
  549|      0|                }
  550|      0|            }
  551|      0|            else if (nextLoop < (unsigned int)o->minOccurs) {
  ------------------
  |  Branch (551:22): [True: 0, False: 0]
  ------------------
  552|       |                // not enough loops on the current state.
  553|      0|                return false;
  554|      0|            }
  555|      0|            else {
  556|       |                // Exiting a counting state. If we're entering a new
  557|       |                // counting state, reset the counter.
  558|      0|                o = fCountingStates[nextState];
  559|      0|                if (o != 0) {
  ------------------
  |  Branch (559:21): [True: 0, False: 0]
  ------------------
  560|      0|                  nextLoop = (elemIndex == XMLSize_t (o->elemIndex)) ? 1 : 0;
  ------------------
  |  Branch (560:30): [True: 0, False: 0]
  ------------------
  561|      0|                }
  562|      0|            }
  563|      0|        }
  564|      0|        else {
  565|      0|            o = fCountingStates[nextState];
  566|      0|            if (o != 0) {
  ------------------
  |  Branch (566:17): [True: 0, False: 0]
  ------------------
  567|       |                // Entering a new counting state. Reset the counter.
  568|       |                // If we've already seen one instance of the looping
  569|       |                // particle set the counter to 1, otherwise set it
  570|       |                // to 0.
  571|      0|              nextLoop = (elemIndex == XMLSize_t (o->elemIndex)) ? 1 : 0;
  ------------------
  |  Branch (571:26): [True: 0, False: 0]
  ------------------
  572|      0|            }
  573|      0|        }
  574|      0|    }
  575|  1.23k|    return true;
  576|  1.23k|}
_ZN11xercesc_3_215DFAContentModel8buildDFAEPNS_15ContentSpecNodeE:
  582|  1.47k|{
  583|  1.47k|    unsigned int index;
  584|       |
  585|       |    //
  586|       |    //  The first step we need to take is to rewrite the content model using
  587|       |    //  our CMNode objects, and in the process get rid of any repetition short
  588|       |    //  cuts, converting them into '*' style repetitions or getting rid of
  589|       |    //  repetitions altogether.
  590|       |    //
  591|       |    //  The conversions done are:
  592|       |    //
  593|       |    //  x+ -> (x|x*)
  594|       |    //  x? -> (x|epsilon)
  595|       |    //
  596|       |    //  This is a relatively complex scenario. What is happening is that we
  597|       |    //  create a top level binary node of which the special EOC value is set
  598|       |    //  as the right side node. The the left side is set to the rewritten
  599|       |    //  syntax tree. The source is the original content model info from the
  600|       |    //  decl pool. The rewrite is done by buildSyntaxTree() which recurses the
  601|       |    //  decl pool's content of the element and builds a new tree in the
  602|       |    //  process.
  603|       |    //
  604|       |    //  Note that, during this operation, we set each non-epsilon leaf node's
  605|       |    //  DFA state position and count the number of such leafs, which is left
  606|       |    //  in the fLeafCount member.
  607|       |    //
  608|  1.47k|    fLeafCount=countLeafNodes(curNode);
  609|  1.47k|    fEOCPos = fLeafCount++;
  610|       |
  611|       |    //  We need to build an array of references to the non-epsilon
  612|       |    //  leaf nodes. We will put them in the array according to their position values
  613|       |    //
  614|  1.47k|    fLeafList = (CMLeaf**) fMemoryManager->allocate(fLeafCount*sizeof(CMLeaf*)); //new CMLeaf*[fLeafCount];
  615|  1.47k|    fLeafListType = (ContentSpecNode::NodeTypes*) fMemoryManager->allocate
  616|  1.47k|    (
  617|  1.47k|        fLeafCount * sizeof(ContentSpecNode::NodeTypes)
  618|  1.47k|    ); //new ContentSpecNode::NodeTypes[fLeafCount];
  619|       |    //
  620|       |    //  And, moving onward... We now need to build the follow position sets
  621|       |    //  for all the nodes. So we allocate an array of pointers to state sets,
  622|       |    //  one for each leaf node (i.e. each significant DFA position.)
  623|       |    //
  624|  1.47k|    fFollowList = (CMStateSet**) fMemoryManager->allocate
  625|  1.47k|    (
  626|  1.47k|        fLeafCount * sizeof(CMStateSet*)
  627|  1.47k|    ); //new CMStateSet*[fLeafCount];
  628|  1.74M|    for (index = 0; index < fLeafCount; index++)
  ------------------
  |  Branch (628:21): [True: 1.74M, False: 1.47k]
  ------------------
  629|  1.74M|        fFollowList[index] = new (fMemoryManager) CMStateSet(fLeafCount, fMemoryManager);
  630|       |
  631|       |    //  The buildSyntaxTree function will recursively iterate over the ContentSpecNode
  632|       |    //  and build the CMNode hierarchy; it will also put every leaf node in the fLeafList
  633|       |    //  array, then calculate the first and last position sets of each node. This is
  634|       |    //  cached away in each of the nodes.
  635|       |    //
  636|       |    //  Along the way we also set the leaf count in each node as the maximum
  637|       |    //  state count. They must know this in order to create their first/last
  638|       |    //  position sets.
  639|       |    //
  640|  1.47k|    unsigned int counter=0;
  641|  1.47k|    CMNode* nodeOrgContent = buildSyntaxTree(curNode, counter);
  642|       |    //
  643|       |    //  Check to see whether this content model can handle an empty content,
  644|       |    //  which is something we need to optimize by looking now before we
  645|       |    //  throw away the info that would tell us that.
  646|       |    //
  647|       |    //  If the left node of the head (the top level of the original content)
  648|       |    //  is nullable, then its true.
  649|       |    //
  650|  1.47k|    fEmptyOk = nodeOrgContent->isNullable();
  651|       |
  652|       |    //
  653|       |    //  And handle specially the EOC node, which also must be numbered and
  654|       |    //  counted as a non-epsilon leaf node. It could not be handled in the
  655|       |    //  above tree build because it was created before all that started. We
  656|       |    //  save the EOC position since its used during the DFA building loop.
  657|       |    //
  658|  1.47k|    CMLeaf* nodeEOC = new (fMemoryManager) CMLeaf
  659|  1.47k|    (
  660|  1.47k|        new (fMemoryManager) QName
  661|  1.47k|        (
  662|  1.47k|            XMLUni::fgZeroLenString
  663|  1.47k|            , XMLUni::fgZeroLenString
  664|  1.47k|            , XMLContentModel::gEOCFakeId
  665|  1.47k|            , fMemoryManager
  666|  1.47k|        )
  667|  1.47k|        , fEOCPos
  668|  1.47k|        , true
  669|  1.47k|        , fLeafCount
  670|  1.47k|        , fMemoryManager
  671|  1.47k|    );
  672|  1.47k|    fHeadNode = new (fMemoryManager) CMBinaryOp
  673|  1.47k|    (
  674|  1.47k|        ContentSpecNode::Sequence
  675|  1.47k|        , nodeOrgContent
  676|  1.47k|        , nodeEOC
  677|  1.47k|        , fLeafCount
  678|  1.47k|        , fMemoryManager
  679|  1.47k|    );
  680|       |
  681|       |    //  Put also the final EOC node in the leaf array
  682|  1.47k|    fLeafList[counter] = new (fMemoryManager) CMLeaf
  683|  1.47k|    (
  684|  1.47k|        nodeEOC->getElement()
  685|  1.47k|        , nodeEOC->getPosition()
  686|  1.47k|        , fLeafCount
  687|  1.47k|        , fMemoryManager
  688|  1.47k|    );
  689|  1.47k|    fLeafListType[counter] = ContentSpecNode::Leaf;
  690|       |
  691|       |    //
  692|       |    //  Now handle our top level. We use our left child's last pos set and our
  693|       |    //  right child's first pos set, so get them now for convenience.
  694|       |    //
  695|  1.47k|    const CMStateSet& last  = nodeOrgContent->getLastPos();
  696|  1.47k|    const CMStateSet& first = nodeEOC->getFirstPos();
  697|       |
  698|       |    //
  699|       |    //  Now, for every position which is in our left child's last set
  700|       |    //  add all of the states in our right child's first set to the
  701|       |    //  follow set for that position.
  702|       |    //
  703|  1.47k|    CMStateSetEnumerator enumLast(&last);
  704|   241k|    while(enumLast.hasMoreElements())
  ------------------
  |  Branch (704:11): [True: 240k, False: 1.47k]
  ------------------
  705|   240k|    {
  706|   240k|        XMLSize_t index=enumLast.nextElement();
  707|   240k|        *fFollowList[index] |= first;
  708|   240k|    }
  709|       |
  710|       |    //
  711|       |    //  And finally the big push... Now we build the DFA using all the states
  712|       |    //  and the tree we've built up. First we set up the various data
  713|       |    //  structures we are going to use while we do this.
  714|       |    //
  715|       |    //  First of all we need an array of unique element ids in our content
  716|       |    //  model. For each transition table entry, we need a set of contiguous
  717|       |    //  indices to represent the transitions for a particular input element.
  718|       |    //  So we need to a zero based range of indexes that map to element types.
  719|       |    //  This element map provides that mapping.
  720|       |    //
  721|  1.47k|    fElemMap = (QName**) fMemoryManager->allocate
  722|  1.47k|    (
  723|  1.47k|        fLeafCount * sizeof(QName*)
  724|  1.47k|    ); //new QName*[fLeafCount];
  725|  1.47k|    fElemMapType = (ContentSpecNode::NodeTypes*) fMemoryManager->allocate
  726|  1.47k|    (
  727|  1.47k|        fLeafCount * sizeof(ContentSpecNode::NodeTypes)
  728|  1.47k|    ); //new ContentSpecNode::NodeTypes[fLeafCount];
  729|  1.47k|    fElemMapSize = 0;
  730|       |
  731|  1.47k|    Occurence** elemOccurenceMap=0;
  732|  1.74M|    for (unsigned int outIndex = 0; outIndex < fLeafCount; outIndex++)
  ------------------
  |  Branch (732:37): [True: 1.74M, False: 1.47k]
  ------------------
  733|  1.74M|    {
  734|  1.74M|        fElemMap[outIndex] = new (fMemoryManager) QName(fMemoryManager);
  735|       |
  736|  1.74M|        if ( (fLeafListType[outIndex] & 0x0f) != ContentSpecNode::Leaf )
  ------------------
  |  Branch (736:14): [True: 0, False: 1.74M]
  ------------------
  737|      0|            if (!fLeafNameTypeVector)
  ------------------
  |  Branch (737:17): [True: 0, False: 0]
  ------------------
  738|      0|                fLeafNameTypeVector = new (fMemoryManager) ContentLeafNameTypeVector(fMemoryManager);
  739|       |
  740|       |        // Get the current leaf's element index
  741|  1.74M|        CMLeaf* leaf=fLeafList[outIndex];
  742|  1.74M|        const QName* element = leaf->getElement();
  743|  1.74M|        const XMLCh* elementRawName = 0;
  744|  1.74M|        if (fDTD && element)
  ------------------
  |  Branch (744:13): [True: 1.74M, False: 0]
  |  Branch (744:21): [True: 1.74M, False: 0]
  ------------------
  745|  1.74M|            elementRawName = element->getRawName();
  746|       |
  747|       |        // See if the current leaf node's element index is in the list
  748|  1.74M|        unsigned int inIndex = 0;
  749|       |
  750|  10.2M|        for (; inIndex < fElemMapSize; inIndex++)
  ------------------
  |  Branch (750:16): [True: 10.2M, False: 21.2k]
  ------------------
  751|  10.2M|        {
  752|  10.2M|            const QName* inElem = fElemMap[inIndex];
  753|  10.2M|            if (fDTD) {
  ------------------
  |  Branch (753:17): [True: 10.2M, False: 0]
  ------------------
  754|  10.2M|                if (XMLString::equals(inElem->getRawName(), elementRawName)) {
  ------------------
  |  Branch (754:21): [True: 1.72M, False: 8.53M]
  ------------------
  755|  1.72M|                    break;
  756|  1.72M|                }
  757|  10.2M|            }
  758|      0|            else {
  759|      0|                if ((fElemMapType[inIndex] == fLeafListType[outIndex]) &&
  ------------------
  |  Branch (759:21): [True: 0, False: 0]
  ------------------
  760|      0|                    (inElem->getURI() == element->getURI()) &&
  ------------------
  |  Branch (760:21): [True: 0, False: 0]
  ------------------
  761|      0|                    (XMLString::equals(inElem->getLocalPart(), element->getLocalPart()))) {
  ------------------
  |  Branch (761:21): [True: 0, False: 0]
  ------------------
  762|      0|                    break;
  763|      0|                }
  764|      0|            }
  765|  10.2M|        }
  766|       |
  767|       |        // If it was not in the list, then add it and bump the map size
  768|  1.74M|        if (inIndex == fElemMapSize)
  ------------------
  |  Branch (768:13): [True: 21.2k, False: 1.72M]
  ------------------
  769|  21.2k|        {
  770|  21.2k|            fElemMap[fElemMapSize]->setValues(*element);
  771|  21.2k|            if(leaf->isRepeatableLeaf())
  ------------------
  |  Branch (771:16): [True: 0, False: 21.2k]
  ------------------
  772|      0|            {
  773|      0|                if (elemOccurenceMap == 0) {
  ------------------
  |  Branch (773:21): [True: 0, False: 0]
  ------------------
  774|      0|                    elemOccurenceMap = (Occurence**)fMemoryManager->allocate(fLeafCount*sizeof(Occurence*));
  775|      0|                    memset(elemOccurenceMap, 0, fLeafCount*sizeof(Occurence*));
  776|      0|                }
  777|      0|                elemOccurenceMap[fElemMapSize] = new (fMemoryManager) Occurence(((CMRepeatingLeaf*)leaf)->getMinOccurs(), ((CMRepeatingLeaf*)leaf)->getMaxOccurs(), fElemMapSize);
  778|      0|            }
  779|  21.2k|            fElemMapType[fElemMapSize] = fLeafListType[outIndex];
  780|  21.2k|            ++fElemMapSize;
  781|  21.2k|        }
  782|  1.74M|    }
  783|       |
  784|       |    // set up the fLeafNameTypeVector object if there is one.
  785|  1.47k|    if (fLeafNameTypeVector) {
  ------------------
  |  Branch (785:9): [True: 0, False: 1.47k]
  ------------------
  786|      0|        fLeafNameTypeVector->setValues(fElemMap, fElemMapType, fElemMapSize);
  787|      0|    }
  788|       |
  789|       |    /***
  790|       |     * Optimization(Jan, 2001); We sort fLeafList according to
  791|       |     * elemIndex which is *uniquely* associated to each leaf.
  792|       |     * We are *assuming* that each element appears in at least one leaf.
  793|       |     **/
  794|       |    // don't forget to delete it
  795|       |#ifdef OPTIMIZED_BUT_STILL_LINEAR_SEARCH
  796|       |    int *fLeafSorter = (int*) fMemoryManager->allocate
  797|       |    (
  798|       |        (fLeafCount + fElemMapSize) * sizeof(int)
  799|       |    ); //new int[fLeafCount + fElemMapSize];
  800|       |    unsigned int fSortCount = 0;
  801|       |
  802|       |    for (unsigned int elemIndex = 0; elemIndex < fElemMapSize; elemIndex++)
  803|       |    {
  804|       |        const QName* element = fElemMap[elemIndex];
  805|       |        const XMLCh* elementRawName = 0;
  806|       |        if (fDTD && element)
  807|       |            elementRawName = element->getRawName();
  808|       |
  809|       |        for (unsigned int leafIndex = 0; leafIndex < fLeafCount; leafIndex++)
  810|       |        {
  811|       |            const QName* leaf = fLeafList[leafIndex]->getElement();
  812|       |            if (fDTD) {
  813|       |                if (XMLString::equals(leaf->getRawName(), elementRawName)) {
  814|       |                    fLeafSorter[fSortCount++] = leafIndex;
  815|       |                }
  816|       |            }
  817|       |            else {
  818|       |                if ((fElemMapType[elemIndex] == fLeafListType[leafIndex]) &&
  819|       |                    (leaf->getURI() == element->getURI()) &&
  820|       |                    (XMLString::equals(leaf->getLocalPart(), element->getLocalPart()))) {
  821|       |                      fLeafSorter[fSortCount++] = leafIndex;
  822|       |                }
  823|       |            }
  824|       |        }
  825|       |        fLeafSorter[fSortCount++] = -1;
  826|       |    }
  827|       |#endif
  828|       |
  829|       |    // instead of using a single array with -1 to separate elements, use a bidimensional map
  830|  1.47k|    unsigned int** fLeafSorter = (unsigned int**)fMemoryManager->allocate(fElemMapSize * sizeof(unsigned int*));
  831|  1.47k|    unsigned int* tmpSorter = (unsigned int*)fMemoryManager->allocate(fLeafCount * sizeof(unsigned int));
  832|  22.7k|    for (unsigned int elemIndex = 0; elemIndex < fElemMapSize; elemIndex++)
  ------------------
  |  Branch (832:38): [True: 21.2k, False: 1.47k]
  ------------------
  833|  21.2k|    {
  834|  21.2k|        const QName* element = fElemMap[elemIndex];
  835|  21.2k|        const XMLCh* elementRawName = 0;
  836|  21.2k|        if (fDTD && element)
  ------------------
  |  Branch (836:13): [True: 21.2k, False: 0]
  |  Branch (836:21): [True: 21.2k, False: 0]
  ------------------
  837|  21.2k|            elementRawName = element->getRawName();
  838|       |
  839|  21.2k|        unsigned int fSortCount=0;
  840|  76.4M|        for (unsigned int leafIndex = 0; leafIndex < fLeafCount; leafIndex++)
  ------------------
  |  Branch (840:42): [True: 76.4M, False: 21.2k]
  ------------------
  841|  76.4M|        {
  842|  76.4M|            const QName* leaf = fLeafList[leafIndex]->getElement();
  843|  76.4M|            if (fDTD) {
  ------------------
  |  Branch (843:17): [True: 76.4M, False: 0]
  ------------------
  844|  76.4M|                if (XMLString::equals(leaf->getRawName(), elementRawName)) {
  ------------------
  |  Branch (844:21): [True: 1.74M, False: 74.7M]
  ------------------
  845|  1.74M|                    tmpSorter[fSortCount++] = leafIndex;
  846|  1.74M|                }
  847|  76.4M|            }
  848|      0|            else {
  849|      0|                if ((fElemMapType[elemIndex] == fLeafListType[leafIndex]) &&
  ------------------
  |  Branch (849:21): [True: 0, False: 0]
  ------------------
  850|      0|                    (leaf->getURI() == element->getURI()) &&
  ------------------
  |  Branch (850:21): [True: 0, False: 0]
  ------------------
  851|      0|                    (XMLString::equals(leaf->getLocalPart(), element->getLocalPart()))) {
  ------------------
  |  Branch (851:21): [True: 0, False: 0]
  ------------------
  852|      0|                      tmpSorter[fSortCount++] = leafIndex;
  853|      0|                }
  854|      0|            }
  855|  76.4M|        }
  856|       |
  857|  21.2k|        fLeafSorter[elemIndex]=(unsigned int*)fMemoryManager->allocate((fSortCount+1) * sizeof(unsigned int));
  858|  21.2k|        fLeafSorter[elemIndex][0]=fSortCount;
  859|  1.76M|        for (unsigned int index=0;index<fSortCount;index++)
  ------------------
  |  Branch (859:35): [True: 1.74M, False: 21.2k]
  ------------------
  860|  1.74M|            fLeafSorter[elemIndex][index+1]=tmpSorter[index];
  861|  21.2k|    }
  862|  1.47k|    fMemoryManager->deallocate(tmpSorter);
  863|       |
  864|       |    //
  865|       |    //  Next lets create some arrays, some that that hold transient info
  866|       |    //  during the DFA build and some that are permament. These are kind of
  867|       |    //  sticky since we cannot know how big they will get, but we don't want
  868|       |    //  to use any collection type classes because of performance.
  869|       |    //
  870|       |    //  Basically they will probably be about fLeafCount*2 on average, but can
  871|       |    //  be as large as 2^(fLeafCount*2), worst case. So we start with
  872|       |    //  fLeafCount*4 as a middle ground. This will be very unlikely to ever
  873|       |    //  have to expand though, it if does, the overhead will be somewhat ugly.
  874|       |    //
  875|  1.47k|    unsigned int curArraySize = fLeafCount * 4;
  876|  1.47k|    CMStateSet** statesToDo = (CMStateSet**)
  877|  1.47k|        fMemoryManager->allocate
  878|  1.47k|        (
  879|  1.47k|            curArraySize * sizeof(CMStateSet*)
  880|  1.47k|        ); //new const CMStateSet*[curArraySize];
  881|  1.47k|    fFinalStateFlags = (bool*) fMemoryManager->allocate
  882|  1.47k|    (
  883|  1.47k|        curArraySize * sizeof(bool)
  884|  1.47k|    ); //new bool[curArraySize];
  885|  1.47k|    fTransTable = (unsigned int**) fMemoryManager->allocate
  886|  1.47k|    (
  887|  1.47k|        curArraySize * sizeof(unsigned int*)
  888|  1.47k|    ); //new unsigned int*[curArraySize];
  889|       |
  890|       |    //
  891|       |    //  Ok we start with the initial set as the first pos set of the head node
  892|       |    //  (which is the seq node that holds the content model and the EOC node.)
  893|       |    //
  894|  1.47k|    CMStateSet* setT = new (fMemoryManager) CMStateSet(fHeadNode->getFirstPos());
  895|       |
  896|       |    //
  897|       |    // Note on memory leak: Bugzilla#2707:
  898|       |    // ===================================
  899|       |    // The CMBinary, pointed to by fHeadNode, shall be released by
  900|       |    // deleted by itself.
  901|       |    //
  902|       |    // fLeafList[] maintains its **OWN** copy of CMLeaf to avoid double deletion
  903|       |    // of CMLeaf.
  904|       |    //
  905|       |
  906|  1.47k|    delete fHeadNode;
  907|       |
  908|       |    //
  909|       |    //  Init our two state flags. Basically the unmarked state counter is
  910|       |    //  always chasing the current state counter. When it catches up, that
  911|       |    //  means we made a pass through that did not add any new states to the
  912|       |    //  lists, at which time we are done. We could have used a expanding array
  913|       |    //  of flags which we used to mark off states as we complete them, but
  914|       |    //  this is easier though less readable maybe.
  915|       |    //
  916|  1.47k|    unsigned int unmarkedState = 0;
  917|  1.47k|    unsigned int curState = 0;
  918|       |
  919|       |    //
  920|       |    //  Init the first transition table entry, and put the initial state
  921|       |    //  into the states to do list, then bump the current state.
  922|       |    //
  923|  1.47k|    fTransTable[curState] = makeDefStateList();
  924|  1.47k|    statesToDo[curState] = setT;
  925|  1.47k|    curState++;
  926|       |
  927|       |    //
  928|       |    // the stateTable is an auxiliary means to fast
  929|       |    // identification of new state created (instead
  930|       |    // of sequential loop statesToDo to find out),
  931|       |    // while the role that statesToDo plays remain unchanged.
  932|       |    //
  933|  1.47k|    RefHashTableOf<XMLInteger, CMStateSetHasher> *stateTable =
  934|  1.47k|        new (fMemoryManager) RefHashTableOf<XMLInteger, CMStateSetHasher>
  935|  1.47k|        (
  936|  1.47k|            curArraySize
  937|  1.47k|            , true
  938|  1.47k|            , fMemoryManager
  939|  1.47k|        );
  940|       |    //stateTable->put((CMStateSet*)setT, new (fMemoryManager) XMLInteger(0));
  941|       |
  942|       |    //
  943|       |    //  Ok, almost done with the algorithm from hell... We now enter the
  944|       |    //  loop where we go until the states done counter catches up with
  945|       |    //  the states to do counter.
  946|       |    //
  947|  1.47k|    CMStateSet* newSet = 0;
  948|  4.63M|    while (unmarkedState < curState)
  ------------------
  |  Branch (948:12): [True: 4.63M, False: 1.47k]
  ------------------
  949|  4.63M|    {
  950|       |        //
  951|       |        //  Get the next unmarked state out of the list of states to do.
  952|       |        //  And get the associated transition table entry.
  953|       |        //
  954|  4.63M|        setT = statesToDo[unmarkedState];
  955|  4.63M|        unsigned int* transEntry = fTransTable[unmarkedState];
  956|       |
  957|       |        // Mark this one final if it contains the EOC state
  958|  4.63M|        fFinalStateFlags[unmarkedState] = setT->getBit(fEOCPos);
  959|       |
  960|       |        // Bump up the unmarked state count, marking this state done
  961|  4.63M|        unmarkedState++;
  962|       |
  963|       |#ifdef OPTIMIZED_BUT_STILL_LINEAR_SEARCH
  964|       |        // Optimization(Jan, 2001)
  965|       |        unsigned int sorterIndex = 0;
  966|       |        // Optimization(Jan, 2001)
  967|       |#endif
  968|       |
  969|       |        // Loop through each possible input symbol in the element map
  970|  57.4M|        for (unsigned int elemIndex = 0; elemIndex < fElemMapSize; elemIndex++)
  ------------------
  |  Branch (970:42): [True: 52.7M, False: 4.63M]
  ------------------
  971|  52.7M|        {
  972|       |            //
  973|       |            //  Build up a set of states which is the union of all of the
  974|       |            //  follow sets of DFA positions that are in the current state. If
  975|       |            //  we gave away the new set last time through then create a new
  976|       |            //  one. Otherwise, zero out the existing one.
  977|       |            //
  978|  52.7M|            if (!newSet)
  ------------------
  |  Branch (978:17): [True: 4.63M, False: 48.1M]
  ------------------
  979|  4.63M|                newSet = new (fMemoryManager) CMStateSet
  980|  4.63M|                (
  981|  4.63M|                    fLeafCount
  982|  4.63M|                    , fMemoryManager
  983|  4.63M|                );
  984|  48.1M|            else
  985|  48.1M|                newSet->zeroBits();
  986|       |
  987|       |#ifdef OBSOLETED
  988|       |// unoptimized code
  989|       |            for (unsigned int leafIndex = 0; leafIndex < fLeafCount; leafIndex++)
  990|       |            {
  991|       |                // If this leaf index (DFA position) is in the current set...
  992|       |                if (setT->getBit(leafIndex))
  993|       |                {
  994|       |                    //
  995|       |                    //  If this leaf is the current input symbol, then we want
  996|       |                    //  to add its follow list to the set of states to transition
  997|       |                    //  to from the current state.
  998|       |                    //
  999|       |                    const QName* leaf = fLeafList[leafIndex]->getElement();
 1000|       |                    const QName* element = fElemMap[elemIndex];
 1001|       |                    if (fDTD) {
 1002|       |                        if (XMLString::equals(leaf->getRawName(), element->getRawName())) {
 1003|       |                            *newSet |= *fFollowList[leafIndex];
 1004|       |                        }
 1005|       |                    }
 1006|       |                    else {
 1007|       |                        if ((leaf->getURI() == element->getURI()) &&
 1008|       |                            (XMLString::equals(leaf->getLocalPart(), element->getLocalPart()))) {
 1009|       |                            *newSet |= *fFollowList[leafIndex];
 1010|       |                        }
 1011|       |                    }
 1012|       |                }
 1013|       |            } // for leafIndex
 1014|       |#endif
 1015|       |
 1016|       |#ifdef OPTIMIZED_BUT_STILL_LINEAR_SEARCH
 1017|       |            // Optimization(Jan, 2001)
 1018|       |            int leafIndex = fLeafSorter[sorterIndex++];
 1019|       |
 1020|       |            while (leafIndex != -1)
 1021|       |            {
 1022|       |                // If this leaf index (DFA position) is in the current set...
 1023|       |                if (setT->getBit(leafIndex))
 1024|       |                {
 1025|       |                    //
 1026|       |                    //  If this leaf is the current input symbol, then we
 1027|       |                    //  want to add its follow list to the set of states to
 1028|       |                    //  transition to from the current state.
 1029|       |                    //
 1030|       |                    *newSet |= *fFollowList[leafIndex];
 1031|       |                }
 1032|       |                leafIndex = fLeafSorter[sorterIndex++];
 1033|       |            } // while (leafIndex != -1)
 1034|       |#endif
 1035|       |
 1036|  52.7M|            unsigned int* fLeafIndexes=fLeafSorter[elemIndex];
 1037|  52.7M|            unsigned int fNumItems=fLeafIndexes[0];
 1038|  52.7M|            if(fNumItems!=0)
  ------------------
  |  Branch (1038:16): [True: 52.7M, False: 0]
  ------------------
 1039|  52.7M|            {
 1040|       |                // The algorithm requires finding the leaf that is present both in the bitfield of the current state, and in the
 1041|       |                // list of places where the currently tested item can appear. When this occurs, the follow list of this parent item
 1042|       |                // is added to the bitfield representing the next state.
 1043|       |                // Both the bitfield and the list of places are sorted, so we can analyze them in two ways; either iterating over the
 1044|       |                // parent items, testing the bitfield for the existence of the parent (N times a constant Tb), or by iterating over the
 1045|       |                // bitfield (restricted to the range of the sorted list of places), using a binary search to locate the leaf in the
 1046|       |                // sorted list of places (M times log(N) testing operations Ts)
 1047|       |                // Assuming that the time to test a bit is roughly the same of the time needed to compute the average of two integers,
 1048|       |                // plus a couple of comparisons and additions, we compare N agains M*log(N) to decide which algorithm should be faster given
 1049|       |                // the two sets
 1050|  52.7M|                if(fNumItems <= setT->getBitCountInRange(fLeafIndexes[1], fLeafIndexes[fNumItems])*log((float)fNumItems))
  ------------------
  |  Branch (1050:20): [True: 7.19M, False: 45.5M]
  ------------------
 1051|  7.19M|                {
 1052|   942M|                    for(unsigned int i=1; i<=fNumItems; ++i)
  ------------------
  |  Branch (1052:43): [True: 935M, False: 7.19M]
  ------------------
 1053|   935M|                        if(setT->getBit(fLeafIndexes[i]))
  ------------------
  |  Branch (1053:28): [True: 264M, False: 671M]
  ------------------
 1054|   264M|                        {
 1055|       |                            //
 1056|       |                            //  If this leaf is the current input symbol, then we
 1057|       |                            //  want to add its follow list to the set of states to
 1058|       |                            //  transition to from the current state.
 1059|       |                            //
 1060|   264M|                            *newSet |= *fFollowList[ fLeafIndexes[i] ];
 1061|   264M|                        }
 1062|  7.19M|                }
 1063|  45.5M|                else
 1064|  45.5M|                {
 1065|       |                    // Further optimization: given that the bitfield enumerator returns the numbers in order,
 1066|       |                    // every time we raise the lower marker we know it will true also for the next bits, so
 1067|       |                    // the next binary search will not start from 1 but from this index
 1068|  45.5M|                    unsigned int lowIndex = 1;
 1069|       |                    // Start the enumerator from the first index in the sorted list of places,
 1070|       |                    // as nothing before that point will match
 1071|  45.5M|                    CMStateSetEnumerator enumBits(setT, fLeafIndexes[1]);
 1072|   241M|                    while(enumBits.hasMoreElements())
  ------------------
  |  Branch (1072:27): [True: 207M, False: 34.1M]
  ------------------
 1073|   207M|                    {
 1074|   207M|                        unsigned int bitIndex=enumBits.nextElement();
 1075|       |                        // if this leaf is greater than the last index in the sorted list of places,
 1076|       |                        // nothing can be found from now on, so get out of here
 1077|   207M|                        if(bitIndex > fLeafIndexes[fNumItems])
  ------------------
  |  Branch (1077:28): [True: 11.4M, False: 196M]
  ------------------
 1078|  11.4M|                            break;
 1079|       |
 1080|       |                        // Check if this leaf index (DFA position) is in the current set
 1081|       |                        // (using binary search: the indexes are sorted)
 1082|   196M|                        unsigned int first=lowIndex,last=fNumItems,i;
 1083|   987M|                        while(first<=last)
  ------------------
  |  Branch (1083:31): [True: 847M, False: 140M]
  ------------------
 1084|   847M|                        {
 1085|   847M|                            i=(first+last)/2;
 1086|   847M|                            if(fLeafIndexes[i]>bitIndex)
  ------------------
  |  Branch (1086:32): [True: 677M, False: 169M]
  ------------------
 1087|   677M|                                last=i-1;
 1088|   169M|                            else if(fLeafIndexes[i]<bitIndex)
  ------------------
  |  Branch (1088:37): [True: 114M, False: 55.7M]
  ------------------
 1089|   114M|                                lowIndex=first=i+1;
 1090|  55.7M|                            else
 1091|  55.7M|                            {
 1092|       |                                //
 1093|       |                                //  If this leaf is the current input symbol, then we
 1094|       |                                //  want to add its follow list to the set of states to
 1095|       |                                //  transition to from the current state.
 1096|       |                                //
 1097|  55.7M|                                *newSet |= *fFollowList[bitIndex];
 1098|  55.7M|                                break;
 1099|  55.7M|                            }
 1100|   847M|                        }
 1101|   196M|                    }
 1102|  45.5M|                }
 1103|  52.7M|            }
 1104|       |
 1105|       |            //
 1106|       |            //  If this new set is not empty, then see if its in the list
 1107|       |            //  of states to do. If not, then add it.
 1108|       |            //
 1109|  52.7M|            if (!newSet->isEmpty())
  ------------------
  |  Branch (1109:17): [True: 9.74M, False: 43.0M]
  ------------------
 1110|  9.74M|            {
 1111|       |                //
 1112|       |                //  Search the 'states to do' list to see if this new
 1113|       |                //  state set is already in there.
 1114|       |                //
 1115|       |                /***
 1116|       |                unsigned int stateIndex = 0;
 1117|       |                for (; stateIndex < curState; stateIndex++)
 1118|       |                {
 1119|       |                    if (*statesToDo[stateIndex] == *newSet)
 1120|       |                        break;
 1121|       |                }
 1122|       |                ***/
 1123|       |
 1124|  9.74M|                XMLInteger *stateObj = stateTable->get(newSet);
 1125|  9.74M|                unsigned int stateIndex = (stateObj == 0 ? curState : stateObj->intValue());
  ------------------
  |  Branch (1125:44): [True: 4.63M, False: 5.11M]
  ------------------
 1126|       |
 1127|       |                // If we did not find it, then add it
 1128|  9.74M|                if (stateIndex == curState)
  ------------------
  |  Branch (1128:21): [True: 4.63M, False: 5.11M]
  ------------------
 1129|  4.63M|                {
 1130|       |                    //
 1131|       |                    //  Put this new state into the states to do and init
 1132|       |                    //  a new entry at the same index in the transition
 1133|       |                    //  table.
 1134|       |                    //
 1135|  4.63M|                    statesToDo[curState] = newSet;
 1136|  4.63M|                    fTransTable[curState] = makeDefStateList();
 1137|  4.63M|                    stateTable->put
 1138|  4.63M|                    (
 1139|  4.63M|                        newSet
 1140|  4.63M|                        , new (fMemoryManager) XMLInteger(curState)
 1141|  4.63M|                    );
 1142|       |
 1143|       |                    // We now have a new state to do so bump the count
 1144|  4.63M|                    curState++;
 1145|       |
 1146|       |                    //
 1147|       |                    //  Null out the new set to indicate we adopted it. This
 1148|       |                    //  will cause the creation of a new set on the next time
 1149|       |                    //  around the loop.
 1150|       |                    //
 1151|  4.63M|                    newSet = 0;
 1152|  4.63M|                }
 1153|       |
 1154|       |                //
 1155|       |                //  Now set this state in the transition table's entry for this
 1156|       |                //  element (using its index), with the DFA state we will move
 1157|       |                //  to from the current state when we see this input element.
 1158|       |                //
 1159|  9.74M|                transEntry[elemIndex] = stateIndex;
 1160|       |
 1161|       |                // Expand the arrays if we're full
 1162|  9.74M|                if (curState == curArraySize)
  ------------------
  |  Branch (1162:21): [True: 993, False: 9.74M]
  ------------------
 1163|    993|                {
 1164|       |                    //
 1165|       |                    //  Yikes, we overflowed the initial array size, so we've
 1166|       |                    //  got to expand all of these arrays. So adjust up the
 1167|       |                    //  size by 50% and allocate new arrays.
 1168|       |                    //
 1169|    993|                    const unsigned int newSize = (unsigned int)(curArraySize * 1.5);
 1170|    993|                    CMStateSet** newToDo = (CMStateSet**)
 1171|    993|                        fMemoryManager->allocate
 1172|    993|                        (
 1173|    993|                            newSize * sizeof(CMStateSet*)
 1174|    993|                        ); //new const CMStateSet*[newSize];
 1175|    993|                    bool* newFinalFlags = (bool*) fMemoryManager->allocate
 1176|    993|                    (
 1177|    993|                        newSize * sizeof(bool)
 1178|    993|                    ); //new bool[newSize];
 1179|    993|                    unsigned int** newTransTable = (unsigned int**)
 1180|    993|                        fMemoryManager->allocate
 1181|    993|                        (
 1182|    993|                            newSize * sizeof(unsigned int*)
 1183|    993|                        ); //new unsigned int*[newSize];
 1184|       |
 1185|       |                    // Copy over all of the existing content
 1186|  8.44M|                    for (unsigned int expIndex = 0; expIndex < curArraySize; expIndex++)
  ------------------
  |  Branch (1186:53): [True: 8.44M, False: 993]
  ------------------
 1187|  8.44M|                    {
 1188|  8.44M|                        newToDo[expIndex] = statesToDo[expIndex];
 1189|  8.44M|                        newFinalFlags[expIndex] = fFinalStateFlags[expIndex];
 1190|  8.44M|                        newTransTable[expIndex] = fTransTable[expIndex];
 1191|  8.44M|                    }
 1192|       |
 1193|       |                    // Clean up the old stuff
 1194|    993|                    fMemoryManager->deallocate(statesToDo); //delete [] statesToDo;
 1195|    993|                    fMemoryManager->deallocate(fFinalStateFlags); //delete [] fFinalStateFlags;
 1196|    993|                    fMemoryManager->deallocate(fTransTable); //delete [] fTransTable;
 1197|       |
 1198|       |                    // Store the new array size and pointers
 1199|    993|                    curArraySize = newSize;
 1200|    993|                    statesToDo = newToDo;
 1201|    993|                    fFinalStateFlags = newFinalFlags;
 1202|    993|                    fTransTable = newTransTable;
 1203|    993|                } //if (curState == curArraySize)
 1204|  9.74M|            } //if (!newSet->isEmpty())
 1205|  52.7M|        } // for elemIndex
 1206|  4.63M|    } //while
 1207|       |
 1208|       |    // Store the current state count in the trans table size
 1209|  1.47k|    fTransTableSize = curState;
 1210|       |
 1211|       |    //
 1212|       |    // Fill in the occurence information for each looping state
 1213|       |    // if we're using counters.
 1214|       |    //
 1215|  1.47k|    if (elemOccurenceMap != 0) {
  ------------------
  |  Branch (1215:9): [True: 0, False: 1.47k]
  ------------------
 1216|      0|        fCountingStates = (Occurence**)fMemoryManager->allocate(fTransTableSize*sizeof(Occurence*));
 1217|      0|        memset(fCountingStates, 0, fTransTableSize*sizeof(Occurence*));
 1218|      0|        for (unsigned int i = 0; i < fTransTableSize; ++i) {
  ------------------
  |  Branch (1218:34): [True: 0, False: 0]
  ------------------
 1219|      0|            unsigned int * transitions = fTransTable[i];
 1220|      0|            for (unsigned int j = 0; j < fElemMapSize; ++j) {
  ------------------
  |  Branch (1220:38): [True: 0, False: 0]
  ------------------
 1221|      0|                if (i == transitions[j]) {
  ------------------
  |  Branch (1221:21): [True: 0, False: 0]
  ------------------
 1222|      0|                    Occurence* old=elemOccurenceMap[j];
 1223|      0|                    if(old!=0)
  ------------------
  |  Branch (1223:24): [True: 0, False: 0]
  ------------------
 1224|      0|                        fCountingStates[i] = new (fMemoryManager) Occurence(old->minOccurs, old->maxOccurs, old->elemIndex);
 1225|      0|                    break;
 1226|      0|                }
 1227|      0|            }
 1228|      0|        }
 1229|      0|        for (unsigned int j = 0; j < fLeafCount; ++j) {
  ------------------
  |  Branch (1229:34): [True: 0, False: 0]
  ------------------
 1230|      0|            if(elemOccurenceMap[j]!=0)
  ------------------
  |  Branch (1230:16): [True: 0, False: 0]
  ------------------
 1231|      0|                delete elemOccurenceMap[j];
 1232|      0|        }
 1233|      0|        fMemoryManager->deallocate(elemOccurenceMap);
 1234|      0|    }
 1235|       |
 1236|       |    // If the last temp set was not stored, then clean it up
 1237|  1.47k|    if (newSet)
  ------------------
  |  Branch (1237:9): [True: 1.47k, False: 0]
  ------------------
 1238|  1.47k|        delete newSet;
 1239|       |
 1240|       |    //
 1241|       |    //  Now we can clean up all of the temporary data that was needed during
 1242|       |    //  DFA build.
 1243|       |    //
 1244|       |
 1245|  1.74M|    for (index = 0; index < fLeafCount; index++)
  ------------------
  |  Branch (1245:21): [True: 1.74M, False: 1.47k]
  ------------------
 1246|  1.74M|        delete fFollowList[index];
 1247|  1.47k|    fMemoryManager->deallocate(fFollowList); //delete [] fFollowList;
 1248|       |
 1249|       |    //
 1250|       |    // removeAll() will delete all data, XMLInteger,
 1251|       |    // while the keys are to be deleted by the
 1252|       |    // deletion of statesToDo.
 1253|       |    //
 1254|  1.47k|    delete stateTable;
 1255|       |
 1256|  4.63M|    for (index = 0; index < curState; index++)
  ------------------
  |  Branch (1256:21): [True: 4.63M, False: 1.47k]
  ------------------
 1257|  4.63M|        delete statesToDo[index];
 1258|  1.47k|    fMemoryManager->deallocate(statesToDo); //delete [] statesToDo;
 1259|       |
 1260|  1.74M|    for (index = 0; index < fLeafCount; index++)
  ------------------
  |  Branch (1260:21): [True: 1.74M, False: 1.47k]
  ------------------
 1261|  1.74M|        delete fLeafList[index];
 1262|  1.47k|    fMemoryManager->deallocate(fLeafList); //delete [] fLeafList;
 1263|       |
 1264|       |#ifdef OPTIMIZED_BUT_STILL_LINEAR_SEARCH
 1265|       |    fMemoryManager->deallocate(fLeafSorter); //delete [] fLeafSorter;
 1266|       |#endif
 1267|  22.7k|    for (index=0; index < fElemMapSize; index++)
  ------------------
  |  Branch (1267:19): [True: 21.2k, False: 1.47k]
  ------------------
 1268|  21.2k|        fMemoryManager->deallocate(fLeafSorter[index]);
 1269|  1.47k|    fMemoryManager->deallocate(fLeafSorter);
 1270|  1.47k|}
_ZN11xercesc_3_215DFAContentModel14countLeafNodesEPNS_15ContentSpecNodeE:
 1273|  3.53M|{
 1274|  3.53M|    unsigned int count = 0;
 1275|       |
 1276|       |    // Get the spec type of the passed node
 1277|  3.53M|    const ContentSpecNode::NodeTypes curType = curNode->getType();
 1278|       |
 1279|  3.53M|    if ((curType & 0x0f) == ContentSpecNode::Any
  ------------------
  |  Branch (1279:9): [True: 0, False: 3.53M]
  ------------------
 1280|  3.53M|        || (curType & 0x0f) == ContentSpecNode::Any_Other
  ------------------
  |  Branch (1280:12): [True: 0, False: 3.53M]
  ------------------
 1281|  3.53M|        || (curType & 0x0f) == ContentSpecNode::Any_NS
  ------------------
  |  Branch (1281:12): [True: 0, False: 3.53M]
  ------------------
 1282|  3.53M|        || curType == ContentSpecNode::Leaf
  ------------------
  |  Branch (1282:12): [True: 1.74M, False: 1.79M]
  ------------------
 1283|  3.53M|        || curType == ContentSpecNode::Loop)
  ------------------
  |  Branch (1283:12): [True: 0, False: 1.79M]
  ------------------
 1284|  1.74M|    {
 1285|  1.74M|        count++;
 1286|  1.74M|    }
 1287|  1.79M|    else
 1288|  1.79M|    {
 1289|       |        //
 1290|       |        //  Its not a leaf, so we have to recurse its left and maybe right
 1291|       |        //  nodes. Save both values before we recurse and trash the node.
 1292|       |        //
 1293|  1.79M|        ContentSpecNode* leftNode = curNode->getFirst();
 1294|  1.79M|        ContentSpecNode* rightNode = curNode->getSecond();
 1295|       |
 1296|       |        // Detect if we have a deep tree that can be analyzed using a loop instead of recursion
 1297|  1.79M|        unsigned int nLoopCount=0;
 1298|  1.79M|        ContentSpecNode* cursor=curNode;
 1299|  1.79M|        while(cursor->getType()==ContentSpecNode::Sequence && cursor->getFirst() && cursor->getFirst()->getSecond()==rightNode)
  ------------------
  |  Branch (1299:15): [True: 1.36M, False: 425k]
  |  Branch (1299:63): [True: 1.36M, False: 0]
  |  Branch (1299:85): [True: 0, False: 1.36M]
  ------------------
 1300|      0|        {
 1301|      0|            nLoopCount++;
 1302|      0|            cursor=cursor->getFirst();
 1303|      0|        }
 1304|  1.79M|        if(nLoopCount!=0)
  ------------------
  |  Branch (1304:12): [True: 0, False: 1.79M]
  ------------------
 1305|      0|        {
 1306|      0|            count += countLeafNodes(cursor);
 1307|      0|            for(unsigned int i=0;i<nLoopCount;i++)
  ------------------
  |  Branch (1307:34): [True: 0, False: 0]
  ------------------
 1308|      0|                count += countLeafNodes(rightNode);
 1309|      0|            return count;
 1310|      0|        }
 1311|  1.79M|        if(leftNode)
  ------------------
  |  Branch (1311:12): [True: 1.79M, False: 0]
  ------------------
 1312|  1.79M|            count+=countLeafNodes(leftNode);
 1313|  1.79M|        if(rightNode)
  ------------------
  |  Branch (1313:12): [True: 1.74M, False: 48.0k]
  ------------------
 1314|  1.74M|            count+=countLeafNodes(rightNode);
 1315|  1.79M|    }
 1316|  3.53M|    return count;
 1317|  3.53M|}
_ZN11xercesc_3_215DFAContentModel15buildSyntaxTreeEPNS_15ContentSpecNodeERj:
 1321|  3.53M|{
 1322|       |    // Initialize a return node pointer
 1323|  3.53M|    CMNode* retNode = 0;
 1324|       |
 1325|       |    // Get the spec type of the passed node
 1326|  3.53M|    const ContentSpecNode::NodeTypes curType = curNode->getType();
 1327|       |
 1328|  3.53M|    if ((curType & 0x0f) == ContentSpecNode::Any
  ------------------
  |  Branch (1328:9): [True: 0, False: 3.53M]
  ------------------
 1329|  3.53M|        || (curType & 0x0f) == ContentSpecNode::Any_Other
  ------------------
  |  Branch (1329:12): [True: 0, False: 3.53M]
  ------------------
 1330|  3.53M|        || (curType & 0x0f) == ContentSpecNode::Any_NS)
  ------------------
  |  Branch (1330:12): [True: 0, False: 3.53M]
  ------------------
 1331|      0|    {
 1332|      0|        retNode = new (fMemoryManager) CMAny
 1333|      0|        (
 1334|      0|            curType
 1335|      0|            , curNode->getElement()->getURI()
 1336|      0|            , curIndex
 1337|      0|            , fLeafCount
 1338|      0|            , fMemoryManager
 1339|      0|        );
 1340|      0|        fLeafList[curIndex] = new (fMemoryManager) CMLeaf
 1341|      0|        (
 1342|      0|            new (fMemoryManager) QName
 1343|      0|            (
 1344|      0|                XMLUni::fgZeroLenString
 1345|      0|                , XMLUni::fgZeroLenString
 1346|      0|                , curNode->getElement()->getURI()
 1347|      0|                , fMemoryManager
 1348|      0|            )
 1349|      0|            , curIndex
 1350|      0|            , true
 1351|      0|            , fLeafCount
 1352|      0|            , fMemoryManager
 1353|      0|        );
 1354|      0|        fLeafListType[curIndex] = curType;
 1355|      0|        ++curIndex;
 1356|      0|    }
 1357|  3.53M|    else if (curType == ContentSpecNode::Leaf)
  ------------------
  |  Branch (1357:14): [True: 1.74M, False: 1.79M]
  ------------------
 1358|  1.74M|    {
 1359|       |        //
 1360|       |        //  Create a new leaf node, and pass it the current leaf count, which
 1361|       |        //  is its DFA state position. Bump the leaf count after storing it.
 1362|       |        //  This makes the positions zero based since we store first and then
 1363|       |        //  increment.
 1364|       |        //
 1365|  1.74M|        retNode = new (fMemoryManager) CMLeaf
 1366|  1.74M|        (
 1367|  1.74M|            curNode->getElement()
 1368|  1.74M|            , curIndex
 1369|  1.74M|            , fLeafCount
 1370|  1.74M|            , fMemoryManager
 1371|  1.74M|        );
 1372|  1.74M|        fLeafList[curIndex] = new (fMemoryManager) CMLeaf
 1373|  1.74M|        (
 1374|  1.74M|            curNode->getElement()
 1375|  1.74M|            , curIndex
 1376|  1.74M|            , fLeafCount
 1377|  1.74M|            , fMemoryManager
 1378|  1.74M|        );
 1379|  1.74M|        fLeafListType[curIndex] = ContentSpecNode::Leaf;
 1380|  1.74M|        ++curIndex;
 1381|  1.74M|    }
 1382|  1.79M|    else if (curType == ContentSpecNode::Loop)
  ------------------
  |  Branch (1382:14): [True: 0, False: 1.79M]
  ------------------
 1383|      0|    {
 1384|       |        //
 1385|       |        //  Create a new leaf node, and pass it the current leaf count, which
 1386|       |        //  is its DFA state position. Bump the leaf count after storing it.
 1387|       |        //  This makes the positions zero based since we store first and then
 1388|       |        //  increment.
 1389|       |        //
 1390|      0|        retNode = new (fMemoryManager) CMRepeatingLeaf
 1391|      0|        (
 1392|      0|            curNode->getFirst()->getElement()
 1393|      0|            , curNode->getMinOccurs()
 1394|      0|            , curNode->getMaxOccurs()
 1395|      0|            , curIndex
 1396|      0|            , fLeafCount
 1397|      0|            , fMemoryManager
 1398|      0|        );
 1399|      0|        fLeafList[curIndex] = new (fMemoryManager) CMRepeatingLeaf
 1400|      0|        (
 1401|      0|            curNode->getFirst()->getElement()
 1402|      0|            , curNode->getMinOccurs()
 1403|      0|            , curNode->getMaxOccurs()
 1404|      0|            , curIndex
 1405|      0|            , fLeafCount
 1406|      0|            , fMemoryManager
 1407|      0|        );
 1408|      0|        fLeafListType[curIndex] = curNode->getFirst()->getType();
 1409|      0|        ++curIndex;
 1410|      0|    }
 1411|  1.79M|     else
 1412|  1.79M|    {
 1413|       |        //
 1414|       |        //  Its not a leaf, so we have to recurse its left and maybe right
 1415|       |        //  nodes. Save both values before we recurse and trash the node.
 1416|       |        //
 1417|  1.79M|        ContentSpecNode* leftNode = curNode->getFirst();
 1418|  1.79M|        ContentSpecNode* rightNode = curNode->getSecond();
 1419|       |
 1420|       |        // Detect if we have a deep tree that can be analyzed using a loop instead of recursion
 1421|  1.79M|        unsigned int nLoopCount=0;
 1422|  1.79M|        ContentSpecNode* cursor=curNode;
 1423|  1.79M|        while(cursor->getType()==ContentSpecNode::Sequence && cursor->getFirst() && cursor->getFirst()->getSecond()==rightNode)
  ------------------
  |  Branch (1423:15): [True: 1.36M, False: 425k]
  |  Branch (1423:63): [True: 1.36M, False: 0]
  |  Branch (1423:85): [True: 0, False: 1.36M]
  ------------------
 1424|      0|        {
 1425|      0|            nLoopCount++;
 1426|      0|            cursor=cursor->getFirst();
 1427|      0|        }
 1428|  1.79M|        if(nLoopCount!=0)
  ------------------
  |  Branch (1428:12): [True: 0, False: 1.79M]
  ------------------
 1429|      0|        {
 1430|      0|            retNode = buildSyntaxTree(cursor, curIndex);
 1431|      0|            for(unsigned int i=0;i<nLoopCount;i++)
  ------------------
  |  Branch (1431:34): [True: 0, False: 0]
  ------------------
 1432|      0|            {
 1433|      0|                CMNode* newRight = buildSyntaxTree(rightNode, curIndex);
 1434|       |                //
 1435|       |                //  Now handle our level. We use our left child's last pos set and our
 1436|       |                //  right child's first pos set, so get them now for convenience.
 1437|       |                //
 1438|      0|                const CMStateSet& last  = retNode->getLastPos();
 1439|      0|                const CMStateSet& first = newRight->getFirstPos();
 1440|       |
 1441|       |                //
 1442|       |                //  Now, for every position which is in our left child's last set
 1443|       |                //  add all of the states in our right child's first set to the
 1444|       |                //  follow set for that position.
 1445|       |                //
 1446|      0|                CMStateSetEnumerator enumLast(&last);
 1447|      0|                while(enumLast.hasMoreElements())
  ------------------
  |  Branch (1447:23): [True: 0, False: 0]
  ------------------
 1448|      0|                {
 1449|      0|                    XMLSize_t index=enumLast.nextElement();
 1450|      0|                    *fFollowList[index] |= first;
 1451|      0|                }
 1452|      0|                retNode = new (fMemoryManager) CMBinaryOp
 1453|      0|                (
 1454|      0|                    ContentSpecNode::Sequence
 1455|      0|                    , retNode
 1456|      0|                    , newRight
 1457|      0|                    , fLeafCount
 1458|      0|                    , fMemoryManager
 1459|      0|                );
 1460|      0|            }
 1461|      0|            return retNode;
 1462|      0|        }
 1463|       |
 1464|  1.79M|        if (((curType & 0x0f) == ContentSpecNode::Choice)
  ------------------
  |  Branch (1464:13): [True: 377k, False: 1.41M]
  ------------------
 1465|  1.79M|        ||   ((curType & 0x0f) == ContentSpecNode::Sequence))
  ------------------
  |  Branch (1465:14): [True: 1.36M, False: 48.0k]
  ------------------
 1466|  1.74M|        {
 1467|       |            //
 1468|       |            //  Recurse on both children, and return a binary op node with the
 1469|       |            //  two created sub nodes as its children. The node type is the
 1470|       |            //  same type as the source.
 1471|       |            //
 1472|  1.74M|            CMNode* newLeft = buildSyntaxTree(leftNode, curIndex);
 1473|  1.74M|            CMNode* newRight = buildSyntaxTree(rightNode, curIndex);
 1474|  1.74M|            if(((curType & 0x0f) == ContentSpecNode::Sequence))
  ------------------
  |  Branch (1474:16): [True: 1.36M, False: 377k]
  ------------------
 1475|  1.36M|            {
 1476|       |                //
 1477|       |                //  Now handle our level. We use our left child's last pos set and our
 1478|       |                //  right child's first pos set, so get them now for convenience.
 1479|       |                //
 1480|  1.36M|                const CMStateSet& last  = newLeft->getLastPos();
 1481|  1.36M|                const CMStateSet& first = newRight->getFirstPos();
 1482|       |
 1483|       |                //
 1484|       |                //  Now, for every position which is in our left child's last set
 1485|       |                //  add all of the states in our right child's first set to the
 1486|       |                //  follow set for that position.
 1487|       |                //
 1488|  1.36M|                CMStateSetEnumerator enumLast(&last);
 1489|  2.91M|                while(enumLast.hasMoreElements())
  ------------------
  |  Branch (1489:23): [True: 1.54M, False: 1.36M]
  ------------------
 1490|  1.54M|                {
 1491|  1.54M|                    XMLSize_t index=enumLast.nextElement();
 1492|  1.54M|                    *fFollowList[index] |= first;
 1493|  1.54M|                }
 1494|  1.36M|            }
 1495|  1.74M|            retNode = new (fMemoryManager) CMBinaryOp
 1496|  1.74M|            (
 1497|  1.74M|                curType
 1498|  1.74M|                , newLeft
 1499|  1.74M|                , newRight
 1500|  1.74M|                , fLeafCount
 1501|  1.74M|                , fMemoryManager
 1502|  1.74M|            );
 1503|  1.74M|        }
 1504|  48.0k|         else if (curType == ContentSpecNode::ZeroOrMore
  ------------------
  |  Branch (1504:19): [True: 17.7k, False: 30.2k]
  ------------------
 1505|  48.0k|               || curType == ContentSpecNode::ZeroOrOne
  ------------------
  |  Branch (1505:19): [True: 14.1k, False: 16.0k]
  ------------------
 1506|  48.0k|               || curType == ContentSpecNode::OneOrMore)
  ------------------
  |  Branch (1506:19): [True: 16.0k, False: 0]
  ------------------
 1507|  48.0k|        {
 1508|  48.0k|            CMNode* newChild = buildSyntaxTree(leftNode, curIndex);
 1509|  48.0k|            if (curType == ContentSpecNode::ZeroOrMore
  ------------------
  |  Branch (1509:17): [True: 17.7k, False: 30.2k]
  ------------------
 1510|  48.0k|               || curType == ContentSpecNode::OneOrMore)
  ------------------
  |  Branch (1510:19): [True: 16.0k, False: 14.1k]
  ------------------
 1511|  33.8k|            {
 1512|       |                //
 1513|       |                //  Now handle our level. We use our own first and last position
 1514|       |                //  sets, so get them up front.
 1515|       |                //
 1516|  33.8k|                const CMStateSet& first = newChild->getFirstPos();
 1517|  33.8k|                const CMStateSet& last  = newChild->getLastPos();
 1518|       |
 1519|       |                //
 1520|       |                //  For every position which is in our last position set, add all
 1521|       |                //  of our first position states to the follow set for that
 1522|       |                //  position.
 1523|       |                //
 1524|  33.8k|                CMStateSetEnumerator enumLast(&last);
 1525|  2.60M|                while(enumLast.hasMoreElements())
  ------------------
  |  Branch (1525:23): [True: 2.57M, False: 33.8k]
  ------------------
 1526|  2.57M|                {
 1527|  2.57M|                    XMLSize_t index=enumLast.nextElement();
 1528|  2.57M|                    *fFollowList[index] |= first;
 1529|  2.57M|                }
 1530|  33.8k|            }
 1531|       |            // This one is fine as is, just change to our form
 1532|  48.0k|            retNode = new (fMemoryManager) CMUnaryOp
 1533|  48.0k|            (
 1534|  48.0k|                curType
 1535|  48.0k|                , newChild
 1536|  48.0k|                , fLeafCount
 1537|  48.0k|                , fMemoryManager
 1538|  48.0k|            );
 1539|  48.0k|        }
 1540|      0|         else
 1541|      0|        {
 1542|      0|            ThrowXMLwithMemMgr(RuntimeException, XMLExcepts::CM_UnknownCMSpecType, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
 1543|      0|        }
 1544|  1.79M|    }
 1545|       |    // fault in the first and last pos, then delete it children
 1546|  3.53M|    retNode->getFirstPos();
 1547|  3.53M|    retNode->getLastPos();
 1548|  3.53M|    retNode->orphanChild();
 1549|  3.53M|    return retNode;
 1550|  3.53M|}
_ZNK11xercesc_3_215DFAContentModel16makeDefStateListEv:
 1558|  4.63M|{
 1559|  4.63M|    unsigned int* retArray = (unsigned int*) fMemoryManager->allocate
 1560|  4.63M|    (
 1561|  4.63M|        fElemMapSize * sizeof(unsigned int)
 1562|  4.63M|    ); //new unsigned int[fElemMapSize];
 1563|  57.4M|    for (unsigned int index = 0; index < fElemMapSize; index++)
  ------------------
  |  Branch (1563:34): [True: 52.7M, False: 4.63M]
  ------------------
 1564|  52.7M|        retArray[index] = XMLContentModel::gInvalidTrans;
 1565|  4.63M|    return retArray;
 1566|  4.63M|}
_ZN11xercesc_3_216CMStateSetHasher10getHashValEPKvm:
   50|  19.1M|  {
   51|  19.1M|    const CMStateSet* const pkey = (const CMStateSet*) key;
   52|  19.1M|    return ((pkey->hashCode()) % mod);
   53|  19.1M|  }
_ZN11xercesc_3_216CMStateSetHasher6equalsEPKvS2_:
   56|  24.9M|  {
   57|  24.9M|    const CMStateSet* const pkey1 = (const CMStateSet*) key1;
   58|  24.9M|    const CMStateSet* const pkey2 = (const CMStateSet*) key2;
   59|  24.9M|    return (*pkey1==*pkey2);
   60|  24.9M|  }

_ZN11xercesc_3_27GrammarC2Ev:
  192|  7.12k|    Grammar(){};

_ZN11xercesc_3_215GrammarResolverC2EPNS_14XMLGrammarPoolEPNS_13MemoryManagerE:
   37|  7.12k|:fCacheGrammar(false)
   38|  7.12k|,fUseCachedGrammar(false)
   39|  7.12k|,fGrammarPoolFromExternalApplication(true)
   40|  7.12k|,fStringPool(0)
   41|  7.12k|,fGrammarBucket(0)
   42|  7.12k|,fGrammarFromPool(0)
   43|  7.12k|,fDataTypeReg(0)
   44|  7.12k|,fMemoryManager(manager)
   45|  7.12k|,fGrammarPool(gramPool)
   46|  7.12k|,fXSModel(0)
   47|  7.12k|,fGrammarPoolXSModel(0)
   48|  7.12k|,fGrammarsToAddToXSModel(0)
   49|  7.12k|{
   50|  7.12k|    fGrammarBucket = new (manager) RefHashTableOf<Grammar>(29, true,  manager);
   51|       |
   52|       |    /***
   53|       |     * Grammars in this set are not owned
   54|       |     */    
   55|  7.12k|    fGrammarFromPool = new (manager) RefHashTableOf<Grammar>(29, false,  manager);
   56|       |
   57|  7.12k|    if (!gramPool)
  ------------------
  |  Branch (57:9): [True: 7.12k, False: 0]
  ------------------
   58|  7.12k|    {
   59|       |        /***
   60|       |         * We need to instantiate a default grammar pool object so that
   61|       |         * all grammars and grammar components could be created through
   62|       |         * the Factory methods
   63|       |         */
   64|  7.12k|        fGrammarPool = new (manager) XMLGrammarPoolImpl(manager);     
   65|  7.12k|        fGrammarPoolFromExternalApplication=false;
   66|  7.12k|    }
   67|  7.12k|    fStringPool = fGrammarPool->getURIStringPool();
   68|       |
   69|       |    // REVISIT: size
   70|  7.12k|    fGrammarsToAddToXSModel = new (manager) ValueVectorOf<SchemaGrammar*> (29, manager);
   71|  7.12k|}
_ZN11xercesc_3_215GrammarResolverD2Ev:
   74|  7.12k|{  
   75|  7.12k|    delete fGrammarBucket;
   76|  7.12k|    delete fGrammarFromPool;
   77|       |
   78|  7.12k|    if (fDataTypeReg)
  ------------------
  |  Branch (78:9): [True: 0, False: 7.12k]
  ------------------
   79|      0|      delete fDataTypeReg;
   80|       |
   81|       |   /***
   82|       |    *  delete the grammar pool iff it is created by this resolver
   83|       |    */
   84|  7.12k|   if (!fGrammarPoolFromExternalApplication)
  ------------------
  |  Branch (84:8): [True: 7.12k, False: 0]
  ------------------
   85|  7.12k|       delete fGrammarPool;
   86|       |
   87|  7.12k|   if (fXSModel)
  ------------------
  |  Branch (87:8): [True: 0, False: 7.12k]
  ------------------
   88|      0|       delete fXSModel;
   89|       |   // don't delete fGrammarPoolXSModel! we don't own it!
   90|  7.12k|   delete fGrammarsToAddToXSModel;
   91|  7.12k|}
_ZN11xercesc_3_215GrammarResolver10getGrammarEPKDs:
  131|  6.05k|{
  132|  6.05k|    if (!namespaceKey)
  ------------------
  |  Branch (132:9): [True: 0, False: 6.05k]
  ------------------
  133|      0|        return 0;
  134|       |
  135|  6.05k|    Grammar* grammar = fGrammarBucket->get(namespaceKey);
  136|       |
  137|  6.05k|    if (grammar)
  ------------------
  |  Branch (137:9): [True: 6.05k, False: 0]
  ------------------
  138|  6.05k|        return grammar;
  139|       |
  140|      0|    if (fUseCachedGrammar)
  ------------------
  |  Branch (140:9): [True: 0, False: 0]
  ------------------
  141|      0|    {
  142|      0|        grammar = fGrammarFromPool->get(namespaceKey);
  143|      0|        if (grammar)
  ------------------
  |  Branch (143:13): [True: 0, False: 0]
  ------------------
  144|      0|        {
  145|      0|            return grammar;
  146|      0|        }
  147|      0|        else
  148|      0|        {
  149|      0|            XMLSchemaDescription* gramDesc = fGrammarPool->createSchemaDescription(namespaceKey);
  150|      0|            Janitor<XMLGrammarDescription> janName(gramDesc);
  151|      0|            grammar = fGrammarPool->retrieveGrammar(gramDesc);
  152|      0|            if (grammar)
  ------------------
  |  Branch (152:17): [True: 0, False: 0]
  ------------------
  153|      0|            {
  154|      0|                fGrammarFromPool->put((void*) grammar->getGrammarDescription()->getGrammarKey(), grammar);
  155|      0|            }
  156|      0|            return grammar;
  157|      0|        }
  158|      0|    }
  159|       |
  160|      0|    return 0;
  161|      0|}
_ZN11xercesc_3_215GrammarResolver10getGrammarEPNS_21XMLGrammarDescriptionE:
  164|  7.12k|{
  165|  7.12k|    if (!gramDesc)
  ------------------
  |  Branch (165:9): [True: 0, False: 7.12k]
  ------------------
  166|      0|        return 0;
  167|       |
  168|  7.12k|    Grammar* grammar = fGrammarBucket->get(gramDesc->getGrammarKey());
  169|       |
  170|  7.12k|    if (grammar)
  ------------------
  |  Branch (170:9): [True: 0, False: 7.12k]
  ------------------
  171|      0|        return grammar;
  172|       |
  173|  7.12k|    if (fUseCachedGrammar)
  ------------------
  |  Branch (173:9): [True: 0, False: 7.12k]
  ------------------
  174|      0|    {
  175|      0|        grammar = fGrammarFromPool->get(gramDesc->getGrammarKey());
  176|      0|        if (grammar)
  ------------------
  |  Branch (176:13): [True: 0, False: 0]
  ------------------
  177|      0|        {
  178|      0|            return grammar;
  179|      0|        }
  180|      0|        else
  181|      0|        {
  182|      0|            grammar = fGrammarPool->retrieveGrammar(gramDesc);
  183|      0|            if (grammar)
  ------------------
  |  Branch (183:17): [True: 0, False: 0]
  ------------------
  184|      0|            {
  185|      0|                fGrammarFromPool->put((void*) grammar->getGrammarDescription()->getGrammarKey(), grammar);
  186|      0|            }
  187|      0|            return grammar;
  188|      0|        }
  189|      0|    }
  190|       |
  191|  7.12k|    return 0;
  192|  7.12k|}
_ZN11xercesc_3_215GrammarResolver10putGrammarEPNS_7GrammarE:
  235|  7.12k|{
  236|  7.12k|    if (!grammarToAdopt)
  ------------------
  |  Branch (236:9): [True: 0, False: 7.12k]
  ------------------
  237|      0|        return;
  238|       |
  239|       |    /***
  240|       |     * the grammar will be either in the grammarpool, or in the grammarbucket
  241|       |     */
  242|  7.12k|    if (!fCacheGrammar || !fGrammarPool->cacheGrammar(grammarToAdopt))
  ------------------
  |  Branch (242:9): [True: 7.12k, False: 0]
  |  Branch (242:27): [True: 0, False: 0]
  ------------------
  243|  7.12k|    {
  244|       |        // either we aren't caching or the grammar pool doesn't want it
  245|       |        // so we need to look after it
  246|  7.12k|        fGrammarBucket->put( (void*) grammarToAdopt->getGrammarDescription()->getGrammarKey(), grammarToAdopt );
  247|  7.12k|        if (grammarToAdopt->getGrammarType() == Grammar::SchemaGrammarType)
  ------------------
  |  Branch (247:13): [True: 0, False: 7.12k]
  ------------------
  248|      0|        {
  249|      0|            fGrammarsToAddToXSModel->addElement((SchemaGrammar*) grammarToAdopt);
  250|      0|        }
  251|  7.12k|    }
  252|  7.12k|}
_ZN11xercesc_3_215GrammarResolver5resetEv:
  257|  7.12k|void GrammarResolver::reset() {
  258|  7.12k|    fGrammarBucket->removeAll();
  259|  7.12k|    fGrammarsToAddToXSModel->removeAllElements();
  260|  7.12k|    delete fXSModel;
  261|  7.12k|    fXSModel = 0;
  262|  7.12k|}
_ZN11xercesc_3_215GrammarResolver21cacheGrammarFromParseEb:
  321|  7.12k|{
  322|  7.12k|    reset();
  323|  7.12k|    fCacheGrammar = aValue;
  324|  7.12k|}

_ZN11xercesc_3_215GrammarResolver13getStringPoolEv:
  238|  7.12k|inline XMLStringPool* GrammarResolver::getStringPool() {
  239|       |
  240|  7.12k|    return fStringPool;
  241|  7.12k|}
_ZN11xercesc_3_215GrammarResolver23useCachedGrammarInParseEb:
  245|  7.12k|{
  246|  7.12k|    fUseCachedGrammar = aValue;
  247|  7.12k|}
_ZNK11xercesc_3_215GrammarResolver27getGrammarPoolMemoryManagerEv:
  255|  7.12k|{
  256|  7.12k|    return fGrammarPool->getMemoryManager();
  257|  7.12k|}

_ZN11xercesc_3_217MixedContentModelC2EbPNS_15ContentSpecNodeEbPNS_13MemoryManagerE:
   44|     83|   fCount(0)
   45|     83| , fChildren(0)
   46|     83| , fChildTypes(0)
   47|     83| , fOrdered(ordered)
   48|     83| , fDTD(dtd)
   49|     83| , fMemoryManager(manager)
   50|     83|{
   51|       |    //
   52|       |    //  Create a vector of unsigned ints that will be filled in with the
   53|       |    //  ids of the child nodes. It will be expanded as needed but we give
   54|       |    //  it an initial capacity of 64 which should be more than enough for
   55|       |    //  99% of the scenarios.
   56|       |    //
   57|     83|    ValueVectorOf<QName*> children(64, fMemoryManager);
   58|     83|    ValueVectorOf<ContentSpecNode::NodeTypes> childTypes(64, fMemoryManager);
   59|       |
   60|       |    //
   61|       |    //  Get the parent element's content spec. This is the head of the tree
   62|       |    //  of nodes that describes the content model. We will iterate this
   63|       |    //  tree.
   64|       |    //
   65|     83|    ContentSpecNode* curNode = parentContentSpec;
   66|     83|    if (!curNode)
  ------------------
  |  Branch (66:9): [True: 0, False: 83]
  ------------------
   67|      0|        ThrowXMLwithMemMgr(RuntimeException, XMLExcepts::CM_NoParentCSN, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
   68|       |
   69|       |    // And now call the private recursive method that iterates the tree
   70|     83|    buildChildList(curNode, children, childTypes);
   71|       |
   72|       |    //
   73|       |    //  And now we know how many elements we need in our member list. So
   74|       |    //  fill them in.
   75|       |    //
   76|     83|    fCount = children.size();
   77|     83|    fChildren = (QName**) fMemoryManager->allocate(fCount * sizeof(QName*)); //new QName*[fCount];
   78|     83|    fChildTypes = (ContentSpecNode::NodeTypes*) fMemoryManager->allocate
   79|     83|    (
   80|     83|        fCount * sizeof(ContentSpecNode::NodeTypes)
   81|     83|    ); //new ContentSpecNode::NodeTypes[fCount];
   82|  1.13M|    for (XMLSize_t index = 0; index < fCount; index++) {
  ------------------
  |  Branch (82:31): [True: 1.13M, False: 83]
  ------------------
   83|  1.13M|        fChildren[index] = new (fMemoryManager) QName(*children.elementAt(index));
   84|  1.13M|        fChildTypes[index] = childTypes.elementAt(index);
   85|  1.13M|    }
   86|     83|}
_ZN11xercesc_3_217MixedContentModelD2Ev:
   89|     83|{
   90|  1.13M|    for (XMLSize_t index = 0; index < fCount; index++) {
  ------------------
  |  Branch (90:31): [True: 1.13M, False: 83]
  ------------------
   91|  1.13M|        delete fChildren[index];
   92|  1.13M|    }
   93|     83|    fMemoryManager->deallocate(fChildren); //delete [] fChildren;
   94|     83|    fMemoryManager->deallocate(fChildTypes); //delete [] fChildTypes;
   95|     83|}
_ZNK11xercesc_3_217MixedContentModel15validateContentEPPNS_5QNameEmjPmPNS_13MemoryManagerE:
  147|  2.20k|{
  148|       |    // must match order
  149|  2.20k|    if (fOrdered) {
  ------------------
  |  Branch (149:9): [True: 0, False: 2.20k]
  ------------------
  150|      0|        unsigned int inIndex = 0;
  151|      0|        for (unsigned int outIndex = 0; outIndex < childCount; outIndex++) {
  ------------------
  |  Branch (151:41): [True: 0, False: 0]
  ------------------
  152|       |
  153|       |            // Get the current child out of the source index
  154|      0|            const QName* curChild = children[outIndex];
  155|       |
  156|       |            // If its PCDATA, then we just accept that
  157|      0|            if (curChild->getURI() == XMLElementDecl::fgPCDataElemId)
  ------------------
  |  Branch (157:17): [True: 0, False: 0]
  ------------------
  158|      0|                continue;
  159|       |
  160|      0|            ContentSpecNode::NodeTypes type = fChildTypes[inIndex];
  161|      0|            const QName* inChild = fChildren[inIndex];
  162|       |
  163|      0|            if (type == ContentSpecNode::Leaf) {
  ------------------
  |  Branch (163:17): [True: 0, False: 0]
  ------------------
  164|      0|                if (fDTD) {
  ------------------
  |  Branch (164:21): [True: 0, False: 0]
  ------------------
  165|      0|                    if (!XMLString::equals(inChild->getRawName(), curChild->getRawName())) {
  ------------------
  |  Branch (165:25): [True: 0, False: 0]
  ------------------
  166|      0|                        *indexFailingChild=outIndex;
  167|      0|                        return false;
  168|      0|                    }
  169|      0|                }
  170|      0|                else {
  171|      0|                    if ((inChild->getURI() != curChild->getURI()) ||
  ------------------
  |  Branch (171:25): [True: 0, False: 0]
  ------------------
  172|      0|                        (!XMLString::equals(inChild->getLocalPart(), curChild->getLocalPart()))) {
  ------------------
  |  Branch (172:25): [True: 0, False: 0]
  ------------------
  173|      0|                        *indexFailingChild=outIndex;
  174|      0|                        return false;
  175|      0|                    }
  176|      0|                }
  177|      0|            }
  178|      0|            else if (type == ContentSpecNode::Any) {
  ------------------
  |  Branch (178:22): [True: 0, False: 0]
  ------------------
  179|      0|            }
  180|      0|            else if (type == ContentSpecNode::Any_NS) {
  ------------------
  |  Branch (180:22): [True: 0, False: 0]
  ------------------
  181|      0|                if (inChild->getURI() != curChild->getURI())
  ------------------
  |  Branch (181:21): [True: 0, False: 0]
  ------------------
  182|      0|                {
  183|      0|                    *indexFailingChild=outIndex;
  184|      0|                    return false;
  185|      0|                }
  186|      0|            }
  187|      0|            else if (type == ContentSpecNode::Any_Other)
  ------------------
  |  Branch (187:22): [True: 0, False: 0]
  ------------------
  188|      0|            {
  189|       |                // Here we assume that empty string has id 1.
  190|       |                //
  191|      0|                unsigned int uriId = curChild->getURI();
  192|      0|                if (uriId == 1 || uriId == inChild->getURI())
  ------------------
  |  Branch (192:21): [True: 0, False: 0]
  |  Branch (192:35): [True: 0, False: 0]
  ------------------
  193|      0|                {
  194|      0|                    *indexFailingChild=outIndex;
  195|      0|                    return false;
  196|      0|                }
  197|      0|            }
  198|       |
  199|       |            // advance index
  200|      0|            inIndex++;
  201|      0|        }
  202|      0|    }
  203|       |
  204|       |    // can appear in any order
  205|  2.20k|    else {
  206|  3.41k|        for (unsigned int outIndex = 0; outIndex < childCount; outIndex++) {
  ------------------
  |  Branch (206:41): [True: 1.57k, False: 1.83k]
  ------------------
  207|       |            // Get the current child out of the source index
  208|  1.57k|            const QName* curChild = children[outIndex];
  209|       |
  210|       |            // If its PCDATA, then we just accept that
  211|  1.57k|            if (curChild->getURI() == XMLElementDecl::fgPCDataElemId)
  ------------------
  |  Branch (211:17): [True: 0, False: 1.57k]
  ------------------
  212|      0|                continue;
  213|       |
  214|       |            // And try to find it in our list
  215|  1.57k|            unsigned int inIndex = 0;
  216|  2.40M|            for (; inIndex < fCount; inIndex++)
  ------------------
  |  Branch (216:20): [True: 2.40M, False: 366]
  ------------------
  217|  2.40M|            {
  218|  2.40M|                ContentSpecNode::NodeTypes type = fChildTypes[inIndex];
  219|  2.40M|                const QName* inChild = fChildren[inIndex];
  220|       |
  221|  2.40M|                if (type == ContentSpecNode::Leaf) {
  ------------------
  |  Branch (221:21): [True: 2.40M, False: 0]
  ------------------
  222|  2.40M|                    if (fDTD) {
  ------------------
  |  Branch (222:25): [True: 2.40M, False: 0]
  ------------------
  223|  2.40M|                        if (XMLString::equals(inChild->getRawName(), curChild->getRawName())) {
  ------------------
  |  Branch (223:29): [True: 1.20k, False: 2.40M]
  ------------------
  224|  1.20k|                            break;
  225|  1.20k|                        }
  226|  2.40M|                    }
  227|      0|                    else {
  228|      0|                        if ((inChild->getURI() == curChild->getURI()) &&
  ------------------
  |  Branch (228:29): [True: 0, False: 0]
  ------------------
  229|      0|                            (XMLString::equals(inChild->getLocalPart(), curChild->getLocalPart()))) {
  ------------------
  |  Branch (229:29): [True: 0, False: 0]
  ------------------
  230|      0|                            break;
  231|      0|                        }
  232|      0|                    }
  233|  2.40M|                }
  234|      0|                else if (type == ContentSpecNode::Any) {
  ------------------
  |  Branch (234:26): [True: 0, False: 0]
  ------------------
  235|      0|                    break;
  236|      0|                }
  237|      0|                else if (type == ContentSpecNode::Any_NS) {
  ------------------
  |  Branch (237:26): [True: 0, False: 0]
  ------------------
  238|      0|                    if (inChild->getURI() == curChild->getURI())
  ------------------
  |  Branch (238:25): [True: 0, False: 0]
  ------------------
  239|      0|                        break;
  240|      0|                }
  241|      0|                else if (type == ContentSpecNode::Any_Other)
  ------------------
  |  Branch (241:26): [True: 0, False: 0]
  ------------------
  242|      0|                {
  243|       |                    // Here we assume that empty string has id 1.
  244|       |                    //
  245|      0|                    unsigned int uriId = curChild->getURI();
  246|      0|                    if (uriId != 1 && uriId != inChild->getURI())
  ------------------
  |  Branch (246:25): [True: 0, False: 0]
  |  Branch (246:39): [True: 0, False: 0]
  ------------------
  247|      0|                        break;
  248|      0|                }
  249|       |
  250|       |                // REVISIT: What about checking for multiple ANY matches?
  251|       |                //          The content model ambiguity *could* be checked
  252|       |                //          by the caller before constructing the mixed
  253|       |                //          content model.
  254|  2.40M|            }
  255|       |            // We did not find this one, so the validation failed
  256|  1.57k|            if (inIndex == fCount)
  ------------------
  |  Branch (256:17): [True: 366, False: 1.20k]
  ------------------
  257|    366|            {
  258|    366|                *indexFailingChild=outIndex;
  259|    366|                return false;
  260|    366|            }
  261|  1.57k|        }
  262|  2.20k|    }
  263|       |
  264|       |    // Everything seems to be in order, so return success
  265|  1.83k|    return true;
  266|  2.20k|}
_ZN11xercesc_3_217MixedContentModel14buildChildListEPNS_15ContentSpecNodeERNS_13ValueVectorOfIPNS_5QNameEEERNS3_INS1_9NodeTypesEEE:
  390|  2.27M|{
  391|       |    // Get the type of spec node our current node is
  392|  2.27M|    const ContentSpecNode::NodeTypes curType = curNode->getType();
  393|       |
  394|       |    // If its a leaf, then store its id in the target list
  395|  2.27M|    if ((curType == ContentSpecNode::Leaf)      ||
  ------------------
  |  Branch (395:9): [True: 1.13M, False: 1.13M]
  ------------------
  396|  2.27M|        (curType == ContentSpecNode::Any)       ||
  ------------------
  |  Branch (396:9): [True: 0, False: 1.13M]
  ------------------
  397|  2.27M|        (curType == ContentSpecNode::Any_Other) ||
  ------------------
  |  Branch (397:9): [True: 0, False: 1.13M]
  ------------------
  398|  2.27M|        (curType == ContentSpecNode::Any_NS)   )
  ------------------
  |  Branch (398:9): [True: 0, False: 1.13M]
  ------------------
  399|  1.13M|    {
  400|  1.13M|        toFill.addElement(curNode->getElement());
  401|  1.13M|        toType.addElement(curType);
  402|  1.13M|        return;
  403|  1.13M|    }
  404|       |
  405|       |    // Get both the child node pointers
  406|  1.13M|    ContentSpecNode* leftNode = curNode->getFirst();
  407|  1.13M|    ContentSpecNode* rightNode = curNode->getSecond();
  408|       |
  409|       |    // And recurse according to the type of node
  410|  1.13M|    if (((curType & 0x0f) == ContentSpecNode::Choice)
  ------------------
  |  Branch (410:9): [True: 1.13M, False: 83]
  ------------------
  411|  1.13M|    ||  ((curType & 0x0f) == ContentSpecNode::Sequence))
  ------------------
  |  Branch (411:9): [True: 0, False: 83]
  ------------------
  412|  1.13M|    {
  413|       |        // Recurse on the left and right nodes
  414|  1.13M|        buildChildList(leftNode, toFill, toType);
  415|       |
  416|       |        // The last node of a choice or sequence has a null right
  417|  1.13M|        if (rightNode)
  ------------------
  |  Branch (417:13): [True: 1.13M, False: 0]
  ------------------
  418|  1.13M|            buildChildList(rightNode, toFill, toType);
  419|  1.13M|    }
  420|     83|    else if ((curType == ContentSpecNode::OneOrMore)
  ------------------
  |  Branch (420:14): [True: 0, False: 83]
  ------------------
  421|     83|         ||  (curType == ContentSpecNode::ZeroOrOne)
  ------------------
  |  Branch (421:14): [True: 0, False: 83]
  ------------------
  422|     83|         ||  (curType == ContentSpecNode::ZeroOrMore))
  ------------------
  |  Branch (422:14): [True: 83, False: 0]
  ------------------
  423|     83|    {
  424|       |        // Just do the left node on this one
  425|     83|        buildChildList(leftNode, toFill, toType);
  426|     83|    }
  427|  1.13M|}

_ZNK11xercesc_3_218SimpleContentModel15validateContentEPPNS_5QNameEmjPmPNS_13MemoryManagerE:
   48|  22.2k|{
   49|       |    //
   50|       |    //  According to the type of operation, we do the correct type of
   51|       |    //  content check.
   52|       |    //
   53|  22.2k|    XMLSize_t index;
   54|  22.2k|    switch(fOp & 0x0f)
   55|  22.2k|    {
   56|  4.02k|        case ContentSpecNode::Leaf :
  ------------------
  |  Branch (56:9): [True: 4.02k, False: 18.2k]
  ------------------
   57|       |            //
   58|       |            //  There can only be one child and it has to be of the
   59|       |            //  element type we stored.
   60|       |            //
   61|  4.02k|            if (!childCount)
  ------------------
  |  Branch (61:17): [True: 2.72k, False: 1.29k]
  ------------------
   62|  2.72k|            {
   63|  2.72k|                *indexFailingChild=0;
   64|  2.72k|                return false;
   65|  2.72k|            }
   66|       |
   67|       |            // If the 0th child is not the right kind, report an error at 0
   68|  1.29k|            if (fDTD) {
  ------------------
  |  Branch (68:17): [True: 1.29k, False: 0]
  ------------------
   69|  1.29k|                if (!XMLString::equals(children[0]->getRawName(), fFirstChild->getRawName())) {
  ------------------
  |  Branch (69:21): [True: 672, False: 626]
  ------------------
   70|    672|                    *indexFailingChild=0;
   71|    672|                    return false;
   72|    672|                }
   73|  1.29k|            }
   74|      0|            else {
   75|      0|                if ((children[0]->getURI() != fFirstChild->getURI()) ||
  ------------------
  |  Branch (75:21): [True: 0, False: 0]
  ------------------
   76|      0|                    !XMLString::equals(children[0]->getLocalPart(), fFirstChild->getLocalPart())) {
  ------------------
  |  Branch (76:21): [True: 0, False: 0]
  ------------------
   77|      0|                    *indexFailingChild=0;
   78|      0|                    return false;
   79|      0|                }
   80|      0|            }
   81|       |
   82|    626|            if (childCount > 1)
  ------------------
  |  Branch (82:17): [True: 540, False: 86]
  ------------------
   83|    540|            {
   84|    540|                *indexFailingChild=1;
   85|    540|                return false;
   86|    540|            }
   87|     86|            break;
   88|       |
   89|  1.99k|        case ContentSpecNode::ZeroOrOne :
  ------------------
  |  Branch (89:9): [True: 1.99k, False: 20.2k]
  ------------------
   90|       |            //
   91|       |            //  If the child count is greater than one, then obviously
   92|       |            //  bad. Otherwise, if its one, then the one child must be
   93|       |            //  of the type we stored.
   94|       |            //
   95|  1.99k|            if (childCount == 1) {
  ------------------
  |  Branch (95:17): [True: 906, False: 1.09k]
  ------------------
   96|    906|                if (fDTD) {
  ------------------
  |  Branch (96:21): [True: 906, False: 0]
  ------------------
   97|    906|                    if (!XMLString::equals(children[0]->getRawName(), fFirstChild->getRawName())) {
  ------------------
  |  Branch (97:25): [True: 625, False: 281]
  ------------------
   98|    625|                        *indexFailingChild=0;
   99|    625|                        return false;
  100|    625|                    }
  101|    906|                }
  102|      0|                else {
  103|      0|                    if ((children[0]->getURI() != fFirstChild->getURI()) ||
  ------------------
  |  Branch (103:25): [True: 0, False: 0]
  ------------------
  104|      0|                        (!XMLString::equals(children[0]->getLocalPart(), fFirstChild->getLocalPart()))) {
  ------------------
  |  Branch (104:25): [True: 0, False: 0]
  ------------------
  105|      0|                        *indexFailingChild=0;
  106|      0|                        return false;
  107|      0|                    }
  108|      0|                }
  109|    906|            }
  110|       |
  111|  1.37k|            if (childCount > 1)
  ------------------
  |  Branch (111:17): [True: 318, False: 1.05k]
  ------------------
  112|    318|            {
  113|    318|                *indexFailingChild=1;
  114|    318|                return false;
  115|    318|            }
  116|  1.05k|            break;
  117|       |
  118|  2.17k|        case ContentSpecNode::ZeroOrMore :
  ------------------
  |  Branch (118:9): [True: 2.17k, False: 20.0k]
  ------------------
  119|       |            //
  120|       |            //  If the child count is zero, that's fine. If its more than
  121|       |            //  zero, then make sure that all children are of the element
  122|       |            //  type that we stored.
  123|       |            //
  124|  2.17k|            if (childCount > 0)
  ------------------
  |  Branch (124:17): [True: 1.24k, False: 927]
  ------------------
  125|  1.24k|            {
  126|  1.24k|                if (fDTD) {
  ------------------
  |  Branch (126:21): [True: 1.24k, False: 0]
  ------------------
  127|  2.19k|                    for (index = 0; index < childCount; index++) {
  ------------------
  |  Branch (127:37): [True: 1.71k, False: 485]
  ------------------
  128|  1.71k|                        if (!XMLString::equals(children[index]->getRawName(), fFirstChild->getRawName())) {
  ------------------
  |  Branch (128:29): [True: 758, False: 956]
  ------------------
  129|    758|                            *indexFailingChild=index;
  130|    758|                            return false;
  131|    758|                        }
  132|  1.71k|                    }
  133|  1.24k|                }
  134|      0|                else {
  135|      0|                    for (index = 0; index < childCount; index++) {
  ------------------
  |  Branch (135:37): [True: 0, False: 0]
  ------------------
  136|      0|                        if ((children[index]->getURI() != fFirstChild->getURI()) ||
  ------------------
  |  Branch (136:29): [True: 0, False: 0]
  ------------------
  137|      0|                            !XMLString::equals(children[index]->getLocalPart(), fFirstChild->getLocalPart())) {
  ------------------
  |  Branch (137:29): [True: 0, False: 0]
  ------------------
  138|      0|                            *indexFailingChild=index;
  139|      0|                            return false;
  140|      0|                        }
  141|      0|                    }
  142|      0|                }
  143|  1.24k|            }
  144|  1.41k|            break;
  145|       |
  146|  2.54k|        case ContentSpecNode::OneOrMore :
  ------------------
  |  Branch (146:9): [True: 2.54k, False: 19.7k]
  ------------------
  147|       |            //
  148|       |            //  If the child count is zero, that's an error. If its more
  149|       |            //  than zero, then make sure that all children are of the
  150|       |            //  element type that we stored.
  151|       |            //
  152|  2.54k|            if (childCount == 0)
  ------------------
  |  Branch (152:17): [True: 1.46k, False: 1.07k]
  ------------------
  153|  1.46k|            {
  154|  1.46k|                *indexFailingChild=0;
  155|  1.46k|                return false;
  156|  1.46k|            }
  157|       |
  158|  1.07k|            if (fDTD) {
  ------------------
  |  Branch (158:17): [True: 1.07k, False: 0]
  ------------------
  159|  2.41k|                for (index = 0; index < childCount; index++) {
  ------------------
  |  Branch (159:33): [True: 1.62k, False: 787]
  ------------------
  160|  1.62k|                    if (!XMLString::equals(children[index]->getRawName(), fFirstChild->getRawName())) {
  ------------------
  |  Branch (160:25): [True: 286, False: 1.34k]
  ------------------
  161|    286|                        *indexFailingChild=index;
  162|    286|                        return false;
  163|    286|                    }
  164|  1.62k|                }
  165|  1.07k|            }
  166|      0|            else {
  167|      0|                for (index = 0; index < childCount; index++) {
  ------------------
  |  Branch (167:33): [True: 0, False: 0]
  ------------------
  168|      0|                    if ((children[index]->getURI() != fFirstChild->getURI()) ||
  ------------------
  |  Branch (168:25): [True: 0, False: 0]
  ------------------
  169|      0|                        !XMLString::equals(children[index]->getLocalPart(), fFirstChild->getLocalPart())) {
  ------------------
  |  Branch (169:25): [True: 0, False: 0]
  ------------------
  170|      0|                        *indexFailingChild=index;
  171|      0|                        return false;
  172|      0|                    }
  173|      0|                }
  174|      0|            }
  175|    787|            break;
  176|       |
  177|  6.27k|        case ContentSpecNode::Choice :
  ------------------
  |  Branch (177:9): [True: 6.27k, False: 15.9k]
  ------------------
  178|       |            //
  179|       |            //  There can only be one child, and it must be one of the
  180|       |            //  two types we stored.
  181|       |            //
  182|  6.27k|            if (!childCount)
  ------------------
  |  Branch (182:17): [True: 2.65k, False: 3.62k]
  ------------------
  183|  2.65k|            {
  184|  2.65k|                *indexFailingChild=0;
  185|  2.65k|                return false;
  186|  2.65k|            }
  187|       |
  188|  3.62k|            if (fDTD) {
  ------------------
  |  Branch (188:17): [True: 3.62k, False: 0]
  ------------------
  189|  3.62k|                if (!XMLString::equals(children[0]->getRawName(), fFirstChild->getRawName()) &&
  ------------------
  |  Branch (189:21): [True: 2.86k, False: 760]
  ------------------
  190|  3.62k|                    !XMLString::equals(children[0]->getRawName(), fSecondChild->getRawName())) {
  ------------------
  |  Branch (190:21): [True: 838, False: 2.02k]
  ------------------
  191|    838|                    *indexFailingChild=0;
  192|    838|                    return false;
  193|    838|                }
  194|  3.62k|            }
  195|      0|            else {
  196|      0|                if (((children[0]->getURI() != fFirstChild->getURI()) ||
  ------------------
  |  Branch (196:22): [True: 0, False: 0]
  ------------------
  197|      0|                     !XMLString::equals(children[0]->getLocalPart(), fFirstChild->getLocalPart())) &&
  ------------------
  |  Branch (197:22): [True: 0, False: 0]
  ------------------
  198|      0|                    ((children[0]->getURI() != fSecondChild->getURI()) ||
  ------------------
  |  Branch (198:22): [True: 0, False: 0]
  ------------------
  199|      0|                     !XMLString::equals(children[0]->getLocalPart(), fSecondChild->getLocalPart()))) {
  ------------------
  |  Branch (199:22): [True: 0, False: 0]
  ------------------
  200|      0|                     *indexFailingChild=0;
  201|      0|                     return false;
  202|      0|                }
  203|      0|            }
  204|       |
  205|  2.78k|            if (childCount > 1)
  ------------------
  |  Branch (205:17): [True: 1.30k, False: 1.47k]
  ------------------
  206|  1.30k|            {
  207|  1.30k|                *indexFailingChild=1;
  208|  1.30k|                return false;
  209|  1.30k|            }
  210|  1.47k|            break;
  211|       |
  212|  5.23k|        case ContentSpecNode::Sequence :
  ------------------
  |  Branch (212:9): [True: 5.23k, False: 17.0k]
  ------------------
  213|       |            //
  214|       |            //  There must be two children and they must be the two values
  215|       |            //  we stored, in the stored order. So first check the obvious
  216|       |            //  problem of an empty content, which would never be valid
  217|       |            //  in this content mode.
  218|       |            //
  219|  5.23k|            if (!childCount)
  ------------------
  |  Branch (219:17): [True: 3.28k, False: 1.94k]
  ------------------
  220|  3.28k|            {
  221|  3.28k|                *indexFailingChild=0;
  222|  3.28k|                return false;
  223|  3.28k|            }
  224|       |
  225|       |            // test first child
  226|  1.94k|            if (fDTD) {
  ------------------
  |  Branch (226:17): [True: 1.94k, False: 0]
  ------------------
  227|  1.94k|                if (!XMLString::equals(children[0]->getRawName(), fFirstChild->getRawName())) {
  ------------------
  |  Branch (227:21): [True: 480, False: 1.46k]
  ------------------
  228|    480|                    *indexFailingChild=0;
  229|    480|                    return false;
  230|    480|                }
  231|  1.94k|            }
  232|      0|            else {
  233|      0|                if ((children[0]->getURI() != fFirstChild->getURI()) ||
  ------------------
  |  Branch (233:21): [True: 0, False: 0]
  ------------------
  234|      0|                    !XMLString::equals(children[0]->getLocalPart(), fFirstChild->getLocalPart())) {
  ------------------
  |  Branch (234:21): [True: 0, False: 0]
  ------------------
  235|      0|                    *indexFailingChild=0;
  236|      0|                    return false;
  237|      0|                }
  238|      0|            }
  239|       |            // test second child, if present
  240|  1.46k|            if( childCount == 1)
  ------------------
  |  Branch (240:17): [True: 583, False: 883]
  ------------------
  241|    583|            {
  242|       |                // missing second child
  243|    583|                *indexFailingChild=1;
  244|    583|                return false;
  245|    583|            }
  246|    883|            else
  247|    883|            {
  248|    883|                if (fDTD) {
  ------------------
  |  Branch (248:21): [True: 883, False: 0]
  ------------------
  249|    883|                    if (!XMLString::equals(children[1]->getRawName(), fSecondChild->getRawName())) {
  ------------------
  |  Branch (249:25): [True: 215, False: 668]
  ------------------
  250|    215|                        *indexFailingChild=1;
  251|    215|                        return false;
  252|    215|                    }
  253|    883|                }
  254|      0|                else {
  255|      0|                    if ((children[1]->getURI() != fSecondChild->getURI()) ||
  ------------------
  |  Branch (255:25): [True: 0, False: 0]
  ------------------
  256|      0|                        !XMLString::equals(children[1]->getLocalPart(), fSecondChild->getLocalPart())) {
  ------------------
  |  Branch (256:25): [True: 0, False: 0]
  ------------------
  257|      0|                        *indexFailingChild=1;
  258|      0|                        return false;
  259|      0|                    }
  260|      0|                }
  261|       |
  262|    668|                if (childCount > 2) {
  ------------------
  |  Branch (262:21): [True: 274, False: 394]
  ------------------
  263|    274|                    *indexFailingChild=2;
  264|    274|                    return false;
  265|    274|                }
  266|    668|            }
  267|    394|            break;
  268|       |
  269|    394|        default :
  ------------------
  |  Branch (269:9): [True: 0, False: 22.2k]
  ------------------
  270|      0|            ThrowXMLwithMemMgr(RuntimeException, XMLExcepts::CM_UnknownCMSpecType, fMemoryManager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  271|      0|            break;
  272|  22.2k|    }
  273|  5.20k|    return true;
  274|  22.2k|}

_ZN11xercesc_3_218SimpleContentModelD2Ev:
  182|    366|{
  183|    366|    delete fFirstChild;
  184|    366|    delete fSecondChild;
  185|    366|}
_ZN11xercesc_3_218SimpleContentModelC2EbPNS_5QNameES2_NS_15ContentSpecNode9NodeTypesEPNS_13MemoryManagerE:
  164|    366|    : fFirstChild(0)
  165|    366|    , fSecondChild(0)
  166|    366|    , fOp(cmOp)
  167|    366|    , fDTD(dtd)
  168|    366|    , fMemoryManager(manager)
  169|    366|{
  170|    366|    if (firstChild)
  ------------------
  |  Branch (170:9): [True: 366, False: 0]
  ------------------
  171|    366|        fFirstChild = new (manager) QName(*firstChild);
  172|      0|    else
  173|      0|        fFirstChild = new (manager) QName(XMLUni::fgZeroLenString, XMLUni::fgZeroLenString, XMLElementDecl::fgInvalidElemId, manager);
  174|       |
  175|    366|    if (secondChild)
  ------------------
  |  Branch (175:9): [True: 104, False: 262]
  ------------------
  176|    104|        fSecondChild = new (manager) QName(*secondChild);
  177|    262|    else
  178|    262|        fSecondChild = new (manager) QName(XMLUni::fgZeroLenString, XMLUni::fgZeroLenString, XMLElementDecl::fgInvalidElemId, manager);
  179|    366|}

_ZN11xercesc_3_229AbstractNumericFacetValidatorC2EPNS_17DatatypeValidatorEPNS_14RefHashTableOfINS_12KVStringPairENS_12StringHasherEEEiNS1_13ValidatorTypeEPNS_13MemoryManagerE:
   97|     25|:DatatypeValidator(baseValidator, facets, finalSet, type, manager)
   98|     25|, fMaxInclusiveInherited(false)
   99|     25|, fMaxExclusiveInherited(false)
  100|     25|, fMinInclusiveInherited(false)
  101|     25|, fMinExclusiveInherited(false)
  102|     25|, fEnumerationInherited(false)
  103|     25|, fMaxInclusive(0)
  104|     25|, fMaxExclusive(0)
  105|     25|, fMinInclusive(0)
  106|     25|, fMinExclusive(0)
  107|     25|, fEnumeration(0)
  108|     25|, fStrEnumeration(0)
  109|     25|{
  110|       |    //do not invoke init() here !!!
  111|     25|}
_ZN11xercesc_3_229AbstractNumericFacetValidator4initEPNS_16RefArrayVectorOfIDsEEPNS_13MemoryManagerE:
  118|     13|{
  119|       |
  120|     13|    fStrEnumeration = enums; // save the literal value
  121|       |	                         // which is needed for getEnumString()
  122|       |
  123|     13|    if (enums)
  ------------------
  |  Branch (123:9): [True: 0, False: 13]
  ------------------
  124|      0|    {
  125|      0|        setFacetsDefined(DatatypeValidator::FACET_ENUMERATION);
  126|      0|    }
  127|       |
  128|     13|    assignFacet(manager);
  129|     13|    inspectFacet(manager);
  130|     13|    inspectFacetBase(manager);
  131|     13|    inheritFacet();
  132|     13|}
_ZN11xercesc_3_229AbstractNumericFacetValidator11assignFacetEPNS_13MemoryManagerE:
  140|     13|{
  141|       |
  142|     13|    RefHashTableOf<KVStringPair>* facets = getFacets();
  143|       |
  144|     13|    if (!facets)     // no facets defined
  ------------------
  |  Branch (144:9): [True: 0, False: 13]
  ------------------
  145|      0|        return;
  146|       |
  147|     13|    XMLCh* key;
  148|       |
  149|     13|    RefHashTableOfEnumerator<KVStringPair> e(facets, false, manager);
  150|       |
  151|     31|    while (e.hasMoreElements())
  ------------------
  |  Branch (151:12): [True: 18, False: 13]
  ------------------
  152|     18|    {
  153|     18|        KVStringPair pair = e.nextElement();
  154|     18|        key = pair.getKey();
  155|     18|        XMLCh* value = pair.getValue();
  156|       |
  157|     18|        if (XMLString::equals(key, SchemaSymbols::fgELT_PATTERN))
  ------------------
  |  Branch (157:13): [True: 1, False: 17]
  ------------------
  158|      1|        {
  159|      1|            setPattern(value);
  160|      1|            if (getPattern())
  ------------------
  |  Branch (160:17): [True: 1, False: 0]
  ------------------
  161|      1|                setFacetsDefined(DatatypeValidator::FACET_PATTERN);
  162|       |            // do not construct regex until needed
  163|      1|        }
  164|     17|        else if (XMLString::equals(key, SchemaSymbols::fgELT_MAXINCLUSIVE))
  ------------------
  |  Branch (164:18): [True: 10, False: 7]
  ------------------
  165|     10|        {
  166|     10|            try
  167|     10|            {
  168|     10|                setMaxInclusive(value);
  169|     10|            }
  170|     10|            catch (NumberFormatException&)
  171|     10|            {
  172|      0|                ThrowXMLwithMemMgr1(InvalidDatatypeFacetException, XMLExcepts::FACET_Invalid_MaxIncl, value, manager);
  ------------------
  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
  173|      0|            }
  174|     10|            setFacetsDefined(DatatypeValidator::FACET_MAXINCLUSIVE);
  175|     10|        }
  176|      7|        else if (XMLString::equals(key, SchemaSymbols::fgELT_MAXEXCLUSIVE))
  ------------------
  |  Branch (176:18): [True: 0, False: 7]
  ------------------
  177|      0|        {
  178|      0|            try
  179|      0|            {
  180|      0|                setMaxExclusive(value);
  181|      0|            }
  182|      0|            catch (NumberFormatException&)
  183|      0|            {
  184|      0|                ThrowXMLwithMemMgr1(InvalidDatatypeFacetException, XMLExcepts::FACET_Invalid_MaxExcl, value, manager);
  ------------------
  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
  185|      0|            }
  186|      0|            setFacetsDefined(DatatypeValidator::FACET_MAXEXCLUSIVE);
  187|      0|        }
  188|      7|        else if (XMLString::equals(key, SchemaSymbols::fgELT_MININCLUSIVE))
  ------------------
  |  Branch (188:18): [True: 6, False: 1]
  ------------------
  189|      6|        {
  190|      6|            try
  191|      6|            {
  192|      6|                setMinInclusive(value);
  193|      6|            }
  194|      6|            catch (NumberFormatException&)
  195|      6|            {
  196|      0|                ThrowXMLwithMemMgr1(InvalidDatatypeFacetException, XMLExcepts::FACET_Invalid_MinIncl, value, manager);
  ------------------
  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
  197|      0|            }
  198|      6|            setFacetsDefined(DatatypeValidator::FACET_MININCLUSIVE);
  199|      6|        }
  200|      1|        else if (XMLString::equals(key, SchemaSymbols::fgELT_MINEXCLUSIVE))
  ------------------
  |  Branch (200:18): [True: 0, False: 1]
  ------------------
  201|      0|        {
  202|      0|            try
  203|      0|            {
  204|      0|                setMinExclusive(value);
  205|      0|            }
  206|      0|            catch (NumberFormatException&)
  207|      0|            {
  208|      0|                ThrowXMLwithMemMgr1(InvalidDatatypeFacetException, XMLExcepts::FACET_Invalid_MinExcl, value, manager);
  ------------------
  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
  209|      0|            }
  210|      0|            setFacetsDefined(DatatypeValidator::FACET_MINEXCLUSIVE);
  211|      0|        }
  212|      1|        else if (XMLString::equals(key, SchemaSymbols::fgATT_FIXED))
  ------------------
  |  Branch (212:18): [True: 0, False: 1]
  ------------------
  213|      0|        {
  214|      0|            unsigned int val;
  215|      0|            bool         retStatus;
  216|      0|            try
  217|      0|            {
  218|      0|                retStatus = XMLString::textToBin(value, val, fMemoryManager);
  219|      0|            }
  220|      0|            catch (RuntimeException&)
  221|      0|            {
  222|      0|                ThrowXMLwithMemMgr(InvalidDatatypeFacetException, XMLExcepts::FACET_internalError_fixed, manager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  223|      0|            }
  224|       |
  225|      0|            if (!retStatus)
  ------------------
  |  Branch (225:17): [True: 0, False: 0]
  ------------------
  226|      0|            {
  227|      0|                ThrowXMLwithMemMgr(InvalidDatatypeFacetException, XMLExcepts::FACET_internalError_fixed, manager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  228|      0|            }
  229|       |
  230|      0|            setFixed(val);
  231|       |            //no setFacetsDefined here
  232|       |
  233|      0|        }
  234|      1|        else
  235|      1|        {
  236|      1|            assignAdditionalFacet(key, value, manager);
  237|      1|        }
  238|       |
  239|     18|    }//while
  240|       |
  241|     13|}// end of assigneFacet()
_ZN11xercesc_3_229AbstractNumericFacetValidator12inspectFacetEPNS_13MemoryManagerE:
  249|     13|{
  250|       |
  251|     13|    int thisFacetsDefined = getFacetsDefined();
  252|     13|    XMLNumber *thisMaxInclusive = getMaxInclusive();
  253|     13|    XMLNumber *thisMaxExclusive = getMaxExclusive();
  254|     13|    XMLNumber *thisMinInclusive = getMinInclusive();
  255|     13|    XMLNumber *thisMinExclusive = getMinExclusive();
  256|       |
  257|     13|    if (!thisFacetsDefined)
  ------------------
  |  Branch (257:9): [True: 0, False: 13]
  ------------------
  258|      0|        return;
  259|       |
  260|       |    // non co-existence checking
  261|       |    // check 4.3.8.c1 error: maxInclusive + maxExclusive
  262|     13|    if (((thisFacetsDefined & DatatypeValidator::FACET_MAXEXCLUSIVE) != 0) &&
  ------------------
  |  Branch (262:9): [True: 0, False: 13]
  ------------------
  263|     13|        ((thisFacetsDefined & DatatypeValidator::FACET_MAXINCLUSIVE) != 0) )
  ------------------
  |  Branch (263:9): [True: 0, False: 0]
  ------------------
  264|      0|        ThrowXMLwithMemMgr(InvalidDatatypeFacetException, XMLExcepts::FACET_max_Incl_Excl, manager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  265|       |
  266|       |    // non co-existence checking
  267|       |    // check 4.3.9.c1 error: minInclusive + minExclusive
  268|     13|    if (((thisFacetsDefined & DatatypeValidator::FACET_MINEXCLUSIVE) != 0) &&
  ------------------
  |  Branch (268:9): [True: 0, False: 13]
  ------------------
  269|     13|        ((thisFacetsDefined & DatatypeValidator::FACET_MININCLUSIVE) != 0) )
  ------------------
  |  Branch (269:9): [True: 0, False: 0]
  ------------------
  270|      0|        ThrowXMLwithMemMgr(InvalidDatatypeFacetException, XMLExcepts::FACET_min_Incl_Excl, manager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  271|       |
  272|       |    //
  273|       |    // minExclusive < minInclusive <= maxInclusive < maxExclusive
  274|       |    //
  275|       |    // check 4.3.7.c1 must: minInclusive <= maxInclusive
  276|     13|    if (((thisFacetsDefined & DatatypeValidator::FACET_MAXINCLUSIVE) != 0) &&
  ------------------
  |  Branch (276:9): [True: 10, False: 3]
  ------------------
  277|     13|        ((thisFacetsDefined & DatatypeValidator::FACET_MININCLUSIVE) != 0) )
  ------------------
  |  Branch (277:9): [True: 4, False: 6]
  ------------------
  278|      4|    {
  279|      4|        int result = compareValues(thisMinInclusive, thisMaxInclusive);
  280|      4|        if ( result == 1 || result == INDETERMINATE )
  ------------------
  |  Branch (280:14): [True: 0, False: 4]
  |  Branch (280:29): [True: 0, False: 4]
  ------------------
  281|      0|        {
  282|      0|            REPORT_FACET_ERROR(thisMinInclusive
  ------------------
  |  |   43|      0|  ThrowXMLwithMemMgr2(InvalidDatatypeFacetException               \
  |  |  ------------------
  |  |  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  |  |  ------------------
  |  |   44|      0|          , except_code                                 \
  |  |   45|      0|          , val1->getFormattedString()                  \
  |  |   46|      0|          , val2->getFormattedString()                  \
  |  |   47|      0|          , manager);
  ------------------
  283|      0|                             , thisMaxInclusive
  284|      0|                             , XMLExcepts::FACET_maxIncl_minIncl
  285|      0|                             , manager)
  286|      0|        }
  287|      4|    }
  288|       |
  289|       |    // check 4.3.8.c2 must: minExclusive <= maxExclusive
  290|     13|    if ( ((thisFacetsDefined & DatatypeValidator::FACET_MAXEXCLUSIVE) != 0) &&
  ------------------
  |  Branch (290:10): [True: 0, False: 13]
  ------------------
  291|     13|        ((thisFacetsDefined & DatatypeValidator::FACET_MINEXCLUSIVE) != 0) )
  ------------------
  |  Branch (291:9): [True: 0, False: 0]
  ------------------
  292|      0|    {
  293|      0|        int result = compareValues(getMinExclusive(), getMaxExclusive());
  294|      0|        if ( result == 1 || result == INDETERMINATE )
  ------------------
  |  Branch (294:14): [True: 0, False: 0]
  |  Branch (294:29): [True: 0, False: 0]
  ------------------
  295|      0|        {
  296|      0|            REPORT_FACET_ERROR(thisMinExclusive
  ------------------
  |  |   43|      0|  ThrowXMLwithMemMgr2(InvalidDatatypeFacetException               \
  |  |  ------------------
  |  |  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  |  |  ------------------
  |  |   44|      0|          , except_code                                 \
  |  |   45|      0|          , val1->getFormattedString()                  \
  |  |   46|      0|          , val2->getFormattedString()                  \
  |  |   47|      0|          , manager);
  ------------------
  297|      0|                             , thisMaxExclusive
  298|      0|                             , XMLExcepts::FACET_maxExcl_minExcl
  299|      0|                             , manager)
  300|      0|        }
  301|      0|    }
  302|       |
  303|       |    // check 4.3.9.c2 must: minExclusive < maxInclusive
  304|     13|    if ( ((thisFacetsDefined & DatatypeValidator::FACET_MAXINCLUSIVE) != 0) &&
  ------------------
  |  Branch (304:10): [True: 10, False: 3]
  ------------------
  305|     13|        ((thisFacetsDefined & DatatypeValidator::FACET_MINEXCLUSIVE) != 0) )
  ------------------
  |  Branch (305:9): [True: 0, False: 10]
  ------------------
  306|      0|    {
  307|      0|        int result = compareValues(getMinExclusive(), getMaxInclusive());
  308|      0|        if ( result != -1 )
  ------------------
  |  Branch (308:14): [True: 0, False: 0]
  ------------------
  309|      0|        {
  310|      0|            REPORT_FACET_ERROR(thisMinExclusive
  ------------------
  |  |   43|      0|  ThrowXMLwithMemMgr2(InvalidDatatypeFacetException               \
  |  |  ------------------
  |  |  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  |  |  ------------------
  |  |   44|      0|          , except_code                                 \
  |  |   45|      0|          , val1->getFormattedString()                  \
  |  |   46|      0|          , val2->getFormattedString()                  \
  |  |   47|      0|          , manager);
  ------------------
  311|      0|                             , thisMaxInclusive
  312|      0|                             , XMLExcepts::FACET_maxIncl_minExcl
  313|      0|                             , manager)
  314|      0|        }
  315|      0|    }
  316|       |
  317|       |    // check 4.3.10.c1 must: minInclusive < maxExclusive
  318|     13|    if ( ((thisFacetsDefined & DatatypeValidator::FACET_MAXEXCLUSIVE) != 0) &&
  ------------------
  |  Branch (318:10): [True: 0, False: 13]
  ------------------
  319|     13|        ((thisFacetsDefined & DatatypeValidator::FACET_MININCLUSIVE) != 0) )
  ------------------
  |  Branch (319:9): [True: 0, False: 0]
  ------------------
  320|      0|    {
  321|      0|        int result = compareValues(getMinInclusive(), getMaxExclusive());
  322|      0|        if ( result != -1)
  ------------------
  |  Branch (322:14): [True: 0, False: 0]
  ------------------
  323|      0|        {
  324|      0|            REPORT_FACET_ERROR(thisMinInclusive
  ------------------
  |  |   43|      0|  ThrowXMLwithMemMgr2(InvalidDatatypeFacetException               \
  |  |  ------------------
  |  |  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  |  |  ------------------
  |  |   44|      0|          , except_code                                 \
  |  |   45|      0|          , val1->getFormattedString()                  \
  |  |   46|      0|          , val2->getFormattedString()                  \
  |  |   47|      0|          , manager);
  ------------------
  325|      0|                             , thisMaxExclusive
  326|      0|                             , XMLExcepts::FACET_maxExcl_minIncl
  327|      0|                             , manager)
  328|      0|        }
  329|      0|    }
  330|       |
  331|     13|    checkAdditionalFacetConstraints(manager);
  332|       |
  333|     13|}// end of inspectFacet()
_ZN11xercesc_3_229AbstractNumericFacetValidator16inspectFacetBaseEPNS_13MemoryManagerE:
  342|     13|{
  343|       |
  344|     13|    AbstractNumericFacetValidator* numBase = (AbstractNumericFacetValidator*) getBaseValidator();
  345|     13|    int thisFacetsDefined = getFacetsDefined();
  346|       |
  347|     13|    if ( (!thisFacetsDefined && !fEnumeration) ||
  ------------------
  |  Branch (347:11): [True: 0, False: 13]
  |  Branch (347:33): [True: 0, False: 0]
  ------------------
  348|     13|         !numBase           )
  ------------------
  |  Branch (348:10): [True: 0, False: 13]
  ------------------
  349|      0|        return;
  350|       |
  351|     13|    int baseFacetsDefined = numBase->getFacetsDefined();
  352|       |
  353|     13|    XMLNumber *thisMaxInclusive = getMaxInclusive();
  354|     13|    XMLNumber *thisMaxExclusive = getMaxExclusive();
  355|     13|    XMLNumber *thisMinInclusive = getMinInclusive();
  356|     13|    XMLNumber *thisMinExclusive = getMinExclusive();
  357|       |
  358|     13|    XMLNumber *baseMaxInclusive = numBase->getMaxInclusive();
  359|     13|    XMLNumber *baseMaxExclusive = numBase->getMaxExclusive();
  360|     13|    XMLNumber *baseMinInclusive = numBase->getMinInclusive();
  361|     13|    XMLNumber *baseMinExclusive = numBase->getMinExclusive();
  362|     13|    int       baseFixed = numBase->getFixed();
  363|       |
  364|       |                //                                     this
  365|       |                //                 minExclusive                          maxExclusive
  366|       |                //                    minInclusive                  maxInclusive
  367|       |                //
  368|       |                //                                     base
  369|       |                //  minExclusive                                                          maxExclusive
  370|       |                //      minInclusive                                                   maxInclusive
  371|       |                //
  372|       |
  373|       |    // check 4.3.7.c2 error:
  374|       |    // maxInclusive > base.maxInclusive && maxInclusive != base.maxInclusive if (base.fixed)
  375|       |    // maxInclusive >= base.maxExclusive
  376|       |    // maxInclusive < base.minInclusive
  377|       |    // maxInclusive <= base.minExclusive
  378|       |
  379|     13|    if ((thisFacetsDefined & DatatypeValidator::FACET_MAXINCLUSIVE) != 0)
  ------------------
  |  Branch (379:9): [True: 10, False: 3]
  ------------------
  380|     10|    {
  381|     10|        if ((baseFacetsDefined & DatatypeValidator::FACET_MAXINCLUSIVE) != 0)
  ------------------
  |  Branch (381:13): [True: 7, False: 3]
  ------------------
  382|      7|        {
  383|      7|            int result = compareValues(thisMaxInclusive, baseMaxInclusive);
  384|       |
  385|      7|            if (((baseFixed & DatatypeValidator::FACET_MAXINCLUSIVE) != 0) &&
  ------------------
  |  Branch (385:17): [True: 0, False: 7]
  ------------------
  386|      7|                 (result != 0 ))
  ------------------
  |  Branch (386:18): [True: 0, False: 0]
  ------------------
  387|      0|            {
  388|      0|                REPORT_FACET_ERROR(thisMaxInclusive
  ------------------
  |  |   43|      0|  ThrowXMLwithMemMgr2(InvalidDatatypeFacetException               \
  |  |  ------------------
  |  |  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  |  |  ------------------
  |  |   44|      0|          , except_code                                 \
  |  |   45|      0|          , val1->getFormattedString()                  \
  |  |   46|      0|          , val2->getFormattedString()                  \
  |  |   47|      0|          , manager);
  ------------------
  389|      0|                                 , baseMaxInclusive
  390|      0|                                 , XMLExcepts::FACET_maxIncl_base_fixed
  391|      0|                                 , manager)
  392|      0|            }
  393|       |
  394|      7|            if (result == 1 || result == INDETERMINATE)
  ------------------
  |  Branch (394:17): [True: 0, False: 7]
  |  Branch (394:32): [True: 0, False: 7]
  ------------------
  395|      0|            {
  396|      0|                REPORT_FACET_ERROR(thisMaxInclusive
  ------------------
  |  |   43|      0|  ThrowXMLwithMemMgr2(InvalidDatatypeFacetException               \
  |  |  ------------------
  |  |  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  |  |  ------------------
  |  |   44|      0|          , except_code                                 \
  |  |   45|      0|          , val1->getFormattedString()                  \
  |  |   46|      0|          , val2->getFormattedString()                  \
  |  |   47|      0|          , manager);
  ------------------
  397|      0|                                 , baseMaxInclusive
  398|      0|                                 , XMLExcepts::FACET_maxIncl_base_maxIncl
  399|      0|                                 , manager)
  400|      0|            }
  401|       |
  402|      7|        }
  403|       |
  404|     10|        if ((baseFacetsDefined & DatatypeValidator::FACET_MAXEXCLUSIVE) != 0)
  ------------------
  |  Branch (404:13): [True: 0, False: 10]
  ------------------
  405|      0|        {
  406|      0|            int result = compareValues(thisMaxInclusive, baseMaxExclusive);
  407|      0|            if (result != -1 )
  ------------------
  |  Branch (407:17): [True: 0, False: 0]
  ------------------
  408|      0|            {
  409|      0|                REPORT_FACET_ERROR(thisMaxInclusive
  ------------------
  |  |   43|      0|  ThrowXMLwithMemMgr2(InvalidDatatypeFacetException               \
  |  |  ------------------
  |  |  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  |  |  ------------------
  |  |   44|      0|          , except_code                                 \
  |  |   45|      0|          , val1->getFormattedString()                  \
  |  |   46|      0|          , val2->getFormattedString()                  \
  |  |   47|      0|          , manager);
  ------------------
  410|      0|                                 , baseMaxExclusive
  411|      0|                                 , XMLExcepts::FACET_maxIncl_base_maxExcl
  412|      0|                                 , manager)
  413|      0|            }
  414|      0|        }
  415|       |
  416|       |
  417|     10|        if ((baseFacetsDefined & DatatypeValidator::FACET_MININCLUSIVE) != 0)
  ------------------
  |  Branch (417:13): [True: 7, False: 3]
  ------------------
  418|      7|        {
  419|      7|            int result = compareValues(thisMaxInclusive, baseMinInclusive);
  420|      7|            if (result == -1 || result == INDETERMINATE)
  ------------------
  |  Branch (420:17): [True: 0, False: 7]
  |  Branch (420:33): [True: 0, False: 7]
  ------------------
  421|      0|            {
  422|      0|                REPORT_FACET_ERROR(thisMaxInclusive
  ------------------
  |  |   43|      0|  ThrowXMLwithMemMgr2(InvalidDatatypeFacetException               \
  |  |  ------------------
  |  |  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  |  |  ------------------
  |  |   44|      0|          , except_code                                 \
  |  |   45|      0|          , val1->getFormattedString()                  \
  |  |   46|      0|          , val2->getFormattedString()                  \
  |  |   47|      0|          , manager);
  ------------------
  423|      0|                                 , baseMinInclusive
  424|      0|                                 , XMLExcepts::FACET_maxIncl_base_minIncl
  425|      0|                                 , manager)
  426|      0|            }
  427|      7|        }
  428|       |
  429|     10|        if ((baseFacetsDefined & DatatypeValidator::FACET_MINEXCLUSIVE) != 0)
  ------------------
  |  Branch (429:13): [True: 0, False: 10]
  ------------------
  430|      0|        {
  431|      0|            int result = compareValues(thisMaxInclusive, baseMinExclusive);
  432|      0|            if (result != 1 )
  ------------------
  |  Branch (432:17): [True: 0, False: 0]
  ------------------
  433|      0|            {
  434|      0|                REPORT_FACET_ERROR(thisMaxInclusive
  ------------------
  |  |   43|      0|  ThrowXMLwithMemMgr2(InvalidDatatypeFacetException               \
  |  |  ------------------
  |  |  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  |  |  ------------------
  |  |   44|      0|          , except_code                                 \
  |  |   45|      0|          , val1->getFormattedString()                  \
  |  |   46|      0|          , val2->getFormattedString()                  \
  |  |   47|      0|          , manager);
  ------------------
  435|      0|                                 , baseMinExclusive
  436|      0|                                 , XMLExcepts::FACET_maxIncl_base_minExcl
  437|      0|                                 , manager)
  438|      0|            }
  439|      0|        }
  440|       |
  441|     10|    }
  442|       |
  443|       |    // check 4.3.8.c3 error:
  444|       |    // maxExclusive > base.maxExclusive  && maxExclusive != base.maxExclusive if (base.fixed)
  445|       |    // maxExclusive > base.maxInclusive
  446|       |    // maxExclusive <= base.minInclusive
  447|       |    // maxExclusive <= base.minExclusive
  448|       |
  449|     13|    if ((thisFacetsDefined & DatatypeValidator::FACET_MAXEXCLUSIVE) != 0)
  ------------------
  |  Branch (449:9): [True: 0, False: 13]
  ------------------
  450|      0|    {
  451|      0|        if (( baseFacetsDefined & DatatypeValidator::FACET_MAXEXCLUSIVE) != 0)
  ------------------
  |  Branch (451:13): [True: 0, False: 0]
  ------------------
  452|      0|        {
  453|      0|            int result = compareValues(thisMaxExclusive, baseMaxExclusive);
  454|       |
  455|      0|            if (((baseFixed & DatatypeValidator::FACET_MAXEXCLUSIVE) != 0) &&
  ------------------
  |  Branch (455:17): [True: 0, False: 0]
  ------------------
  456|      0|                 (result != 0 ))
  ------------------
  |  Branch (456:18): [True: 0, False: 0]
  ------------------
  457|      0|            {
  458|      0|                REPORT_FACET_ERROR(thisMaxExclusive
  ------------------
  |  |   43|      0|  ThrowXMLwithMemMgr2(InvalidDatatypeFacetException               \
  |  |  ------------------
  |  |  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  |  |  ------------------
  |  |   44|      0|          , except_code                                 \
  |  |   45|      0|          , val1->getFormattedString()                  \
  |  |   46|      0|          , val2->getFormattedString()                  \
  |  |   47|      0|          , manager);
  ------------------
  459|      0|                                 , baseMaxExclusive
  460|      0|                                 , XMLExcepts::FACET_maxExcl_base_fixed
  461|      0|                                 , manager)
  462|      0|             }
  463|       |
  464|      0|            if (result == 1 || result == INDETERMINATE)
  ------------------
  |  Branch (464:17): [True: 0, False: 0]
  |  Branch (464:32): [True: 0, False: 0]
  ------------------
  465|      0|            {
  466|      0|                REPORT_FACET_ERROR(thisMaxExclusive
  ------------------
  |  |   43|      0|  ThrowXMLwithMemMgr2(InvalidDatatypeFacetException               \
  |  |  ------------------
  |  |  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  |  |  ------------------
  |  |   44|      0|          , except_code                                 \
  |  |   45|      0|          , val1->getFormattedString()                  \
  |  |   46|      0|          , val2->getFormattedString()                  \
  |  |   47|      0|          , manager);
  ------------------
  467|      0|                                 , baseMaxExclusive
  468|      0|                                 , XMLExcepts::FACET_maxExcl_base_maxExcl
  469|      0|                                 , manager)
  470|      0|            }
  471|       |
  472|       |            /**
  473|       |             * Schema Errata
  474|       |             * E2-16 maxExclusive
  475|       |             *
  476|       |             *   derived type's maxExclusive must either be
  477|       |             *   1) equal to base' maxExclusive or
  478|       |             *   2) from the base type value space
  479|       |             *
  480|       |             */
  481|      0|            if (result != 0)
  ------------------
  |  Branch (481:17): [True: 0, False: 0]
  ------------------
  482|      0|            {
  483|      0|                FROM_BASE_VALUE_SPACE(thisMaxExclusive
  ------------------
  |  |   50|      0|  if ((thisFacetsDefined & facetFlag) != 0)                   \
  |  |  ------------------
  |  |  |  Branch (50:7): [True: 0, False: 0]
  |  |  ------------------
  |  |   51|      0|{                                                             \
  |  |   52|      0|    try                                                       \
  |  |   53|      0|{                                                             \
  |  |   54|      0|        numBase->checkContent(val->getRawData(), (ValidationContext*)0, false, manager);      \
  |  |   55|      0|}                                                             \
  |  |   56|      0|    catch ( XMLException& )                                   \
  |  |   57|      0|{                                                             \
  |  |   58|      0|        ThrowXMLwithMemMgr1(InvalidDatatypeFacetException               \
  |  |  ------------------
  |  |  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  |  |  ------------------
  |  |   59|      0|                , except_code                                 \
  |  |   60|      0|                , val->getRawData()                           \
  |  |   61|      0|                , manager);                                   \
  |  |   62|      0|}                                                             \
  |  |   63|      0|}
  ------------------
  484|      0|                        , DatatypeValidator::FACET_MAXEXCLUSIVE
  485|      0|                        , XMLExcepts::FACET_maxExcl_notFromBase
  486|      0|                        , manager)
  487|      0|            }
  488|      0|        }
  489|      0|        else  // base has no maxExclusive
  490|      0|        {
  491|      0|            FROM_BASE_VALUE_SPACE(thisMaxExclusive
  ------------------
  |  |   50|      0|  if ((thisFacetsDefined & facetFlag) != 0)                   \
  |  |  ------------------
  |  |  |  Branch (50:7): [True: 0, False: 0]
  |  |  ------------------
  |  |   51|      0|{                                                             \
  |  |   52|      0|    try                                                       \
  |  |   53|      0|{                                                             \
  |  |   54|      0|        numBase->checkContent(val->getRawData(), (ValidationContext*)0, false, manager);      \
  |  |   55|      0|}                                                             \
  |  |   56|      0|    catch ( XMLException& )                                   \
  |  |   57|      0|{                                                             \
  |  |   58|      0|        ThrowXMLwithMemMgr1(InvalidDatatypeFacetException               \
  |  |  ------------------
  |  |  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  |  |  ------------------
  |  |   59|      0|                , except_code                                 \
  |  |   60|      0|                , val->getRawData()                           \
  |  |   61|      0|                , manager);                                   \
  |  |   62|      0|}                                                             \
  |  |   63|      0|}
  ------------------
  492|      0|                        , DatatypeValidator::FACET_MAXEXCLUSIVE
  493|      0|                        , XMLExcepts::FACET_maxExcl_notFromBase
  494|      0|                        , manager)
  495|      0|        }
  496|       |
  497|      0|        if (( baseFacetsDefined & DatatypeValidator::FACET_MAXINCLUSIVE) != 0)
  ------------------
  |  Branch (497:13): [True: 0, False: 0]
  ------------------
  498|      0|        {
  499|      0|            int result = compareValues(thisMaxExclusive, baseMaxInclusive);
  500|      0|            if (result == 1 || result == INDETERMINATE)
  ------------------
  |  Branch (500:17): [True: 0, False: 0]
  |  Branch (500:32): [True: 0, False: 0]
  ------------------
  501|      0|            {
  502|      0|                REPORT_FACET_ERROR(thisMaxExclusive
  ------------------
  |  |   43|      0|  ThrowXMLwithMemMgr2(InvalidDatatypeFacetException               \
  |  |  ------------------
  |  |  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  |  |  ------------------
  |  |   44|      0|          , except_code                                 \
  |  |   45|      0|          , val1->getFormattedString()                  \
  |  |   46|      0|          , val2->getFormattedString()                  \
  |  |   47|      0|          , manager);
  ------------------
  503|      0|                                 , baseMaxInclusive
  504|      0|                                 , XMLExcepts::FACET_maxExcl_base_maxIncl
  505|      0|                                 , manager)
  506|      0|            }
  507|      0|        }
  508|       |
  509|      0|        if (( baseFacetsDefined & DatatypeValidator::FACET_MINEXCLUSIVE) != 0)
  ------------------
  |  Branch (509:13): [True: 0, False: 0]
  ------------------
  510|      0|        {
  511|      0|            int result = compareValues(thisMaxExclusive, baseMinExclusive);
  512|      0|            if (result != 1)
  ------------------
  |  Branch (512:17): [True: 0, False: 0]
  ------------------
  513|      0|            {
  514|      0|                REPORT_FACET_ERROR(thisMaxExclusive
  ------------------
  |  |   43|      0|  ThrowXMLwithMemMgr2(InvalidDatatypeFacetException               \
  |  |  ------------------
  |  |  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  |  |  ------------------
  |  |   44|      0|          , except_code                                 \
  |  |   45|      0|          , val1->getFormattedString()                  \
  |  |   46|      0|          , val2->getFormattedString()                  \
  |  |   47|      0|          , manager);
  ------------------
  515|      0|                                 , baseMinExclusive
  516|      0|                                 , XMLExcepts::FACET_maxExcl_base_minExcl
  517|      0|                                 , manager)
  518|      0|            }
  519|      0|        }
  520|       |
  521|      0|        if (( baseFacetsDefined & DatatypeValidator::FACET_MININCLUSIVE) != 0)
  ------------------
  |  Branch (521:13): [True: 0, False: 0]
  ------------------
  522|      0|        {
  523|      0|            int result = compareValues(thisMaxExclusive, baseMinInclusive);
  524|      0|            if (result != 1)
  ------------------
  |  Branch (524:17): [True: 0, False: 0]
  ------------------
  525|      0|            {
  526|      0|                REPORT_FACET_ERROR(thisMaxExclusive
  ------------------
  |  |   43|      0|  ThrowXMLwithMemMgr2(InvalidDatatypeFacetException               \
  |  |  ------------------
  |  |  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  |  |  ------------------
  |  |   44|      0|          , except_code                                 \
  |  |   45|      0|          , val1->getFormattedString()                  \
  |  |   46|      0|          , val2->getFormattedString()                  \
  |  |   47|      0|          , manager);
  ------------------
  527|      0|                                 , baseMinInclusive
  528|      0|                                 , XMLExcepts::FACET_maxExcl_base_minIncl
  529|      0|                                 , manager)
  530|      0|            }
  531|      0|        }
  532|      0|    }
  533|       |
  534|       |    // check 4.3.9.c3 error:
  535|       |    // minExclusive < base.minExclusive     minExclusive != base.minExclusive if (base.fixed)
  536|       |    // minExclusive > base.maxInclusive ??? minExclusive >= base.maxInclusive
  537|       |    // minExclusive < base.minInclusive
  538|       |    // minExclusive >= base.maxExclusive
  539|       |
  540|     13|    if ((thisFacetsDefined & DatatypeValidator::FACET_MINEXCLUSIVE) != 0)
  ------------------
  |  Branch (540:9): [True: 0, False: 13]
  ------------------
  541|      0|    {
  542|      0|        if (( baseFacetsDefined & DatatypeValidator::FACET_MINEXCLUSIVE) != 0)
  ------------------
  |  Branch (542:13): [True: 0, False: 0]
  ------------------
  543|      0|        {
  544|      0|            int result = compareValues(thisMinExclusive, baseMinExclusive);
  545|       |
  546|      0|            if (((baseFixed & DatatypeValidator::FACET_MINEXCLUSIVE) != 0) &&
  ------------------
  |  Branch (546:17): [True: 0, False: 0]
  ------------------
  547|      0|                 (result != 0 ))
  ------------------
  |  Branch (547:18): [True: 0, False: 0]
  ------------------
  548|      0|            {
  549|      0|                REPORT_FACET_ERROR(thisMinExclusive
  ------------------
  |  |   43|      0|  ThrowXMLwithMemMgr2(InvalidDatatypeFacetException               \
  |  |  ------------------
  |  |  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  |  |  ------------------
  |  |   44|      0|          , except_code                                 \
  |  |   45|      0|          , val1->getFormattedString()                  \
  |  |   46|      0|          , val2->getFormattedString()                  \
  |  |   47|      0|          , manager);
  ------------------
  550|      0|                                 , baseMinExclusive
  551|      0|                                 , XMLExcepts::FACET_minExcl_base_fixed
  552|      0|                                 , manager)
  553|      0|            }
  554|       |
  555|      0|            if (result == -1 || result == INDETERMINATE)
  ------------------
  |  Branch (555:17): [True: 0, False: 0]
  |  Branch (555:33): [True: 0, False: 0]
  ------------------
  556|      0|            {
  557|      0|                REPORT_FACET_ERROR(thisMinExclusive
  ------------------
  |  |   43|      0|  ThrowXMLwithMemMgr2(InvalidDatatypeFacetException               \
  |  |  ------------------
  |  |  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  |  |  ------------------
  |  |   44|      0|          , except_code                                 \
  |  |   45|      0|          , val1->getFormattedString()                  \
  |  |   46|      0|          , val2->getFormattedString()                  \
  |  |   47|      0|          , manager);
  ------------------
  558|      0|                                 , baseMinExclusive
  559|      0|                                 , XMLExcepts::FACET_minExcl_base_minExcl
  560|      0|                                 , manager)
  561|      0|            }
  562|       |
  563|       |            /**
  564|       |             * Schema Errata
  565|       |             * E2-16 maxExclusive
  566|       |             *
  567|       |             *   derived type's minExclusive must either be
  568|       |             *   1) equal to base' minxExclusive or
  569|       |             *   2) from the base type value space
  570|       |             *
  571|       |             *  Note: deduced from, not explicitly expressed in the Errata
  572|       |             */
  573|      0|            if (result != 0)
  ------------------
  |  Branch (573:17): [True: 0, False: 0]
  ------------------
  574|      0|            {
  575|      0|                FROM_BASE_VALUE_SPACE(thisMinExclusive
  ------------------
  |  |   50|      0|  if ((thisFacetsDefined & facetFlag) != 0)                   \
  |  |  ------------------
  |  |  |  Branch (50:7): [True: 0, False: 0]
  |  |  ------------------
  |  |   51|      0|{                                                             \
  |  |   52|      0|    try                                                       \
  |  |   53|      0|{                                                             \
  |  |   54|      0|        numBase->checkContent(val->getRawData(), (ValidationContext*)0, false, manager);      \
  |  |   55|      0|}                                                             \
  |  |   56|      0|    catch ( XMLException& )                                   \
  |  |   57|      0|{                                                             \
  |  |   58|      0|        ThrowXMLwithMemMgr1(InvalidDatatypeFacetException               \
  |  |  ------------------
  |  |  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  |  |  ------------------
  |  |   59|      0|                , except_code                                 \
  |  |   60|      0|                , val->getRawData()                           \
  |  |   61|      0|                , manager);                                   \
  |  |   62|      0|}                                                             \
  |  |   63|      0|}
  ------------------
  576|      0|                        , DatatypeValidator::FACET_MINEXCLUSIVE
  577|      0|                        , XMLExcepts::FACET_minExcl_notFromBase
  578|      0|                        , manager)
  579|      0|            }
  580|      0|        }
  581|      0|        else // base has no minExclusive
  582|      0|        {
  583|       |
  584|      0|            FROM_BASE_VALUE_SPACE(thisMinExclusive
  ------------------
  |  |   50|      0|  if ((thisFacetsDefined & facetFlag) != 0)                   \
  |  |  ------------------
  |  |  |  Branch (50:7): [True: 0, False: 0]
  |  |  ------------------
  |  |   51|      0|{                                                             \
  |  |   52|      0|    try                                                       \
  |  |   53|      0|{                                                             \
  |  |   54|      0|        numBase->checkContent(val->getRawData(), (ValidationContext*)0, false, manager);      \
  |  |   55|      0|}                                                             \
  |  |   56|      0|    catch ( XMLException& )                                   \
  |  |   57|      0|{                                                             \
  |  |   58|      0|        ThrowXMLwithMemMgr1(InvalidDatatypeFacetException               \
  |  |  ------------------
  |  |  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  |  |  ------------------
  |  |   59|      0|                , except_code                                 \
  |  |   60|      0|                , val->getRawData()                           \
  |  |   61|      0|                , manager);                                   \
  |  |   62|      0|}                                                             \
  |  |   63|      0|}
  ------------------
  585|      0|                        , DatatypeValidator::FACET_MINEXCLUSIVE
  586|      0|                        , XMLExcepts::FACET_minExcl_notFromBase
  587|      0|                        , manager)
  588|      0|        }
  589|       |
  590|      0|        if (( baseFacetsDefined & DatatypeValidator::FACET_MAXINCLUSIVE) != 0)
  ------------------
  |  Branch (590:13): [True: 0, False: 0]
  ------------------
  591|      0|        {
  592|      0|            int result = compareValues(thisMinExclusive, baseMaxInclusive);
  593|      0|            if (result == 1 || result == INDETERMINATE)
  ------------------
  |  Branch (593:17): [True: 0, False: 0]
  |  Branch (593:32): [True: 0, False: 0]
  ------------------
  594|      0|            {
  595|      0|                REPORT_FACET_ERROR(thisMinExclusive
  ------------------
  |  |   43|      0|  ThrowXMLwithMemMgr2(InvalidDatatypeFacetException               \
  |  |  ------------------
  |  |  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  |  |  ------------------
  |  |   44|      0|          , except_code                                 \
  |  |   45|      0|          , val1->getFormattedString()                  \
  |  |   46|      0|          , val2->getFormattedString()                  \
  |  |   47|      0|          , manager);
  ------------------
  596|      0|                                 , baseMaxInclusive
  597|      0|                                 , XMLExcepts::FACET_minExcl_base_maxIncl
  598|      0|                                 , manager)
  599|      0|            }
  600|      0|        }
  601|       |
  602|      0|        if (( baseFacetsDefined & DatatypeValidator::FACET_MININCLUSIVE) != 0)
  ------------------
  |  Branch (602:13): [True: 0, False: 0]
  ------------------
  603|      0|        {
  604|      0|            int result = compareValues(thisMinExclusive, baseMinInclusive);
  605|      0|            if (result == -1 || result == INDETERMINATE)
  ------------------
  |  Branch (605:17): [True: 0, False: 0]
  |  Branch (605:33): [True: 0, False: 0]
  ------------------
  606|      0|            {
  607|      0|                REPORT_FACET_ERROR(thisMinExclusive
  ------------------
  |  |   43|      0|  ThrowXMLwithMemMgr2(InvalidDatatypeFacetException               \
  |  |  ------------------
  |  |  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  |  |  ------------------
  |  |   44|      0|          , except_code                                 \
  |  |   45|      0|          , val1->getFormattedString()                  \
  |  |   46|      0|          , val2->getFormattedString()                  \
  |  |   47|      0|          , manager);
  ------------------
  608|      0|                                 , baseMinInclusive
  609|      0|                                 , XMLExcepts::FACET_minExcl_base_minIncl
  610|      0|                                 , manager)
  611|      0|            }
  612|      0|        }
  613|       |
  614|      0|        if (( baseFacetsDefined & DatatypeValidator::FACET_MAXEXCLUSIVE) != 0)
  ------------------
  |  Branch (614:13): [True: 0, False: 0]
  ------------------
  615|      0|        {
  616|      0|            int result = compareValues(thisMinExclusive, baseMaxExclusive);
  617|      0|            if (result != -1)
  ------------------
  |  Branch (617:17): [True: 0, False: 0]
  ------------------
  618|      0|            {
  619|      0|                REPORT_FACET_ERROR(thisMinExclusive
  ------------------
  |  |   43|      0|  ThrowXMLwithMemMgr2(InvalidDatatypeFacetException               \
  |  |  ------------------
  |  |  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  |  |  ------------------
  |  |   44|      0|          , except_code                                 \
  |  |   45|      0|          , val1->getFormattedString()                  \
  |  |   46|      0|          , val2->getFormattedString()                  \
  |  |   47|      0|          , manager);
  ------------------
  620|      0|                                 , baseMaxExclusive
  621|      0|                                 , XMLExcepts::FACET_minExcl_base_maxExcl
  622|      0|                                 , manager)
  623|      0|            }
  624|      0|        }
  625|       |
  626|      0|    }
  627|       |
  628|       |    // check 4.3.10.c2 error:
  629|       |    // minInclusive < base.minInclusive   minInclusive != base.minInclusive if (base.fixed)
  630|       |    // minInclusive > base.maxInclusive
  631|       |    // minInclusive <= base.minExclusive
  632|       |    // minInclusive >= base.maxExclusive
  633|       |
  634|       |
  635|     13|    if ((thisFacetsDefined & DatatypeValidator::FACET_MININCLUSIVE) != 0)
  ------------------
  |  Branch (635:9): [True: 6, False: 7]
  ------------------
  636|      6|    {
  637|      6|        if ((baseFacetsDefined & DatatypeValidator::FACET_MININCLUSIVE) != 0)
  ------------------
  |  Branch (637:13): [True: 4, False: 2]
  ------------------
  638|      4|        {
  639|      4|            int result = compareValues(thisMinInclusive, baseMinInclusive);
  640|       |
  641|      4|            if (((baseFixed & DatatypeValidator::FACET_MININCLUSIVE) != 0) &&
  ------------------
  |  Branch (641:17): [True: 0, False: 4]
  ------------------
  642|      4|                 (result != 0 ))
  ------------------
  |  Branch (642:18): [True: 0, False: 0]
  ------------------
  643|      0|            {
  644|      0|                REPORT_FACET_ERROR(thisMinInclusive
  ------------------
  |  |   43|      0|  ThrowXMLwithMemMgr2(InvalidDatatypeFacetException               \
  |  |  ------------------
  |  |  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  |  |  ------------------
  |  |   44|      0|          , except_code                                 \
  |  |   45|      0|          , val1->getFormattedString()                  \
  |  |   46|      0|          , val2->getFormattedString()                  \
  |  |   47|      0|          , manager);
  ------------------
  645|      0|                                 , baseMinInclusive
  646|      0|                                 , XMLExcepts::FACET_minIncl_base_fixed
  647|      0|                                 , manager)
  648|      0|            }
  649|       |
  650|      4|            if (result == -1 || result == INDETERMINATE)
  ------------------
  |  Branch (650:17): [True: 0, False: 4]
  |  Branch (650:33): [True: 0, False: 4]
  ------------------
  651|      0|            {
  652|      0|                REPORT_FACET_ERROR(thisMinInclusive
  ------------------
  |  |   43|      0|  ThrowXMLwithMemMgr2(InvalidDatatypeFacetException               \
  |  |  ------------------
  |  |  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  |  |  ------------------
  |  |   44|      0|          , except_code                                 \
  |  |   45|      0|          , val1->getFormattedString()                  \
  |  |   46|      0|          , val2->getFormattedString()                  \
  |  |   47|      0|          , manager);
  ------------------
  653|      0|                                 , baseMinInclusive
  654|      0|                                 , XMLExcepts::FACET_minIncl_base_minIncl
  655|      0|                                 , manager)
  656|      0|            }
  657|      4|        }
  658|       |
  659|      6|        if (( baseFacetsDefined & DatatypeValidator::FACET_MAXINCLUSIVE) != 0)
  ------------------
  |  Branch (659:13): [True: 3, False: 3]
  ------------------
  660|      3|        {
  661|      3|            int result = compareValues(thisMinInclusive, baseMaxInclusive);
  662|      3|            if (result == 1 || result == INDETERMINATE)
  ------------------
  |  Branch (662:17): [True: 0, False: 3]
  |  Branch (662:32): [True: 0, False: 3]
  ------------------
  663|      0|            {
  664|      0|                REPORT_FACET_ERROR(thisMinInclusive
  ------------------
  |  |   43|      0|  ThrowXMLwithMemMgr2(InvalidDatatypeFacetException               \
  |  |  ------------------
  |  |  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  |  |  ------------------
  |  |   44|      0|          , except_code                                 \
  |  |   45|      0|          , val1->getFormattedString()                  \
  |  |   46|      0|          , val2->getFormattedString()                  \
  |  |   47|      0|          , manager);
  ------------------
  665|      0|                                 , baseMaxInclusive
  666|      0|                                 , XMLExcepts::FACET_minIncl_base_maxIncl
  667|      0|                                 , manager)
  668|      0|            }
  669|      3|        }
  670|       |
  671|      6|        if (( baseFacetsDefined & DatatypeValidator::FACET_MINEXCLUSIVE) != 0)
  ------------------
  |  Branch (671:13): [True: 0, False: 6]
  ------------------
  672|      0|        {
  673|      0|            int result = compareValues(thisMinInclusive, baseMinExclusive);
  674|      0|            if (result != 1)
  ------------------
  |  Branch (674:17): [True: 0, False: 0]
  ------------------
  675|      0|            {
  676|      0|                REPORT_FACET_ERROR(thisMinInclusive
  ------------------
  |  |   43|      0|  ThrowXMLwithMemMgr2(InvalidDatatypeFacetException               \
  |  |  ------------------
  |  |  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  |  |  ------------------
  |  |   44|      0|          , except_code                                 \
  |  |   45|      0|          , val1->getFormattedString()                  \
  |  |   46|      0|          , val2->getFormattedString()                  \
  |  |   47|      0|          , manager);
  ------------------
  677|      0|                                 , baseMinExclusive
  678|      0|                                 , XMLExcepts::FACET_minIncl_base_minExcl
  679|      0|                                 , manager)
  680|      0|            }
  681|      0|        }
  682|       |
  683|      6|        if (( baseFacetsDefined & DatatypeValidator::FACET_MAXEXCLUSIVE) != 0)
  ------------------
  |  Branch (683:13): [True: 0, False: 6]
  ------------------
  684|      0|        {
  685|      0|            int result = compareValues(thisMinInclusive, baseMaxExclusive);
  686|      0|            if (result != -1)
  ------------------
  |  Branch (686:17): [True: 0, False: 0]
  ------------------
  687|      0|            {
  688|      0|                REPORT_FACET_ERROR(thisMinInclusive
  ------------------
  |  |   43|      0|  ThrowXMLwithMemMgr2(InvalidDatatypeFacetException               \
  |  |  ------------------
  |  |  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  |  |  ------------------
  |  |   44|      0|          , except_code                                 \
  |  |   45|      0|          , val1->getFormattedString()                  \
  |  |   46|      0|          , val2->getFormattedString()                  \
  |  |   47|      0|          , manager);
  ------------------
  689|      0|                                 , baseMaxExclusive
  690|      0|                                 , XMLExcepts::FACET_minIncl_base_maxExcl
  691|      0|                                 , manager)
  692|      0|            }
  693|      0|        }
  694|       |
  695|      6|    }
  696|       |
  697|     13|    checkAdditionalFacetConstraintsBase(manager);
  698|       |
  699|       |    // check 4.3.5.c0 must: enumeration values from the value space of base
  700|       |    //
  701|       |    // In fact, the values in the enumeration shall go through validation
  702|       |    // of this class as well.
  703|       |    // this->checkContent(value, false);
  704|       |    //
  705|     13|    if ( ((thisFacetsDefined & DatatypeValidator::FACET_ENUMERATION) != 0) &&
  ------------------
  |  Branch (705:10): [True: 0, False: 13]
  ------------------
  706|     13|        ( fStrEnumeration ))
  ------------------
  |  Branch (706:9): [True: 0, False: 0]
  ------------------
  707|      0|    {
  708|      0|        setEnumeration(manager);
  709|      0|    }
  710|       |
  711|       |    //
  712|       |    // maxInclusive, maxExclusive, minInclusive and minExclusive
  713|       |    // shall come from the base's value space as well
  714|       |    //
  715|       |
  716|     13|    FROM_BASE_VALUE_SPACE(thisMaxInclusive
  ------------------
  |  |   50|     13|  if ((thisFacetsDefined & facetFlag) != 0)                   \
  |  |  ------------------
  |  |  |  Branch (50:7): [True: 10, False: 3]
  |  |  ------------------
  |  |   51|     10|{                                                             \
  |  |   52|     10|    try                                                       \
  |  |   53|     10|{                                                             \
  |  |   54|     10|        numBase->checkContent(val->getRawData(), (ValidationContext*)0, false, manager);      \
  |  |   55|     10|}                                                             \
  |  |   56|     10|    catch ( XMLException& )                                   \
  |  |   57|      0|{                                                             \
  |  |   58|      0|        ThrowXMLwithMemMgr1(InvalidDatatypeFacetException               \
  |  |  ------------------
  |  |  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  |  |  ------------------
  |  |   59|      0|                , except_code                                 \
  |  |   60|      0|                , val->getRawData()                           \
  |  |   61|      0|                , manager);                                   \
  |  |   62|      0|}                                                             \
  |  |   63|     10|}
  ------------------
  717|     13|                        , DatatypeValidator::FACET_MAXINCLUSIVE
  718|     13|                        , XMLExcepts::FACET_maxIncl_notFromBase
  719|     13|                        , manager)
  720|       |
  721|     13|    FROM_BASE_VALUE_SPACE(thisMinInclusive
  ------------------
  |  |   50|     13|  if ((thisFacetsDefined & facetFlag) != 0)                   \
  |  |  ------------------
  |  |  |  Branch (50:7): [True: 6, False: 7]
  |  |  ------------------
  |  |   51|      6|{                                                             \
  |  |   52|      6|    try                                                       \
  |  |   53|      6|{                                                             \
  |  |   54|      6|        numBase->checkContent(val->getRawData(), (ValidationContext*)0, false, manager);      \
  |  |   55|      6|}                                                             \
  |  |   56|      6|    catch ( XMLException& )                                   \
  |  |   57|      0|{                                                             \
  |  |   58|      0|        ThrowXMLwithMemMgr1(InvalidDatatypeFacetException               \
  |  |  ------------------
  |  |  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  |  |  ------------------
  |  |   59|      0|                , except_code                                 \
  |  |   60|      0|                , val->getRawData()                           \
  |  |   61|      0|                , manager);                                   \
  |  |   62|      0|}                                                             \
  |  |   63|      6|}
  ------------------
  722|     13|                        , DatatypeValidator::FACET_MININCLUSIVE
  723|     13|                        , XMLExcepts::FACET_minIncl_notFromBase
  724|     13|                        , manager)
  725|       |
  726|     13|} //end of inspectFacetBase
_ZN11xercesc_3_229AbstractNumericFacetValidator12inheritFacetEv:
  734|     13|{
  735|       |
  736|     13|    AbstractNumericFacetValidator* numBase = (AbstractNumericFacetValidator*) getBaseValidator();
  737|     13|    if (!numBase)
  ------------------
  |  Branch (737:9): [True: 0, False: 13]
  ------------------
  738|      0|        return;
  739|       |
  740|     13|    int thisFacetsDefined = getFacetsDefined();
  741|     13|    int baseFacetsDefined = numBase->getFacetsDefined();
  742|       |
  743|       |    // inherit enumeration
  744|     13|    if ((( baseFacetsDefined & DatatypeValidator::FACET_ENUMERATION) != 0) &&
  ------------------
  |  Branch (744:9): [True: 0, False: 13]
  ------------------
  745|     13|        (( thisFacetsDefined & DatatypeValidator::FACET_ENUMERATION) == 0))
  ------------------
  |  Branch (745:9): [True: 0, False: 0]
  ------------------
  746|      0|    {
  747|      0|        fEnumeration = numBase->fEnumeration;
  748|      0|        fEnumerationInherited = true;
  749|      0|        setFacetsDefined(DatatypeValidator::FACET_ENUMERATION);
  750|      0|    }
  751|       |
  752|       |    // inherit maxInclusive
  753|     13|    if ((( baseFacetsDefined & DatatypeValidator::FACET_MAXINCLUSIVE) != 0) &&
  ------------------
  |  Branch (753:9): [True: 7, False: 6]
  ------------------
  754|     13|        (( thisFacetsDefined & DatatypeValidator::FACET_MAXEXCLUSIVE) == 0) &&
  ------------------
  |  Branch (754:9): [True: 7, False: 0]
  ------------------
  755|     13|        (( thisFacetsDefined & DatatypeValidator::FACET_MAXINCLUSIVE) == 0) )
  ------------------
  |  Branch (755:9): [True: 0, False: 7]
  ------------------
  756|      0|    {
  757|      0|        fMaxInclusive = numBase->getMaxInclusive();
  758|      0|        fMaxInclusiveInherited = true;
  759|      0|        setFacetsDefined(DatatypeValidator::FACET_MAXINCLUSIVE);
  760|      0|    }
  761|       |
  762|       |    // inherit maxExclusive
  763|     13|    if ((( baseFacetsDefined & DatatypeValidator::FACET_MAXEXCLUSIVE) != 0) &&
  ------------------
  |  Branch (763:9): [True: 0, False: 13]
  ------------------
  764|     13|        (( thisFacetsDefined & DatatypeValidator::FACET_MAXEXCLUSIVE) == 0) &&
  ------------------
  |  Branch (764:9): [True: 0, False: 0]
  ------------------
  765|     13|        (( thisFacetsDefined & DatatypeValidator::FACET_MAXINCLUSIVE) == 0) )
  ------------------
  |  Branch (765:9): [True: 0, False: 0]
  ------------------
  766|      0|    {
  767|      0|        fMaxExclusive = numBase->getMaxExclusive();
  768|      0|        fMaxExclusiveInherited = true;
  769|      0|        setFacetsDefined(DatatypeValidator::FACET_MAXEXCLUSIVE);
  770|      0|    }
  771|       |
  772|       |    // inherit minExclusive
  773|     13|    if ((( baseFacetsDefined & DatatypeValidator::FACET_MININCLUSIVE) != 0) &&
  ------------------
  |  Branch (773:9): [True: 8, False: 5]
  ------------------
  774|     13|        (( thisFacetsDefined & DatatypeValidator::FACET_MINEXCLUSIVE) == 0) &&
  ------------------
  |  Branch (774:9): [True: 8, False: 0]
  ------------------
  775|     13|        (( thisFacetsDefined & DatatypeValidator::FACET_MININCLUSIVE) == 0) )
  ------------------
  |  Branch (775:9): [True: 4, False: 4]
  ------------------
  776|      4|    {
  777|      4|        fMinInclusive = numBase->getMinInclusive();
  778|      4|        fMinInclusiveInherited = true;
  779|      4|        setFacetsDefined(DatatypeValidator::FACET_MININCLUSIVE);
  780|      4|    }
  781|       |
  782|       |    // inherit minExclusive
  783|     13|    if ((( baseFacetsDefined & DatatypeValidator::FACET_MINEXCLUSIVE) != 0) &&
  ------------------
  |  Branch (783:9): [True: 0, False: 13]
  ------------------
  784|     13|        (( thisFacetsDefined & DatatypeValidator::FACET_MINEXCLUSIVE) == 0) &&
  ------------------
  |  Branch (784:9): [True: 0, False: 0]
  ------------------
  785|     13|        (( thisFacetsDefined & DatatypeValidator::FACET_MININCLUSIVE) == 0) )
  ------------------
  |  Branch (785:9): [True: 0, False: 0]
  ------------------
  786|      0|    {
  787|      0|        fMinExclusive = numBase->getMinExclusive();
  788|      0|        fMinExclusiveInherited = true;
  789|      0|        setFacetsDefined(DatatypeValidator::FACET_MINEXCLUSIVE);
  790|      0|    }
  791|       |
  792|     13|    inheritAdditionalFacet();
  793|       |
  794|       |    // inherit "fixed" option
  795|     13|    setFixed(getFixed() | numBase->getFixed());
  796|       |
  797|     13|}

_ZNK11xercesc_3_229AbstractNumericFacetValidator15getMaxInclusiveEv:
  171|     49|{
  172|     49|    return fMaxInclusive;
  173|     49|}
_ZNK11xercesc_3_229AbstractNumericFacetValidator15getMaxExclusiveEv:
  176|     39|{
  177|     39|    return fMaxExclusive;
  178|     39|}
_ZNK11xercesc_3_229AbstractNumericFacetValidator15getMinInclusiveEv:
  181|     54|{
  182|     54|    return fMinInclusive;
  183|     54|}
_ZNK11xercesc_3_229AbstractNumericFacetValidator15getMinExclusiveEv:
  186|     39|{
  187|     39|    return fMinExclusive;
  188|     39|}
_ZNK11xercesc_3_229AbstractNumericFacetValidator14getEnumerationEv:
  191|     16|{
  192|     16|    return fEnumeration;
  193|     16|}

_ZN11xercesc_3_224AbstractNumericValidatorC2EPNS_17DatatypeValidatorEPNS_14RefHashTableOfINS_12KVStringPairENS_12StringHasherEEEiNS1_13ValidatorTypeEPNS_13MemoryManagerE:
   50|     16|:AbstractNumericFacetValidator(baseValidator, facets, finalSet, type, manager)
   51|     16|{
   52|       |    //do not invoke init() here !!!
   53|     16|}
_ZN11xercesc_3_224AbstractNumericValidator11boundsCheckEPKNS_9XMLNumberEPNS_13MemoryManagerE:
   64|     16|{
   65|     16|    int thisFacetsDefined = getFacetsDefined();
   66|     16|    int result;
   67|       |
   68|     16|    if (thisFacetsDefined == 0)
  ------------------
  |  Branch (68:9): [True: 0, False: 16]
  ------------------
   69|      0|        return;
   70|       |
   71|       |    // must be < MaxExclusive
   72|     16|    if ( (thisFacetsDefined & DatatypeValidator::FACET_MAXEXCLUSIVE) != 0 )
  ------------------
  |  Branch (72:10): [True: 0, False: 16]
  ------------------
   73|      0|    {
   74|      0|        result = compareValues(theData, getMaxExclusive());
   75|      0|        if ( result != -1)
  ------------------
  |  Branch (75:14): [True: 0, False: 0]
  ------------------
   76|      0|        {
   77|      0|            REPORT_VALUE_ERROR(theData
  ------------------
  |  |   32|      0|  ThrowXMLwithMemMgr2(InvalidDatatypeValueException               \
  |  |  ------------------
  |  |  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  |  |  ------------------
  |  |   33|      0|          , except_code                                 \
  |  |   34|      0|          , val1->getFormattedString()                  \
  |  |   35|      0|          , val2->getFormattedString()                  \
  |  |   36|      0|          , manager);
  ------------------
   78|      0|                                 , getMaxExclusive()
   79|      0|                                 , XMLExcepts::VALUE_exceed_maxExcl
   80|      0|                                 , manager)
   81|      0|        }
   82|      0|    } 	
   83|       |
   84|       |    // must be <= MaxInclusive
   85|     16|    if ( (thisFacetsDefined & DatatypeValidator::FACET_MAXINCLUSIVE) != 0 )
  ------------------
  |  Branch (85:10): [True: 10, False: 6]
  ------------------
   86|     10|    {
   87|     10|        result = compareValues(theData, getMaxInclusive());
   88|     10|        if (result == 1)
  ------------------
  |  Branch (88:13): [True: 0, False: 10]
  ------------------
   89|      0|        {
   90|      0|            REPORT_VALUE_ERROR(theData
  ------------------
  |  |   32|      0|  ThrowXMLwithMemMgr2(InvalidDatatypeValueException               \
  |  |  ------------------
  |  |  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  |  |  ------------------
  |  |   33|      0|          , except_code                                 \
  |  |   34|      0|          , val1->getFormattedString()                  \
  |  |   35|      0|          , val2->getFormattedString()                  \
  |  |   36|      0|          , manager);
  ------------------
   91|      0|                             , getMaxInclusive()
   92|      0|                             , XMLExcepts::VALUE_exceed_maxIncl
   93|      0|                             , manager)
   94|      0|        }
   95|     10|    }
   96|       |
   97|       |    // must be >= MinInclusive
   98|     16|    if ( (thisFacetsDefined & DatatypeValidator::FACET_MININCLUSIVE) != 0 )
  ------------------
  |  Branch (98:10): [True: 11, False: 5]
  ------------------
   99|     11|    {
  100|     11|        result = compareValues(theData, getMinInclusive());
  101|     11|        if (result == -1)
  ------------------
  |  Branch (101:13): [True: 0, False: 11]
  ------------------
  102|      0|        {
  103|      0|            REPORT_VALUE_ERROR(theData
  ------------------
  |  |   32|      0|  ThrowXMLwithMemMgr2(InvalidDatatypeValueException               \
  |  |  ------------------
  |  |  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  |  |  ------------------
  |  |   33|      0|          , except_code                                 \
  |  |   34|      0|          , val1->getFormattedString()                  \
  |  |   35|      0|          , val2->getFormattedString()                  \
  |  |   36|      0|          , manager);
  ------------------
  104|      0|                             , getMinInclusive()
  105|      0|                             , XMLExcepts::VALUE_exceed_minIncl
  106|      0|                             , manager)
  107|      0|        }
  108|     11|    }
  109|       |
  110|       |    // must be > MinExclusive
  111|     16|    if ( (thisFacetsDefined & DatatypeValidator::FACET_MINEXCLUSIVE) != 0 )
  ------------------
  |  Branch (111:10): [True: 0, False: 16]
  ------------------
  112|      0|    {
  113|      0|        result = compareValues(theData, getMinExclusive());
  114|      0|        if (result != 1)
  ------------------
  |  Branch (114:13): [True: 0, False: 0]
  ------------------
  115|      0|        {
  116|      0|            REPORT_VALUE_ERROR(theData
  ------------------
  |  |   32|      0|  ThrowXMLwithMemMgr2(InvalidDatatypeValueException               \
  |  |  ------------------
  |  |  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  |  |  ------------------
  |  |   33|      0|          , except_code                                 \
  |  |   34|      0|          , val1->getFormattedString()                  \
  |  |   35|      0|          , val2->getFormattedString()                  \
  |  |   36|      0|          , manager);
  ------------------
  117|      0|                             , getMinExclusive()
  118|      0|                             , XMLExcepts::VALUE_exceed_minExcl
  119|      0|                             , manager)
  120|      0|        }
  121|      0|    }
  122|     16|}

_ZN11xercesc_3_224AbstractNumericValidator4initEPNS_16RefArrayVectorOfIDsEEPNS_13MemoryManagerE:
   99|     13|{
  100|     13|    AbstractNumericFacetValidator::init(enums, manager);
  101|     13|}

_ZN11xercesc_3_223AbstractStringValidatorC2EPNS_17DatatypeValidatorEPNS_14RefHashTableOfINS_12KVStringPairENS_12StringHasherEEEiNS1_13ValidatorTypeEPNS_13MemoryManagerE:
   78|     18|:DatatypeValidator(baseValidator, facets, finalSet, type, manager)
   79|     18|,fLength(0)
   80|     18|,fMaxLength(SchemaSymbols::fgINT_MAX_VALUE)
   81|     18|,fMinLength(0)
   82|     18|,fEnumerationInherited(false)
   83|     18|,fEnumeration(0)
   84|     18|{
   85|       |    // init() is invoked from derived class's ctor instead of from
   86|       |    // here to allow correct resolution of virutal method, such as
   87|       |    // assigneAdditionalFacet(), inheritAdditionalFacet().
   88|     18|}
_ZN11xercesc_3_223AbstractStringValidator4initEPNS_16RefArrayVectorOfIDsEEPNS_13MemoryManagerE:
   92|     12|{
   93|       |
   94|     12|    if (enums)
  ------------------
  |  Branch (94:9): [True: 0, False: 12]
  ------------------
   95|      0|    {
   96|      0|        setEnumeration(enums, false);
   97|      0|        normalizeEnumeration(manager);
   98|      0|    }
   99|       |
  100|     12|    assignFacet(manager);
  101|     12|    inspectFacet(manager);
  102|     12|    inspectFacetBase(manager);
  103|     12|    inheritFacet();
  104|       |
  105|     12|}
_ZN11xercesc_3_223AbstractStringValidator11assignFacetEPNS_13MemoryManagerE:
  113|     12|{
  114|       |
  115|     12|    RefHashTableOf<KVStringPair>* facets = getFacets();
  116|       |
  117|     12|    if (!facets)
  ------------------
  |  Branch (117:9): [True: 5, False: 7]
  ------------------
  118|      5|        return;
  119|       |
  120|      7|    XMLCh* key;
  121|      7|    RefHashTableOfEnumerator<KVStringPair> e(facets, false, manager);
  122|       |
  123|     15|    while (e.hasMoreElements())
  ------------------
  |  Branch (123:12): [True: 8, False: 7]
  ------------------
  124|      8|    {
  125|      8|        KVStringPair pair = e.nextElement();
  126|      8|        key = pair.getKey();
  127|      8|        XMLCh* value = pair.getValue();
  128|       |
  129|      8|        if (XMLString::equals(key, SchemaSymbols::fgELT_LENGTH))
  ------------------
  |  Branch (129:13): [True: 0, False: 8]
  ------------------
  130|      0|        {
  131|      0|            int val;
  132|      0|            try
  133|      0|            {
  134|      0|                val = XMLString::parseInt(value, manager);
  135|      0|            }
  136|      0|            catch (NumberFormatException&)
  137|      0|            {
  138|      0|                ThrowXMLwithMemMgr1(InvalidDatatypeFacetException, XMLExcepts::FACET_Invalid_Len, value, manager);
  ------------------
  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
  139|      0|            }
  140|       |
  141|      0|            if ( val < 0 )
  ------------------
  |  Branch (141:18): [True: 0, False: 0]
  ------------------
  142|      0|                ThrowXMLwithMemMgr1(InvalidDatatypeFacetException, XMLExcepts::FACET_NonNeg_Len, value, manager);
  ------------------
  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
  143|       |
  144|      0|            setLength(val);
  145|      0|            setFacetsDefined(DatatypeValidator::FACET_LENGTH);
  146|      0|        }
  147|      8|        else if (XMLString::equals(key, SchemaSymbols::fgELT_MINLENGTH))
  ------------------
  |  Branch (147:18): [True: 3, False: 5]
  ------------------
  148|      3|        {
  149|      3|            int val;
  150|      3|            try
  151|      3|            {
  152|      3|                val = XMLString::parseInt(value, manager);
  153|      3|            }
  154|      3|            catch (NumberFormatException&)
  155|      3|            {
  156|      0|                ThrowXMLwithMemMgr1(InvalidDatatypeFacetException, XMLExcepts::FACET_Invalid_minLen, value, manager);
  ------------------
  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
  157|      0|            }
  158|       |
  159|      3|            if ( val < 0 )
  ------------------
  |  Branch (159:18): [True: 0, False: 3]
  ------------------
  160|      0|                ThrowXMLwithMemMgr1(InvalidDatatypeFacetException, XMLExcepts::FACET_NonNeg_minLen, value, manager);
  ------------------
  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
  161|       |
  162|      3|            setMinLength(val);
  163|      3|            setFacetsDefined(DatatypeValidator::FACET_MINLENGTH);
  164|      3|        }
  165|      5|        else if (XMLString::equals(key, SchemaSymbols::fgELT_MAXLENGTH))
  ------------------
  |  Branch (165:18): [True: 0, False: 5]
  ------------------
  166|      0|        {
  167|      0|            int val;
  168|      0|            try
  169|      0|            {
  170|      0|                val = XMLString::parseInt(value, manager);
  171|      0|            }
  172|      0|            catch (NumberFormatException&)
  173|      0|            {
  174|      0|                ThrowXMLwithMemMgr1(InvalidDatatypeFacetException, XMLExcepts::FACET_Invalid_maxLen, value, manager);
  ------------------
  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
  175|      0|            }
  176|       |
  177|      0|            if ( val < 0 )
  ------------------
  |  Branch (177:18): [True: 0, False: 0]
  ------------------
  178|      0|                ThrowXMLwithMemMgr1(InvalidDatatypeFacetException, XMLExcepts::FACET_NonNeg_maxLen, value, manager);
  ------------------
  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
  179|       |
  180|      0|            setMaxLength(val);
  181|      0|            setFacetsDefined(DatatypeValidator::FACET_MAXLENGTH);
  182|      0|        }
  183|      5|        else if (XMLString::equals(key, SchemaSymbols::fgELT_PATTERN))
  ------------------
  |  Branch (183:18): [True: 2, False: 3]
  ------------------
  184|      2|        {
  185|      2|            setPattern(value);
  186|      2|            if (getPattern())
  ------------------
  |  Branch (186:17): [True: 2, False: 0]
  ------------------
  187|      2|                setFacetsDefined(DatatypeValidator::FACET_PATTERN);
  188|       |            // do not construct regex until needed
  189|      2|        }
  190|      3|        else if (XMLString::equals(key, SchemaSymbols::fgATT_FIXED))
  ------------------
  |  Branch (190:18): [True: 0, False: 3]
  ------------------
  191|      0|        {
  192|      0|            unsigned int val;
  193|      0|            bool         retStatus;
  194|      0|            try
  195|      0|            {
  196|      0|                retStatus = XMLString::textToBin(value, val, fMemoryManager);
  197|      0|            }
  198|      0|            catch (RuntimeException&)
  199|      0|            {
  200|      0|                ThrowXMLwithMemMgr(InvalidDatatypeFacetException, XMLExcepts::FACET_internalError_fixed, manager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  201|      0|            }
  202|       |
  203|      0|            if (!retStatus)
  ------------------
  |  Branch (203:17): [True: 0, False: 0]
  ------------------
  204|      0|            {
  205|      0|                ThrowXMLwithMemMgr(InvalidDatatypeFacetException, XMLExcepts::FACET_internalError_fixed, manager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  206|      0|            }
  207|       |
  208|      0|            setFixed(val);
  209|       |            //no setFacetsDefined here
  210|      0|        }
  211|       |        //
  212|       |        // else if (XMLString::equals(key, SchemaSymbols::fgELT_SPECIAL_TOKEN))
  213|       |        // TODO
  214|       |        //
  215|       |        // Note: whitespace is taken care of by TraverseSchema.
  216|       |        //
  217|      3|        else
  218|      3|        {
  219|      3|            assignAdditionalFacet(key, value, manager);
  220|      3|        }
  221|      8|    }//while
  222|      7|}//end of assigneFacet()
_ZN11xercesc_3_223AbstractStringValidator12inspectFacetEPNS_13MemoryManagerE:
  230|     12|{
  231|       |
  232|     12|    int thisFacetsDefined = getFacetsDefined();
  233|       |
  234|     12|    if (!thisFacetsDefined)
  ------------------
  |  Branch (234:9): [True: 5, False: 7]
  ------------------
  235|      5|        return;
  236|       |
  237|       |    // check 4.3.1.c1 error: length & (maxLength | minLength)
  238|      7|    if ((thisFacetsDefined & DatatypeValidator::FACET_LENGTH) != 0)
  ------------------
  |  Branch (238:9): [True: 0, False: 7]
  ------------------
  239|      0|    {
  240|      0|        if ((thisFacetsDefined & DatatypeValidator::FACET_MAXLENGTH) != 0)
  ------------------
  |  Branch (240:13): [True: 0, False: 0]
  ------------------
  241|      0|            ThrowXMLwithMemMgr(InvalidDatatypeFacetException, XMLExcepts::FACET_Len_maxLen, manager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  242|      0|        else if (((thisFacetsDefined & DatatypeValidator::FACET_MINLENGTH) != 0))
  ------------------
  |  Branch (242:18): [True: 0, False: 0]
  ------------------
  243|      0|            ThrowXMLwithMemMgr(InvalidDatatypeFacetException, XMLExcepts::FACET_Len_minLen, manager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  244|      0|    }
  245|       |
  246|       |    // check 4.3.2.c1 must: minLength <= maxLength
  247|      7|    if ((thisFacetsDefined & (DatatypeValidator::FACET_MINLENGTH
  ------------------
  |  Branch (247:9): [True: 3, False: 4]
  ------------------
  248|      7|        |DatatypeValidator::FACET_MAXLENGTH)) != 0)
  249|      3|    {
  250|      3|        XMLSize_t thisMinLength = getMinLength();
  251|      3|        XMLSize_t thisMaxLength = getMaxLength();
  252|      3|        if ( thisMinLength > thisMaxLength )
  ------------------
  |  Branch (252:14): [True: 0, False: 3]
  ------------------
  253|      0|        {
  254|      0|            REPORT_FACET_ERROR(thisMaxLength
  ------------------
  |  |   37|      0|    XMLCh value1[BUF_LEN+1]; \
  |  |   38|      0|    XMLCh value2[BUF_LEN+1]; \
  |  |   39|      0|   XMLString::sizeToText(val1, value1, BUF_LEN, 10, manager);     \
  |  |   40|      0|   XMLString::sizeToText(val2, value2, BUF_LEN, 10, manager);     \
  |  |   41|      0|   ThrowXMLwithMemMgr2(InvalidDatatypeFacetException              \
  |  |  ------------------
  |  |  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  |  |  ------------------
  |  |   42|      0|           , except_code                                \
  |  |   43|      0|           , value1                                     \
  |  |   44|      0|           , value2                                     \
  |  |   45|      0|           , manager);
  ------------------
  255|      0|                             , thisMinLength
  256|      0|                             , XMLExcepts::FACET_maxLen_minLen
  257|      0|                             , manager)
  258|      0|        }
  259|      3|    }
  260|       |
  261|      7|}// end of inspectFacet()
_ZN11xercesc_3_223AbstractStringValidator16inspectFacetBaseEPNS_13MemoryManagerE:
  270|      9|{
  271|       |
  272|      9|    AbstractStringValidator *pBaseValidator = (AbstractStringValidator*) getBaseValidator();
  273|      9|    int thisFacetsDefined = getFacetsDefined();
  274|       |
  275|      9|    if ( (!thisFacetsDefined && !fEnumeration) ||
  ------------------
  |  Branch (275:11): [True: 5, False: 4]
  |  Branch (275:33): [True: 5, False: 0]
  ------------------
  276|      9|         (!pBaseValidator)                      )
  ------------------
  |  Branch (276:10): [True: 0, False: 4]
  ------------------
  277|      5|        return;
  278|       |
  279|      4|    int baseFacetsDefined = pBaseValidator->getFacetsDefined();
  280|       |
  281|      4|    XMLSize_t thisLength    = getLength();
  282|      4|    XMLSize_t thisMinLength = getMinLength();
  283|      4|    XMLSize_t thisMaxLength = getMaxLength();
  284|       |
  285|      4|    XMLSize_t baseLength    = pBaseValidator->getLength();
  286|      4|    XMLSize_t baseMinLength = pBaseValidator->getMinLength();
  287|      4|    XMLSize_t baseMaxLength = pBaseValidator->getMaxLength();
  288|      4|    int baseFixed     = pBaseValidator->getFixed();
  289|       |
  290|       |    /***
  291|       |       check facets against base.facets
  292|       |       Note: later we need to check the "fix" option of the base type
  293|       |            and apply that to every individual facet.
  294|       |    ***/
  295|       |
  296|       |    /***
  297|       |                Non coexistence of derived' length and base'    (minLength | maxLength)
  298|       |                                   base'    length and derived' (minLength | maxLength)
  299|       |
  300|       |     E2-35
  301|       |     It is an error for both length and either of minLength or maxLength to be members of {facets},
  302|       |     unless they are specified in different derivation steps in which case the following must be true:
  303|       |     the {value} of minLength <= the {value} of length <= the {value} of maxLength
  304|       |    ***/
  305|       |
  306|       |    // error: length > base.maxLength
  307|       |    //        length < base.minLength
  308|      4|    if ((thisFacetsDefined & DatatypeValidator::FACET_LENGTH) !=0)
  ------------------
  |  Branch (308:9): [True: 0, False: 4]
  ------------------
  309|      0|    {
  310|      0|        if (((baseFacetsDefined & DatatypeValidator::FACET_MAXLENGTH) !=0) &&
  ------------------
  |  Branch (310:13): [True: 0, False: 0]
  ------------------
  311|      0|             (thisLength > baseMaxLength)                                   )
  ------------------
  |  Branch (311:14): [True: 0, False: 0]
  ------------------
  312|      0|        {
  313|      0|            REPORT_FACET_ERROR(thisLength
  ------------------
  |  |   37|      0|    XMLCh value1[BUF_LEN+1]; \
  |  |   38|      0|    XMLCh value2[BUF_LEN+1]; \
  |  |   39|      0|   XMLString::sizeToText(val1, value1, BUF_LEN, 10, manager);     \
  |  |   40|      0|   XMLString::sizeToText(val2, value2, BUF_LEN, 10, manager);     \
  |  |   41|      0|   ThrowXMLwithMemMgr2(InvalidDatatypeFacetException              \
  |  |  ------------------
  |  |  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  |  |  ------------------
  |  |   42|      0|           , except_code                                \
  |  |   43|      0|           , value1                                     \
  |  |   44|      0|           , value2                                     \
  |  |   45|      0|           , manager);
  ------------------
  314|      0|                             , baseMaxLength
  315|      0|                             , XMLExcepts::FACET_Len_baseMaxLen
  316|      0|                             , manager)
  317|      0|        }
  318|       |
  319|      0|        if (((baseFacetsDefined & DatatypeValidator::FACET_MINLENGTH) !=0) &&
  ------------------
  |  Branch (319:13): [True: 0, False: 0]
  ------------------
  320|      0|             (thisLength < baseMinLength)                                   )
  ------------------
  |  Branch (320:14): [True: 0, False: 0]
  ------------------
  321|      0|        {
  322|      0|            REPORT_FACET_ERROR(thisLength
  ------------------
  |  |   37|      0|    XMLCh value1[BUF_LEN+1]; \
  |  |   38|      0|    XMLCh value2[BUF_LEN+1]; \
  |  |   39|      0|   XMLString::sizeToText(val1, value1, BUF_LEN, 10, manager);     \
  |  |   40|      0|   XMLString::sizeToText(val2, value2, BUF_LEN, 10, manager);     \
  |  |   41|      0|   ThrowXMLwithMemMgr2(InvalidDatatypeFacetException              \
  |  |  ------------------
  |  |  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  |  |  ------------------
  |  |   42|      0|           , except_code                                \
  |  |   43|      0|           , value1                                     \
  |  |   44|      0|           , value2                                     \
  |  |   45|      0|           , manager);
  ------------------
  323|      0|                             , baseMinLength
  324|      0|                             , XMLExcepts::FACET_Len_baseMinLen
  325|      0|                             , manager)
  326|      0|        }
  327|      0|    }
  328|       |
  329|       |    // error: baseLength > maxLength
  330|       |    //        baseLength < minLength
  331|      4|    if ((baseFacetsDefined & DatatypeValidator::FACET_LENGTH) !=0)
  ------------------
  |  Branch (331:9): [True: 0, False: 4]
  ------------------
  332|      0|    {
  333|      0|        if (((thisFacetsDefined & DatatypeValidator::FACET_MAXLENGTH) !=0) &&
  ------------------
  |  Branch (333:13): [True: 0, False: 0]
  ------------------
  334|      0|             (baseLength > thisMaxLength)                                   )
  ------------------
  |  Branch (334:14): [True: 0, False: 0]
  ------------------
  335|      0|        {
  336|      0|            REPORT_FACET_ERROR(thisMaxLength
  ------------------
  |  |   37|      0|    XMLCh value1[BUF_LEN+1]; \
  |  |   38|      0|    XMLCh value2[BUF_LEN+1]; \
  |  |   39|      0|   XMLString::sizeToText(val1, value1, BUF_LEN, 10, manager);     \
  |  |   40|      0|   XMLString::sizeToText(val2, value2, BUF_LEN, 10, manager);     \
  |  |   41|      0|   ThrowXMLwithMemMgr2(InvalidDatatypeFacetException              \
  |  |  ------------------
  |  |  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  |  |  ------------------
  |  |   42|      0|           , except_code                                \
  |  |   43|      0|           , value1                                     \
  |  |   44|      0|           , value2                                     \
  |  |   45|      0|           , manager);
  ------------------
  337|      0|                             , baseLength
  338|      0|                             , XMLExcepts::FACET_maxLen_baseLen
  339|      0|                             , manager)
  340|      0|        }
  341|       |
  342|      0|        if (((thisFacetsDefined & DatatypeValidator::FACET_MINLENGTH) !=0) &&
  ------------------
  |  Branch (342:13): [True: 0, False: 0]
  ------------------
  343|      0|             (baseLength < thisMinLength)                                   )
  ------------------
  |  Branch (343:14): [True: 0, False: 0]
  ------------------
  344|      0|        {
  345|      0|            REPORT_FACET_ERROR(thisMinLength
  ------------------
  |  |   37|      0|    XMLCh value1[BUF_LEN+1]; \
  |  |   38|      0|    XMLCh value2[BUF_LEN+1]; \
  |  |   39|      0|   XMLString::sizeToText(val1, value1, BUF_LEN, 10, manager);     \
  |  |   40|      0|   XMLString::sizeToText(val2, value2, BUF_LEN, 10, manager);     \
  |  |   41|      0|   ThrowXMLwithMemMgr2(InvalidDatatypeFacetException              \
  |  |  ------------------
  |  |  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  |  |  ------------------
  |  |   42|      0|           , except_code                                \
  |  |   43|      0|           , value1                                     \
  |  |   44|      0|           , value2                                     \
  |  |   45|      0|           , manager);
  ------------------
  346|      0|                             , baseLength
  347|      0|                             , XMLExcepts::FACET_minLen_baseLen
  348|      0|                             , manager)
  349|      0|        }
  350|      0|    }
  351|       |
  352|       |    // check 4.3.1.c2 error: length != base.length
  353|      4|    if (((thisFacetsDefined & DatatypeValidator::FACET_LENGTH) !=0) &&
  ------------------
  |  Branch (353:9): [True: 0, False: 4]
  ------------------
  354|      4|        ((baseFacetsDefined & DatatypeValidator::FACET_LENGTH) !=0))
  ------------------
  |  Branch (354:9): [True: 0, False: 0]
  ------------------
  355|      0|    {
  356|      0|        if ( thisLength != baseLength )
  ------------------
  |  Branch (356:14): [True: 0, False: 0]
  ------------------
  357|      0|        {
  358|      0|            REPORT_FACET_ERROR(thisLength
  ------------------
  |  |   37|      0|    XMLCh value1[BUF_LEN+1]; \
  |  |   38|      0|    XMLCh value2[BUF_LEN+1]; \
  |  |   39|      0|   XMLString::sizeToText(val1, value1, BUF_LEN, 10, manager);     \
  |  |   40|      0|   XMLString::sizeToText(val2, value2, BUF_LEN, 10, manager);     \
  |  |   41|      0|   ThrowXMLwithMemMgr2(InvalidDatatypeFacetException              \
  |  |  ------------------
  |  |  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  |  |  ------------------
  |  |   42|      0|           , except_code                                \
  |  |   43|      0|           , value1                                     \
  |  |   44|      0|           , value2                                     \
  |  |   45|      0|           , manager);
  ------------------
  359|      0|                             , baseLength
  360|      0|                             , XMLExcepts::FACET_Len_baseLen
  361|      0|                             , manager)
  362|      0|        }
  363|      0|    }
  364|       |
  365|       |    /***
  366|       |                                   |---  derived   ---|
  367|       |                base.minLength <= minLength <= maxLength <= base.maxLength
  368|       |                |-------------------        base      -------------------|
  369|       |    ***/
  370|       |
  371|       |    // check 4.3.2.c1 must: minLength <= base.maxLength
  372|      4|    if (((thisFacetsDefined & DatatypeValidator::FACET_MINLENGTH ) != 0) &&
  ------------------
  |  Branch (372:9): [True: 0, False: 4]
  ------------------
  373|      4|        ((baseFacetsDefined & DatatypeValidator::FACET_MAXLENGTH ) != 0))
  ------------------
  |  Branch (373:9): [True: 0, False: 0]
  ------------------
  374|      0|    {
  375|      0|        if ( thisMinLength > baseMaxLength )
  ------------------
  |  Branch (375:14): [True: 0, False: 0]
  ------------------
  376|      0|        {
  377|      0|            REPORT_FACET_ERROR(thisMinLength
  ------------------
  |  |   37|      0|    XMLCh value1[BUF_LEN+1]; \
  |  |   38|      0|    XMLCh value2[BUF_LEN+1]; \
  |  |   39|      0|   XMLString::sizeToText(val1, value1, BUF_LEN, 10, manager);     \
  |  |   40|      0|   XMLString::sizeToText(val2, value2, BUF_LEN, 10, manager);     \
  |  |   41|      0|   ThrowXMLwithMemMgr2(InvalidDatatypeFacetException              \
  |  |  ------------------
  |  |  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  |  |  ------------------
  |  |   42|      0|           , except_code                                \
  |  |   43|      0|           , value1                                     \
  |  |   44|      0|           , value2                                     \
  |  |   45|      0|           , manager);
  ------------------
  378|      0|                             , baseMaxLength
  379|      0|                             , XMLExcepts::FACET_minLen_basemaxLen
  380|      0|                             , manager)
  381|      0|        }
  382|      0|    }
  383|       |
  384|       |    // check 4.3.2.c2 error: minLength < base.minLength
  385|      4|    if (((thisFacetsDefined & DatatypeValidator::FACET_MINLENGTH) !=0) &&
  ------------------
  |  Branch (385:9): [True: 0, False: 4]
  ------------------
  386|      4|        ((baseFacetsDefined & DatatypeValidator::FACET_MINLENGTH) != 0))
  ------------------
  |  Branch (386:9): [True: 0, False: 0]
  ------------------
  387|      0|    {
  388|      0|        if ((baseFixed & DatatypeValidator::FACET_MINLENGTH) !=0)
  ------------------
  |  Branch (388:13): [True: 0, False: 0]
  ------------------
  389|      0|        {
  390|      0|            if ( thisMinLength != baseMinLength )
  ------------------
  |  Branch (390:18): [True: 0, False: 0]
  ------------------
  391|      0|            {
  392|      0|                REPORT_FACET_ERROR(thisMinLength
  ------------------
  |  |   37|      0|    XMLCh value1[BUF_LEN+1]; \
  |  |   38|      0|    XMLCh value2[BUF_LEN+1]; \
  |  |   39|      0|   XMLString::sizeToText(val1, value1, BUF_LEN, 10, manager);     \
  |  |   40|      0|   XMLString::sizeToText(val2, value2, BUF_LEN, 10, manager);     \
  |  |   41|      0|   ThrowXMLwithMemMgr2(InvalidDatatypeFacetException              \
  |  |  ------------------
  |  |  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  |  |  ------------------
  |  |   42|      0|           , except_code                                \
  |  |   43|      0|           , value1                                     \
  |  |   44|      0|           , value2                                     \
  |  |   45|      0|           , manager);
  ------------------
  393|      0|                                 , baseMinLength
  394|      0|                                 , XMLExcepts::FACET_minLen_base_fixed
  395|      0|                                 , manager)
  396|      0|            }
  397|       |
  398|      0|        }
  399|      0|        else
  400|      0|        {
  401|      0|            if ( thisMinLength < baseMinLength )
  ------------------
  |  Branch (401:18): [True: 0, False: 0]
  ------------------
  402|      0|            {
  403|      0|                REPORT_FACET_ERROR(thisMinLength
  ------------------
  |  |   37|      0|    XMLCh value1[BUF_LEN+1]; \
  |  |   38|      0|    XMLCh value2[BUF_LEN+1]; \
  |  |   39|      0|   XMLString::sizeToText(val1, value1, BUF_LEN, 10, manager);     \
  |  |   40|      0|   XMLString::sizeToText(val2, value2, BUF_LEN, 10, manager);     \
  |  |   41|      0|   ThrowXMLwithMemMgr2(InvalidDatatypeFacetException              \
  |  |  ------------------
  |  |  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  |  |  ------------------
  |  |   42|      0|           , except_code                                \
  |  |   43|      0|           , value1                                     \
  |  |   44|      0|           , value2                                     \
  |  |   45|      0|           , manager);
  ------------------
  404|      0|                                 , baseMinLength
  405|      0|                                 , XMLExcepts::FACET_minLen_baseminLen
  406|      0|                                 , manager)
  407|      0|            }
  408|      0|        }
  409|      0|    }
  410|       |
  411|       |    // check 4.3.2.c1 must: base.minLength <= maxLength
  412|      4|    if (((baseFacetsDefined & DatatypeValidator::FACET_MINLENGTH) !=0) &&
  ------------------
  |  Branch (412:9): [True: 0, False: 4]
  ------------------
  413|      4|        ((thisFacetsDefined & DatatypeValidator::FACET_MAXLENGTH) !=0))
  ------------------
  |  Branch (413:9): [True: 0, False: 0]
  ------------------
  414|      0|    {
  415|      0|        if ( baseMinLength > thisMaxLength )
  ------------------
  |  Branch (415:14): [True: 0, False: 0]
  ------------------
  416|      0|        {
  417|      0|            REPORT_FACET_ERROR(thisMaxLength
  ------------------
  |  |   37|      0|    XMLCh value1[BUF_LEN+1]; \
  |  |   38|      0|    XMLCh value2[BUF_LEN+1]; \
  |  |   39|      0|   XMLString::sizeToText(val1, value1, BUF_LEN, 10, manager);     \
  |  |   40|      0|   XMLString::sizeToText(val2, value2, BUF_LEN, 10, manager);     \
  |  |   41|      0|   ThrowXMLwithMemMgr2(InvalidDatatypeFacetException              \
  |  |  ------------------
  |  |  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  |  |  ------------------
  |  |   42|      0|           , except_code                                \
  |  |   43|      0|           , value1                                     \
  |  |   44|      0|           , value2                                     \
  |  |   45|      0|           , manager);
  ------------------
  418|      0|                             , baseMinLength
  419|      0|                             , XMLExcepts::FACET_maxLen_baseminLen
  420|      0|                             , manager)
  421|      0|        }
  422|      0|    }
  423|       |
  424|       |    // check 4.3.3.c1 error: maxLength > base.maxLength
  425|      4|    if (((thisFacetsDefined & DatatypeValidator::FACET_MAXLENGTH) !=0) &&
  ------------------
  |  Branch (425:9): [True: 0, False: 4]
  ------------------
  426|      4|        ((baseFacetsDefined & DatatypeValidator::FACET_MAXLENGTH) !=0))
  ------------------
  |  Branch (426:9): [True: 0, False: 0]
  ------------------
  427|      0|    {
  428|      0|        if ((baseFixed & DatatypeValidator::FACET_MAXLENGTH) !=0)
  ------------------
  |  Branch (428:13): [True: 0, False: 0]
  ------------------
  429|      0|        {
  430|      0|            if ( thisMaxLength != baseMaxLength )
  ------------------
  |  Branch (430:18): [True: 0, False: 0]
  ------------------
  431|      0|            {
  432|      0|                REPORT_FACET_ERROR(thisMaxLength
  ------------------
  |  |   37|      0|    XMLCh value1[BUF_LEN+1]; \
  |  |   38|      0|    XMLCh value2[BUF_LEN+1]; \
  |  |   39|      0|   XMLString::sizeToText(val1, value1, BUF_LEN, 10, manager);     \
  |  |   40|      0|   XMLString::sizeToText(val2, value2, BUF_LEN, 10, manager);     \
  |  |   41|      0|   ThrowXMLwithMemMgr2(InvalidDatatypeFacetException              \
  |  |  ------------------
  |  |  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  |  |  ------------------
  |  |   42|      0|           , except_code                                \
  |  |   43|      0|           , value1                                     \
  |  |   44|      0|           , value2                                     \
  |  |   45|      0|           , manager);
  ------------------
  433|      0|                                 , baseMaxLength
  434|      0|                                 , XMLExcepts::FACET_maxLen_base_fixed
  435|      0|                                 , manager)
  436|      0|            }
  437|      0|        }
  438|      0|        else
  439|      0|        {
  440|      0|            if ( thisMaxLength > baseMaxLength )
  ------------------
  |  Branch (440:18): [True: 0, False: 0]
  ------------------
  441|      0|            {
  442|      0|                REPORT_FACET_ERROR(thisMaxLength
  ------------------
  |  |   37|      0|    XMLCh value1[BUF_LEN+1]; \
  |  |   38|      0|    XMLCh value2[BUF_LEN+1]; \
  |  |   39|      0|   XMLString::sizeToText(val1, value1, BUF_LEN, 10, manager);     \
  |  |   40|      0|   XMLString::sizeToText(val2, value2, BUF_LEN, 10, manager);     \
  |  |   41|      0|   ThrowXMLwithMemMgr2(InvalidDatatypeFacetException              \
  |  |  ------------------
  |  |  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  |  |  ------------------
  |  |   42|      0|           , except_code                                \
  |  |   43|      0|           , value1                                     \
  |  |   44|      0|           , value2                                     \
  |  |   45|      0|           , manager);
  ------------------
  443|      0|                                 , baseMaxLength
  444|      0|                                 , XMLExcepts::FACET_maxLen_basemaxLen
  445|      0|                                 , manager)
  446|      0|            }
  447|      0|        }
  448|      0|    }
  449|       |
  450|       |    // check 4.3.5.c0 must: enumeration values from the value space of base
  451|      4|    if ( ((thisFacetsDefined & DatatypeValidator::FACET_ENUMERATION) != 0) &&
  ------------------
  |  Branch (451:10): [True: 0, False: 4]
  ------------------
  452|      4|        (getEnumeration() !=0))
  ------------------
  |  Branch (452:9): [True: 0, False: 0]
  ------------------
  453|      0|    {
  454|      0|        XMLSize_t i = 0;
  455|      0|        XMLSize_t enumLength = getEnumeration()->size();
  456|      0|        for ( ; i < enumLength; i++)
  ------------------
  |  Branch (456:17): [True: 0, False: 0]
  ------------------
  457|      0|        {
  458|       |            // ask parent do a complete check
  459|      0|            pBaseValidator->checkContent(getEnumeration()->elementAt(i), (ValidationContext*)0, false, manager);
  460|       |#if 0
  461|       |// spec says that only base has to checkContent
  462|       |            // enum shall pass this->checkContent() as well.
  463|       |            checkContent(getEnumeration()->elementAt(i), (ValidationContext*)0, false, manager);
  464|       |#endif
  465|      0|        }
  466|      0|    }
  467|       |
  468|      4|    checkAdditionalFacetConstraints(manager);
  469|       |
  470|      4|} //end of inspectFacetBase
_ZN11xercesc_3_223AbstractStringValidator12inheritFacetEv:
  478|      9|{
  479|       |    /***
  480|       |        P3. Inherit facets from base.facets
  481|       |
  482|       |        The reason of this inheriting (or copying values) is to ease
  483|       |        schema constraint checking, so that we need NOT trace back to our
  484|       |        very first base validator in the hierachy. Instead, we are pretty
  485|       |        sure checking against immediate base validator is enough.
  486|       |    ***/
  487|       |
  488|      9|    AbstractStringValidator *pBaseValidator = (AbstractStringValidator*) getBaseValidator();
  489|       |
  490|      9|    if (!pBaseValidator)
  ------------------
  |  Branch (490:9): [True: 0, False: 9]
  ------------------
  491|      0|        return;
  492|       |
  493|      9|    int thisFacetsDefined = getFacetsDefined();
  494|      9|    int baseFacetsDefined = pBaseValidator->getFacetsDefined();
  495|       |
  496|       |    // inherit length
  497|      9|    if (((baseFacetsDefined & DatatypeValidator::FACET_LENGTH) != 0) &&
  ------------------
  |  Branch (497:9): [True: 0, False: 9]
  ------------------
  498|      9|        ((thisFacetsDefined & DatatypeValidator::FACET_LENGTH) == 0))
  ------------------
  |  Branch (498:9): [True: 0, False: 0]
  ------------------
  499|      0|    {
  500|      0|        setLength(pBaseValidator->getLength());
  501|      0|        setFacetsDefined(DatatypeValidator::FACET_LENGTH);
  502|      0|    }
  503|       |
  504|       |    // inherit minLength
  505|      9|    if (((baseFacetsDefined & DatatypeValidator::FACET_MINLENGTH) !=0) &&
  ------------------
  |  Branch (505:9): [True: 0, False: 9]
  ------------------
  506|      9|        ((thisFacetsDefined & DatatypeValidator::FACET_MINLENGTH) == 0))
  ------------------
  |  Branch (506:9): [True: 0, False: 0]
  ------------------
  507|      0|    {
  508|      0|        setMinLength(pBaseValidator->getMinLength());
  509|      0|        setFacetsDefined(DatatypeValidator::FACET_MINLENGTH);
  510|      0|    }
  511|       |
  512|       |    // inherit maxLength
  513|      9|    if (((baseFacetsDefined & DatatypeValidator::FACET_MAXLENGTH) !=0) &&
  ------------------
  |  Branch (513:9): [True: 0, False: 9]
  ------------------
  514|      9|        ((thisFacetsDefined & DatatypeValidator::FACET_MAXLENGTH) == 0))
  ------------------
  |  Branch (514:9): [True: 0, False: 0]
  ------------------
  515|      0|    {
  516|      0|        setMaxLength(pBaseValidator->getMaxLength());
  517|      0|        setFacetsDefined(DatatypeValidator::FACET_MAXLENGTH);
  518|      0|    }
  519|       |
  520|       |    // inherit enumeration
  521|      9|    if (((baseFacetsDefined & DatatypeValidator::FACET_ENUMERATION) !=0) &&
  ------------------
  |  Branch (521:9): [True: 0, False: 9]
  ------------------
  522|      9|        ((thisFacetsDefined & DatatypeValidator::FACET_ENUMERATION) == 0))
  ------------------
  |  Branch (522:9): [True: 0, False: 0]
  ------------------
  523|      0|    {
  524|      0|        setEnumeration(pBaseValidator->getEnumeration(), true);
  525|      0|    }
  526|       |
  527|       |    // we don't inherit pattern
  528|       |
  529|       |    // inherit "fixed" option
  530|      9|    setFixed(getFixed() | pBaseValidator->getFixed());
  531|       |
  532|       |    // inherit additional facet
  533|      9|    inheritAdditionalFacet();
  534|       |
  535|      9|} // end of inheritance

_ZNK11xercesc_3_223AbstractStringValidator9getLengthEv:
  192|      8|{
  193|      8|    return fLength;
  194|      8|}
_ZNK11xercesc_3_223AbstractStringValidator12getMaxLengthEv:
  197|     11|{
  198|     11|    return fMaxLength;
  199|     11|}
_ZNK11xercesc_3_223AbstractStringValidator12getMinLengthEv:
  202|     11|{
  203|     11|    return fMinLength;
  204|     11|}
_ZN11xercesc_3_223AbstractStringValidator12setMinLengthEm:
  226|      3|{
  227|      3|    fMinLength = newMinLength;
  228|      3|}

_ZN11xercesc_3_230AnySimpleTypeDatatypeValidatorC2EPNS_13MemoryManagerE:
   35|      1|    : DatatypeValidator(0, 0, SchemaSymbols::XSD_RESTRICTION, DatatypeValidator::AnySimpleType, manager)
   36|      1|{
   37|      1|    setWhiteSpace(DatatypeValidator::PRESERVE);
   38|      1|    setFinite(true);
   39|      1|}

_ZN11xercesc_3_223AnyURIDatatypeValidatorC2EPNS_13MemoryManagerE:
   39|      1|:AbstractStringValidator(0, 0, 0, DatatypeValidator::AnyURI, manager)
   40|      1|{}

_ZN11xercesc_3_229Base64BinaryDatatypeValidatorC2EPNS_13MemoryManagerE:
   36|      1|:AbstractStringValidator(0, 0, 0, DatatypeValidator::Base64Binary, manager)
   37|      1|{}

_ZN11xercesc_3_224BooleanDatatypeValidatorC2EPNS_13MemoryManagerE:
  150|      1|:DatatypeValidator(0, 0, 0, DatatypeValidator::Boolean, manager)
  151|      1|{
  152|      1|    setFinite(true);
  153|      1|}

_ZN11xercesc_3_217DatatypeValidatorC2EPS0_PNS_14RefHashTableOfINS_12KVStringPairENS_12StringHasherEEEiNS0_13ValidatorTypeEPNS_13MemoryManagerE:
   81|     45|    : fAnonymous(false)
   82|     45|    , fFinite(false)
   83|     45|    , fBounded(false)
   84|     45|    , fNumeric(false)
   85|     45|    , fWhiteSpace(COLLAPSE)
   86|     45|    , fFinalSet(finalSet)
   87|     45|    , fFacetsDefined(0)
   88|     45|    , fFixed(0)
   89|     45|    , fType(type)
   90|     45|    , fOrdered(XSSimpleTypeDefinition::ORDERED_FALSE)
   91|     45|    , fBaseValidator(baseValidator)
   92|     45|    , fFacets(facets)
   93|     45|    , fPattern(0)
   94|     45|    , fRegex(0)
   95|     45|    , fTypeName(0)
   96|     45|    , fTypeLocalName(XMLUni::fgZeroLenString)
   97|     45|    , fTypeUri(XMLUni::fgZeroLenString)
   98|     45|    , fMemoryManager(manager)
   99|     45|{
  100|     45|}
_ZN11xercesc_3_217DatatypeValidator11setTypeNameEPKDsS2_:
  124|     25|{
  125|     25|    if (fTypeName) {
  ------------------
  |  Branch (125:9): [True: 0, False: 25]
  ------------------
  126|       |
  127|      0|        fMemoryManager->deallocate(fTypeName);
  128|      0|        fTypeName = 0;
  129|      0|    }
  130|       |
  131|     25|    if (name || uri) {
  ------------------
  |  Branch (131:9): [True: 25, False: 0]
  |  Branch (131:17): [True: 0, False: 0]
  ------------------
  132|       |
  133|     25|        XMLSize_t nameLen = XMLString::stringLen(name);
  134|     25|        XMLSize_t uriLen = XMLString::stringLen(uri);
  135|       |
  136|     25|        fTypeName = (XMLCh*) fMemoryManager->allocate
  137|     25|        (
  138|     25|            (nameLen + uriLen + 2)*sizeof(XMLCh)
  139|     25|        );
  140|     25|        fTypeUri = fTypeName;
  141|     25|        fTypeLocalName = &fTypeName[uriLen+1];
  142|       |
  143|     25|        if (uri)
  ------------------
  |  Branch (143:13): [True: 25, False: 0]
  ------------------
  144|     25|			XMLString::moveChars(fTypeName, uri, uriLen+1);
  145|      0|        else
  146|      0|			fTypeName[0] = chNull;
  147|       |
  148|     25|        if (name)
  ------------------
  |  Branch (148:13): [True: 25, False: 0]
  ------------------
  149|     25|            XMLString::moveChars(&fTypeName[uriLen+1], name, nameLen+1);
  150|      0|        else
  151|      0|            fTypeName[uriLen+1] = chNull;
  152|     25|    }
  153|      0|    else
  154|      0|    {
  155|      0|        fTypeUri = fTypeLocalName = XMLUni::fgZeroLenString;
  156|      0|    }
  157|     25|}
_ZN11xercesc_3_217DatatypeValidator11setTypeNameEPKDs:
  160|     20|{
  161|     20|    if (fTypeName)
  ------------------
  |  Branch (161:9): [True: 0, False: 20]
  ------------------
  162|      0|    {
  163|      0|        fMemoryManager->deallocate(fTypeName);
  164|      0|        fTypeName = 0;
  165|      0|    }
  166|       |
  167|     20|    if (typeName)
  ------------------
  |  Branch (167:9): [True: 20, False: 0]
  ------------------
  168|     20|    {
  169|     20|        XMLSize_t nameLen = XMLString::stringLen(typeName);
  170|     20|        int commaOffset = XMLString::indexOf(typeName, chComma);
  171|       |
  172|     20|        fTypeName = (XMLCh*) fMemoryManager->allocate
  173|     20|        (
  174|     20|            (nameLen + 1) * sizeof(XMLCh)
  175|     20|        );
  176|     20|	    XMLString::moveChars(fTypeName, typeName, nameLen+1);
  177|       |
  178|     20|        if ( commaOffset == -1) {
  ------------------
  |  Branch (178:14): [True: 20, False: 0]
  ------------------
  179|     20|            fTypeUri = SchemaSymbols::fgURI_SCHEMAFORSCHEMA;
  180|     20|            fTypeLocalName = fTypeName;
  181|     20|        }
  182|      0|        else {
  183|      0|            fTypeUri = fTypeName;
  184|      0|            fTypeLocalName = &fTypeName[commaOffset+1];
  185|      0|            fTypeName[commaOffset] = chNull;
  186|      0|        }
  187|     20|    }
  188|      0|    else
  189|      0|    {
  190|      0|        fTypeUri = fTypeLocalName = XMLUni::fgZeroLenString;
  191|      0|    }
  192|     20|}

_ZNK11xercesc_3_217DatatypeValidator9getFacetsEv:
  561|     42|inline RefHashTableOf<KVStringPair>* DatatypeValidator::getFacets() const {
  562|       |
  563|     42|    return fFacets;
  564|     42|}
_ZNK11xercesc_3_217DatatypeValidator16getBaseValidatorEv:
  566|    151|inline DatatypeValidator* DatatypeValidator::getBaseValidator() const {
  567|       |
  568|    151|	return fBaseValidator;
  569|    151|}
_ZNK11xercesc_3_217DatatypeValidator10getWSFacetEv:
  571|     14|inline short DatatypeValidator::getWSFacet() const {
  572|       |
  573|     14|    return fWhiteSpace;
  574|     14|}
_ZNK11xercesc_3_217DatatypeValidator7getTypeEv:
  577|     95|{
  578|     95|    return fType;
  579|     95|}
_ZNK11xercesc_3_217DatatypeValidator16getFacetsDefinedEv:
  582|    272|{
  583|    272|    return fFacetsDefined;
  584|    272|}
_ZNK11xercesc_3_217DatatypeValidator8getFixedEv:
  587|     63|{
  588|     63|    return fFixed;
  589|     63|}
_ZNK11xercesc_3_217DatatypeValidator10getPatternEv:
  592|      3|{
  593|      3|    return fPattern;
  594|      3|}
_ZNK11xercesc_3_217DatatypeValidator8getRegexEv:
  597|     16|{
  598|     16|    return fRegex;
  599|     16|}
_ZNK11xercesc_3_217DatatypeValidator10getOrderedEv:
  627|     17|{
  628|     17|    return fOrdered;
  629|     17|}
_ZNK11xercesc_3_217DatatypeValidator9getFiniteEv:
  632|     17|{
  633|     17|    return fFinite;
  634|     17|}
_ZNK11xercesc_3_217DatatypeValidator10getBoundedEv:
  637|     17|{
  638|     17|    return fBounded;
  639|     17|}
_ZNK11xercesc_3_217DatatypeValidator10getNumericEv:
  642|     17|{
  643|     17|    return fNumeric;
  644|     17|}
_ZN11xercesc_3_217DatatypeValidator13setWhiteSpaceEs:
  655|     20|{
  656|     20|    fWhiteSpace = newValue;
  657|     20|}
_ZN11xercesc_3_217DatatypeValidator16setFacetsDefinedEi:
  660|     48|{
  661|     48|    fFacetsDefined |= facets;
  662|     48|}
_ZN11xercesc_3_217DatatypeValidator8setFixedEi:
  665|     22|{
  666|     22|    fFixed |= fixed;
  667|     22|}
_ZN11xercesc_3_217DatatypeValidator10setPatternEPKDs:
  670|      3|{
  671|      3|    if (fPattern) {
  ------------------
  |  Branch (671:9): [True: 0, False: 3]
  ------------------
  672|      0|        fMemoryManager->deallocate(fPattern);//delete [] fPattern;
  673|      0|        delete fRegex;
  674|      0|    }
  675|      3|    fPattern = XMLString::replicate(pattern, fMemoryManager);
  676|      3|    fRegex = new (fMemoryManager) RegularExpression(fPattern, SchemaSymbols::fgRegEx_XOption, fMemoryManager);
  677|      3|}
_ZN11xercesc_3_217DatatypeValidator10setOrderedENS_22XSSimpleTypeDefinition8ORDERINGE:
  694|     32|{
  695|     32|    fOrdered = ordered;
  696|     32|}
_ZN11xercesc_3_217DatatypeValidator9setFiniteEb:
  699|     24|{
  700|     24|    fFinite = finite;
  701|     24|}
_ZN11xercesc_3_217DatatypeValidator10setBoundedEb:
  704|     22|{
  705|     22|    fBounded = bounded;
  706|     22|}
_ZN11xercesc_3_217DatatypeValidator10setNumericEb:
  709|     23|{
  710|     23|    fNumeric = numeric;
  711|     23|}

_ZN11xercesc_3_214XMLInitializer34initializeDatatypeValidatorFactoryEv:
   91|      1|{
   92|       |    // @@ This is ugly. Need to make expandRegistryToFullSchemaSet
   93|       |    // static.
   94|       |    //
   95|      1|    DatatypeValidatorFactory *dvFactory = new DatatypeValidatorFactory();
   96|      1|    if (dvFactory) {
  ------------------
  |  Branch (96:9): [True: 1, False: 0]
  ------------------
   97|      1|        dvFactory->expandRegistryToFullSchemaSet();
   98|      1|        delete dvFactory;
   99|      1|    }
  100|      1|}
_ZN11xercesc_3_224DatatypeValidatorFactoryC2EPNS_13MemoryManagerE:
  115|      2|    : fUserDefinedRegistry(0)
  116|      2|    , fMemoryManager(manager)
  117|      2|{
  118|      2|}
_ZN11xercesc_3_224DatatypeValidatorFactoryD2Ev:
  121|      2|{
  122|      2|    cleanUp();
  123|      2|}
_ZN11xercesc_3_224DatatypeValidatorFactory29expandRegistryToFullSchemaSetEv:
  140|      1|{
  141|       |    //Initialize common Schema/DTD Datatype validator set
  142|      1|    fBuiltInRegistry = new RefHashTableOf<DatatypeValidator>(29);
  143|       |
  144|      1|    DatatypeValidator *dv = new StringDatatypeValidator();
  145|      1|    dv->setTypeName(SchemaSymbols::fgDT_STRING, SchemaSymbols::fgURI_SCHEMAFORSCHEMA);
  146|      1|    fBuiltInRegistry->put((void*) SchemaSymbols::fgDT_STRING, dv);
  147|       |
  148|      1|    dv = new NOTATIONDatatypeValidator();
  149|      1|    dv->setTypeName(XMLUni::fgNotationString, SchemaSymbols::fgURI_SCHEMAFORSCHEMA);
  150|      1|    fBuiltInRegistry->put((void*) XMLUni::fgNotationString, dv);
  151|       |
  152|      1|    dv = new AnySimpleTypeDatatypeValidator();
  153|      1|    dv->setTypeName(SchemaSymbols::fgDT_ANYSIMPLETYPE, SchemaSymbols::fgURI_SCHEMAFORSCHEMA);
  154|      1|    fBuiltInRegistry->put((void*) SchemaSymbols::fgDT_ANYSIMPLETYPE, dv);
  155|       |
  156|      1|    dv = new BooleanDatatypeValidator();
  157|      1|    dv->setTypeName(SchemaSymbols::fgDT_BOOLEAN, SchemaSymbols::fgURI_SCHEMAFORSCHEMA);
  158|      1|    fBuiltInRegistry->put((void*) SchemaSymbols::fgDT_BOOLEAN, dv);
  159|       |
  160|      1|    dv = new DecimalDatatypeValidator();
  161|      1|    dv->setTypeName(SchemaSymbols::fgDT_DECIMAL, SchemaSymbols::fgURI_SCHEMAFORSCHEMA);
  162|      1|    fBuiltInRegistry->put((void*) SchemaSymbols::fgDT_DECIMAL, dv);
  163|       |
  164|      1|    dv = new HexBinaryDatatypeValidator();
  165|      1|    dv->setTypeName(SchemaSymbols::fgDT_HEXBINARY, SchemaSymbols::fgURI_SCHEMAFORSCHEMA);
  166|      1|    fBuiltInRegistry->put((void*) SchemaSymbols::fgDT_HEXBINARY, dv);
  167|       |
  168|      1|    dv = new Base64BinaryDatatypeValidator();
  169|      1|    dv->setTypeName(SchemaSymbols::fgDT_BASE64BINARY, SchemaSymbols::fgURI_SCHEMAFORSCHEMA);
  170|      1|    fBuiltInRegistry->put((void*) SchemaSymbols::fgDT_BASE64BINARY, dv);
  171|       |
  172|      1|    dv = new DoubleDatatypeValidator();
  173|      1|    dv->setTypeName(SchemaSymbols::fgDT_DOUBLE, SchemaSymbols::fgURI_SCHEMAFORSCHEMA);
  174|      1|    fBuiltInRegistry->put((void*) SchemaSymbols::fgDT_DOUBLE, dv);
  175|       |
  176|      1|    dv = new FloatDatatypeValidator();
  177|      1|    dv->setTypeName(SchemaSymbols::fgDT_FLOAT, SchemaSymbols::fgURI_SCHEMAFORSCHEMA);
  178|      1|    fBuiltInRegistry->put((void*) SchemaSymbols::fgDT_FLOAT, dv);
  179|       |
  180|      1|    dv = new AnyURIDatatypeValidator();
  181|      1|    dv->setTypeName(SchemaSymbols::fgDT_ANYURI, SchemaSymbols::fgURI_SCHEMAFORSCHEMA);
  182|      1|    fBuiltInRegistry->put((void*) SchemaSymbols::fgDT_ANYURI, dv);
  183|       |
  184|      1|    dv = new QNameDatatypeValidator();
  185|      1|    dv->setTypeName(SchemaSymbols::fgDT_QNAME, SchemaSymbols::fgURI_SCHEMAFORSCHEMA);
  186|      1|    fBuiltInRegistry->put((void*) SchemaSymbols::fgDT_QNAME, dv);
  187|       |
  188|      1|    dv = new DateTimeDatatypeValidator();
  189|      1|    dv->setTypeName(SchemaSymbols::fgDT_DATETIME, SchemaSymbols::fgURI_SCHEMAFORSCHEMA);
  190|      1|    fBuiltInRegistry->put((void*) SchemaSymbols::fgDT_DATETIME, dv);
  191|       |
  192|      1|    dv = new DateDatatypeValidator();
  193|      1|    dv->setTypeName(SchemaSymbols::fgDT_DATE, SchemaSymbols::fgURI_SCHEMAFORSCHEMA);
  194|      1|    fBuiltInRegistry->put((void*) SchemaSymbols::fgDT_DATE, dv);
  195|       |
  196|      1|    dv = new TimeDatatypeValidator();
  197|      1|    dv->setTypeName(SchemaSymbols::fgDT_TIME, SchemaSymbols::fgURI_SCHEMAFORSCHEMA);
  198|      1|    fBuiltInRegistry->put((void*) SchemaSymbols::fgDT_TIME, dv);
  199|       |
  200|      1|    dv = new DayDatatypeValidator();
  201|      1|    dv->setTypeName(SchemaSymbols::fgDT_DAY, SchemaSymbols::fgURI_SCHEMAFORSCHEMA);
  202|      1|    fBuiltInRegistry->put((void*) SchemaSymbols::fgDT_DAY, dv);
  203|       |
  204|      1|    dv = new MonthDatatypeValidator();
  205|      1|    dv->setTypeName(SchemaSymbols::fgDT_MONTH, SchemaSymbols::fgURI_SCHEMAFORSCHEMA);
  206|      1|    fBuiltInRegistry->put((void*) SchemaSymbols::fgDT_MONTH, dv);
  207|       |
  208|      1|    dv = new MonthDayDatatypeValidator();
  209|      1|    dv->setTypeName(SchemaSymbols::fgDT_MONTHDAY, SchemaSymbols::fgURI_SCHEMAFORSCHEMA);
  210|      1|    fBuiltInRegistry->put((void*) SchemaSymbols::fgDT_MONTHDAY, dv);
  211|       |
  212|      1|    dv = new YearDatatypeValidator();
  213|      1|    dv->setTypeName(SchemaSymbols::fgDT_YEAR, SchemaSymbols::fgURI_SCHEMAFORSCHEMA);
  214|      1|    fBuiltInRegistry->put((void*) SchemaSymbols::fgDT_YEAR, dv);
  215|       |
  216|      1|    dv = new YearMonthDatatypeValidator();
  217|      1|    dv->setTypeName(SchemaSymbols::fgDT_YEARMONTH, SchemaSymbols::fgURI_SCHEMAFORSCHEMA);
  218|      1|    fBuiltInRegistry->put((void*) SchemaSymbols::fgDT_YEARMONTH, dv);
  219|       |
  220|      1|    dv = new DurationDatatypeValidator();
  221|      1|    dv->setTypeName(SchemaSymbols::fgDT_DURATION, SchemaSymbols::fgURI_SCHEMAFORSCHEMA);
  222|      1|    fBuiltInRegistry->put((void*) SchemaSymbols::fgDT_DURATION, dv);
  223|       |
  224|       |    // REVISIT
  225|       |    // We are creating a lot of Hashtables for the facets of the different
  226|       |    // validators. It's better to have some kind of a memory pool and ask
  227|       |    // the pool to give us a new instance of the hashtable.
  228|      1|    RefHashTableOf<KVStringPair>* facets = new RefHashTableOf<KVStringPair>(3);
  229|       |
  230|       |    // Create 'normalizedString' datatype validator
  231|      1|    facets->put((void*) SchemaSymbols::fgELT_WHITESPACE,
  232|      1|                new KVStringPair(SchemaSymbols::fgELT_WHITESPACE, SchemaSymbols::fgWS_REPLACE));
  233|       |
  234|      1|    createDatatypeValidator(SchemaSymbols::fgDT_NORMALIZEDSTRING,
  235|      1|                            getDatatypeValidator(SchemaSymbols::fgDT_STRING),
  236|      1|                            facets, 0, false, 0, false);
  237|       |
  238|       |    // Create 'token' datatype validator
  239|      1|    facets = new RefHashTableOf<KVStringPair>(3);
  240|      1|    facets->put((void*) SchemaSymbols::fgELT_WHITESPACE,
  241|      1|                new KVStringPair(SchemaSymbols::fgELT_WHITESPACE, SchemaSymbols::fgWS_COLLAPSE));
  242|       |
  243|      1|    createDatatypeValidator(SchemaSymbols::fgDT_TOKEN,
  244|      1|                            getDatatypeValidator(SchemaSymbols::fgDT_NORMALIZEDSTRING),
  245|      1|                            facets, 0, false, 0, false);
  246|       |
  247|       |
  248|      1|    dv = new NameDatatypeValidator(getDatatypeValidator(SchemaSymbols::fgDT_TOKEN), 0, 0, 0);
  249|      1|    dv->setTypeName(SchemaSymbols::fgDT_NAME, SchemaSymbols::fgURI_SCHEMAFORSCHEMA);
  250|      1|    fBuiltInRegistry->put((void*) SchemaSymbols::fgDT_NAME, dv);
  251|       |
  252|       |
  253|      1|    dv = new NCNameDatatypeValidator(getDatatypeValidator(SchemaSymbols::fgDT_NAME), 0, 0, 0);
  254|      1|    dv->setTypeName(SchemaSymbols::fgDT_NCNAME, SchemaSymbols::fgURI_SCHEMAFORSCHEMA);
  255|      1|    fBuiltInRegistry->put((void*) SchemaSymbols::fgDT_NCNAME, dv);
  256|       |
  257|       |    // Create 'NMTOKEN' datatype validator
  258|      1|    facets = new RefHashTableOf<KVStringPair>(3);
  259|       |
  260|      1|    facets->put((void*) SchemaSymbols::fgELT_PATTERN ,
  261|      1|                new KVStringPair(SchemaSymbols::fgELT_PATTERN,fgTokPattern));
  262|      1|    facets->put((void*) SchemaSymbols::fgELT_WHITESPACE,
  263|      1|                new KVStringPair(SchemaSymbols::fgELT_WHITESPACE, SchemaSymbols::fgWS_COLLAPSE));
  264|       |
  265|      1|    createDatatypeValidator(XMLUni::fgNmTokenString,
  266|      1|                            getDatatypeValidator(SchemaSymbols::fgDT_TOKEN),facets, 0, false, 0, false);
  267|       |
  268|       |    // Create 'NMTOKENS' datatype validator
  269|      1|    facets = new RefHashTableOf<KVStringPair>(2);
  270|      1|    facets->put((void*) SchemaSymbols::fgELT_MINLENGTH,
  271|      1|                new KVStringPair(SchemaSymbols::fgELT_MINLENGTH, XMLUni::fgValueOne));
  272|       |
  273|      1|    createDatatypeValidator(XMLUni::fgNmTokensString,
  274|      1|                            getDatatypeValidator(XMLUni::fgNmTokenString), facets, 0, true, 0, false);
  275|       |
  276|       |    // Create 'language' datatype validator
  277|      1|    facets = new RefHashTableOf<KVStringPair>(3);
  278|       |
  279|      1|    facets->put((void*) SchemaSymbols::fgELT_PATTERN,
  280|      1|                new KVStringPair(SchemaSymbols::fgELT_PATTERN, XMLUni::fgLangPattern));
  281|       |
  282|      1|    createDatatypeValidator(SchemaSymbols::fgDT_LANGUAGE,
  283|      1|                            getDatatypeValidator(SchemaSymbols::fgDT_TOKEN),
  284|      1|                            facets, 0, false, 0, false);
  285|       |
  286|       |    // Create 'integer' datatype validator
  287|      1|    facets = new RefHashTableOf<KVStringPair>(3);
  288|       |
  289|      1|    facets->put((void*) SchemaSymbols::fgELT_FRACTIONDIGITS,
  290|      1|                new KVStringPair(SchemaSymbols::fgELT_FRACTIONDIGITS, XMLUni::fgValueZero));
  291|       |
  292|      1|    facets->put((void*) SchemaSymbols::fgELT_PATTERN,
  293|      1|                new KVStringPair(SchemaSymbols::fgELT_PATTERN, fgIntegerPattern));
  294|       |
  295|      1|    createDatatypeValidator(SchemaSymbols::fgDT_INTEGER,
  296|      1|                            getDatatypeValidator(SchemaSymbols::fgDT_DECIMAL),
  297|      1|                            facets, 0, false, 0, false);
  298|       |
  299|       |    // Create 'nonPositiveInteger' datatype validator
  300|      1|    facets = new RefHashTableOf<KVStringPair>(2);
  301|       |
  302|      1|    facets->put((void*) SchemaSymbols::fgELT_MAXINCLUSIVE,
  303|      1|                new KVStringPair(SchemaSymbols::fgELT_MAXINCLUSIVE, XMLUni::fgValueZero));
  304|       |
  305|      1|    createDatatypeValidator(SchemaSymbols::fgDT_NONPOSITIVEINTEGER,
  306|      1|                            getDatatypeValidator(SchemaSymbols::fgDT_INTEGER),
  307|      1|                            facets, 0, false, 0, false);
  308|       |
  309|       |    // Create 'negativeInteger' datatype validator
  310|      1|    facets = new RefHashTableOf<KVStringPair>(2);
  311|       |
  312|      1|    facets->put((void*) SchemaSymbols::fgELT_MAXINCLUSIVE,
  313|      1|                new KVStringPair(SchemaSymbols::fgELT_MAXINCLUSIVE, XMLUni::fgNegOne));
  314|       |
  315|      1|    createDatatypeValidator(SchemaSymbols::fgDT_NEGATIVEINTEGER,
  316|      1|                            getDatatypeValidator(SchemaSymbols::fgDT_NONPOSITIVEINTEGER),
  317|      1|                            facets, 0, false, 0, false);
  318|       |
  319|       |    // Create 'long' datatype validator
  320|      1|    facets = new RefHashTableOf<KVStringPair>(2);
  321|       |
  322|      1|    facets->put((void*) SchemaSymbols::fgELT_MAXINCLUSIVE,
  323|      1|                new KVStringPair(SchemaSymbols::fgELT_MAXINCLUSIVE, XMLUni::fgLongMaxInc));
  324|      1|    facets->put((void*) SchemaSymbols::fgELT_MININCLUSIVE,
  325|      1|                new KVStringPair(SchemaSymbols::fgELT_MININCLUSIVE, XMLUni::fgLongMinInc));
  326|       |
  327|      1|    createDatatypeValidator(SchemaSymbols::fgDT_LONG,
  328|      1|                            getDatatypeValidator(SchemaSymbols::fgDT_INTEGER),
  329|      1|                            facets, 0, false, 0, false);
  330|       |
  331|       |    // Create 'int' datatype validator
  332|      1|    facets = new RefHashTableOf<KVStringPair>(2);
  333|       |
  334|      1|    facets->put((void*) SchemaSymbols::fgELT_MAXINCLUSIVE,
  335|      1|                new KVStringPair(SchemaSymbols::fgELT_MAXINCLUSIVE, XMLUni::fgIntMaxInc));
  336|      1|    facets->put((void*) SchemaSymbols::fgELT_MININCLUSIVE,
  337|      1|                new KVStringPair(SchemaSymbols::fgELT_MININCLUSIVE, XMLUni::fgIntMinInc));
  338|       |
  339|      1|    createDatatypeValidator(SchemaSymbols::fgDT_INT,
  340|      1|                            getDatatypeValidator(SchemaSymbols::fgDT_LONG),
  341|      1|                            facets, 0, false, 0, false);
  342|       |
  343|       |    // Create 'short' datatype validator
  344|      1|    facets = new RefHashTableOf<KVStringPair>(2);
  345|       |
  346|      1|    facets->put((void*) SchemaSymbols::fgELT_MAXINCLUSIVE,
  347|      1|                new KVStringPair(SchemaSymbols::fgELT_MAXINCLUSIVE, XMLUni::fgShortMaxInc));
  348|      1|    facets->put((void*) SchemaSymbols::fgELT_MININCLUSIVE,
  349|      1|                new KVStringPair(SchemaSymbols::fgELT_MININCLUSIVE, XMLUni::fgShortMinInc));
  350|       |
  351|      1|    createDatatypeValidator(SchemaSymbols::fgDT_SHORT,
  352|      1|                            getDatatypeValidator(SchemaSymbols::fgDT_INT),
  353|      1|                            facets, 0, false, 0 ,false);
  354|       |
  355|       |    // Create 'byte' datatype validator
  356|      1|    facets = new RefHashTableOf<KVStringPair>(2);
  357|       |
  358|      1|    facets->put((void*) SchemaSymbols::fgELT_MAXINCLUSIVE,
  359|      1|                new KVStringPair(SchemaSymbols::fgELT_MAXINCLUSIVE, XMLUni::fgByteMaxInc));
  360|      1|    facets->put((void*) SchemaSymbols::fgELT_MININCLUSIVE,
  361|      1|                new KVStringPair(SchemaSymbols::fgELT_MININCLUSIVE, XMLUni::fgByteMinInc));
  362|       |
  363|      1|    createDatatypeValidator(SchemaSymbols::fgDT_BYTE,
  364|      1|                            getDatatypeValidator(SchemaSymbols::fgDT_SHORT),
  365|      1|                            facets, 0, false, 0, false);
  366|       |
  367|       |    // Create 'nonNegativeInteger' datatype validator
  368|      1|    facets = new RefHashTableOf<KVStringPair>(2);
  369|       |
  370|      1|    facets->put((void*) SchemaSymbols::fgELT_MININCLUSIVE,
  371|      1|                new KVStringPair(SchemaSymbols::fgELT_MININCLUSIVE, XMLUni::fgValueZero));
  372|       |
  373|      1|    createDatatypeValidator(SchemaSymbols::fgDT_NONNEGATIVEINTEGER,
  374|      1|                            getDatatypeValidator(SchemaSymbols::fgDT_INTEGER),
  375|      1|                            facets, 0, false, 0, false);
  376|       |
  377|       |    // Create 'unsignedLong' datatype validator
  378|      1|    facets = new RefHashTableOf<KVStringPair>(2);
  379|       |
  380|      1|    facets->put((void*) SchemaSymbols::fgELT_MAXINCLUSIVE,
  381|      1|                new KVStringPair(SchemaSymbols::fgELT_MAXINCLUSIVE, XMLUni::fgULongMaxInc));
  382|       |
  383|      1|    createDatatypeValidator(SchemaSymbols::fgDT_ULONG,
  384|      1|                            getDatatypeValidator(SchemaSymbols::fgDT_NONNEGATIVEINTEGER),
  385|      1|                            facets, 0, false, 0, false);
  386|       |
  387|       |    // Create 'unsignedInt' datatype validator
  388|      1|    facets = new RefHashTableOf<KVStringPair>(2);
  389|       |
  390|      1|    facets->put((void*) SchemaSymbols::fgELT_MAXINCLUSIVE,
  391|      1|                new KVStringPair(SchemaSymbols::fgELT_MAXINCLUSIVE, XMLUni::fgUIntMaxInc));
  392|       |
  393|      1|    createDatatypeValidator(SchemaSymbols::fgDT_UINT,
  394|      1|                            getDatatypeValidator(SchemaSymbols::fgDT_ULONG),
  395|      1|                            facets, 0, false, 0, false);
  396|       |
  397|       |    // Create 'unsignedShort' datatypeValidator
  398|      1|    facets = new RefHashTableOf<KVStringPair>(2);
  399|       |
  400|      1|    facets->put((void*) SchemaSymbols::fgELT_MAXINCLUSIVE,
  401|      1|                new KVStringPair(SchemaSymbols::fgELT_MAXINCLUSIVE, XMLUni::fgUShortMaxInc));
  402|       |
  403|      1|    createDatatypeValidator(SchemaSymbols::fgDT_USHORT,
  404|      1|                            getDatatypeValidator(SchemaSymbols::fgDT_UINT),
  405|      1|                            facets, 0, false, 0, false);
  406|       |
  407|       |    // Create 'unsignedByte' datatype validator
  408|      1|    facets = new RefHashTableOf<KVStringPair>(2);
  409|       |
  410|      1|    facets->put((void*) SchemaSymbols::fgELT_MAXINCLUSIVE,
  411|      1|                new KVStringPair(SchemaSymbols::fgELT_MAXINCLUSIVE, XMLUni::fgUByteMaxInc));
  412|       |
  413|      1|    createDatatypeValidator(SchemaSymbols::fgDT_UBYTE,
  414|      1|                            getDatatypeValidator(SchemaSymbols::fgDT_USHORT),
  415|      1|                            facets, 0, false, 0, false);
  416|       |
  417|       |    // Create 'positiveInteger' datatype validator
  418|      1|    facets = new RefHashTableOf<KVStringPair>(2);
  419|       |
  420|      1|    facets->put((void*) SchemaSymbols::fgELT_MININCLUSIVE,
  421|      1|                new KVStringPair(SchemaSymbols::fgELT_MININCLUSIVE, XMLUni::fgValueOne));
  422|       |
  423|      1|    createDatatypeValidator(SchemaSymbols::fgDT_POSITIVEINTEGER,
  424|      1|                            getDatatypeValidator(SchemaSymbols::fgDT_NONNEGATIVEINTEGER),
  425|      1|                            facets, 0, false, 0, false);
  426|       |
  427|       |    // Create 'ID', 'IDREF' and 'ENTITY' datatype validator
  428|      1|    dv = new IDDatatypeValidator(getDatatypeValidator(SchemaSymbols::fgDT_NCNAME), 0, 0, 0);
  429|      1|    dv->setTypeName(XMLUni::fgIDString, SchemaSymbols::fgURI_SCHEMAFORSCHEMA);
  430|      1|    fBuiltInRegistry->put((void*) XMLUni::fgIDString, dv);
  431|       |
  432|      1|    dv = new IDREFDatatypeValidator(getDatatypeValidator(SchemaSymbols::fgDT_NCNAME), 0, 0, 0);
  433|      1|    dv->setTypeName(XMLUni::fgIDRefString, SchemaSymbols::fgURI_SCHEMAFORSCHEMA);
  434|      1|    fBuiltInRegistry->put((void*) XMLUni::fgIDRefString, dv);
  435|       |
  436|      1|    dv = new ENTITYDatatypeValidator(getDatatypeValidator(SchemaSymbols::fgDT_NCNAME), 0, 0, 0);
  437|      1|    dv->setTypeName(XMLUni::fgEntityString, SchemaSymbols::fgURI_SCHEMAFORSCHEMA);
  438|      1|    fBuiltInRegistry->put((void*) XMLUni::fgEntityString, dv);
  439|       |
  440|      1|    facets = new RefHashTableOf<KVStringPair>(2);
  441|      1|    facets->put((void*) SchemaSymbols::fgELT_MINLENGTH,
  442|      1|                new KVStringPair(SchemaSymbols::fgELT_MINLENGTH, XMLUni::fgValueOne));
  443|       |
  444|       |    // Create 'IDREFS' datatype validator
  445|      1|    createDatatypeValidator
  446|      1|      (
  447|      1|        XMLUni::fgIDRefsString
  448|      1|        , getDatatypeValidator(XMLUni::fgIDRefString)
  449|      1|        , facets
  450|      1|        , 0
  451|      1|        , true
  452|      1|        , 0
  453|      1|        , false
  454|      1|      );
  455|       |
  456|      1|    facets = new RefHashTableOf<KVStringPair>(2);
  457|       |
  458|      1|    facets->put((void*) SchemaSymbols::fgELT_MINLENGTH,
  459|      1|                new KVStringPair(SchemaSymbols::fgELT_MINLENGTH, XMLUni::fgValueOne));
  460|       |
  461|       |    // Create 'ENTITIES' datatype validator
  462|      1|    createDatatypeValidator
  463|      1|      (
  464|      1|        XMLUni::fgEntitiesString
  465|      1|        , getDatatypeValidator(XMLUni::fgEntityString)
  466|      1|        , facets
  467|      1|        , 0
  468|      1|        , true
  469|      1|        , 0
  470|      1|        , false
  471|      1|      );
  472|       |
  473|      1|    initCanRepRegistory();
  474|      1|}
_ZN11xercesc_3_224DatatypeValidatorFactory19initCanRepRegistoryEv:
  491|      1|{
  492|       |
  493|       |     /***
  494|       |      * key:  dv
  495|       |      * data: XMLCanRepGroup
  496|       |      ***/
  497|      1|     fCanRepRegistry  = new RefHashTableOf<XMLCanRepGroup, PtrHasher>(29, true);
  498|       |
  499|      1|     fCanRepRegistry->put((void*) getDatatypeValidator(SchemaSymbols::fgDT_DECIMAL),
  500|      1|                        new  XMLCanRepGroup(XMLCanRepGroup::Decimal));
  501|       |
  502|      1|     fCanRepRegistry->put((void*) getDatatypeValidator(SchemaSymbols::fgDT_INTEGER),
  503|      1|                        new  XMLCanRepGroup(XMLCanRepGroup::Decimal_Derived_signed));
  504|      1|     fCanRepRegistry->put((void*) getDatatypeValidator(SchemaSymbols::fgDT_LONG),
  505|      1|                        new  XMLCanRepGroup(XMLCanRepGroup::Decimal_Derived_signed));
  506|      1|     fCanRepRegistry->put((void*) getDatatypeValidator(SchemaSymbols::fgDT_INT),
  507|      1|                        new  XMLCanRepGroup(XMLCanRepGroup::Decimal_Derived_signed));
  508|      1|     fCanRepRegistry->put((void*) getDatatypeValidator(SchemaSymbols::fgDT_SHORT),
  509|      1|                        new  XMLCanRepGroup(XMLCanRepGroup::Decimal_Derived_signed));
  510|      1|     fCanRepRegistry->put((void*) getDatatypeValidator(SchemaSymbols::fgDT_BYTE),
  511|      1|                        new  XMLCanRepGroup(XMLCanRepGroup::Decimal_Derived_signed));
  512|      1|     fCanRepRegistry->put((void*) getDatatypeValidator(SchemaSymbols::fgDT_NONNEGATIVEINTEGER),
  513|      1|                        new  XMLCanRepGroup(XMLCanRepGroup::Decimal_Derived_signed));
  514|      1|     fCanRepRegistry->put((void*) getDatatypeValidator(SchemaSymbols::fgDT_POSITIVEINTEGER),
  515|      1|                        new  XMLCanRepGroup(XMLCanRepGroup::Decimal_Derived_signed));
  516|       |
  517|      1|     fCanRepRegistry->put((void*) getDatatypeValidator(SchemaSymbols::fgDT_NEGATIVEINTEGER),
  518|      1|                        new  XMLCanRepGroup(XMLCanRepGroup::Decimal_Derived_unsigned));
  519|      1|     fCanRepRegistry->put((void*) getDatatypeValidator(SchemaSymbols::fgDT_ULONG),
  520|      1|                        new  XMLCanRepGroup(XMLCanRepGroup::Decimal_Derived_unsigned));
  521|      1|     fCanRepRegistry->put((void*) getDatatypeValidator(SchemaSymbols::fgDT_UINT),
  522|      1|                        new  XMLCanRepGroup(XMLCanRepGroup::Decimal_Derived_unsigned));
  523|      1|     fCanRepRegistry->put((void*) getDatatypeValidator(SchemaSymbols::fgDT_USHORT),
  524|      1|                        new  XMLCanRepGroup(XMLCanRepGroup::Decimal_Derived_unsigned));
  525|      1|     fCanRepRegistry->put((void*) getDatatypeValidator(SchemaSymbols::fgDT_UBYTE),
  526|      1|                        new  XMLCanRepGroup(XMLCanRepGroup::Decimal_Derived_unsigned));
  527|       |
  528|      1|     fCanRepRegistry->put((void*) getDatatypeValidator(SchemaSymbols::fgDT_NONPOSITIVEINTEGER),
  529|      1|                        new  XMLCanRepGroup(XMLCanRepGroup::Decimal_Derived_npi));
  530|      1|}
_ZN11xercesc_3_224DatatypeValidatorFactory23createDatatypeValidatorEPKDsPNS_17DatatypeValidatorEPNS_14RefHashTableOfINS_12KVStringPairENS_12StringHasherEEEPNS_16RefArrayVectorOfIDsEEbibPNS_13MemoryManagerE:
  586|     20|{
  587|     20|	if (baseValidator == 0) {
  ------------------
  |  Branch (587:6): [True: 0, False: 20]
  ------------------
  588|       |
  589|      0|        if (facets) {
  ------------------
  |  Branch (589:13): [True: 0, False: 0]
  ------------------
  590|      0|            Janitor<KVStringPairHashTable> janFacets(facets);
  591|      0|        }
  592|       |
  593|      0|        if (enums) {
  ------------------
  |  Branch (593:13): [True: 0, False: 0]
  ------------------
  594|      0|            Janitor<XMLChRefVector> janEnums(enums);
  595|      0|        }
  596|       |
  597|      0|        return 0;
  598|      0|    }
  599|       |
  600|     20|	DatatypeValidator* datatypeValidator = 0;
  601|     20|    MemoryManager* const manager = (isUserDefined)
  ------------------
  |  Branch (601:36): [True: 0, False: 20]
  ------------------
  602|     20|        ? userManager : XMLPlatformUtils::fgMemoryManager;
  603|       |
  604|     20|    if (isDerivedByList) {
  ------------------
  |  Branch (604:9): [True: 3, False: 17]
  ------------------
  605|      3|        datatypeValidator = new (manager) ListDatatypeValidator(baseValidator, facets, enums, finalSet, manager);
  606|       |
  607|       |        // Set PSVI information for Ordered, Numeric, Bounded & Finite
  608|      3|        datatypeValidator->setOrdered(XSSimpleTypeDefinition::ORDERED_FALSE);
  609|      3|        datatypeValidator->setNumeric(false);
  610|      3|        if (facets &&
  ------------------
  |  Branch (610:13): [True: 3, False: 0]
  ------------------
  611|      3|             ((facets->get(SchemaSymbols::fgELT_LENGTH) ||
  ------------------
  |  Branch (611:16): [True: 0, False: 3]
  ------------------
  612|      3|              (facets->get(SchemaSymbols::fgELT_MINLENGTH) && facets->get(SchemaSymbols::fgELT_MAXLENGTH)))))
  ------------------
  |  Branch (612:16): [True: 3, False: 0]
  |  Branch (612:63): [True: 0, False: 3]
  ------------------
  613|      0|        {
  614|      0|            datatypeValidator->setBounded(true);
  615|      0|            datatypeValidator->setFinite(true);
  616|      0|        }
  617|      3|        else
  618|      3|        {
  619|      3|            datatypeValidator->setBounded(false);
  620|      3|            datatypeValidator->setFinite(false);
  621|      3|        }
  622|      3|    }
  623|     17|    else {
  624|       |
  625|     17|        if ((baseValidator->getType() != DatatypeValidator::String) && facets) {
  ------------------
  |  Branch (625:13): [True: 13, False: 4]
  |  Branch (625:72): [True: 13, False: 0]
  ------------------
  626|       |
  627|     13|            KVStringPair* value = facets->get(SchemaSymbols::fgELT_WHITESPACE);
  628|       |
  629|     13|            if (value != 0) {
  ------------------
  |  Branch (629:17): [True: 0, False: 13]
  ------------------
  630|      0|                facets->removeKey(SchemaSymbols::fgELT_WHITESPACE);
  631|      0|            }
  632|     13|        }
  633|       |
  634|     17|        datatypeValidator = baseValidator->newInstance
  635|     17|        (
  636|     17|            facets
  637|     17|            , enums
  638|     17|            , finalSet
  639|     17|            , manager
  640|     17|        );
  641|       |
  642|       |        // Set PSVI information for Ordered, Numeric, Bounded & Finite
  643|     17|        datatypeValidator->setOrdered(baseValidator->getOrdered());
  644|     17|        datatypeValidator->setNumeric(baseValidator->getNumeric());
  645|     17|        RefHashTableOf<KVStringPair>* baseFacets = baseValidator->getFacets();
  646|     17|        if (facets  &&
  ------------------
  |  Branch (646:13): [True: 17, False: 0]
  ------------------
  647|     17|            ((facets->get(SchemaSymbols::fgELT_MININCLUSIVE) ||
  ------------------
  |  Branch (647:15): [True: 6, False: 11]
  ------------------
  648|     17|              facets->get(SchemaSymbols::fgELT_MINEXCLUSIVE) ||
  ------------------
  |  Branch (648:15): [True: 0, False: 11]
  ------------------
  649|     17|              (baseFacets && (baseFacets->get(SchemaSymbols::fgELT_MININCLUSIVE) ||
  ------------------
  |  Branch (649:16): [True: 9, False: 2]
  |  Branch (649:31): [True: 1, False: 8]
  ------------------
  650|      9|                              baseFacets->get(SchemaSymbols::fgELT_MINEXCLUSIVE))))) &&
  ------------------
  |  Branch (650:31): [True: 0, False: 8]
  ------------------
  651|     17|             (facets->get(SchemaSymbols::fgELT_MAXINCLUSIVE) ||
  ------------------
  |  Branch (651:15): [True: 5, False: 2]
  ------------------
  652|      7|              facets->get(SchemaSymbols::fgELT_MAXEXCLUSIVE) ||
  ------------------
  |  Branch (652:15): [True: 0, False: 2]
  ------------------
  653|      7|              (baseFacets && ((baseFacets->get(SchemaSymbols::fgELT_MAXINCLUSIVE) ||
  ------------------
  |  Branch (653:16): [True: 2, False: 0]
  |  Branch (653:32): [True: 0, False: 2]
  ------------------
  654|      2|                               baseFacets->get(SchemaSymbols::fgELT_MAXEXCLUSIVE))))))
  ------------------
  |  Branch (654:32): [True: 0, False: 2]
  ------------------
  655|      5|        {
  656|      5|            datatypeValidator->setBounded(true);
  657|      5|        }
  658|     12|        else
  659|     12|        {
  660|     12|            datatypeValidator->setBounded(false);
  661|     12|        }
  662|     17|        if (baseValidator->getFinite())
  ------------------
  |  Branch (662:13): [True: 0, False: 17]
  ------------------
  663|      0|        {
  664|      0|            datatypeValidator->setFinite(true);
  665|      0|        }
  666|     17|        else if (!facets)
  ------------------
  |  Branch (666:18): [True: 0, False: 17]
  ------------------
  667|      0|        {
  668|      0|            datatypeValidator->setFinite(false);
  669|      0|        }
  670|     17|        else if (facets->get(SchemaSymbols::fgELT_LENGTH) || facets->get(SchemaSymbols::fgELT_MAXLENGTH) ||
  ------------------
  |  Branch (670:18): [True: 0, False: 17]
  |  Branch (670:62): [True: 0, False: 17]
  ------------------
  671|     17|                 facets->get(SchemaSymbols::fgELT_TOTALDIGITS))
  ------------------
  |  Branch (671:18): [True: 0, False: 17]
  ------------------
  672|      0|        {
  673|      0|            datatypeValidator->setFinite(true);
  674|      0|        }
  675|       |        //for efficiency use this instead of rechecking...
  676|       |        //else if ((facets->get(SchemaSymbols::fgELT_MININCLUSIVE) || facets->get(SchemaSymbols::fgELT_MINEXCLUSIVE)) &&
  677|       |        //         (facets->get(SchemaSymbols::fgELT_MAXINCLUSIVE) || facets->get(SchemaSymbols::fgELT_MAXEXCLUSIVE)))
  678|     17|        else if (datatypeValidator->getBounded() ||
  ------------------
  |  Branch (678:18): [True: 5, False: 12]
  ------------------
  679|     17|                 datatypeValidator->getType() == DatatypeValidator::Date      ||
  ------------------
  |  Branch (679:18): [True: 0, False: 12]
  ------------------
  680|     17|                 datatypeValidator->getType() == DatatypeValidator::YearMonth ||
  ------------------
  |  Branch (680:18): [True: 0, False: 12]
  ------------------
  681|     17|                 datatypeValidator->getType() == DatatypeValidator::Year      ||
  ------------------
  |  Branch (681:18): [True: 0, False: 12]
  ------------------
  682|     17|                 datatypeValidator->getType() == DatatypeValidator::MonthDay  ||
  ------------------
  |  Branch (682:18): [True: 0, False: 12]
  ------------------
  683|     17|                 datatypeValidator->getType() == DatatypeValidator::Day       ||
  ------------------
  |  Branch (683:18): [True: 0, False: 12]
  ------------------
  684|     17|                 datatypeValidator->getType() == DatatypeValidator::Month)
  ------------------
  |  Branch (684:18): [True: 0, False: 12]
  ------------------
  685|      5|        {
  686|      5|            if (facets->get(SchemaSymbols::fgELT_FRACTIONDIGITS))
  ------------------
  |  Branch (686:17): [True: 0, False: 5]
  ------------------
  687|      0|            {
  688|      0|                datatypeValidator->setFinite(true);
  689|      0|            }
  690|      5|            else
  691|      5|            {
  692|      5|                datatypeValidator->setFinite(false);
  693|      5|            }
  694|      5|        }
  695|     12|        else
  696|     12|        {
  697|     12|            datatypeValidator->setFinite(false);
  698|     12|        }
  699|     17|    }
  700|       |
  701|     20|    if (datatypeValidator != 0) {
  ------------------
  |  Branch (701:9): [True: 20, False: 0]
  ------------------
  702|       |
  703|     20|        if (isUserDefined) {
  ------------------
  |  Branch (703:13): [True: 0, False: 20]
  ------------------
  704|       |
  705|      0|            if (!fUserDefinedRegistry) {
  ------------------
  |  Branch (705:17): [True: 0, False: 0]
  ------------------
  706|      0|                fUserDefinedRegistry = new (userManager) RefHashTableOf<DatatypeValidator>(29, userManager);
  707|      0|            }
  708|       |
  709|      0|            fUserDefinedRegistry->put((void *)typeName, datatypeValidator);
  710|      0|        }
  711|     20|        else {
  712|     20|            fBuiltInRegistry->put((void *)typeName, datatypeValidator);
  713|     20|        }
  714|       |
  715|     20|        datatypeValidator->setTypeName(typeName);
  716|     20|    }
  717|       |
  718|     20|    return datatypeValidator;
  719|     20|}

_ZNK11xercesc_3_224DatatypeValidatorFactory20getDatatypeValidatorEPKDs:
  244|     42|{
  245|     42|	if (dvType) {
  ------------------
  |  Branch (245:6): [True: 42, False: 0]
  ------------------
  246|     42|        if (fBuiltInRegistry && fBuiltInRegistry->containsKey(dvType)) {
  ------------------
  |  Branch (246:13): [True: 42, False: 0]
  |  Branch (246:33): [True: 42, False: 0]
  ------------------
  247|     42|		    return fBuiltInRegistry->get(dvType);
  248|     42|        }
  249|       |
  250|      0|        if (fUserDefinedRegistry && fUserDefinedRegistry->containsKey(dvType)) {
  ------------------
  |  Branch (250:13): [True: 0, False: 0]
  |  Branch (250:37): [True: 0, False: 0]
  ------------------
  251|      0|		    return fUserDefinedRegistry->get(dvType);
  252|       |
  253|      0|        }
  254|      0|    }
  255|      0|	return 0;
  256|     42|}
_ZN11xercesc_3_224DatatypeValidatorFactory7cleanUpEv:
  270|      2|inline void DatatypeValidatorFactory::cleanUp() {
  271|       |
  272|      2|    if (fUserDefinedRegistry)
  ------------------
  |  Branch (272:9): [True: 0, False: 2]
  ------------------
  273|      0|    {
  274|      0|	    delete fUserDefinedRegistry;
  275|      0|	    fUserDefinedRegistry = 0;
  276|      0|    }
  277|      2|}

_ZN11xercesc_3_221DateDatatypeValidatorC2EPNS_13MemoryManagerE:
   34|      1|:DateTimeValidator(0, 0, 0, DatatypeValidator::Date, manager)
   35|      1|{
   36|      1|    setOrdered(XSSimpleTypeDefinition::ORDERED_PARTIAL);
   37|      1|}

_ZN11xercesc_3_225DateTimeDatatypeValidatorC2EPNS_13MemoryManagerE:
   34|      1|:DateTimeValidator(0, 0, 0, DatatypeValidator::DateTime, manager)
   35|      1|{
   36|      1|    setOrdered(XSSimpleTypeDefinition::ORDERED_PARTIAL);
   37|      1|}

_ZN11xercesc_3_217DateTimeValidatorC2EPNS_17DatatypeValidatorEPNS_14RefHashTableOfINS_12KVStringPairENS_12StringHasherEEEiNS1_13ValidatorTypeEPNS_13MemoryManagerE:
   56|      9|:AbstractNumericFacetValidator(baseValidator, facets, finalSet, type, manager)
   57|      9|{
   58|       |    //do not invoke init() here !!!
   59|      9|}

_ZN11xercesc_3_220DayDatatypeValidatorC2EPNS_13MemoryManagerE:
   34|      1|:DateTimeValidator(0, 0, 0, DatatypeValidator::Day, manager)
   35|      1|{
   36|      1|    setOrdered(XSSimpleTypeDefinition::ORDERED_PARTIAL);
   37|      1|}

_ZN11xercesc_3_224DecimalDatatypeValidatorC2EPNS_13MemoryManagerE:
   44|      1|:AbstractNumericValidator(0, 0, 0, DatatypeValidator::Decimal, manager)
   45|      1|, fTotalDigits(0)
   46|      1|, fFractionDigits(0)
   47|      1|{
   48|      1|    setOrdered(XSSimpleTypeDefinition::ORDERED_TOTAL);
   49|      1|    setNumeric(true);
   50|      1|}
_ZN11xercesc_3_224DecimalDatatypeValidatorC2EPNS_17DatatypeValidatorEPNS_14RefHashTableOfINS_12KVStringPairENS_12StringHasherEEEPNS_16RefArrayVectorOfIDsEEiPNS_13MemoryManagerE:
   58|     13|:AbstractNumericValidator(baseValidator, facets, finalSet, DatatypeValidator::Decimal, manager)
   59|     13|, fTotalDigits(0)
   60|     13|, fFractionDigits(0)
   61|     13|{
   62|     13|    init(enums, manager);
   63|     13|}
_ZN11xercesc_3_224DecimalDatatypeValidator11newInstanceEPNS_14RefHashTableOfINS_12KVStringPairENS_12StringHasherEEEPNS_16RefArrayVectorOfIDsEEiPNS_13MemoryManagerE:
   89|     13|{
   90|     13|    return (DatatypeValidator*) new (manager) DecimalDatatypeValidator(this, facets, enums, finalSet, manager);
   91|     13|}
_ZN11xercesc_3_224DecimalDatatypeValidator21assignAdditionalFacetEPKDsS2_PNS_13MemoryManagerE:
  111|      1|{
  112|      1|    if (XMLString::equals(key, SchemaSymbols::fgELT_TOTALDIGITS))
  ------------------
  |  Branch (112:9): [True: 0, False: 1]
  ------------------
  113|      0|    {
  114|      0|        int val;
  115|      0|        try
  116|      0|        {
  117|      0|            val = XMLString::parseInt(value, manager);
  118|      0|        }
  119|      0|        catch (NumberFormatException&)
  120|      0|        {
  121|      0|            ThrowXMLwithMemMgr1(InvalidDatatypeFacetException, XMLExcepts::FACET_Invalid_TotalDigit, value, manager);
  ------------------
  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
  122|      0|        }
  123|       |
  124|       |        // check 4.3.11.c0 must: totalDigits > 0
  125|      0|        if ( val <= 0 )
  ------------------
  |  Branch (125:14): [True: 0, False: 0]
  ------------------
  126|      0|            ThrowXMLwithMemMgr1(InvalidDatatypeFacetException, XMLExcepts::FACET_PosInt_TotalDigit, value, manager);
  ------------------
  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
  127|       |
  128|      0|        setTotalDigits(val);
  129|      0|        setFacetsDefined(DatatypeValidator::FACET_TOTALDIGITS);
  130|      0|    }
  131|      1|    else if (XMLString::equals(key, SchemaSymbols::fgELT_FRACTIONDIGITS))
  ------------------
  |  Branch (131:14): [True: 1, False: 0]
  ------------------
  132|      1|    {
  133|      1|        int val;
  134|      1|        try
  135|      1|        {
  136|      1|            val = XMLString::parseInt(value, manager);
  137|      1|        }
  138|      1|        catch (NumberFormatException&)
  139|      1|        {
  140|      0|            ThrowXMLwithMemMgr1(InvalidDatatypeFacetException, XMLExcepts::FACET_Invalid_FractDigit, value, manager);
  ------------------
  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
  141|      0|        }
  142|       |
  143|       |        // check 4.3.12.c0 must: fractionDigits > 0
  144|      1|        if ( val < 0 )
  ------------------
  |  Branch (144:14): [True: 0, False: 1]
  ------------------
  145|      0|            ThrowXMLwithMemMgr1(InvalidDatatypeFacetException, XMLExcepts::FACET_NonNeg_FractDigit, value, manager);
  ------------------
  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
  146|       |
  147|      1|        setFractionDigits(val);
  148|      1|        setFacetsDefined(DatatypeValidator::FACET_FRACTIONDIGITS);
  149|      1|    }
  150|      0|    else
  151|      0|    {
  152|      0|        ThrowXMLwithMemMgr1(InvalidDatatypeFacetException
  ------------------
  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
  153|      0|                , XMLExcepts::FACET_Invalid_Tag
  154|      0|                , key
  155|      0|                , manager);
  156|      0|    }
  157|      1|}
_ZN11xercesc_3_224DecimalDatatypeValidator22inheritAdditionalFacetEv:
  160|     13|{
  161|       |
  162|     13|    DecimalDatatypeValidator *numBase = (DecimalDatatypeValidator*) getBaseValidator();
  163|       |
  164|     13|    if (!numBase)
  ------------------
  |  Branch (164:9): [True: 0, False: 13]
  ------------------
  165|      0|        return;
  166|       |
  167|     13|    int thisFacetsDefined = getFacetsDefined();
  168|     13|    int baseFacetsDefined = numBase->getFacetsDefined();
  169|       |
  170|       |    // inherit totalDigits
  171|     13|    if ((( baseFacetsDefined & DatatypeValidator::FACET_TOTALDIGITS) != 0) &&
  ------------------
  |  Branch (171:9): [True: 0, False: 13]
  ------------------
  172|     13|        (( thisFacetsDefined & DatatypeValidator::FACET_TOTALDIGITS) == 0) )
  ------------------
  |  Branch (172:9): [True: 0, False: 0]
  ------------------
  173|      0|    {
  174|      0|        setTotalDigits(numBase->fTotalDigits);
  175|      0|        setFacetsDefined(DatatypeValidator::FACET_TOTALDIGITS);
  176|      0|    }
  177|       |
  178|       |    // inherit fractionDigits
  179|     13|    if ((( baseFacetsDefined & DatatypeValidator::FACET_FRACTIONDIGITS) != 0) &&
  ------------------
  |  Branch (179:9): [True: 12, False: 1]
  ------------------
  180|     13|        (( thisFacetsDefined & DatatypeValidator::FACET_FRACTIONDIGITS) == 0) )
  ------------------
  |  Branch (180:9): [True: 12, False: 0]
  ------------------
  181|     12|    {
  182|     12|        setFractionDigits(numBase->fFractionDigits);
  183|     12|        setFacetsDefined(DatatypeValidator::FACET_FRACTIONDIGITS);
  184|     12|    }
  185|     13|}
_ZNK11xercesc_3_224DecimalDatatypeValidator31checkAdditionalFacetConstraintsEPNS_13MemoryManagerE:
  188|     13|{
  189|     13|    int thisFacetsDefined = getFacetsDefined();
  190|       |
  191|       |    // check 4.3.12.c1 must: fractionDigits <= totalDigits
  192|     13|    if ( ((thisFacetsDefined & DatatypeValidator::FACET_FRACTIONDIGITS) != 0) &&
  ------------------
  |  Branch (192:10): [True: 1, False: 12]
  ------------------
  193|     13|         ((thisFacetsDefined & DatatypeValidator::FACET_TOTALDIGITS) != 0) )
  ------------------
  |  Branch (193:10): [True: 0, False: 1]
  ------------------
  194|      0|    {
  195|      0|        if ( fFractionDigits > fTotalDigits )
  ------------------
  |  Branch (195:14): [True: 0, False: 0]
  ------------------
  196|      0|        {
  197|      0|            XMLCh value1[BUF_LEN+1];
  198|      0|            XMLCh value2[BUF_LEN+1];
  199|      0|            XMLString::binToText(getFractionDigits(), value1, BUF_LEN, 10, manager);
  200|      0|            XMLString::binToText(getTotalDigits(), value2, BUF_LEN, 10, manager);
  201|      0|            ThrowXMLwithMemMgr2(InvalidDatatypeFacetException
  ------------------
  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  ------------------
  202|      0|                                 , XMLExcepts::FACET_TotDigit_FractDigit
  203|      0|                                 , value2
  204|      0|                                 , value1
  205|      0|                                 , manager);
  206|      0|        }
  207|      0|    }
  208|       |
  209|     13|}
_ZNK11xercesc_3_224DecimalDatatypeValidator35checkAdditionalFacetConstraintsBaseEPNS_13MemoryManagerE:
  212|     13|{
  213|       |
  214|     13|    DecimalDatatypeValidator *numBase = (DecimalDatatypeValidator*) getBaseValidator();
  215|       |
  216|     13|    if (!numBase)
  ------------------
  |  Branch (216:9): [True: 0, False: 13]
  ------------------
  217|      0|        return;
  218|       |
  219|     13|    int thisFacetsDefined = getFacetsDefined();
  220|     13|    int baseFacetsDefined = numBase->getFacetsDefined();
  221|       |
  222|       |    // check 4.3.11.c1 error: totalDigits > base.totalDigits
  223|       |    // totalDigits != base.totalDigits if (base.fixed)
  224|     13|    if (( thisFacetsDefined & DatatypeValidator::FACET_TOTALDIGITS) != 0)
  ------------------
  |  Branch (224:9): [True: 0, False: 13]
  ------------------
  225|      0|    {
  226|      0|        if ( (( baseFacetsDefined & DatatypeValidator::FACET_TOTALDIGITS) != 0) &&
  ------------------
  |  Branch (226:14): [True: 0, False: 0]
  ------------------
  227|      0|            ( fTotalDigits > numBase->fTotalDigits ))
  ------------------
  |  Branch (227:13): [True: 0, False: 0]
  ------------------
  228|      0|        {
  229|      0|            XMLCh value1[BUF_LEN+1];
  230|      0|            XMLCh value2[BUF_LEN+1];
  231|      0|            XMLString::binToText(fTotalDigits, value1, BUF_LEN, 10, manager);
  232|      0|            XMLString::binToText(numBase->fTotalDigits, value2, BUF_LEN, 10, manager);
  233|      0|            ThrowXMLwithMemMgr2(InvalidDatatypeFacetException
  ------------------
  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  ------------------
  234|      0|                                 , XMLExcepts::FACET_totalDigit_base_totalDigit
  235|      0|                                 , value1
  236|      0|                                 , value2
  237|      0|                                 , manager);
  238|      0|        }
  239|       |
  240|      0|        if ( (( baseFacetsDefined & DatatypeValidator::FACET_TOTALDIGITS) != 0) &&
  ------------------
  |  Branch (240:14): [True: 0, False: 0]
  ------------------
  241|      0|            (( numBase->getFixed() & DatatypeValidator::FACET_TOTALDIGITS) != 0) &&
  ------------------
  |  Branch (241:13): [True: 0, False: 0]
  ------------------
  242|      0|            ( fTotalDigits != numBase->fTotalDigits ))
  ------------------
  |  Branch (242:13): [True: 0, False: 0]
  ------------------
  243|      0|        {
  244|      0|            XMLCh value1[BUF_LEN+1];
  245|      0|            XMLCh value2[BUF_LEN+1];
  246|      0|            XMLString::binToText(fTotalDigits, value1, BUF_LEN, 10, manager);
  247|      0|            XMLString::binToText(numBase->fTotalDigits, value2, BUF_LEN, 10, manager);
  248|      0|            ThrowXMLwithMemMgr2(InvalidDatatypeFacetException
  ------------------
  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  ------------------
  249|      0|                                 , XMLExcepts::FACET_totalDigit_base_fixed
  250|      0|                                 , value1
  251|      0|                                 , value2
  252|      0|                                 , manager);
  253|      0|        }
  254|      0|    }
  255|       |
  256|     13|    if (( thisFacetsDefined & DatatypeValidator::FACET_FRACTIONDIGITS) != 0)
  ------------------
  |  Branch (256:9): [True: 1, False: 12]
  ------------------
  257|      1|    {
  258|       |        // check question error: fractionDigits > base.fractionDigits ???
  259|      1|        if ( (( baseFacetsDefined & DatatypeValidator::FACET_FRACTIONDIGITS) != 0) &&
  ------------------
  |  Branch (259:14): [True: 0, False: 1]
  ------------------
  260|      1|            ( fFractionDigits > numBase->fFractionDigits ))
  ------------------
  |  Branch (260:13): [True: 0, False: 0]
  ------------------
  261|      0|        {
  262|      0|            XMLCh value1[BUF_LEN+1];
  263|      0|            XMLCh value2[BUF_LEN+1];
  264|      0|            XMLString::binToText(fFractionDigits, value1, BUF_LEN, 10, manager);
  265|      0|            XMLString::binToText(numBase->fFractionDigits, value2, BUF_LEN, 10, manager);
  266|      0|            ThrowXMLwithMemMgr2(InvalidDatatypeFacetException
  ------------------
  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  ------------------
  267|      0|                                 , XMLExcepts::FACET_fractDigit_base_fractDigit
  268|      0|                                 , value1
  269|      0|                                 , value2
  270|      0|                                 , manager);
  271|      0|                        }
  272|       |
  273|       |        // check question error: fractionDigits > base.totalDigits ???
  274|      1|        if ( (( baseFacetsDefined & DatatypeValidator::FACET_TOTALDIGITS) != 0) &&
  ------------------
  |  Branch (274:14): [True: 0, False: 1]
  ------------------
  275|      1|            ( fFractionDigits > numBase->fTotalDigits ))
  ------------------
  |  Branch (275:13): [True: 0, False: 0]
  ------------------
  276|      0|        {
  277|      0|            XMLCh value1[BUF_LEN+1];
  278|      0|            XMLCh value2[BUF_LEN+1];
  279|      0|            XMLString::binToText(fFractionDigits, value1, BUF_LEN, 10, manager);
  280|      0|            XMLString::binToText(numBase->fTotalDigits, value2, BUF_LEN, 10, manager);
  281|      0|            ThrowXMLwithMemMgr2(InvalidDatatypeFacetException
  ------------------
  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  ------------------
  282|      0|                                 , XMLExcepts::FACET_fractDigit_base_totalDigit
  283|      0|                                 , value1
  284|      0|                                 , value2
  285|      0|                                 , manager);
  286|      0|        }
  287|       |
  288|       |        // fractionDigits != base.fractionDigits if (base.fixed)
  289|      1|        if ( (( baseFacetsDefined & DatatypeValidator::FACET_FRACTIONDIGITS) != 0) &&
  ------------------
  |  Branch (289:14): [True: 0, False: 1]
  ------------------
  290|      1|            (( numBase->getFixed() & DatatypeValidator::FACET_FRACTIONDIGITS) != 0) &&
  ------------------
  |  Branch (290:13): [True: 0, False: 0]
  ------------------
  291|      1|            ( fFractionDigits != numBase->fFractionDigits ))
  ------------------
  |  Branch (291:13): [True: 0, False: 0]
  ------------------
  292|      0|        {
  293|      0|            XMLCh value1[BUF_LEN+1];
  294|      0|            XMLCh value2[BUF_LEN+1];
  295|      0|            XMLString::binToText(fFractionDigits, value1, BUF_LEN, 10, manager);
  296|      0|            XMLString::binToText(numBase->fFractionDigits, value2, BUF_LEN, 10, manager);
  297|      0|            ThrowXMLwithMemMgr2(InvalidDatatypeFacetException
  ------------------
  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  ------------------
  298|      0|                                 , XMLExcepts::FACET_fractDigit_base_fixed
  299|      0|                                 , value1
  300|      0|                                 , value2
  301|      0|                                 , manager);
  302|      0|        }
  303|      1|    }
  304|       |
  305|     13|}
_ZN11xercesc_3_224DecimalDatatypeValidator13compareValuesEPKNS_9XMLNumberES3_:
  309|     46|{
  310|     46|    return XMLBigDecimal::compareValues((XMLBigDecimal*) lValue, (XMLBigDecimal*) rValue,
  311|     46|                                        ((XMLBigDecimal*)lValue)->getMemoryManager());
  312|     46|}
_ZN11xercesc_3_224DecimalDatatypeValidator15setMaxInclusiveEPKDs:
  315|     10|{
  316|     10|    fMaxInclusive = new (fMemoryManager) XMLBigDecimal(value, fMemoryManager);
  317|     10|}
_ZN11xercesc_3_224DecimalDatatypeValidator15setMinInclusiveEPKDs:
  325|      6|{
  326|      6|    fMinInclusive = new (fMemoryManager) XMLBigDecimal(value, fMemoryManager);
  327|      6|}
_ZN11xercesc_3_224DecimalDatatypeValidator12checkContentEPKDsPNS_17ValidationContextEbPNS_13MemoryManagerE:
  392|     56|{
  393|       |    //validate against base validator if any
  394|     56|    DecimalDatatypeValidator *pBase = (DecimalDatatypeValidator*) this->getBaseValidator();
  395|     56|    if (pBase)
  ------------------
  |  Branch (395:9): [True: 40, False: 16]
  ------------------
  396|     40|        pBase->checkContent(content, context, true, manager);
  397|       |
  398|     56|    int thisFacetsDefined = getFacetsDefined();
  399|       |
  400|       |    // we check pattern first
  401|     56|    if ( (thisFacetsDefined & DatatypeValidator::FACET_PATTERN ) != 0 )
  ------------------
  |  Branch (401:10): [True: 16, False: 40]
  ------------------
  402|     16|    {
  403|     16|        if (getRegex()->matches(content, manager) ==false)
  ------------------
  |  Branch (403:13): [True: 0, False: 16]
  ------------------
  404|      0|        {
  405|      0|            ThrowXMLwithMemMgr2(InvalidDatatypeValueException
  ------------------
  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  ------------------
  406|      0|                    , XMLExcepts::VALUE_NotMatch_Pattern
  407|      0|                    , content
  408|      0|                    , getPattern()
  409|      0|                    , manager);
  410|      0|        }
  411|     16|    }
  412|       |
  413|       |    // if this is a base validator, we only need to check pattern facet
  414|       |    // all other facet were inherited by the derived type
  415|     56|    if (asBase)
  ------------------
  |  Branch (415:9): [True: 40, False: 16]
  ------------------
  416|     40|        return;
  417|       |
  418|     16|    XMLBigDecimal  compareDataValue(content, manager);
  419|     16|    XMLBigDecimal* compareData = &compareDataValue;
  420|       |
  421|     16|    if (getEnumeration())
  ------------------
  |  Branch (421:9): [True: 0, False: 16]
  ------------------
  422|      0|    {
  423|      0|        XMLSize_t i=0;
  424|      0|        XMLSize_t enumLength = getEnumeration()->size();
  425|      0|        for ( ; i < enumLength; i++)
  ------------------
  |  Branch (425:17): [True: 0, False: 0]
  ------------------
  426|      0|        {
  427|      0|            if (compareValues(compareData, (XMLBigDecimal*) getEnumeration()->elementAt(i)) ==0 )
  ------------------
  |  Branch (427:17): [True: 0, False: 0]
  ------------------
  428|      0|                break;
  429|      0|        }
  430|       |
  431|      0|        if (i == enumLength)
  ------------------
  |  Branch (431:13): [True: 0, False: 0]
  ------------------
  432|      0|            ThrowXMLwithMemMgr1(InvalidDatatypeValueException, XMLExcepts::VALUE_NotIn_Enumeration, content, manager);
  ------------------
  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
  433|      0|    }
  434|       |
  435|     16|    boundsCheck(compareData, manager);
  436|       |
  437|     16|    if ( (thisFacetsDefined & DatatypeValidator::FACET_FRACTIONDIGITS) != 0 )
  ------------------
  |  Branch (437:10): [True: 16, False: 0]
  ------------------
  438|     16|    {
  439|     16|        if ( compareData->getScale() > fFractionDigits )
  ------------------
  |  Branch (439:14): [True: 0, False: 16]
  ------------------
  440|      0|        {
  441|      0|            XMLCh value1[BUF_LEN+1];
  442|      0|            XMLCh value2[BUF_LEN+1];
  443|      0|            XMLString::binToText(compareData->getScale(), value1, BUF_LEN, 10, manager);
  444|      0|            XMLString::binToText(fFractionDigits, value2, BUF_LEN, 10, manager);
  445|      0|            ThrowXMLwithMemMgr3(InvalidDatatypeFacetException
  ------------------
  |  |  270|      0|#define ThrowXMLwithMemMgr3(type,code,p1,p2,p3,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, p3, 0, memMgr)
  ------------------
  446|      0|                              , XMLExcepts::VALUE_exceed_fractDigit
  447|      0|                              , compareData->getRawData()
  448|      0|                              , value1
  449|      0|                              , value2
  450|      0|                              , manager);
  451|      0|        }
  452|     16|    }
  453|       |
  454|     16|    if ( (thisFacetsDefined & DatatypeValidator::FACET_TOTALDIGITS) != 0 )
  ------------------
  |  Branch (454:10): [True: 0, False: 16]
  ------------------
  455|      0|    {
  456|      0|        if ( compareData->getTotalDigit() > fTotalDigits )
  ------------------
  |  Branch (456:14): [True: 0, False: 0]
  ------------------
  457|      0|        {
  458|      0|            XMLCh value1[BUF_LEN+1];
  459|      0|            XMLCh value2[BUF_LEN+1];
  460|      0|            XMLString::binToText(compareData->getTotalDigit(), value1, BUF_LEN, 10, manager);
  461|      0|            XMLString::binToText(fTotalDigits, value2, BUF_LEN, 10, manager);
  462|      0|            ThrowXMLwithMemMgr3(InvalidDatatypeFacetException
  ------------------
  |  |  270|      0|#define ThrowXMLwithMemMgr3(type,code,p1,p2,p3,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, p3, 0, memMgr)
  ------------------
  463|      0|                              , XMLExcepts::VALUE_exceed_totalDigit
  464|      0|                              , compareData->getRawData()
  465|      0|                              , value1
  466|      0|                              , value2
  467|      0|                              , manager);
  468|      0|        }
  469|       |
  470|       |        /***
  471|       |         E2-44 totalDigits
  472|       |         ... by restricting it to numbers that are expressible as i x 10^-n
  473|       |         where i and n are integers such that |i| < 10^totalDigits and 0 <= n <= totalDigits.
  474|       |         ***/
  475|       |
  476|      0|        if ( compareData->getScale() > fTotalDigits )
  ------------------
  |  Branch (476:14): [True: 0, False: 0]
  ------------------
  477|      0|        {
  478|      0|            XMLCh value1[BUF_LEN+1];
  479|      0|            XMLCh value2[BUF_LEN+1];
  480|      0|            XMLString::binToText(compareData->getScale(), value1, BUF_LEN, 10, manager);
  481|      0|            XMLString::binToText(fTotalDigits, value2, BUF_LEN, 10, manager);
  482|      0|            ThrowXMLwithMemMgr3(InvalidDatatypeFacetException
  ------------------
  |  |  270|      0|#define ThrowXMLwithMemMgr3(type,code,p1,p2,p3,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, p3, 0, memMgr)
  ------------------
  483|      0|                              , XMLExcepts::VALUE_exceed_totalDigit
  484|      0|                              , compareData->getRawData()
  485|      0|                              , value1
  486|      0|                              , value2
  487|      0|                              , manager);
  488|      0|        }
  489|      0|    }
  490|     16|}

_ZN11xercesc_3_224DecimalDatatypeValidator17setFractionDigitsEj:
  208|     13|{
  209|     13|    fFractionDigits = newFractionDigits;
  210|     13|}

_ZN11xercesc_3_223DoubleDatatypeValidatorC2EPNS_13MemoryManagerE:
   35|      1|:AbstractNumericValidator(0, 0, 0, DatatypeValidator::Double, manager)
   36|      1|{
   37|      1|    setOrdered(XSSimpleTypeDefinition::ORDERED_PARTIAL);
   38|      1|    setBounded(true);
   39|      1|    setFinite(true);
   40|      1|    setNumeric(true);
   41|      1|}

_ZN11xercesc_3_225DurationDatatypeValidatorC2EPNS_13MemoryManagerE:
   34|      1|:DateTimeValidator(0, 0, 0, DatatypeValidator::Duration, manager)
   35|      1|{
   36|      1|    setOrdered(XSSimpleTypeDefinition::ORDERED_PARTIAL);
   37|      1|}

_ZN11xercesc_3_223ENTITYDatatypeValidatorC2EPNS_17DatatypeValidatorEPNS_14RefHashTableOfINS_12KVStringPairENS_12StringHasherEEEPNS_16RefArrayVectorOfIDsEEiPNS_13MemoryManagerE:
   45|      1|:StringDatatypeValidator(baseValidator, facets, finalSet, DatatypeValidator::ENTITY, manager)
   46|      1|{
   47|      1|    init(enums, manager);
   48|      1|}

_ZN11xercesc_3_222FloatDatatypeValidatorC2EPNS_13MemoryManagerE:
   36|      1|:AbstractNumericValidator(0, 0, 0, DatatypeValidator::Float, manager)
   37|      1|{
   38|      1|    setOrdered(XSSimpleTypeDefinition::ORDERED_PARTIAL);
   39|      1|    setBounded(true);
   40|      1|    setFinite(true);
   41|      1|    setNumeric(true);
   42|      1|}

_ZN11xercesc_3_226HexBinaryDatatypeValidatorC2EPNS_13MemoryManagerE:
   36|      1|:AbstractStringValidator(0, 0, 0, DatatypeValidator::HexBinary, manager)
   37|      1|{}

_ZN11xercesc_3_219IDDatatypeValidatorC2EPNS_17DatatypeValidatorEPNS_14RefHashTableOfINS_12KVStringPairENS_12StringHasherEEEPNS_16RefArrayVectorOfIDsEEiPNS_13MemoryManagerE:
   44|      1|:StringDatatypeValidator(baseValidator, facets, finalSet, DatatypeValidator::ID, manager)
   45|      1|{
   46|      1|    init(enums, manager);
   47|      1|}

_ZN11xercesc_3_222IDREFDatatypeValidatorC2EPNS_17DatatypeValidatorEPNS_14RefHashTableOfINS_12KVStringPairENS_12StringHasherEEEPNS_16RefArrayVectorOfIDsEEiPNS_13MemoryManagerE:
   44|      1|:StringDatatypeValidator(baseValidator, facets, finalSet, DatatypeValidator::IDREF, manager)
   45|      1|{
   46|      1|    init(enums, manager);
   47|      1|}

_ZN11xercesc_3_221ListDatatypeValidatorC2EPNS_17DatatypeValidatorEPNS_14RefHashTableOfINS_12KVStringPairENS_12StringHasherEEEPNS_16RefArrayVectorOfIDsEEiPNS_13MemoryManagerE:
   48|      3|:AbstractStringValidator(baseValidator, facets, finalSet, DatatypeValidator::List, manager)
   49|      3|,fContent(0)
   50|      3|{
   51|       |    //
   52|       |    // baseValidator shall either
   53|       |    // an atomic DTV which servers as itemType, or
   54|       |    // another ListDTV from which, this ListDTV is derived by restriction.
   55|       |    //
   56|       |    // In either case, it shall be not null
   57|       |    //
   58|      3|    if (!baseValidator)
  ------------------
  |  Branch (58:9): [True: 0, False: 3]
  ------------------
   59|      0|        ThrowXMLwithMemMgr(InvalidDatatypeFacetException, XMLExcepts::FACET_List_Null_baseValidator, manager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
   60|       |
   61|      3|    init(enums, manager);
   62|      3|}
_ZN11xercesc_3_221ListDatatypeValidator16inspectFacetBaseEPNS_13MemoryManagerE:
  299|      3|{
  300|       |
  301|       |    //
  302|       |    // we are pretty sure baseValidator is not null
  303|       |    //
  304|       |
  305|      3|    if (getBaseValidator()->getType() == DatatypeValidator::List)
  ------------------
  |  Branch (305:9): [True: 0, False: 3]
  ------------------
  306|      0|    {
  307|      0|        AbstractStringValidator::inspectFacetBase(manager);
  308|      0|    }
  309|      3|    else
  310|      3|    {
  311|       |        // the first level ListDTV
  312|       |        // check 4.3.5.c0 must: enumeration values from the value space of base
  313|      3|        if ( ((getFacetsDefined() & DatatypeValidator::FACET_ENUMERATION) != 0) &&
  ------------------
  |  Branch (313:14): [True: 0, False: 3]
  ------------------
  314|      3|             (getEnumeration() !=0)                                              )
  ------------------
  |  Branch (314:14): [True: 0, False: 0]
  ------------------
  315|      0|        {
  316|      0|            XMLSize_t i;
  317|      0|            XMLSize_t enumLength = getEnumeration()->size();
  318|      0|            try
  319|      0|            {
  320|      0|                for ( i = 0; i < enumLength; i++)
  ------------------
  |  Branch (320:30): [True: 0, False: 0]
  ------------------
  321|      0|                {
  322|       |                    // ask the itemType for a complete check
  323|      0|                    BaseRefVectorOf<XMLCh>* tempList = XMLString::tokenizeString(getEnumeration()->elementAt(i), manager);
  324|      0|                    Janitor<BaseRefVectorOf<XMLCh> >    jan(tempList);
  325|      0|                    XMLSize_t tokenNumber = tempList->size();
  326|       |
  327|      0|                    try
  328|      0|                    {
  329|      0|                        for ( XMLSize_t j = 0; j < tokenNumber; j++)
  ------------------
  |  Branch (329:48): [True: 0, False: 0]
  ------------------
  330|      0|                            getBaseValidator()->validate(tempList->elementAt(j), (ValidationContext*)0, manager);
  331|      0|                    }
  332|      0|                    catch(const OutOfMemoryException&)
  333|      0|                    {
  334|      0|                        jan.release();
  335|       |
  336|      0|                        throw;
  337|      0|                    }
  338|       |#if 0
  339|       |// spec says that only base has to checkContent                    
  340|       |                    // enum shall pass this->checkContent() as well.
  341|       |                    checkContent(getEnumeration()->elementAt(i), (ValidationContext*)0, false, manager);
  342|       |#endif
  343|      0|                }
  344|      0|            }
  345|       |
  346|      0|            catch ( XMLException& )
  347|      0|            {
  348|      0|                ThrowXMLwithMemMgr1(InvalidDatatypeFacetException
  ------------------
  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
  349|      0|                        , XMLExcepts::FACET_enum_base
  350|      0|                        , getEnumeration()->elementAt(i)
  351|      0|                        , manager);
  352|      0|            }
  353|       |
  354|      0|        }
  355|       |
  356|      3|    }
  357|       |
  358|      3|}// End of inspectFacetBase()
_ZN11xercesc_3_221ListDatatypeValidator12inheritFacetEv:
  361|      3|{
  362|       |
  363|       |    //iff the base validator is List, then we inherit
  364|       |    //
  365|      3|    if (getBaseValidator()->getType() == DatatypeValidator::List)
  ------------------
  |  Branch (365:9): [True: 0, False: 3]
  ------------------
  366|      0|    {
  367|      0|        AbstractStringValidator::inheritFacet();
  368|      0|    }
  369|       |
  370|      3|}

_ZN11xercesc_3_222MonthDatatypeValidatorC2EPNS_13MemoryManagerE:
   34|      1|:DateTimeValidator(0, 0, 0, DatatypeValidator::Month, manager)
   35|      1|{
   36|      1|    setOrdered(XSSimpleTypeDefinition::ORDERED_PARTIAL);
   37|      1|}

_ZN11xercesc_3_225MonthDayDatatypeValidatorC2EPNS_13MemoryManagerE:
   34|      1|:DateTimeValidator(0, 0, 0, DatatypeValidator::MonthDay, manager)
   35|      1|{
   36|      1|    setOrdered(XSSimpleTypeDefinition::ORDERED_PARTIAL);
   37|      1|}

_ZN11xercesc_3_223NCNameDatatypeValidatorC2EPNS_17DatatypeValidatorEPNS_14RefHashTableOfINS_12KVStringPairENS_12StringHasherEEEPNS_16RefArrayVectorOfIDsEEiPNS_13MemoryManagerE:
   47|      1|:StringDatatypeValidator(baseValidator, facets, finalSet, DatatypeValidator::NCName, manager)
   48|      1|{
   49|      1|    init(enums, manager);
   50|      1|}

_ZN11xercesc_3_225NOTATIONDatatypeValidatorC2EPNS_13MemoryManagerE:
   37|      1|:AbstractStringValidator(0, 0, 0, DatatypeValidator::NOTATION, manager)
   38|      1|{}

_ZN11xercesc_3_221NameDatatypeValidatorC2EPNS_17DatatypeValidatorEPNS_14RefHashTableOfINS_12KVStringPairENS_12StringHasherEEEPNS_16RefArrayVectorOfIDsEEiPNS_13MemoryManagerE:
   47|      1|:StringDatatypeValidator(baseValidator, facets, finalSet, DatatypeValidator::Name, manager)
   48|      1|{
   49|      1|    init(enums, manager);
   50|      1|}

_ZN11xercesc_3_222QNameDatatypeValidatorC2EPNS_13MemoryManagerE:
   37|      1|:AbstractStringValidator(0, 0, 0, DatatypeValidator::QName, manager)
   38|      1|{}

_ZN11xercesc_3_223StringDatatypeValidatorC2EPNS_13MemoryManagerE:
   36|      1|:AbstractStringValidator(0, 0, 0, DatatypeValidator::String, manager)
   37|      1|{
   38|      1|    setWhiteSpace(DatatypeValidator::PRESERVE);
   39|      1|}
_ZN11xercesc_3_223StringDatatypeValidatorC2EPNS_17DatatypeValidatorEPNS_14RefHashTableOfINS_12KVStringPairENS_12StringHasherEEEPNS_16RefArrayVectorOfIDsEEiPNS_13MemoryManagerE:
   47|      4|:AbstractStringValidator(baseValidator, facets, finalSet, DatatypeValidator::String, manager)
   48|      4|{
   49|      4|    setWhiteSpace(DatatypeValidator::PRESERVE);
   50|      4|    init(enums, manager);
   51|      4|}
_ZN11xercesc_3_223StringDatatypeValidator11newInstanceEPNS_14RefHashTableOfINS_12KVStringPairENS_12StringHasherEEEPNS_16RefArrayVectorOfIDsEEiPNS_13MemoryManagerE:
   63|      4|{
   64|      4|    return (DatatypeValidator*) new (manager) StringDatatypeValidator(this, facets, enums, finalSet, manager);
   65|      4|}
_ZN11xercesc_3_223StringDatatypeValidatorC2EPNS_17DatatypeValidatorEPNS_14RefHashTableOfINS_12KVStringPairENS_12StringHasherEEEiNS1_13ValidatorTypeEPNS_13MemoryManagerE:
   73|      5|:AbstractStringValidator(baseValidator, facets, finalSet, type, manager)
   74|      5|{
   75|      5|    setWhiteSpace(DatatypeValidator::PRESERVE);
   76|       |    // do not invoke init() here!!!
   77|      5|}
_ZN11xercesc_3_223StringDatatypeValidator21assignAdditionalFacetEPKDsS2_PNS_13MemoryManagerE:
   85|      3|{
   86|      3|    if (XMLString::equals(key, SchemaSymbols::fgELT_WHITESPACE))
  ------------------
  |  Branch (86:9): [True: 3, False: 0]
  ------------------
   87|      3|    {
   88|       |        // whiteSpace = preserve | replace | collapse
   89|      3|        if (XMLString::equals(value, SchemaSymbols::fgWS_PRESERVE))
  ------------------
  |  Branch (89:13): [True: 0, False: 3]
  ------------------
   90|      0|            setWhiteSpace(DatatypeValidator::PRESERVE);
   91|      3|        else if (XMLString::equals(value, SchemaSymbols::fgWS_REPLACE))
  ------------------
  |  Branch (91:18): [True: 1, False: 2]
  ------------------
   92|      1|            setWhiteSpace(DatatypeValidator::REPLACE);
   93|      2|        else if (XMLString::equals(value, SchemaSymbols::fgWS_COLLAPSE))
  ------------------
  |  Branch (93:18): [True: 2, False: 0]
  ------------------
   94|      2|            setWhiteSpace(DatatypeValidator::COLLAPSE);
   95|      0|        else
   96|      0|            ThrowXMLwithMemMgr1(InvalidDatatypeFacetException, XMLExcepts::FACET_Invalid_WS, value, manager);
  ------------------
  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
   97|       |        //("whiteSpace value '" + ws + "' must be one of 'preserve', 'replace', 'collapse'.");
   98|       |
   99|      3|        setFacetsDefined(DatatypeValidator::FACET_WHITESPACE);
  100|      3|    }
  101|      0|    else
  102|      0|    {
  103|      0|        ThrowXMLwithMemMgr1(InvalidDatatypeFacetException
  ------------------
  |  |  266|      0|#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)
  ------------------
  104|      0|                , XMLExcepts::FACET_Invalid_Tag
  105|      0|                , key
  106|      0|                , manager);
  107|      0|    }
  108|      3|}
_ZN11xercesc_3_223StringDatatypeValidator22inheritAdditionalFacetEv:
  111|      9|{
  112|      9|    StringDatatypeValidator *pBaseValidator = (StringDatatypeValidator*) getBaseValidator();
  113|       |
  114|      9|    if (!pBaseValidator)
  ------------------
  |  Branch (114:9): [True: 0, False: 9]
  ------------------
  115|      0|        return;
  116|       |
  117|       |    // inherit whitespace
  118|      9|    if (((pBaseValidator->getFacetsDefined() & DatatypeValidator::FACET_WHITESPACE) !=0) &&
  ------------------
  |  Branch (118:9): [True: 8, False: 1]
  ------------------
  119|      9|        ((getFacetsDefined() & DatatypeValidator::FACET_WHITESPACE) == 0))
  ------------------
  |  Branch (119:9): [True: 6, False: 2]
  ------------------
  120|      6|    {
  121|      6|        setWhiteSpace(getBaseValidator()->getWSFacet());
  122|      6|        setFacetsDefined(DatatypeValidator::FACET_WHITESPACE);
  123|      6|    }
  124|      9|}
_ZNK11xercesc_3_223StringDatatypeValidator31checkAdditionalFacetConstraintsEPNS_13MemoryManagerE:
  127|      4|{
  128|       |
  129|      4|    StringDatatypeValidator *pBaseValidator = (StringDatatypeValidator*) getBaseValidator();
  130|       |
  131|      4|    if (!pBaseValidator)
  ------------------
  |  Branch (131:9): [True: 0, False: 4]
  ------------------
  132|      0|        return;
  133|       |
  134|      4|    short    thisWSFacet = getWSFacet();
  135|      4|    short    baseWSFacet = pBaseValidator->getWSFacet();
  136|       |
  137|       |    // check 4.3.6.c1 error: whitespace
  138|      4|    if (((getFacetsDefined() & DatatypeValidator::FACET_WHITESPACE) != 0) &&
  ------------------
  |  Branch (138:9): [True: 3, False: 1]
  ------------------
  139|      4|        ((pBaseValidator->getFacetsDefined() & DatatypeValidator::FACET_WHITESPACE) != 0 ))
  ------------------
  |  Branch (139:9): [True: 2, False: 1]
  ------------------
  140|      2|    {
  141|      2|        if ((baseWSFacet == DatatypeValidator::COLLAPSE) &&
  ------------------
  |  Branch (141:13): [True: 1, False: 1]
  ------------------
  142|      2|            ((thisWSFacet == DatatypeValidator::PRESERVE) ||
  ------------------
  |  Branch (142:14): [True: 0, False: 1]
  ------------------
  143|      1|             (thisWSFacet == DatatypeValidator::REPLACE)))
  ------------------
  |  Branch (143:14): [True: 0, False: 1]
  ------------------
  144|      0|             ThrowXMLwithMemMgr(InvalidDatatypeFacetException, XMLExcepts::FACET_WS_collapse, manager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  145|       |
  146|      2|        if ((baseWSFacet == DatatypeValidator::REPLACE) &&
  ------------------
  |  Branch (146:13): [True: 1, False: 1]
  ------------------
  147|      2|            (thisWSFacet == DatatypeValidator::PRESERVE))
  ------------------
  |  Branch (147:13): [True: 0, False: 1]
  ------------------
  148|      0|            ThrowXMLwithMemMgr(InvalidDatatypeFacetException, XMLExcepts::FACET_WS_replace, manager);
  ------------------
  |  |  264|      0|#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)
  ------------------
  149|       |
  150|      2|        if (((pBaseValidator->getFixed() & DatatypeValidator::FACET_WHITESPACE) !=0) &&
  ------------------
  |  Branch (150:13): [True: 0, False: 2]
  ------------------
  151|      2|            ( thisWSFacet != baseWSFacet))
  ------------------
  |  Branch (151:13): [True: 0, False: 0]
  ------------------
  152|      0|        {
  153|      0|            ThrowXMLwithMemMgr2(InvalidDatatypeFacetException
  ------------------
  |  |  268|      0|#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)
  ------------------
  154|      0|                        , XMLExcepts::FACET_whitespace_base_fixed
  155|      0|                        , getWSstring(thisWSFacet)
  156|      0|                        , getWSstring(baseWSFacet)
  157|      0|                        , manager);
  158|      0|        }
  159|      2|    }
  160|       |
  161|      4|}

_ZN11xercesc_3_221TimeDatatypeValidatorC2EPNS_13MemoryManagerE:
   34|      1|:DateTimeValidator(0, 0, 0, DatatypeValidator::Time, manager)
   35|      1|{
   36|      1|    setOrdered(XSSimpleTypeDefinition::ORDERED_PARTIAL);
   37|      1|}

_ZN11xercesc_3_214XMLCanRepGroupC2ENS0_11CanRepGroupE:
   35|     14|:fData(val)
   36|     14|{
   37|     14|}

_ZN11xercesc_3_221YearDatatypeValidatorC2EPNS_13MemoryManagerE:
   34|      1|:DateTimeValidator(0, 0, 0, DatatypeValidator::Year, manager)
   35|      1|{
   36|      1|    setOrdered(XSSimpleTypeDefinition::ORDERED_PARTIAL);
   37|      1|}

_ZN11xercesc_3_226YearMonthDatatypeValidatorC2EPNS_13MemoryManagerE:
   34|      1|:DateTimeValidator(0, 0, 0, DatatypeValidator::YearMonth, manager)
   35|      1|{
   36|      1|    setOrdered(XSSimpleTypeDefinition::ORDERED_PARTIAL);
   37|      1|}

_ZN11xercesc_3_214XMLInitializer25initializeComplexTypeInfoEv:
   45|      1|{
   46|       |  // create type name
   47|      1|  XMLCh typeName[128];
   48|      1|  XMLSize_t nsLen = XMLString::stringLen(SchemaSymbols::fgURI_SCHEMAFORSCHEMA);
   49|       |
   50|      1|  XMLString::copyString(typeName, SchemaSymbols::fgURI_SCHEMAFORSCHEMA);
   51|      1|  typeName[nsLen] = chComma;
   52|      1|  XMLString::copyString(typeName + nsLen + 1, SchemaSymbols::fgATTVAL_ANYTYPE);
   53|       |
   54|       |  // Create and initialize 'anyType'
   55|      1|  ComplexTypeInfo::fAnyType = new ComplexTypeInfo();
   56|       |
   57|      1|  ContentSpecNode* term = new ContentSpecNode
   58|      1|    (
   59|      1|      new QName
   60|      1|      (
   61|      1|        XMLUni::fgZeroLenString
   62|      1|        , XMLUni::fgZeroLenString
   63|      1|        , 1
   64|      1|      )
   65|      1|      , false
   66|      1|    );
   67|      1|  term->setType(ContentSpecNode::Any_Lax);
   68|      1|  term->setMinOccurs(0);
   69|      1|  term->setMaxOccurs(SchemaSymbols::XSD_UNBOUNDED);
   70|       |
   71|      1|  ContentSpecNode* particle = new ContentSpecNode
   72|      1|    (
   73|      1|      ContentSpecNode::ModelGroupSequence
   74|      1|      , term
   75|      1|      , 0
   76|      1|    );
   77|       |
   78|      1|  SchemaAttDef* attWildCard = new SchemaAttDef
   79|      1|    (
   80|      1|      XMLUni::fgZeroLenString
   81|      1|      , XMLUni::fgZeroLenString
   82|      1|      , 1
   83|      1|      , XMLAttDef::Any_Any
   84|      1|      , XMLAttDef::ProcessContents_Lax
   85|      1|    );
   86|       |
   87|      1|  ComplexTypeInfo::fAnyType->setTypeName(typeName);
   88|      1|  ComplexTypeInfo::fAnyType->setBaseComplexTypeInfo(ComplexTypeInfo::fAnyType);
   89|      1|  ComplexTypeInfo::fAnyType->setDerivedBy(SchemaSymbols::XSD_RESTRICTION);
   90|      1|  ComplexTypeInfo::fAnyType->setContentType(SchemaElementDecl::Mixed_Complex);
   91|      1|  ComplexTypeInfo::fAnyType->setContentSpec(particle);
   92|      1|  ComplexTypeInfo::fAnyType->setAttWildCard(attWildCard);
   93|      1|}
_ZN11xercesc_3_215ComplexTypeInfoC2EPNS_13MemoryManagerE:
  111|      1|    : fAnonymous(false)
  112|      1|    , fAbstract(false)
  113|      1|    , fAdoptContentSpec(true)
  114|      1|    , fAttWithTypeId(false)
  115|      1|    , fPreprocessed(false)
  116|      1|    , fDerivedBy(0)
  117|      1|    , fBlockSet(0)
  118|      1|    , fFinalSet(0)
  119|      1|    , fScopeDefined(Grammar::TOP_LEVEL_SCOPE)
  120|      1|    , fContentType(SchemaElementDecl::Empty)
  121|      1|    , fElementId(XMLElementDecl::fgInvalidElemId)
  122|      1|    , fUniqueURI(0)
  123|      1|    , fContentSpecOrgURISize(16)
  124|      1|    , fTypeName(0)
  125|      1|    , fTypeLocalName(0)
  126|      1|    , fTypeUri(0)
  127|      1|    , fBaseDatatypeValidator(0)
  128|      1|    , fDatatypeValidator(0)
  129|      1|    , fBaseComplexTypeInfo(0)
  130|      1|    , fContentSpec(0)
  131|      1|    , fAttWildCard(0)
  132|      1|    , fAttList(0)
  133|      1|    , fElements(0)
  134|      1|    , fAttDefs(0)
  135|      1|    , fContentModel(0)
  136|      1|    , fFormattedModel(0)
  137|      1|    , fContentSpecOrgURI(0)
  138|      1|    , fLocator(0)
  139|      1|    , fMemoryManager(manager)
  140|      1|{
  141|      1|    fAttDefs = new (fMemoryManager) RefHash2KeysTableOf<SchemaAttDef>(29, true, fMemoryManager);
  142|      1|    fAttList = new (fMemoryManager) SchemaAttDefList(fAttDefs,fMemoryManager);
  143|      1|}
_ZN11xercesc_3_215ComplexTypeInfo14setContentSpecEPNS_15ContentSpecNodeE:
  182|      1|void ComplexTypeInfo::setContentSpec(ContentSpecNode* const toAdopt) {
  183|       |
  184|      1|    if (fContentSpec && fAdoptContentSpec) {
  ------------------
  |  Branch (184:9): [True: 0, False: 1]
  |  Branch (184:25): [True: 0, False: 0]
  ------------------
  185|      0|        delete fContentSpec;
  186|      0|    }
  187|       |
  188|      1|    fContentSpec = toAdopt;
  189|      1|}

_ZN11xercesc_3_215ComplexTypeInfo12setDerivedByEi:
  398|      1|inline void ComplexTypeInfo::setDerivedBy(const int derivedBy) {
  399|       |
  400|      1|    fDerivedBy = derivedBy;
  401|      1|}
_ZN11xercesc_3_215ComplexTypeInfo14setContentTypeEi:
  424|      1|ComplexTypeInfo::setContentType(const int contentType) {
  425|       |
  426|      1|    fContentType = contentType;
  427|      1|}
_ZN11xercesc_3_215ComplexTypeInfo11setTypeNameEPKDs:
  429|      1|inline void ComplexTypeInfo::setTypeName(const XMLCh* const typeName) {
  430|       |
  431|      1|    fMemoryManager->deallocate(fTypeName);//delete [] fTypeName;
  432|      1|    fMemoryManager->deallocate(fTypeLocalName);//delete [] fTypeLocalName;
  433|      1|    fMemoryManager->deallocate(fTypeUri);//delete [] fTypeUri;
  434|       |
  435|      1|    if (typeName)
  ------------------
  |  Branch (435:9): [True: 1, False: 0]
  ------------------
  436|      1|    {
  437|      1|        fTypeName = XMLString::replicate(typeName, fMemoryManager);
  438|       |
  439|      1|        int index = XMLString::indexOf(fTypeName, chComma);
  440|      1|        XMLSize_t length = XMLString::stringLen(fTypeName);
  441|      1|        fTypeLocalName = (XMLCh*) fMemoryManager->allocate
  442|      1|        (
  443|      1|            (length - index + 1) * sizeof(XMLCh)
  444|      1|        ); //new XMLCh[length - index + 1];
  445|      1|        XMLString::subString(fTypeLocalName, fTypeName, index + 1, length, fMemoryManager);
  446|       |
  447|      1|        fTypeUri = (XMLCh*) fMemoryManager->allocate
  448|      1|        (
  449|      1|            (index + 1) * sizeof(XMLCh)
  450|      1|        ); //new XMLCh[index + 1];
  451|      1|        XMLString::subString(fTypeUri, fTypeName, 0, index, fMemoryManager);
  452|      1|    }
  453|      0|    else
  454|      0|    {
  455|      0|        fTypeName = fTypeLocalName = fTypeUri = 0;
  456|      0|    }
  457|      1|}
_ZN11xercesc_3_215ComplexTypeInfo22setBaseComplexTypeInfoEPS0_:
  472|      1|ComplexTypeInfo::setBaseComplexTypeInfo(ComplexTypeInfo* const typeInfo) {
  473|       |
  474|      1|    fBaseComplexTypeInfo = typeInfo;
  475|      1|}
_ZN11xercesc_3_215ComplexTypeInfo14setAttWildCardEPNS_12SchemaAttDefE:
  489|      1|inline void ComplexTypeInfo::setAttWildCard(SchemaAttDef* const toAdopt) {
  490|       |
  491|      1|    if (fAttWildCard) {
  ------------------
  |  Branch (491:9): [True: 0, False: 1]
  ------------------
  492|      0|       delete fAttWildCard;
  493|      0|    }
  494|       |
  495|      1|    fAttWildCard = toAdopt;
  496|      1|}

_ZN11xercesc_3_214XMLInitializer31initializeGeneralAttributeCheckEv:
   66|      1|{
   67|      1|    GeneralAttributeCheck::initialize ();
   68|      1|}
_ZN11xercesc_3_221GeneralAttributeCheck10initializeEv:
   84|      1|{
   85|       |    // Set up validators.
   86|       |    //
   87|      1|    DatatypeValidatorFactory dvFactory;
   88|       |
   89|      1|    fNonNegIntDV = dvFactory.getDatatypeValidator(SchemaSymbols::fgDT_NONNEGATIVEINTEGER);
   90|      1|    fBooleanDV = dvFactory.getDatatypeValidator(SchemaSymbols::fgDT_BOOLEAN);
   91|      1|    fAnyURIDV = dvFactory.getDatatypeValidator(SchemaSymbols::fgDT_ANYURI);
   92|       |
   93|       |    // TODO - add remaining valdiators
   94|       |
   95|       |    // Map attributes.
   96|       |    //
   97|      1|    fAttMap = new ValueHashTableOf<unsigned short>(A_Count);
   98|       |
   99|      1|    fAttMap->put((void*)SchemaSymbols::fgATT_ABSTRACT, A_Abstract);
  100|      1|    fAttMap->put((void*)SchemaSymbols::fgATT_ATTRIBUTEFORMDEFAULT, A_AttributeFormDefault);
  101|      1|    fAttMap->put((void*)SchemaSymbols::fgATT_BASE, A_Base);
  102|      1|    fAttMap->put((void*)SchemaSymbols::fgATT_BLOCK, A_Block);
  103|      1|    fAttMap->put((void*)SchemaSymbols::fgATT_BLOCKDEFAULT, A_BlockDefault);
  104|      1|    fAttMap->put((void*)SchemaSymbols::fgATT_DEFAULT, A_Default);
  105|      1|    fAttMap->put((void*)SchemaSymbols::fgATT_ELEMENTFORMDEFAULT, A_ElementFormDefault);
  106|      1|    fAttMap->put((void*)SchemaSymbols::fgATT_FINAL, A_Final);
  107|      1|    fAttMap->put((void*)SchemaSymbols::fgATT_FINALDEFAULT, A_FinalDefault);
  108|      1|    fAttMap->put((void*)SchemaSymbols::fgATT_FIXED, A_Fixed);
  109|      1|    fAttMap->put((void*)SchemaSymbols::fgATT_FORM, A_Form);
  110|      1|    fAttMap->put((void*)SchemaSymbols::fgATT_ID, A_ID);
  111|      1|    fAttMap->put((void*)SchemaSymbols::fgATT_ITEMTYPE, A_ItemType);
  112|      1|    fAttMap->put((void*)SchemaSymbols::fgATT_MAXOCCURS, A_MaxOccurs);
  113|      1|    fAttMap->put((void*)SchemaSymbols::fgATT_MEMBERTYPES, A_MemberTypes);
  114|      1|    fAttMap->put((void*)SchemaSymbols::fgATT_MINOCCURS, A_MinOccurs);
  115|      1|    fAttMap->put((void*)SchemaSymbols::fgATT_MIXED, A_Mixed);
  116|      1|    fAttMap->put((void*)SchemaSymbols::fgATT_NAME, A_Name);
  117|      1|    fAttMap->put((void*)SchemaSymbols::fgATT_NAMESPACE, A_Namespace);
  118|      1|    fAttMap->put((void*)SchemaSymbols::fgATT_NILLABLE, A_Nillable);
  119|      1|    fAttMap->put((void*)SchemaSymbols::fgATT_PROCESSCONTENTS, A_ProcessContents);
  120|      1|    fAttMap->put((void*)SchemaSymbols::fgATT_PUBLIC, A_Public);
  121|      1|    fAttMap->put((void*)SchemaSymbols::fgATT_REF, A_Ref);
  122|      1|    fAttMap->put((void*)SchemaSymbols::fgATT_REFER, A_Refer);
  123|      1|    fAttMap->put((void*)SchemaSymbols::fgATT_SCHEMALOCATION, A_SchemaLocation);
  124|      1|    fAttMap->put((void*)SchemaSymbols::fgATT_SOURCE, A_Source);
  125|      1|    fAttMap->put((void*)SchemaSymbols::fgATT_SUBSTITUTIONGROUP, A_SubstitutionGroup);
  126|      1|    fAttMap->put((void*)SchemaSymbols::fgATT_SYSTEM, A_System);
  127|      1|    fAttMap->put((void*)SchemaSymbols::fgATT_TARGETNAMESPACE, A_TargetNamespace);
  128|      1|    fAttMap->put((void*)SchemaSymbols::fgATT_TYPE, A_Type);
  129|      1|    fAttMap->put((void*)SchemaSymbols::fgATT_USE, A_Use);
  130|      1|    fAttMap->put((void*)SchemaSymbols::fgATT_VALUE, A_Value);
  131|      1|    fAttMap->put((void*)SchemaSymbols::fgATT_VERSION, A_Version);
  132|      1|    fAttMap->put((void*)SchemaSymbols::fgATT_XPATH, A_XPath);
  133|       |
  134|      1|    fFacetsMap = new ValueHashTableOf<unsigned short>(13);
  135|       |
  136|      1|    fFacetsMap->put((void*) SchemaSymbols::fgELT_MINEXCLUSIVE, E_MinExclusive);
  137|      1|    fFacetsMap->put((void*) SchemaSymbols::fgELT_MININCLUSIVE, E_MinInclusive);
  138|      1|    fFacetsMap->put((void*) SchemaSymbols::fgELT_MAXEXCLUSIVE, E_MaxExclusive);
  139|      1|    fFacetsMap->put((void*) SchemaSymbols::fgELT_MAXINCLUSIVE, E_MaxInclusive);
  140|      1|    fFacetsMap->put((void*) SchemaSymbols::fgELT_TOTALDIGITS, E_TotalDigits);
  141|      1|    fFacetsMap->put((void*) SchemaSymbols::fgELT_FRACTIONDIGITS, E_FractionDigits);
  142|      1|    fFacetsMap->put((void*) SchemaSymbols::fgELT_LENGTH, E_Length);
  143|      1|    fFacetsMap->put((void*) SchemaSymbols::fgELT_MINLENGTH, E_MinLength);
  144|      1|    fFacetsMap->put((void*) SchemaSymbols::fgELT_MAXLENGTH, E_MaxLength);
  145|      1|    fFacetsMap->put((void*) SchemaSymbols::fgELT_ENUMERATION, E_Enumeration);
  146|      1|    fFacetsMap->put((void*) SchemaSymbols::fgELT_WHITESPACE, E_WhiteSpace);
  147|      1|    fFacetsMap->put((void*) SchemaSymbols::fgELT_PATTERN, E_Pattern);
  148|      1|}

_ZN11xercesc_3_212SchemaAttDefC2EPKDsS2_iNS_9XMLAttDef8AttTypesENS3_11DefAttTypesEPNS_13MemoryManagerE:
   61|      1|    XMLAttDef(type, defType, manager)
   62|      1|    , fElemId(XMLElementDecl::fgInvalidElemId)
   63|      1|    , fPSVIScope(PSVIDefs::SCP_ABSENT)
   64|      1|    , fDatatypeValidator(0)
   65|      1|    , fNamespaceList(0)
   66|      1|    , fBaseAttDecl(0)
   67|      1|{
   68|      1|    fAttName = new (manager) QName(prefix, localPart, uriId, manager);
   69|      1|}

_ZN11xercesc_3_216SchemaAttDefListC2EPNS_19RefHash2KeysTableOfINS_12SchemaAttDefENS_12StringHasherEEEPNS_13MemoryManagerE:
   37|      1|: XMLAttDefList(manager)
   38|      1|,fEnum(0)
   39|      1|,fList(listToUse)
   40|      1|,fArray(0)
   41|      1|,fSize(0)
   42|      1|,fCount(0)
   43|      1|{
   44|      1|    fEnum = new (getMemoryManager()) RefHash2KeysTableOfEnumerator<SchemaAttDef>(listToUse, false, getMemoryManager());
   45|      1|    fArray = (SchemaAttDef **)((getMemoryManager())->allocate( sizeof(SchemaAttDef*) << 1));
   46|      1|    fSize = 2;
   47|      1|}

_ZN11xercesc_3_215SchemaValidatorC2EPNS_16XMLErrorReporterEPNS_13MemoryManagerE:
   53|  7.12k|    XMLValidator(errReporter)
   54|  7.12k|    , fMemoryManager(manager)
   55|  7.12k|    , fSchemaGrammar(0)
   56|  7.12k|    , fGrammarResolver(0)
   57|  7.12k|    , fXsiType(0)
   58|  7.12k|    , fNil(false)
   59|  7.12k|    , fNilFound(false)
   60|  7.12k|    , fCurrentDatatypeValidator(0)
   61|  7.12k|    , fNotationBuf(0)
   62|  7.12k|    , fDatatypeBuffer(1023, manager)
   63|  7.12k|    , fTrailing(false)
   64|  7.12k|    , fSeenNonWhiteSpace(false)
   65|  7.12k|    , fSeenId(false)
   66|  7.12k|    , fTypeStack(0)
   67|  7.12k|    , fMostRecentAttrValidator(0)
   68|  7.12k|    , fErrorOccurred(false)
   69|  7.12k|    , fElemIsSpecified(false)
   70|  7.12k|{
   71|  7.12k|    fTypeStack = new (fMemoryManager) ValueStackOf<ComplexTypeInfo*>(8, fMemoryManager);
   72|  7.12k|}
_ZN11xercesc_3_215SchemaValidatorD2Ev:
   75|  7.12k|{
   76|  7.12k|    delete fXsiType;
   77|  7.12k|    delete fTypeStack;
   78|       |
   79|  7.12k|    if (fNotationBuf)
  ------------------
  |  Branch (79:9): [True: 0, False: 7.12k]
  ------------------
   80|      0|        delete fNotationBuf;
   81|  7.12k|}
_ZN11xercesc_3_215SchemaValidator5resetEv:
  338|  7.12k|{
  339|  7.12k|    fTrailing = false;
  340|  7.12k|    fSeenNonWhiteSpace = false;
  341|  7.12k|    fSeenId = false;
  342|  7.12k|	fTypeStack->removeAllElements();
  343|  7.12k|    delete fXsiType;
  344|  7.12k|    fXsiType = 0;
  345|  7.12k|    fCurrentDatatypeValidator = 0;
  346|  7.12k|    fNil = false;
  347|  7.12k|    fNilFound = false;
  348|  7.12k|    fDatatypeBuffer.reset();
  349|  7.12k|    fErrorOccurred = false;
  350|  7.12k|}

_ZN11xercesc_3_215SchemaValidator16setErrorReporterEPNS_16XMLErrorReporterE:
  383|  7.12k|inline void SchemaValidator::setErrorReporter(XMLErrorReporter* const errorReporter) {
  384|       |
  385|  7.12k|    XMLValidator::setErrorReporter(errorReporter);
  386|  7.12k|    fSchemaErrorReporter.setErrorReporter(errorReporter);
  387|  7.12k|}
_ZN11xercesc_3_215SchemaValidator19setExitOnFirstFatalEb:
  339|  7.12k|inline void SchemaValidator::setExitOnFirstFatal(const bool newValue) {
  340|       |
  341|  7.12k|    fSchemaErrorReporter.setExitOnFirstFatal(newValue);
  342|  7.12k|}
_ZN11xercesc_3_215SchemaValidator18setGrammarResolverEPNS_15GrammarResolverE:
  317|  7.12k|inline void SchemaValidator::setGrammarResolver(GrammarResolver* grammarResolver) {
  318|  7.12k|    fGrammarResolver = grammarResolver;
  319|  7.12k|}

_ZN11xercesc_3_214XMLInitializer26initializeXSDErrorReporterEv:
   40|      1|{
   41|      1|    gErrMsgLoader = XMLPlatformUtils::loadMsgSet(XMLUni::fgXMLErrDomain);
   42|       |
   43|      1|    if (!gErrMsgLoader)
  ------------------
  |  Branch (43:9): [True: 0, False: 1]
  ------------------
   44|      0|      XMLPlatformUtils::panic(PanicHandler::Panic_CantLoadMsgDomain);
   45|       |
   46|      1|    gValidMsgLoader = XMLPlatformUtils::loadMsgSet(XMLUni::fgValidityDomain);
   47|       |
   48|      1|    if (!gValidMsgLoader)
  ------------------
  |  Branch (48:9): [True: 0, False: 1]
  ------------------
   49|      0|      XMLPlatformUtils::panic(PanicHandler::Panic_CantLoadMsgDomain);
   50|      1|}
_ZN11xercesc_3_216XSDErrorReporterC2EPNS_16XMLErrorReporterE:
   65|  7.12k|    fExitOnFirstFatal(false)
   66|  7.12k|    , fErrorReporter(errorReporter)
   67|  7.12k|{
   68|       |
   69|  7.12k|}

_ZN11xercesc_3_216XSDErrorReporterD2Ev:
   45|  7.12k|    {
   46|  7.12k|    }
_ZN11xercesc_3_216XSDErrorReporter19setExitOnFirstFatalEb:
  104|  7.12k|{
  105|  7.12k|    fExitOnFirstFatal = newValue;
  106|  7.12k|}
_ZN11xercesc_3_216XSDErrorReporter16setErrorReporterEPNS_16XMLErrorReporterE:
  109|  7.12k|{
  110|  7.12k|    fErrorReporter = errorReporter;
  111|  7.12k|}

_ZN11xercesc_3_214FieldActivatorC2EPNS_15ValueStoreCacheEPNS_17XPathMatcherStackEPNS_13MemoryManagerE:
   38|  7.12k|    : fValueStoreCache(valueStoreCache)
   39|  7.12k|    , fMatcherStack(matcherStack)
   40|  7.12k|    , fMayMatch(0)
   41|  7.12k|    , fMemoryManager(manager)
   42|  7.12k|{
   43|  7.12k|    fMayMatch = new (manager) ValueHashTableOf<bool, PtrHasher>(29, manager);
   44|  7.12k|}
_ZN11xercesc_3_214FieldActivatorD2Ev:
   66|  7.12k|{
   67|  7.12k|    delete fMayMatch;
   68|  7.12k|}

_ZN11xercesc_3_225IdentityConstraintHandlerC2EPNS_10XMLScannerEPNS_13MemoryManagerE:
   44|  7.12k|: fScanner(scanner)
   45|  7.12k|, fMemoryManager(manager)
   46|  7.12k|, fMatcherStack(0)
   47|  7.12k|, fValueStoreCache(0)
   48|  7.12k|, fFieldActivator(0)
   49|  7.12k|{
   50|  7.12k|    CleanupType cleanup(this, &IdentityConstraintHandler::cleanUp);
   51|       |
   52|  7.12k|    try {
   53|       |
   54|  7.12k|        fMatcherStack    = new (fMemoryManager) XPathMatcherStack(fMemoryManager);
   55|  7.12k|        fValueStoreCache = new (fMemoryManager) ValueStoreCache(fMemoryManager);
   56|  7.12k|        fFieldActivator  = new (fMemoryManager) FieldActivator(fValueStoreCache, fMatcherStack, fMemoryManager);
   57|       |
   58|  7.12k|        fValueStoreCache->setScanner(scanner);
   59|  7.12k|    }
   60|  7.12k|    catch(const OutOfMemoryException&)
   61|  7.12k|    {
   62|      0|        cleanup.release();
   63|       |
   64|      0|        throw;
   65|      0|    }
   66|       |
   67|  7.12k|    cleanup.release();
   68|  7.12k|}
_ZN11xercesc_3_225IdentityConstraintHandlerD2Ev:
   71|  7.12k|{
   72|  7.12k|    cleanUp();
   73|  7.12k|}
_ZN11xercesc_3_225IdentityConstraintHandler7cleanUpEv:
  192|  7.12k|{
  193|  7.12k|    if (fMatcherStack)
  ------------------
  |  Branch (193:9): [True: 7.12k, False: 0]
  ------------------
  194|  7.12k|        delete fMatcherStack;
  195|       |
  196|  7.12k|    if (fValueStoreCache)
  ------------------
  |  Branch (196:9): [True: 7.12k, False: 0]
  ------------------
  197|  7.12k|        delete fValueStoreCache;
  198|       |
  199|  7.12k|    if (fFieldActivator)
  ------------------
  |  Branch (199:9): [True: 7.12k, False: 0]
  ------------------
  200|  7.12k|        delete fFieldActivator;
  201|       |
  202|  7.12k|}
_ZN11xercesc_3_225IdentityConstraintHandler5resetEv:
  205|  7.12k|{
  206|  7.12k|    fValueStoreCache->startDocument();
  207|  7.12k|    fMatcherStack->clear();
  208|  7.12k|}

_ZN11xercesc_3_215ValueStoreCacheC2EPNS_13MemoryManagerE:
   38|  7.12k|    : fValueStores(0)
   39|  7.12k|    , fGlobalICMap(0)
   40|  7.12k|    , fIC2ValueStoreMap(0)
   41|  7.12k|    , fGlobalMapStack(0)
   42|  7.12k|    , fScanner(0)
   43|  7.12k|    , fMemoryManager(manager)
   44|  7.12k|{
   45|  7.12k|    CleanupType cleanup(this, &ValueStoreCache::cleanUp);
   46|       |
   47|  7.12k|    try {
   48|  7.12k|        init();
   49|  7.12k|    }
   50|  7.12k|    catch(const OutOfMemoryException&)
   51|  7.12k|    {
   52|      0|        cleanup.release();
   53|       |
   54|      0|        throw;
   55|      0|    }
   56|       |
   57|  7.12k|    cleanup.release();
   58|  7.12k|}
_ZN11xercesc_3_215ValueStoreCacheD2Ev:
   62|  7.12k|{
   63|  7.12k|    cleanUp();
   64|  7.12k|}
_ZN11xercesc_3_215ValueStoreCache13startDocumentEv:
   69|  7.12k|void ValueStoreCache::startDocument() {
   70|       |
   71|  7.12k|    fIC2ValueStoreMap->removeAll();
   72|  7.12k|    fGlobalICMap->removeAll();
   73|  7.12k|    fValueStores->removeAllElements();
   74|  7.12k|    fGlobalMapStack->removeAllElements();
   75|  7.12k|}
_ZN11xercesc_3_215ValueStoreCache7cleanUpEv:
  117|  7.12k|void ValueStoreCache::cleanUp() {
  118|       |
  119|  7.12k|    delete fIC2ValueStoreMap;
  120|  7.12k|    delete fGlobalICMap;
  121|  7.12k|    delete fGlobalMapStack;
  122|  7.12k|    delete fValueStores;
  123|  7.12k|}
_ZN11xercesc_3_215ValueStoreCache4initEv:
  125|  7.12k|void ValueStoreCache::init() {
  126|       |
  127|  7.12k|    fValueStores = new (fMemoryManager) RefVectorOf<ValueStore>(8, false, fMemoryManager);
  128|  7.12k|    fGlobalICMap = new (fMemoryManager) RefHashTableOf<ValueStore, PtrHasher>
  129|  7.12k|    (
  130|  7.12k|        13
  131|  7.12k|        , false
  132|  7.12k|        , fMemoryManager
  133|  7.12k|    );
  134|  7.12k|    fIC2ValueStoreMap = new (fMemoryManager) RefHash2KeysTableOf<ValueStore, PtrHasher>
  135|  7.12k|    (
  136|  7.12k|        13
  137|  7.12k|        , true
  138|  7.12k|        , fMemoryManager
  139|  7.12k|    );
  140|  7.12k|    fGlobalMapStack = new (fMemoryManager) RefStackOf<RefHashTableOf<ValueStore, PtrHasher> >(8, true, fMemoryManager);
  141|  7.12k|}

_ZN11xercesc_3_215ValueStoreCache10setScannerEPNS_10XMLScannerE:
  134|  7.12k|inline void ValueStoreCache::setScanner(XMLScanner* const scanner) {
  135|       |
  136|  7.12k|    fScanner = scanner;
  137|  7.12k|}

_ZN11xercesc_3_217XPathMatcherStackC2EPNS_13MemoryManagerE:
   37|  7.12k|    : fMatchersCount(0)
   38|  7.12k|    , fContextStack(0)
   39|  7.12k|    , fMatchers(0)
   40|  7.12k|{
   41|  7.12k|    CleanupType cleanup(this, &XPathMatcherStack::cleanUp);
   42|       |
   43|  7.12k|    try {
   44|  7.12k|        fContextStack = new (manager) ValueStackOf<int>(8, manager);
   45|  7.12k|        fMatchers = new (manager) RefVectorOf<XPathMatcher>(8, true, manager);
   46|  7.12k|    }
   47|  7.12k|    catch(const OutOfMemoryException&)
   48|  7.12k|    {
   49|      0|        cleanup.release();
   50|       |
   51|      0|        throw;
   52|      0|    }
   53|       |
   54|  7.12k|    cleanup.release();
   55|  7.12k|}
_ZN11xercesc_3_217XPathMatcherStackD2Ev:
   57|  7.12k|XPathMatcherStack::~XPathMatcherStack() {
   58|       |
   59|  7.12k|    cleanUp();
   60|  7.12k|}
_ZN11xercesc_3_217XPathMatcherStack7cleanUpEv:
   66|  7.12k|{
   67|  7.12k|    delete fContextStack;
   68|  7.12k|    delete fMatchers;
   69|  7.12k|}
_ZN11xercesc_3_217XPathMatcherStack5clearEv:
   74|  7.12k|void XPathMatcherStack::clear() {
   75|       |
   76|  7.12k|    fContextStack->removeAllElements();
   77|  7.12k|    fMatchers->removeAllElements();
   78|  7.12k|    fMatchersCount = 0;
   79|  7.12k|}

_ZN11xercesc_3_214XMLInitializer18initializeXIncludeEv:
   45|      1|{
   46|      1|    gMsgLoader = XMLPlatformUtils::loadMsgSet(XMLUni::fgXMLErrDomain);
   47|       |
   48|      1|    if (!gMsgLoader)
  ------------------
  |  Branch (48:9): [True: 0, False: 1]
  ------------------
   49|      0|      XMLPlatformUtils::panic(PanicHandler::Panic_CantLoadMsgDomain);
   50|      1|}

_Z13parseInMemoryPKhm:
   23|  7.12k|{
   24|  7.12k|    if (!initialized)
  ------------------
  |  Branch (24:9): [True: 1, False: 7.12k]
  ------------------
   25|      1|    {
   26|      1|        XMLPlatformUtils::Initialize();
   27|      1|        initialized = true;
   28|      1|    }
   29|  7.12k|    SAXParser::ValSchemes valScheme = SAXParser::Val_Auto;
   30|  7.12k|    bool doNamespaces = false;
   31|  7.12k|    bool doSchema = false;
   32|  7.12k|    bool schemaFullChecking = false;
   33|  7.12k|    SAXParser *parser = new SAXParser;
   34|  7.12k|    parser->setValidationScheme(valScheme);
   35|  7.12k|    parser->setDoNamespaces(doNamespaces);
   36|  7.12k|    parser->setDoSchema(doSchema);
   37|  7.12k|    parser->setHandleMultipleImports(true);
   38|  7.12k|    parser->setValidationSchemaFullChecking(schemaFullChecking);
   39|  7.12k|    static const char *gMemBufId = "prodInfo";
   40|       |
   41|  7.12k|    MemBufInputSource *memBufIS = new MemBufInputSource(
   42|  7.12k|        (const XMLByte *)Data, Size, gMemBufId, false);
   43|  7.12k|    parser->parse(*memBufIS);
   44|  7.12k|    delete parser;
   45|  7.12k|    delete memBufIS;
   46|       |    //XMLPlatformUtils::Terminate();
   47|  7.12k|}

