source: NonGTP/Xerces/xerces/include/xercesc/util/MsgLoaders/MsgCatalog/MsgCatalogLoader.hpp @ 358

Revision 358, 4.8 KB checked in by bittner, 19 years ago (diff)

xerces added

Line 
1/*
2 * Copyright 1999-2000,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
17/*
18 * $Log: MsgCatalogLoader.hpp,v $
19 * Revision 1.8  2004/09/08 13:56:34  peiyongz
20 * Apache License Version 2.0
21 *
22 * Revision 1.7  2003/12/24 15:24:13  cargilld
23 * More updates to memory management so that the static memory manager.
24 *
25 * Revision 1.6  2003/12/17 03:56:15  neilg
26 * add default memory manager parameter to loadMsg method that uses char * parameters
27 *
28 * Revision 1.5  2003/03/07 18:15:44  tng
29 * Return a reference instead of void for operator=
30 *
31 * Revision 1.4  2002/11/05 16:54:46  peiyongz
32 * Using XERCESC_NLS_HOME
33 *
34 * Revision 1.3  2002/11/04 15:10:41  tng
35 * C++ Namespace Support.
36 *
37 * Revision 1.2  2002/09/23 21:03:06  peiyongz
38 * Build MsgCatalog on Solaris
39 *
40 * Revision 1.1.1.1  2002/02/01 22:22:21  peiyongz
41 * sane_include
42 *
43 * Revision 1.3  2000/03/02 19:55:16  roddey
44 * This checkin includes many changes done while waiting for the
45 * 1.1.0 code to be finished. I can't list them all here, but a list is
46 * available elsewhere.
47 *
48 * Revision 1.2  2000/02/06 07:48:22  rahulj
49 * Year 2K copyright swat.
50 *
51 * Revision 1.1.1.1  1999/11/09 01:07:17  twl
52 * Initial checkin
53 *
54 * Revision 1.2  1999/11/08 20:45:28  rahul
55 * Swat for adding in Product name and CVS comment log variable.
56 *
57 */
58
59#if !defined(ICONVMSGLOADER_HPP)
60#define ICONVMSGLOADER_HPP
61
62#include <xercesc/util/XercesDefs.hpp>
63#include <xercesc/util/XMLMsgLoader.hpp>
64
65#include <nl_types.h>
66
67XERCES_CPP_NAMESPACE_BEGIN
68
69//
70//  This is a simple in Iconv RC message loader implementation.
71//
72class XMLUTIL_EXPORT MsgCatalogLoader : public XMLMsgLoader
73{
74public :
75    // -----------------------------------------------------------------------
76    //  Public Constructors and Destructor
77    // -----------------------------------------------------------------------
78    MsgCatalogLoader(const XMLCh* const msgDomain);
79    ~MsgCatalogLoader();
80
81
82    // -----------------------------------------------------------------------
83    //  Implementation of the virtual message loader API
84    // -----------------------------------------------------------------------
85    virtual bool loadMsg
86    (
87        const   XMLMsgLoader::XMLMsgId  msgToLoad
88        ,       XMLCh* const            toFill
89        , const unsigned int            maxChars
90    );
91
92    virtual bool loadMsg
93    (
94        const   XMLMsgLoader::XMLMsgId  msgToLoad
95        ,       XMLCh* const            toFill
96        , const unsigned int            maxChars
97        , const XMLCh* const            repText1
98        , const XMLCh* const            repText2 = 0
99        , const XMLCh* const            repText3 = 0
100        , const XMLCh* const            repText4 = 0
101        , MemoryManager* const          manager  = XMLPlatformUtils::fgMemoryManager
102    );
103
104    virtual bool loadMsg
105    (
106        const   XMLMsgLoader::XMLMsgId  msgToLoad
107        ,       XMLCh* const            toFill
108        , const unsigned int            maxChars
109        , const char* const             repText1
110        , const char* const             repText2 = 0
111        , const char* const             repText3 = 0
112        , const char* const             repText4 = 0
113        , MemoryManager * const         manager  = XMLPlatformUtils::fgMemoryManager
114    );
115
116
117private :
118    // -----------------------------------------------------------------------
119    //  Unimplemented constructors and operators
120    // -----------------------------------------------------------------------
121    MsgCatalogLoader();
122    MsgCatalogLoader(const MsgCatalogLoader&);
123    MsgCatalogLoader& operator=(const MsgCatalogLoader&);
124
125
126    // -----------------------------------------------------------------------
127    //  Private data members
128    //
129    //  fModHandle
130    //      This is our DLL module handle that we need in order to load
131    //      resource messages. This is set during construction.
132    //
133    //  fMsgSet
134    //      This is the message set id for the error domain that this loader is for.
135    // -----------------------------------------------------------------------
136    nl_catd       fCatalogHandle;
137    unsigned int  fMsgSet;
138       
139};
140
141XERCES_CPP_NAMESPACE_END
142
143#endif
Note: See TracBrowser for help on using the repository browser.