Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.8

Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

AttributeVectorEntry.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(ATTRIBUTEVECTORENTRY_HEADER_GUARD_1357924680)
00017 #define ATTRIBUTEVECTORENTRY_HEADER_GUARD_1357924680
00018 
00019 
00020 
00021 // Base include file.  Must be first.
00022 #include <xalanc/PlatformSupport/PlatformSupportDefinitions.hpp>
00023 
00024 
00025 
00026 #include <vector>
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 AttributeVectorEntry
00039 {
00040 public:
00041 
00042 #if defined(XALAN_NO_STD_NAMESPACE)
00043     typedef vector<XMLCh>       XMLChVectorType;
00044 #else
00045     typedef std::vector<XMLCh>  XMLChVectorType;
00046 #endif
00047 
00048     AttributeVectorEntry(
00049             const XMLChVectorType&  theName,
00050             const XMLChVectorType&  theValue,
00051             const XMLChVectorType&  theType) :
00052         m_Name(theName),
00053         m_Value(theValue),
00054         m_Type(theType)
00055     {
00056     }
00057 
00058     AttributeVectorEntry(
00059             const XMLCh*    theName,
00060             const XMLCh*    theValue,
00061             const XMLCh*    theType) :
00062         m_Name(theName, theName + length(theName) + 1),
00063         m_Value(theValue, theValue + length(theValue) + 1),
00064         m_Type(theType, theType + length(theType) + 1)
00065     {
00066     }
00067 
00068     AttributeVectorEntry() :
00069         m_Name(),
00070         m_Value(),
00071         m_Type()
00072     {
00073     }
00074 
00075     virtual
00076     ~AttributeVectorEntry()
00077     {
00078     }
00079 
00080     void
00081     clear()
00082     {
00083         m_Name.clear();
00084         m_Value.clear();
00085         m_Type.clear();
00086     }
00087 
00088     XMLChVectorType     m_Name;
00089     XMLChVectorType     m_Value;
00090     XMLChVectorType     m_Type;
00091 
00092     // A convenience function to find the length of a null-terminated
00093     // array of XMLChs
00094     static const XMLCh*
00095     endArray(const XMLCh*   data)
00096     {
00097         assert(data != 0);
00098 
00099         while(*data)
00100         {
00101             ++data;
00102         }
00103 
00104         return data;
00105     }
00106 };
00107 
00108 
00109 
00110 XALAN_CPP_NAMESPACE_END
00111 
00112 
00113 
00114 #endif  // ATTRIBUTEVECTORENTRY_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.8
Copyright © 1999-2004 The Apache Software Foundation. All Rights Reserved.