Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.5

Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

XPathExpression.hpp

Go to the documentation of this file.
00001 /*
00002  * The Apache Software License, Version 1.1
00003  *
00004  *
00005  * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights 
00006  * reserved.
00007  *
00008  * Redistribution and use in source and binary forms, with or without
00009  * modification, are permitted provided that the following conditions
00010  * are met:
00011  *
00012  * 1. Redistributions of source code must retain the above copyright
00013  *    notice, this list of conditions and the following disclaimer. 
00014  *
00015  * 2. Redistributions in binary form must reproduce the above copyright
00016  *    notice, this list of conditions and the following disclaimer in
00017  *    the documentation and/or other materials provided with the
00018  *    distribution.
00019  *
00020  * 3. The end-user documentation included with the redistribution,
00021  *    if any, must include the following acknowledgment:  
00022  *       "This product includes software developed by the
00023  *        Apache Software Foundation (http://www.apache.org/)."
00024  *    Alternately, this acknowledgment may appear in the software itself,
00025  *    if and wherever such third-party acknowledgments normally appear.
00026  *
00027  * 4. The names "Xalan" and "Apache Software Foundation" must
00028  *    not be used to endorse or promote products derived from this
00029  *    software without prior written permission. For written 
00030  *    permission, please contact apache@apache.org.
00031  *
00032  * 5. Products derived from this software may not be called "Apache",
00033  *    nor may "Apache" appear in their name, without prior written
00034  *    permission of the Apache Software Foundation.
00035  *
00036  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
00037  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
00038  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00039  * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
00040  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
00041  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
00042  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
00043  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
00044  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00045  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
00046  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00047  * SUCH DAMAGE.
00048  * ====================================================================
00049  *
00050  * This software consists of voluntary contributions made by many
00051  * individuals on behalf of the Apache Software Foundation and was
00052  * originally based on software copyright (c) 1999, International
00053  * Business Machines, Inc., http://www.ibm.com.  For more
00054  * information on the Apache Software Foundation, please see
00055  * <http://www.apache.org/>.
00056  */
00057 #if !defined(XPATHEXPRESSION_HEADER_GUARD_1357924680)
00058 #define XPATHEXPRESSION_HEADER_GUARD_1357924680
00059 
00060 
00061 
00062 // Base header file.  Must be first.
00063 #include <XPath/XPathDefinitions.hpp>
00064 
00065 
00066 
00067 #include <vector>
00068 
00069 #if defined(XALAN_CLASSIC_IOSTREAMS)
00070 #include <iostream.h>
00071 #else
00072 #include <iosfwd>
00073 #endif
00074 
00075 
00076 
00077 #include <XalanDOM/XalanDOMString.hpp>
00078 
00079 
00080 
00081 #include <PlatformSupport/DOMStringHelper.hpp>
00082 #include <PlatformSupport/PrintWriter.hpp>
00083 
00084 
00085 
00086 #include <XPath/XToken.hpp>
00087 #include <XPath/XalanXPathException.hpp>
00088 
00089 
00090 
00091 XALAN_CPP_NAMESPACE_BEGIN
00092 
00093 
00094 
00095 class XALAN_XPATH_EXPORT XPathExpression
00096 {
00097 public:
00098 
00099 #if defined(XALAN_NO_STD_NAMESPACE)
00100     typedef ostream         OstreamType;
00101 #else
00102     typedef std::ostream    OstreamType;
00103 #endif
00104 
00123     enum eOpCodes
00124     {
00130         eELEMWILDCARD = -3,
00131 
00136         eEMPTY = -2,
00137 
00142         eENDOP = -1,
00143 
00157         eOP_XPATH = 1,
00158 
00168         eOP_OR = 2,
00169 
00179         eOP_AND = 3,
00180 
00190         eOP_NOTEQUALS = 4,
00191 
00201         eOP_EQUALS = 5,
00202 
00212         eOP_LTE = 6,
00213 
00223         eOP_LT = 7,
00224 
00234         eOP_GTE = 8,
00235 
00245         eOP_GT = 9,
00246 
00256         eOP_PLUS = 10,
00257 
00267         eOP_MINUS = 11,
00268 
00278         eOP_MULT = 12,
00279 
00289         eOP_DIV = 13,
00290 
00300         eOP_MOD = 14,
00301 
00310         eOP_NEG = 15,
00311 
00320         eOP_BOOL = 16,
00321 
00330         eOP_UNION = 17,
00331 
00340         eOP_LITERAL = 18,
00341 
00350         eOP_VARIABLE = 19,
00351 
00365         eOP_GROUP = 20,
00366 
00375         eOP_NUMBERLIT = 21,
00376 
00390         eOP_ARGUMENT = 22,
00391 
00407         eOP_EXTFUNCTION = 23,
00408 
00425         eOP_FUNCTION = 24,
00426 
00440         eOP_LOCATIONPATH = 25,
00441 
00451         eOP_PREDICATE = 26,
00452 
00460         eNODETYPE_COMMENT = 27,
00461         
00469         eNODETYPE_TEXT = 28,
00470         
00478         eNODETYPE_PI = 29,
00479         
00487         eNODETYPE_NODE = 30,
00488         
00497         eNODENAME = 31,
00498         
00506         eNODETYPE_ROOT = 32,
00507         
00515         eNODETYPE_ANYELEMENT = 33,
00516 
00527         eFROM_ANCESTORS = 34,
00528         eFROM_ANCESTORS_OR_SELF = 35,
00529         eFROM_ATTRIBUTES = 36,
00530         eFROM_CHILDREN = 37,
00531         eFROM_DESCENDANTS = 38,
00532         eFROM_DESCENDANTS_OR_SELF = 39,
00533         eFROM_FOLLOWING = 40,
00534         eFROM_FOLLOWING_SIBLINGS = 41,
00535         eFROM_PARENT = 42,
00536         eFROM_PRECEDING = 43,
00537         eFROM_PRECEDING_SIBLINGS = 44,
00538         eFROM_SELF = 45,
00539         eFROM_NAMESPACE = 46,
00540         eFROM_ROOT = 47,
00541 
00550         eOP_MATCHPATTERN = 48,
00551 
00560         eOP_LOCATIONPATHPATTERN = 49,
00561 
00562         // For match patterns
00563         eMATCH_ATTRIBUTE = 50,
00564         eMATCH_ANY_ANCESTOR = 51,
00565         eMATCH_IMMEDIATE_ANCESTOR = 52,
00566         eMATCH_ANY_ANCESTOR_WITH_PREDICATE = 53,
00567         eMATCH_ANY_ANCESTOR_WITH_FUNCTION_CALL = 54,
00568 
00578         eOP_PREDICATE_WITH_POSITION = 55,
00579   
00584         eOP_FUNCTION_POSITION = 56,
00585         eOP_FUNCTION_LAST = 57,
00586         eOP_FUNCTION_COUNT = 58,
00587         eOP_FUNCTION_NOT = 59,
00588         eOP_FUNCTION_TRUE = 60,
00589         eOP_FUNCTION_FALSE = 61,
00590         eOP_FUNCTION_BOOLEAN = 62,
00591         eOP_FUNCTION_NAME_0 = 63,
00592         eOP_FUNCTION_NAME_1 = 64,
00593         eOP_FUNCTION_LOCALNAME_0 = 65,
00594         eOP_FUNCTION_LOCALNAME_1 = 66,
00595         eOP_FUNCTION_FLOOR = 67,
00596         eOP_FUNCTION_CEILING = 68,
00597         eOP_FUNCTION_ROUND = 69,
00598         eOP_FUNCTION_NUMBER_0 = 70,
00599         eOP_FUNCTION_NUMBER_1 = 71,
00600         eOP_FUNCTION_STRING_0 = 72,
00601         eOP_FUNCTION_STRING_1 = 73,
00602         eOP_FUNCTION_STRINGLENGTH_0 = 74,
00603         eOP_FUNCTION_STRINGLENGTH_1 = 75,
00604         eOP_FUNCTION_NAMESPACEURI_0 = 76,
00605         eOP_FUNCTION_NAMESPACEURI_1 = 77,
00606         eOP_FUNCTION_SUM = 78,
00607         eOP_FUNCTION_CONCAT = 79,
00608 
00609         // Always add _before_ this one and update
00610         // s_opCodeLengthArray.
00611         eOpCodeNextAvailable
00612     };  // enum eOpCodes
00613 
00617     class XALAN_XPATH_EXPORT XPathExpressionException : public XalanXPathException
00618     {
00619     public:
00620 
00626         XPathExpressionException(const XalanDOMString&  theMessage);
00627 
00628         virtual
00629 ~		XPathExpressionException();
00630     };
00631 
00635     class XALAN_XPATH_EXPORT InvalidOpCodeException : public XPathExpressionException
00636     {
00637     public:
00638 
00644         InvalidOpCodeException(int  theOpCode);
00645 
00646         virtual
00647 ~		InvalidOpCodeException();
00648 
00649     private:
00650 
00651         static XalanDOMString
00652         FormatErrorMessage(int  theOpCode);
00653     };
00654 
00659     class XALAN_XPATH_EXPORT InvalidArgumentCountException : public XPathExpressionException
00660     {
00661     public:
00662 
00670         InvalidArgumentCountException(
00671             int     theOpCode,
00672             int     theExpectedCount,
00673             int     theSuppliedCount);
00674 
00675         virtual
00676 ~		InvalidArgumentCountException();
00677 
00678     private:
00679 
00680         static XalanDOMString
00681         FormatErrorMessage(
00682             int     theOpCode,
00683             int     theExpectedCount,
00684             int     theSuppliedCount);
00685     };
00686 
00690     class XALAN_XPATH_EXPORT InvalidArgumentException : public XPathExpressionException
00691     {
00692     public:
00693 
00700         InvalidArgumentException(
00701             int theOpCode,
00702             int theValue);
00703 
00704         virtual
00705 ~		InvalidArgumentException();
00706 
00707     private:
00708 
00709         static XalanDOMString
00710         FormatErrorMessage(
00711                 int     theOpCode,
00712                 int     theValue);
00713     };
00714 
00718     class XALAN_XPATH_EXPORT InvalidRelativeTokenPosition : public XPathExpressionException
00719     {
00720     public:
00721 
00727         InvalidRelativeTokenPosition(int    theOffset);
00728 
00729         virtual
00730 ~		InvalidRelativeTokenPosition();
00731 
00732     private:
00733 
00734         static XalanDOMString
00735         FormatErrorMessage(int  theOffset);
00736     };
00737 
00738 
00739 #if defined(XALAN_NO_STD_NAMESPACE)
00740 
00741     typedef vector<int>                     OpCodeMapType;
00742     typedef vector<XToken>                  TokenQueueType;
00743     typedef vector<int>                     PatternMapType;
00744 
00745     typedef OpCodeMapType::value_type       OpCodeMapValueType;
00746     typedef OpCodeMapType::size_type        OpCodeMapSizeType;
00747 
00748     typedef vector<OpCodeMapValueType>      OpCodeMapValueVectorType;
00749 
00750     typedef vector<double>                  NumberLiteralValueVectorType;
00751 #else
00752 
00753     typedef std::vector<int>                OpCodeMapType;
00754     typedef std::vector<XToken>             TokenQueueType;
00755     typedef std::vector<int>                PatternMapType;
00756 
00757     typedef OpCodeMapType::value_type       OpCodeMapValueType;
00758     typedef OpCodeMapType::size_type        OpCodeMapSizeType;
00759 
00760     typedef std::vector<OpCodeMapValueType> OpCodeMapValueVectorType;
00761 
00762     typedef std::vector<double>             NumberLiteralValueVectorType;
00763 #endif
00764 
00765     typedef TokenQueueType::value_type      TokenQueueValueType;
00766     typedef TokenQueueType::size_type       TokenQueueSizeType;
00767     typedef PatternMapType::value_type      PatternMapValueType;
00768     typedef PatternMapType::size_type       PatternMapSizeType;
00769 
00776 #if defined(XALAN_INLINE_INITIALIZATION)
00777     static const TokenQueueSizeType     s_opCodeMapLengthIndex = 1;
00778 #else
00779     enum eDummy
00780     {
00781         s_opCodeMapLengthIndex = 1
00782     };
00783 #endif
00784 
00785     explicit
00786     XPathExpression();
00787 
00788     ~XPathExpression();
00789 
00793     void
00794     reset();
00795 
00799     void
00800     shrink();
00801 
00807     OpCodeMapSizeType
00808     opCodeMapSize() const
00809     {
00810         return m_opMap.size();
00811     }
00812 
00824     OpCodeMapValueType
00825     opCodeMapLength() const
00826     {
00827         const OpCodeMapSizeType     theSize = opCodeMapSize();
00828 
00829         if (theSize > s_opCodeMapLengthIndex)
00830         {
00831             assert(theSize == OpCodeMapSizeType(m_opMap[s_opCodeMapLengthIndex]));
00832 
00833             return m_opMap[s_opCodeMapLengthIndex];
00834         }
00835         else
00836         {
00837             assert(theSize == OpCodeMapValueType(theSize));
00838 
00839             return OpCodeMapValueType(theSize);
00840         }
00841     }
00842 
00848     TokenQueueSizeType
00849     tokenQueueSize() const
00850     {
00851         return m_tokenQueue.size();
00852     }
00853 
00859     PatternMapSizeType
00860     patternMapSize() const
00861     {
00862         return m_patternMap.size();
00863     }
00864 
00872     OpCodeMapValueType
00873     getOpCodeMapValue(OpCodeMapSizeType     opPos) const
00874     {
00875         return m_opMap[opPos];
00876     }
00877 
00878     OpCodeMapValueType
00879     getOpCodeArgumentLength(OpCodeMapSizeType   opPos) const
00880     {
00881         return getOpCodeMapValue(opPos + XPathExpression::s_opCodeMapLengthIndex + 1) - 3;
00882     }
00883 
00891     OpCodeMapValueType
00892     getOpCodeLengthFromOpMap(OpCodeMapSizeType  opPos) const;
00893 
00901     OpCodeMapValueType
00902     getNextOpCodePosition(OpCodeMapSizeType     opPos) const
00903     {
00904         assert(opPos < opCodeMapSize());
00905 
00906         assert(opPos + m_opMap[opPos + s_opCodeMapLengthIndex] == OpCodeMapValueType(opPos + m_opMap[opPos + s_opCodeMapLengthIndex]));
00907 
00908         return OpCodeMapValueType(opPos + m_opMap[opPos + s_opCodeMapLengthIndex]);
00909     }
00910 
00920     void
00921     setOpCodeArgs(
00922             eOpCodes                            theOpCode,
00923             OpCodeMapSizeType                   theIndex,
00924             const OpCodeMapValueVectorType&     theArgs);
00925 
00932     OpCodeMapSizeType
00933     appendOpCode(eOpCodes   theOpCode);
00934 
00941     OpCodeMapSizeType
00942     appendOpCode(eOpCodes                           theOpCode,
00943                  const OpCodeMapValueVectorType&    theArgs)
00944     {
00945         const OpCodeMapSizeType     thePosition = appendOpCode(theOpCode);
00946 
00947         setOpCodeArgs(theOpCode,
00948                       thePosition,
00949                       theArgs);
00950 
00951         return thePosition;
00952     }
00953 
00961     void
00962     replaceOpCode(
00963             OpCodeMapSizeType   theIndex,
00964             eOpCodes            theOldOpCode,
00965             eOpCodes            theNewOpCode);
00966 
00973     OpCodeMapValueType
00974     insertOpCode(
00975             eOpCodes            theOpCode,
00976             OpCodeMapSizeType   theIndex);
00977 
00987     void
00988     updateOpCodeLength(OpCodeMapSizeType    theIndex)
00989     {
00990         assert(theIndex < opCodeMapSize());
00991 
00992         updateOpCodeLength(m_opMap[theIndex], theIndex);
00993     }
00994 
01003     void
01004     updateShiftedOpCodeLength(
01005             OpCodeMapValueType  theOpCode,
01006             OpCodeMapSizeType   theOriginalIndex,
01007             OpCodeMapSizeType   theNewIndex);
01008 
01019     void
01020     updateOpCodeLength(
01021             OpCodeMapValueType  theOpCode,
01022             OpCodeMapSizeType   theIndex);
01023 
01031     static bool
01032     isNodeTestOpCode(OpCodeMapValueType     theOpCode);
01033 
01039     void
01040     updateOpCodeLengthAfterNodeTest(OpCodeMapSizeType   theIndex);
01041 
01047     bool
01048     hasMoreTokens() const
01049     {
01050         return tokenQueueSize() - m_currentPosition > 0 ? true : false;
01051     }
01052 
01058     TokenQueueSizeType
01059     getTokenPosition() const
01060     {
01061         return m_currentPosition;
01062     }
01063 
01067     void
01068     resetTokenPosition()
01069     {
01070         m_currentPosition = 0;
01071     }
01072 
01078     void
01079     setTokenPosition(TokenQueueSizeType     thePosition)
01080     {
01081         const TokenQueueSizeType    theSize = tokenQueueSize();
01082 
01083         m_currentPosition = thePosition > theSize ? theSize : thePosition;
01084     }
01085 
01091     void
01092     setTokenPosition(int    thePosition)
01093     {
01094         setTokenPosition(thePosition > 0 ? TokenQueueSizeType(thePosition) : 0);
01095     }
01096 
01103     const XObject*
01104     getToken(TokenQueueSizeType     thePosition) const
01105     {
01106         assert(thePosition < tokenQueueSize());
01107 
01108         return &m_tokenQueue[thePosition];
01109     }
01110 
01116     const XObject*
01117     getNextToken()
01118     {
01119         if (hasMoreTokens() == true)
01120         {
01121             return getToken(m_currentPosition++);
01122         }
01123         else
01124         {
01125             return 0;
01126         }
01127     }
01128 
01134     const XObject*
01135     getPreviousToken()
01136     {
01137         if (m_currentPosition > 0)
01138         {
01139             return getToken(--m_currentPosition);
01140         }
01141         else
01142         {
01143             return 0;
01144         }
01145     }
01146 
01154     const XObject*
01155     getRelativeToken(int    theOffset) const
01156     {
01157         const int   thePosition = int(m_currentPosition) + theOffset;
01158 
01159         if (thePosition < 0 ||
01160             thePosition >= int(tokenQueueSize()))
01161         {
01162             return 0;
01163         }
01164         else
01165         {
01166             return getToken(thePosition);
01167         }
01168     }
01169 
01175     void
01176     pushToken(const XalanDOMString&     theToken)
01177     {
01178         m_tokenQueue.push_back(XToken(theToken));
01179     }
01180 
01186     void
01187     pushToken(double    theToken)
01188     {
01189         m_tokenQueue.push_back(XToken(theToken));
01190     }
01191 
01198     void
01199     insertToken(const XalanDOMString&   theToken)
01200     {
01201         m_tokenQueue.insert(m_tokenQueue.begin() + (m_currentPosition - 1), XToken(theToken));
01202     }
01203 
01210     void
01211     insertToken(double  theToken)
01212     {
01213         m_tokenQueue.insert(m_tokenQueue.begin() + (m_currentPosition - 1), XToken(theToken));
01214     }
01215 
01216 #if 1
01217 
01223     void
01224     replaceRelativeToken(
01225             int             theOffset,
01226             const XToken&   theToken)
01227     {
01228         const int   thePosition = int(m_currentPosition) + theOffset;
01229 
01230         if (thePosition < 0 ||
01231             thePosition >= int(tokenQueueSize()))
01232         {
01233             throw InvalidRelativeTokenPosition(theOffset);
01234         }
01235 
01236         m_tokenQueue[thePosition] = theToken;
01237     }
01238 #else
01239 
01245     void
01246     replaceRelativeToken(
01247             int                     theOffset,
01248             const XalanDOMString&   theToken)
01249     {
01250         assert(c_wstr(theToken) != 0);
01251 
01252         const int   thePosition = int(m_currentPosition) + theOffset;
01253 
01254         if (thePosition < 0 ||
01255             thePosition >= int(tokenQueueSize()))
01256         {
01257             throw InvalidRelativeTokenPosition(theOffset);
01258         }
01259 
01260         m_tokenQueue[thePosition] = theToken;
01261     }
01262 
01269     void
01270     replaceRelativeToken(
01271             int     theOffset,
01272             double  theToken)
01273     {
01274         assert(theToken != 0);
01275 
01276         const int   thePosition = int(m_currentPosition) + theOffset;
01277 
01278         if (thePosition < 0 || thePosition >= int(tokenQueueSize()))
01279         {
01280             throw InvalidRelativeTokenPosition(theOffset);
01281         }
01282 
01283         m_tokenQueue[thePosition] = theToken;
01284     }
01285 #endif
01286 
01292     void
01293     dumpOpCodeMap(PrintWriter&          thePrintWriter,
01294                   OpCodeMapSizeType     theStartPosition = 0) const;
01295 
01302     void
01303     dumpOpCodeMap(
01304             OstreamType&        theStream,
01305             OpCodeMapSizeType   theStartPosition = 0) const;
01306 
01313     void
01314     dumpTokenQueue(
01315             PrintWriter&        thePrintWriter,
01316             TokenQueueSizeType  theStartPosition = 0) const;
01317 
01324     void
01325     dumpTokenQueue(
01326             OstreamType&        theStream,
01327             TokenQueueSizeType  theStartPosition = 0) const;
01328 
01334     void
01335     dumpRemainingTokenQueue(PrintWriter&    thePrintWriter) const;
01336 
01342     void
01343     dumpRemainingTokenQueue(OstreamType&    theStream) const;
01344 
01351     void
01352     pushValueOnOpCodeMap(const OpCodeMapType::value_type&   theValue)
01353     {
01354         // Push the index onto the op map.
01355         m_opMap.push_back(theValue);
01356 
01357         // Update the op map length.
01358         m_opMap[s_opCodeMapLengthIndex]++;
01359     }
01360 
01367     void
01368     pushArgumentOnOpCodeMap(const XToken&   theXToken);
01369 
01376     void
01377     pushArgumentOnOpCodeMap(const XalanDOMString&   theToken);
01378 
01385     void
01386     pushArgumentOnOpCodeMap(double  theToken);
01387 
01394     void
01395     pushNumberLiteralOnOpCodeMap(double     theNumber);
01396 
01402     double
01403     getNumberLiteral(int    theIndex) const
01404     {
01405         assert(theIndex >= 0 &&
01406                NumberLiteralValueVectorType::size_type(theIndex) < m_numberLiteralValues.size());
01407 
01408         return m_numberLiteralValues[NumberLiteralValueVectorType::size_type(theIndex)];
01409     }
01410 
01415     void
01416     pushCurrentTokenOnOpCodeMap();
01417 
01425     PatternMapValueType
01426     getPattern(int  thePatternPosition) const
01427     {
01428         assert(int(patternMapSize()) > thePatternPosition);
01429 
01430         return m_patternMap[thePatternPosition];
01431     }
01432 
01440     PatternMapValueType
01441     getPattern(PatternMapSizeType   thePatternPosition) const
01442     {
01443         assert(patternMapSize() > thePatternPosition);
01444 
01445         return m_patternMap[thePatternPosition];
01446     }
01447 
01453     void
01454     pushPattern(PatternMapValueType thePattern)
01455     {
01456         m_patternMap.push_back(thePattern);
01457     }
01458 
01465     void
01466     adjustPattern(
01467             OpCodeMapSizeType   theIndex,
01468             PatternMapValueType theAdjustment)
01469     {
01470         m_patternMap[theIndex] += theAdjustment;
01471     }
01472 
01478     void
01479     setCurrentPattern(const XalanDOMString&     thePattern)
01480     {
01481         m_currentPattern = thePattern;
01482     }
01483 
01489     const XalanDOMString&
01490     getCurrentPattern() const
01491     {
01492         return m_currentPattern;
01493     }
01494 
01501     OpCodeMapType           m_opMap;
01502 
01507     OpCodeMapSizeType       m_lastOpCodeIndex;
01508 
01514     TokenQueueType          m_tokenQueue;
01515 
01519     TokenQueueSizeType      m_currentPosition;
01520 
01528      // Ignore this, it is going away.
01529     PatternMapType          m_patternMap;
01530 
01534     XalanDOMString          m_currentPattern;
01535 
01536 private:
01537 
01538     // Default vector allocation sizes.
01539     enum
01540     {
01541         eDefaultOpMapSize = 100,
01542         eDefaultTokenQueueSize = 50,
01543         eDefaultPatternMapSize = 100
01544     };
01545 
01546     NumberLiteralValueVectorType    m_numberLiteralValues;
01547 };
01548 
01549 
01550 
01551 XALAN_CPP_NAMESPACE_END
01552 
01553 
01554 
01555 #endif  // XPATHEXPRESSION_HEADER_GUARD_1357924680

Interpreting class diagrams

Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.

Xalan-C++ XSLT Processor Version 1.5
Copyright © 2000, 2001, 2002, 2003 The Apache Software Foundation. All Rights Reserved.