Xalan-C++ API Reference 1.12.0
AttributeVectorEntry.hpp
Go to the documentation of this file.
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */
18#if !defined(ATTRIBUTEVECTORENTRY_HEADER_GUARD_1357924680)
19#define ATTRIBUTEVECTORENTRY_HEADER_GUARD_1357924680
20
21
22
23// Base include file. Must be first.
26
27
28
30
32
33
34namespace XALAN_CPP_NAMESPACE {
35
36
37
39{
40public:
41
43
48 MemoryManager& theManager) :
49 m_Name(theName,theManager),
50 m_Value(theValue,theManager),
51 m_Type(theType,theManager)
52 {
53 }
54
56 const XMLCh* theName,
57 const XMLCh* theValue,
58 const XMLCh* theType,
59 MemoryManager& theManager) :
60 m_Name(theName, theName + length(theName) + 1, theManager),
61 m_Value(theValue, theValue + length(theValue) + 1, theManager),
62 m_Type(theType, theType + length(theType) + 1, theManager)
63 {
64 }
65
67 m_Name(theManager),
68 m_Value(theManager),
69 m_Type(theManager)
70 {
71 }
72
75 const XMLCh* theName,
76 const XMLCh* theValue,
77 const XMLCh* theType,
78 MemoryManager& theManager)
79 {
81
82 return XalanConstruct(
85 theName,
87 theType,
89 }
90
91 virtual
95
96 void
98 {
99 m_Name.clear();
100 m_Value.clear();
101 m_Type.clear();
102 }
103
107
108 // A convenience function to find the length of a null-terminated
109 // array of XMLChs
110 static const XMLCh*
111 endArray(const XMLCh* data)
112 {
113 assert(data != 0);
114
115 while(*data)
116 {
117 ++data;
118 }
119
120 return data;
121 }
122};
123
124
125
126}
127
128
129
130#endif // ATTRIBUTEVECTORENTRY_HEADER_GUARD_1357924680
#define XALAN_PLATFORMSUPPORT_EXPORT
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
AttributeVectorEntry(MemoryManager &theManager)
AttributeVectorEntry(const XMLCh *theName, const XMLCh *theValue, const XMLCh *theType, MemoryManager &theManager)
AttributeVectorEntry(const XMLChVectorType &theName, const XMLChVectorType &theValue, const XMLChVectorType &theType, MemoryManager &theManager)
static AttributeVectorEntry * create(const XMLCh *theName, const XMLCh *theValue, const XMLCh *theType, MemoryManager &theManager)
static const XMLCh * endArray(const XMLCh *data)
XalanDOMString::size_type length(const XalanDOMString &theString)
Get the length of a XalanDOMString.
Type * XalanConstruct(MemoryManager &theMemoryManager, Type *&theInstance)