Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.10

AttributeVectorEntry.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 1999-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 #if !defined(ATTRIBUTEVECTORENTRY_HEADER_GUARD_1357924680)
17 #define ATTRIBUTEVECTORENTRY_HEADER_GUARD_1357924680
18 
19 
20 
21 // Base include file. Must be first.
24 
25 
26 
28 
30 
31 
32 XALAN_CPP_NAMESPACE_BEGIN
33 
34 
35 
37 {
38 public:
39 
41 
43  const XMLChVectorType& theName,
44  const XMLChVectorType& theValue,
45  const XMLChVectorType& theType,
46  MemoryManagerType& theManager) :
47  m_Name(theName,theManager),
48  m_Value(theValue,theManager),
49  m_Type(theType,theManager)
50  {
51  }
52 
54  const XMLCh* theName,
55  const XMLCh* theValue,
56  const XMLCh* theType,
57  MemoryManagerType& theManager) :
58  m_Name(theName, theName + length(theName) + 1, theManager),
59  m_Value(theValue, theValue + length(theValue) + 1, theManager),
60  m_Type(theType, theType + length(theType) + 1, theManager)
61  {
62  }
63 
65  m_Name(theManager),
66  m_Value(theManager),
67  m_Type(theManager)
68  {
69  }
70 
71  static AttributeVectorEntry*
72  create( const XMLCh* theName,
73  const XMLCh* theValue,
74  const XMLCh* theType,
75  MemoryManagerType& theManager)
76  {
77  typedef AttributeVectorEntry ThisType;
78 
79  XalanMemMgrAutoPtr<ThisType, false> theGuard( theManager , (ThisType*)theManager.allocate(sizeof(ThisType)));
80 
81  ThisType* theResult = theGuard.get();
82 
83  new (theResult) ThisType(theName, theValue, theType, theManager);
84 
85  theGuard.release();
86 
87  return theResult;
88  }
89 
90  virtual
92  {
93  }
94 
95  void
97  {
98  m_Name.clear();
99  m_Value.clear();
100  m_Type.clear();
101  }
102 
106 
107  // A convenience function to find the length of a null-terminated
108  // array of XMLChs
109  static const XMLCh*
110  endArray(const XMLCh* data)
111  {
112  assert(data != 0);
113 
114  while(*data)
115  {
116  ++data;
117  }
118 
119  return data;
120  }
121 };
122 
123 
124 
125 XALAN_CPP_NAMESPACE_END
126 
127 
128 
129 #endif // ATTRIBUTEVECTORENTRY_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