Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.10

XalanMessageLoader.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(XALANMESSAGELOADER_HEADER_GUARD_1357924680)
17 #define XALANMESSAGELOADER_HEADER_GUARD_1357924680
18 
19 
20 // Base include file. Must be first.
22 
23 
25 
28 
29 #include "LocalMsgIndex.hpp"
30 
31 
32 
33 XALAN_CPP_NAMESPACE_BEGIN
34 
35 
36 
37 XALAN_USING_XERCES(MemoryManager)
38 
39 
40 
41 // class for calling fom outside of the module
43 
44 
45 public:
46  template <class Type>
48  {
49  public:
50  Type*
51  operator()(MemoryManager& theManager)
52  {
53  XalanMemMgrAutoPtr<Type, false> theGuard( theManager , (Type*)theManager.allocate(sizeof(Type)));
54 
55  Type* theResult = theGuard.get();
56 
57  new (theResult) Type(theManager);
58 
59  theGuard.release();
60 
61  return theResult;
62  }
63  };
64 
66  {
67  public:
68  void
69  operator()(
70  MemoryManager& theManager,
71  XalanMessageLoader* p)
72  {
73  assert ( p != 0);
74 
75  destroyObjWithMemMgr(p, theManager);
76  }
77  };
78 
79  virtual
80  ~XalanMessageLoader();
81 
82  XalanMessageLoader()
83  {
84  }
85 
86  static void
87  initialize(MemoryManagerType& theManager);
88 
89  static void
90  terminate();
91 
92  static XalanDOMString&
93  getMessage(
94  XalanDOMString& theResultMessage,
95  XalanMessages::Codes msgToLoad,
96  const char* repText1 ,
97  const char* repText2 = 0,
98  const char* repText3 = 0,
99  const char* repText4 = 0);
100 
101  static XalanDOMString&
102  getMessage(
103  XalanDOMString& theResultMessage,
104  XalanMessages::Codes msgToLoad,
105  const XalanDOMChar* repText1,
106  const XalanDOMChar* repText2 = 0,
107  const XalanDOMChar* repText3 = 0,
108  const XalanDOMChar* repText4 = 0);
109 
110  static XalanDOMString&
111  getMessage(
112  XalanDOMString& theResultMessage,
113  XalanMessages::Codes msgToLoad);
114 
115  static XalanDOMString&
116  getMessage(
117  XalanDOMString& theResultMessage,
118  XalanMessages::Codes msgToLoad,
119  const XalanDOMString& repText1);
120 
121  static XalanDOMString&
122  getMessage(
123  XalanDOMString& theResultMessage,
124  XalanMessages::Codes msgToLoad,
125  const XalanDOMString& repText1,
126  const XalanDOMString& repText2);
127 
128  static XalanDOMString&
129  getMessage(
130  XalanDOMString& theResultMessage,
131  XalanMessages::Codes msgToLoad,
132  const XalanDOMString& repText1,
133  const XalanDOMString& repText2,
134  const XalanDOMString& repText3);
135 
136 protected:
137 
138  virtual bool
139  loadMsg(
140  XalanMessages::Codes msgToLoad,
141  XalanDOMChar* toFill,
142  unsigned int maxChars) = 0;
143 
144 private:
145 
146  bool
147  load(
148  XalanMessages::Codes msgToLoad,
149  MemoryManager& theMemoryManager,
150  XalanDOMChar* toFill,
151  unsigned int maxChars,
152  const XalanDOMChar* repText1,
153  const XalanDOMChar* repText2 = 0,
154  const XalanDOMChar* repText3 = 0,
155  const XalanDOMChar* repText4 = 0);
156 
157  bool
158  load(
159  XalanMessages::Codes msgToLoad,
160  MemoryManagerType& theManager,
161  XalanDOMChar* toFill,
162  unsigned int maxChars,
163  const char* repText1 ,
164  const char* repText2 = 0,
165  const char* repText3 = 0,
166  const char* repText4 = 0);
167 
168  XalanMessageLoader(const XalanMessageLoader&);
169 
170  XalanMessageLoader&
171  operator=(const XalanMessageLoader&);
172 
173  static XalanMessageLoader* s_msgLoader;
174 };
175 
176 
177 
178 XALAN_CPP_NAMESPACE_END
179 
180 #endif // XALANMESSAGELOADER_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