Ignore:
Timestamp:
Nov 18, 2013, 5:53:53 AM (6 years ago)
Author:
cameron
Message:

Updates to xercesc sources

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icXML/icXML-devel/src/xercesc/validators/schema/identity/IC_Selector.cpp

    r3153 r3565  
    2828#include <icxercesc/validators/schema/identity/IdentityConstraint.hpp>
    2929#include <xercesc/validators/schema/identity/FieldActivator.hpp>
     30#include <xercesc/util/StringPool.hpp>
    3031
    3132XERCES_CPP_NAMESPACE_BEGIN
     
    3435//  SelectorMatcher: Constructors and Destructor
    3536// ---------------------------------------------------------------------------
    36 SelectorMatcher::SelectorMatcher(XercesXPath* const xpath,
    37                                  IC_Selector* const selector,
    38                                  FieldActivator* const fieldActivator,
    39                                  const int initialDepth,
    40                                  MemoryManager* const manager)
    41     : XPathMatcher(xpath, selector->getIdentityConstraint(), manager)
    42     , fInitialDepth(initialDepth)
    43     , fElementDepth(0)
    44     , fMatchedDepth(-1)
    45     , fSelector(selector)
    46     , fFieldActivator(fieldActivator)
    47 {
    48 }
     37SelectorMatcher::SelectorMatcher
     38(
     39    XercesXPath* const xpath
     40    , IC_Selector* const selector
     41    , FieldActivator* const fieldActivator
     42    , const int initialDepth
     43    , XMLStringPool * stringPool
     44    , MemoryManager* const manager
     45)
     46: XPathMatcher(xpath, selector->getIdentityConstraint(), stringPool, manager)
     47, fInitialDepth(initialDepth)
     48, fElementDepth(0)
     49, fMatchedDepth(-1)
     50, fSelector(selector)
     51, fStringPool(stringPool)
     52, fFieldActivator(fieldActivator)
     53{
     54
     55}
     56
     57
    4958
    5059// ---------------------------------------------------------------------------
     
    7180    // activate the fields, if selector is matched
    7281    unsigned char matched = isMatched();
    73     if ((fMatchedDepth == -1 && ((matched & XP_MATCHED) == XP_MATCHED))
    74         || ((matched & XP_MATCHED_D) == XP_MATCHED_D)) {
    75 
     82    if ((fMatchedDepth == -1 && ((matched & XP_MATCHED) == XP_MATCHED)) || ((matched & XP_MATCHED_D) == XP_MATCHED_D))
     83    {
    7684        IdentityConstraint* ic = fSelector->getIdentityConstraint();
    7785        XMLSize_t count = ic->getFieldCount();
     
    8088        fFieldActivator->startValueScopeFor(ic, fInitialDepth);
    8189
    82         for (XMLSize_t i = 0; i < count; i++) {
    83 
    84             XPathMatcher* matcher = fFieldActivator->activateField(ic->getFieldAt(i), fInitialDepth);
     90        for (XMLSize_t i = 0; i < count; i++)
     91        {
     92            XPathMatcher* matcher = fFieldActivator->activateField(ic->getFieldAt(i), fStringPool, fInitialDepth);
    8593            matcher->startElement(elemDecl, urlId, elemPrefix, attrList, attrCount, validationContext);
    8694        }
     
    135143//  IC_Selector: Factory methods
    136144// ---------------------------------------------------------------------------
    137 XPathMatcher* IC_Selector::createMatcher(FieldActivator* const fieldActivator,
    138                                          const int initialDepth,
    139                                          MemoryManager* const manager) {
    140 
    141     return new (manager) SelectorMatcher(fXPath, this, fieldActivator, initialDepth, manager);
     145XPathMatcher* IC_Selector::createMatcher
     146(
     147    FieldActivator* const   fieldActivator
     148    , const int             initialDepth
     149    , XMLStringPool *       stringPool
     150    , MemoryManager * const manager
     151)
     152{
     153    return new (manager) SelectorMatcher(fXPath, this, fieldActivator, initialDepth, stringPool, manager);
    142154}
    143155
     
    171183}
    172184
     185XPathMatcher* IC_Selector::createMatcher
     186(
     187    FieldActivator* const
     188    , const int
     189    , MemoryManager* const
     190)
     191{
     192    DEPRECATED_FEATURE_IN_ICXML;
     193}
     194
     195SelectorMatcher::SelectorMatcher(XercesXPath* const,
     196                                 IC_Selector* const,
     197                                 FieldActivator* const,
     198                                 const int,
     199                                 MemoryManager* const)
     200: XPathMatcher(NULL, NULL, NULL, NULL)
     201{
     202    DEPRECATED_FEATURE_IN_ICXML;
     203}
     204
    173205XERCES_CPP_NAMESPACE_END
    174206
Note: See TracChangeset for help on using the changeset viewer.