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 
34 namespace XALAN_CPP_NAMESPACE {
35 
36 
37 
39 {
40 public:
41 
43 
45  const XMLChVectorType& theName,
46  const XMLChVectorType& theValue,
47  const XMLChVectorType& theType,
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 
66  AttributeVectorEntry(MemoryManager& theManager) :
67  m_Name(theManager),
68  m_Value(theManager),
69  m_Type(theManager)
70  {
71  }
72 
73  static AttributeVectorEntry*
75  const XMLCh* theName,
76  const XMLCh* theValue,
77  const XMLCh* theType,
78  MemoryManager& theManager)
79  {
80  AttributeVectorEntry* theInstance;
81 
82  return XalanConstruct(
83  theManager,
84  theInstance,
85  theName,
86  theValue,
87  theType,
88  theManager);
89  }
90 
91  virtual
93  {
94  }
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
xalanc::AttributeVectorEntry
Definition: AttributeVectorEntry.hpp:38
xalanc::AttributeVectorEntry::endArray
static const XMLCh * endArray(const XMLCh *data)
Definition: AttributeVectorEntry.hpp:111
xalanc::AttributeVectorEntry::AttributeVectorEntry
AttributeVectorEntry(MemoryManager &theManager)
Definition: AttributeVectorEntry.hpp:66
XALAN_CPP_NAMESPACE
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
Definition: XalanVersion.hpp:76
xalanc::AttributeVectorEntry::XMLChVectorType
XalanVector< XMLCh > XMLChVectorType
Definition: AttributeVectorEntry.hpp:42
xalanc::XalanVector< XMLCh >
xalanc::AttributeVectorEntry::m_Name
XMLChVectorType m_Name
Definition: AttributeVectorEntry.hpp:104
xalanc::XalanConstruct
Type * XalanConstruct(MemoryManager &theMemoryManager, Type *&theInstance)
Definition: XalanMemoryManagement.hpp:200
XalanVector.hpp
xalanc::AttributeVectorEntry::AttributeVectorEntry
AttributeVectorEntry(const XMLChVectorType &theName, const XMLChVectorType &theValue, const XMLChVectorType &theType, MemoryManager &theManager)
Definition: AttributeVectorEntry.hpp:44
DOMStringHelper.hpp
XALAN_PLATFORMSUPPORT_EXPORT
#define XALAN_PLATFORMSUPPORT_EXPORT
Definition: PlatformSupportDefinitions.hpp:35
PlatformSupportDefinitions.hpp
xalanc::AttributeVectorEntry::AttributeVectorEntry
AttributeVectorEntry(const XMLCh *theName, const XMLCh *theValue, const XMLCh *theType, MemoryManager &theManager)
Definition: AttributeVectorEntry.hpp:55
xalanc::length
XalanDOMString::size_type length(const XalanDOMString &theString)
Get the length of a XalanDOMString.
Definition: DOMStringHelper.hpp:235
xalanc::AttributeVectorEntry::m_Value
XMLChVectorType m_Value
Definition: AttributeVectorEntry.hpp:105
xalanc::AttributeVectorEntry::m_Type
XMLChVectorType m_Type
Definition: AttributeVectorEntry.hpp:106
xalanc::AttributeVectorEntry::~AttributeVectorEntry
virtual ~AttributeVectorEntry()
Definition: AttributeVectorEntry.hpp:92
xalanc::AttributeVectorEntry::clear
void clear()
Definition: AttributeVectorEntry.hpp:97
xalanc::AttributeVectorEntry::create
static AttributeVectorEntry * create(const XMLCh *theName, const XMLCh *theValue, const XMLCh *theType, MemoryManager &theManager)
Definition: AttributeVectorEntry.hpp:74
XalanMemMgrAutoPtr.hpp