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  

XSLException.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(XSLEXCEPTION_HEADER_GUARD_1357924680)
00017 #define XSLEXCEPTION_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/PlatformSupport/DOMStringHelper.hpp>
00027 #include <xalanc/PlatformSupport/XalanLocator.hpp>
00028 
00029 
00030 
00031 XALAN_CPP_NAMESPACE_BEGIN
00032 
00033 
00034 
00035 typedef XERCES_CPP_NAMESPACE_QUALIFIER Locator  LocatorType;
00036 
00037 
00038 
00039 class XALAN_PLATFORMSUPPORT_EXPORT XSLException
00040 {
00041 public:
00042 
00043     typedef XalanLocator::size_type                 size_type;
00044 
00054     XSLException(
00055             const XalanDOMString&   theMessage,
00056             const XalanDOMString&   theURI,
00057             int                     theLineNumber,
00058             int                     theColumnNumber,
00059             MemoryManagerType&      theManager);
00067     XSLException(
00068             const LocatorType&      theLocator,
00069             const XalanDOMString&   theMessage,
00070             MemoryManagerType&      theManager);
00077     XSLException(
00078             const XalanDOMString&   theMessage,
00079             MemoryManagerType&      theManager);
00080 
00081 
00082     XSLException(const XSLException&    other);
00083 
00084     virtual
00085     ~XSLException();
00086 
00092     virtual const XalanDOMChar*
00093     getType() const = 0;
00094 
00100     const XalanDOMString&
00101     getMessage() const
00102     {
00103         return m_message;
00104     }
00105 
00111     const XalanDOMString&
00112     getURI() const
00113     {
00114         return m_uri;
00115     }
00116 
00122     size_type
00123     getLineNumber() const
00124     {
00125         return m_lineNumber;
00126     }
00127 
00133     size_type
00134     getColumnNumber() const
00135     {
00136         return m_columnNumber;
00137     }
00138 
00139 
00140     MemoryManagerType& 
00141     getMemoryManager()const
00142     {
00143 //#pragma message ("Breaks the const-correctness !")
00144         XalanDOMString* pnt = const_cast<XalanDOMString*>(&m_message);
00145         return pnt->getMemoryManager();
00146     }
00147 
00148     void
00149     defaultFormat(XalanDOMString&   theBuffer) const;
00150 
00151     static void
00152     defaultFormat(
00153             const XalanDOMString&   theMessage,
00154             const XalanDOMString&   theURI,
00155             size_type               theLineNumber,
00156             size_type               theColumnNumber,
00157             const XalanDOMChar*     theType,
00158             XalanDOMString&         theBuffer)
00159     {
00160         defaultFormat(
00161             theMessage.c_str(),
00162             theMessage.size(),
00163             theURI.c_str(),
00164             theURI.size(),
00165             theLineNumber,
00166             theColumnNumber,
00167             theType,
00168             XalanDOMString::length(theType),
00169             theBuffer);
00170     }
00171 
00172     static void
00173     defaultFormat(
00174             const XalanDOMChar*                 theMessage,
00175             const XalanDOMChar*                 theURI,
00176             size_type                           theLineNumber,
00177             size_type                           theColumnNumber,
00178             const XalanDOMChar*                 theType,
00179             XalanDOMString&                     theBuffer)
00180     {
00181         assert(theMessage != 0 && theURI != 0 && theType != 0);
00182 
00183         defaultFormat(
00184             theMessage,
00185             XalanDOMString::length(theMessage),
00186             theURI,
00187             XalanDOMString::length(theURI),
00188             theLineNumber,
00189             theColumnNumber,
00190             theType,
00191             XalanDOMString::length(theType),
00192             theBuffer);
00193     }
00194 
00195     static void
00196     defaultFormat(
00197             const XalanDOMChar*                 theMessage,
00198             const XalanDOMString::size_type     theMessageLength,
00199             const XalanDOMChar*                 theURI,
00200             const XalanDOMString::size_type     theURILength,
00201             size_type                           theLineNumber,
00202             size_type                           theColumnNumber,
00203             const XalanDOMChar*                 theType,
00204             const XalanDOMString::size_type     theTypeLength,
00205             XalanDOMString&                     theBuffer);
00206 
00207 private:
00208     
00209     const XalanDOMString    m_message;
00210     const XalanDOMString    m_uri;
00211 
00212     const size_type         m_lineNumber;
00213     const size_type         m_columnNumber;
00214 
00215 
00216 };
00217 
00218 
00219 
00220 XALAN_CPP_NAMESPACE_END
00221 
00222 
00223 
00224 #endif  // XSLEXCEPTION_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