Xalan-C++ API Reference  1.12.0
XString.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(XSTRING_HEADER_GUARD_1357924680)
19 #define XSTRING_HEADER_GUARD_1357924680
20 
21 
22 
23 // Base header file. Must be first.
25 
26 
27 
28 // Base class header file.
30 
31 
32 
33 namespace XALAN_CPP_NAMESPACE {
34 
35 
36 
38 {
39 public:
40 
42 
43  /**
44  * Construct an XString object from a string.
45  *
46  * @param val The string value to use.
47  * @param theMemoryManager The MemoryManager instance.
48  */
49  XString(
50  const XalanDOMString& val,
51  MemoryManager& theManager);
52 
53  /**
54  * Construct an XString object from a string.
55  *
56  * @param val The string value to use.
57  * @param theMemoryManager The MemoryManager instance.
58  */
59  XString(
60  const XalanDOMChar* val,
61  MemoryManager& theManager);
62 
63  /**
64  * Construct an XString object from a string.
65  *
66  * @param val The string value to use.
67  * @param len The length of the string value.
68  * @param theMemoryManager The MemoryManager instance.
69  */
70  XString(
71  const XalanDOMChar* val,
72  XalanSize_t len,
73  MemoryManager& theManager);
74 
75  /**
76  * Construct an XString object from another string.
77  *
78  * @param source The source XString.
79  * @param theMemoryManager The MemoryManager instance.
80  */
81  XString(
82  const XString& source,
83  MemoryManager& theManager);
84 
85  virtual
86  ~XString();
87 
88  void
89  set(const XalanDOMString& theString)
90  {
91  m_value = theString;
92  }
93 
94  // These methods are inherited from XObject ...
95 
96  virtual const XalanDOMString&
97  str(XPathExecutionContext& executionContext) const;
98 
99  virtual const XalanDOMString&
100  str() const;
101 
102  virtual void
103  str(
104  XPathExecutionContext& executionContext,
105  FormatterListener& formatterListener,
106  MemberFunctionPtr function) const;
107 
108  virtual void
109  str(
110  FormatterListener& formatterListener,
111  MemberFunctionPtr function) const;
112 
113  virtual void
114  str(
115  XPathExecutionContext& executionContext,
116  XalanDOMString& theBuffer) const;
117 
118  virtual void
119  str(XalanDOMString& theBuffer) const;
120 
121  virtual double
122  stringLength(XPathExecutionContext& executionContext) const;
123 
124 private:
125 
126  //not implemented
127  XString(const XString& source);
128 
129  XalanDOMString m_value;
130 };
131 
132 
133 
134 }
135 
136 
137 
138 #endif // XSTRING_HEADER_GUARD_1357924680
XALAN_CPP_NAMESPACE
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
Definition: XalanVersion.hpp:76
XALAN_XPATH_EXPORT
#define XALAN_XPATH_EXPORT
Definition: XPathDefinitions.hpp:35
XStringBase.hpp
xalanc::XString
Definition: XString.hpp:37
xalanc::XString::set
void set(const XalanDOMString &theString)
Definition: XString.hpp:89
xalanc::XString::ParentType
XStringBase ParentType
Definition: XString.hpp:41
xalanc::XStringBase
Definition: XStringBase.hpp:42
xalanc::FormatterListener
A SAX-based formatter interface for the XSL processor.
Definition: FormatterListener.hpp:56
xalanc::XPathExecutionContext
Definition: XPathExecutionContext.hpp:82
xalanc::XalanDOMString
Definition: XalanDOMString.hpp:45
XPathDefinitions.hpp