Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.10

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

StringTokenizer.hpp

Go to the documentation of this file.
00001 /*
00002  * Copyright 1999-2004 The Apache Software Foundation.
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 #if !defined(STRINGTOKENIZER_HEADER_GUARD_1357924680)
00017 #define STRINGTOKENIZER_HEADER_GUARD_1357924680
00018 
00019 
00020 
00021 // Base include file.  Must be first.
00022 #include <xalanc/PlatformSupport/PlatformSupportDefinitions.hpp>
00023 
00024 
00025 
00026 #include <xalanc/XalanDOM/XalanDOMString.hpp>
00027 
00028 
00029 
00030 #include <xalanc/PlatformSupport/DOMStringHelper.hpp>
00031 
00032 
00033 
00034 XALAN_CPP_NAMESPACE_BEGIN
00035 
00036 
00037 
00038 class XALAN_PLATFORMSUPPORT_EXPORT StringTokenizer
00039 {
00040 public:
00041 
00042     static const XalanDOMChar   s_defaultTokens[];
00043 
00044     typedef size_t  size_type;
00045 
00056     StringTokenizer(const XalanDOMString&   theString,
00057                     const XalanDOMString&   theTokens,
00058                     bool                    fReturnTokens = false);
00059 
00070     StringTokenizer(const XalanDOMString&   theString,
00071                     const XalanDOMChar*     theTokens = s_defaultTokens,
00072                     bool                    fReturnTokens = false);
00073 
00083     StringTokenizer(const XalanDOMChar*     theString,
00084                     const XalanDOMChar*     theTokens = s_defaultTokens,
00085                     bool                    fReturnTokens = false);
00086 
00096     StringTokenizer(const XalanDOMChar*     theString,
00097                     const XalanDOMString&   theTokens,
00098                     bool                    fReturnTokens = false);
00099 
00100     ~StringTokenizer();
00101 
00107     bool
00108     hasMoreTokens() const;
00109 
00110 
00117     void
00118     nextToken(XalanDOMString&   theToken);
00119 
00125     size_type
00126     countTokens() const;
00127 
00128     void
00129     reset()
00130     {
00131         m_currentIndex = 0;
00132     }
00133 
00134 protected:
00135 
00136     XalanDOMString::size_type
00137     FindNextDelimiterIndex(XalanDOMString::size_type    theStartIndex) const;
00138 
00139 private:
00140 
00141     // These are not implemented...
00142     StringTokenizer(const StringTokenizer&);
00143 
00144     StringTokenizer&
00145     operator=(const StringTokenizer&);
00146 
00147     bool
00148     operator==(const StringTokenizer&) const;
00149 
00150 
00151     // Data members...
00152     const XalanDOMChar* const           m_string;
00153 
00154     const XalanDOMChar* const           m_tokens;
00155 
00156     const bool                          m_returnTokens;
00157 
00158     XalanDOMString::size_type           m_currentIndex;
00159 
00160     const XalanDOMString::size_type     m_stringLength;
00161 
00162     const XalanDOMString::size_type     m_tokensLength;
00163 };
00164 
00165 
00166 
00167 XALAN_CPP_NAMESPACE_END
00168 
00169 
00170 
00171 #endif  // STRINGTOKENIZER_HEADER_GUARD_1357924680

Interpreting class diagrams

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

dot

Xalan-C++ XSLT Processor Version 1.10
Copyright © 1999-2004 The Apache Software Foundation. All Rights Reserved.

Apache Logo