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/XercesXPath.cpp

    r3153 r3565  
    5858//  XercesNodeTest: Constructors and Destructor
    5959// ---------------------------------------------------------------------------
    60 XercesNodeTest::XercesNodeTest(const short aType,
    61                                MemoryManager* const manager)
    62     : fType(aType)
    63     , fName(new (manager) QName(manager))
    64 {
    65 }
     60XercesNodeTest::XercesNodeTest(const short aType, XMLStringPool * const qNameManager, MemoryManager* const manager)
     61: fType(aType)
     62, fName(new (manager) QName(qNameManager))
     63{
     64}
     65
     66XercesNodeTest::XercesNodeTest(const XMLCh* const prefix, const unsigned int uriId, XMLStringPool* const qNameManager, MemoryManager* const manager)
     67: fType(NodeType_NAMESPACE)
     68, fName(new (manager) QName(prefix, XMLUni::fgZeroLenString, uriId, qNameManager))
     69{
     70
     71}
     72
    6673
    6774XercesNodeTest::XercesNodeTest(const QName* const qName)
    68     : fType(NodeType_QNAME)
    69     , fName(new (qName->getMemoryManager()) QName(*qName))
    70 {
    71 }
    72 
    73 XercesNodeTest::XercesNodeTest(const XMLCh* const prefix,
    74                                const unsigned int uriId,
    75                                MemoryManager* const manager)
    76     : fType(NodeType_NAMESPACE)
    77     , fName(new (manager) QName(manager))
    78 {
    79     fName->setURI(uriId);
    80     fName->setPrefix(prefix);
     75: fType(NodeType_QNAME)
     76, fName(new (qName->getMemoryManager()) QName(*qName))
     77{
     78
    8179}
    8280
    8381XercesNodeTest::XercesNodeTest(const XercesNodeTest& other)
    84     : XSerializable(other)
    85     , XMemory(other)
    86     , fType(other.fType)
    87     , fName(new ((other.fName)->getMemoryManager()) QName(*other.fName))
    88 {
    89 }
     82: XSerializable(other)
     83, XMemory(other)
     84, fType(other.fType)
     85, fName(new ((other.fName)->getMemoryManager()) QName(*other.fName))
     86{
     87
     88}
     89
     90XercesNodeTest::XercesNodeTest(const short, MemoryManager* const)
     91{
     92    DEPRECATED_FEATURE_IN_ICXML;
     93}
     94
     95XercesNodeTest::XercesNodeTest(const XMLCh* const, const unsigned int, MemoryManager* const)
     96{
     97    DEPRECATED_FEATURE_IN_ICXML;
     98}
     99
    90100
    91101/***
     
    424434                {
    425435                    // prepend ./
    426                     XercesNodeTest* nodeTest = new (fMemoryManager) XercesNodeTest(XercesNodeTest::NodeType_NODE, fMemoryManager);
     436                    XercesNodeTest* nodeTest = new (fMemoryManager) XercesNodeTest(XercesNodeTest::NodeType_NODE, stringPool, fMemoryManager);
    427437                    XercesStep* step = new (fMemoryManager) XercesStep(XercesStep::AxisType_SELF, nodeTest);
    428438                    stepsVector->insertElementAt(step, 0);
     
    472482                case XercesXPath::EXPRTOKEN_NAMETEST_ANY:
    473483                    {
    474                         XercesNodeTest* nodeTest = new (fMemoryManager) XercesNodeTest(XercesNodeTest::NodeType_WILDCARD, fMemoryManager);
     484                        XercesNodeTest* nodeTest = new (fMemoryManager) XercesNodeTest(XercesNodeTest::NodeType_WILDCARD, stringPool, fMemoryManager);
    475485                        XercesStep* step = new (fMemoryManager) XercesStep(XercesStep::AxisType_ATTRIBUTE, nodeTest);
    476486                        stepsVector->addElement(step);
     
    501511
    502512                            // build step
    503                             XercesNodeTest* nodeTest = new (fMemoryManager) XercesNodeTest(prefix, uri, fMemoryManager);
     513                            XercesNodeTest* nodeTest = new (fMemoryManager) XercesNodeTest(prefix, uri, stringPool, fMemoryManager);
    504514                            XercesStep* step = new (fMemoryManager) XercesStep(XercesStep::AxisType_ATTRIBUTE, nodeTest);
    505515                            stepsVector->addElement(step);
     
    510520
    511521                        const XMLCh* localPart = stringPool->getValueForId(aToken);
    512                         QName aQName(prefix, localPart, uri, fMemoryManager);
     522                        QName aQName(prefix, localPart, uri, stringPool);
    513523
    514524                        // build step
     
    542552        case XercesXPath::EXPRTOKEN_NAMETEST_ANY:
    543553            {
    544                 XercesNodeTest* nodeTest = new (fMemoryManager) XercesNodeTest(XercesNodeTest::NodeType_WILDCARD, fMemoryManager);
     554                XercesNodeTest* nodeTest = new (fMemoryManager) XercesNodeTest(XercesNodeTest::NodeType_WILDCARD, stringPool, fMemoryManager);
    545555                XercesStep* step = new (fMemoryManager) XercesStep(XercesStep::AxisType_CHILD, nodeTest);
    546556                stepsVector->addElement(step);
     
    573583
    574584                    // build step
    575                     XercesNodeTest* nodeTest = new (fMemoryManager) XercesNodeTest(prefix, uri, fMemoryManager);
     585                    XercesNodeTest* nodeTest = new (fMemoryManager) XercesNodeTest(prefix, uri, stringPool, fMemoryManager);
    576586                    XercesStep* step = new (fMemoryManager) XercesStep(XercesStep::AxisType_CHILD, nodeTest);
    577587                    stepsVector->addElement(step);
     
    581591                aToken = tokens.elementAt(++i);
    582592                const XMLCh* localPart = stringPool->getValueForId(aToken);
    583                 QName aQName(prefix, localPart, uri, fMemoryManager);
     593                QName aQName(prefix, localPart, uri, stringPool);
    584594
    585595                // build step
     
    593603            {
    594604                // build step
    595                 XercesNodeTest* nodeTest = new (fMemoryManager) XercesNodeTest(XercesNodeTest::NodeType_NODE, fMemoryManager);
     605                XercesNodeTest* nodeTest = new (fMemoryManager) XercesNodeTest(XercesNodeTest::NodeType_NODE, stringPool, fMemoryManager);
    596606                XercesStep* step = new (fMemoryManager) XercesStep(XercesStep::AxisType_SELF, nodeTest);
    597607                stepsVector->addElement(step);
     
    616626                        }
    617627                        // build step
    618                         nodeTest = new (fMemoryManager) XercesNodeTest(XercesNodeTest::NodeType_NODE, fMemoryManager);
     628                        nodeTest = new (fMemoryManager) XercesNodeTest(XercesNodeTest::NodeType_NODE, stringPool, fMemoryManager);
    619629                        step = new (fMemoryManager) XercesStep(XercesStep::AxisType_DESCENDANT, nodeTest);
    620630                        stepsVector->addElement(step);
     
    669679    {
    670680        // prepend ./
    671         XercesNodeTest* nodeTest = new (fMemoryManager) XercesNodeTest(XercesNodeTest::NodeType_NODE, fMemoryManager);
     681        XercesNodeTest * nodeTest = new (fMemoryManager) XercesNodeTest(XercesNodeTest::NodeType_NODE, stringPool, fMemoryManager);
    672682        XercesStep* step = new (fMemoryManager) XercesStep(XercesStep::AxisType_SELF, nodeTest);
    673683        stepsVector->insertElementAt(step, 0);
Note: See TracChangeset for help on using the changeset viewer.