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  */
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  */
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  */
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  */
82  const XString& source,
83  MemoryManager& theManager);
84 
85  virtual
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
104  XPathExecutionContext& executionContext,
105  FormatterListener& formatterListener,
106  MemberFunctionPtr function) const;
107 
108  virtual void
110  FormatterListener& formatterListener,
111  MemberFunctionPtr function) const;
112 
113  virtual void
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
xalanc::XString::stringLength
virtual double stringLength(XPathExecutionContext &executionContext) const
Get the length of the string value of the instance.
XALAN_XPATH_EXPORT
#define XALAN_XPATH_EXPORT
Definition: XPathDefinitions.hpp:35
xalanc::XString::XString
XString(const XalanDOMString &val, MemoryManager &theManager)
Construct an XString object from a string.
xalanc::XString::str
virtual const XalanDOMString & str(XPathExecutionContext &executionContext) const
Cast result object to a string.
XStringBase.hpp
xalanc::XString
Definition: XString.hpp:38
xalanc::XString::XString
XString(const XalanDOMChar *val, XalanSize_t len, MemoryManager &theManager)
Construct an XString object from a string.
xalanc::XString::XString
XString(const XString &source, MemoryManager &theManager)
Construct an XString object from another string.
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:43
xalanc::XString::str
virtual void str(FormatterListener &formatterListener, MemberFunctionPtr function) const
Send the string value to a FormatterListener instance.
xalanc::XString::XString
XString(const XalanDOMChar *val, MemoryManager &theManager)
Construct an XString object from a string.
xalanc::FormatterListener
A SAX-based formatter interface for the XSL processor.
Definition: FormatterListener.hpp:57
xalanc::XPathExecutionContext
Definition: XPathExecutionContext.hpp:83
xalanc::XString::str
virtual void str(XPathExecutionContext &executionContext, FormatterListener &formatterListener, MemberFunctionPtr function) const
Send the string value to a FormatterListener instance.
xalanc::XString::~XString
virtual ~XString()
xalanc::XString::str
virtual void str(XalanDOMString &theBuffer) const
Append the string value directly a string.
xalanc::XalanDOMString
Definition: XalanDOMString.hpp:46
xalanc::XString::str
virtual const XalanDOMString & str() const
Cast result object to a string.
xalanc::XString::str
virtual void str(XPathExecutionContext &executionContext, XalanDOMString &theBuffer) const
Append the string value directly a string.
XPathDefinitions.hpp