source: NonGTP/Xerces/xerces/include/xercesc/util/MsgLoaders/InMemory/InMemMsgLoader.hpp @ 358

Revision 358, 4.7 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: InMemMsgLoader.hpp,v $
19 * Revision 1.6  2004/09/08 13:56:33  peiyongz
20 * Apache License Version 2.0
21 *
22 * Revision 1.5  2003/12/24 15:24:13  cargilld
23 * More updates to memory management so that the static memory manager.
24 *
25 * Revision 1.4  2003/12/17 03:56:15  neilg
26 * add default memory manager parameter to loadMsg method that uses char * parameters
27 *
28 * Revision 1.3  2003/03/07 18:15:44  tng
29 * Return a reference instead of void for operator=
30 *
31 * Revision 1.2  2002/11/04 15:10:40  tng
32 * C++ Namespace Support.
33 *
34 * Revision 1.1.1.1  2002/02/01 22:22:21  peiyongz
35 * sane_include
36 *
37 * Revision 1.4  2000/03/28 19:43:21  roddey
38 * Fixes for signed/unsigned warnings. New work for two way transcoding
39 * stuff.
40 *
41 * Revision 1.3  2000/03/02 19:55:15  roddey
42 * This checkin includes many changes done while waiting for the
43 * 1.1.0 code to be finished. I can't list them all here, but a list is
44 * available elsewhere.
45 *
46 * Revision 1.2  2000/02/06 07:48:22  rahulj
47 * Year 2K copyright swat.
48 *
49 * Revision 1.1.1.1  1999/11/09 01:07:20  twl
50 * Initial checkin
51 *
52 * Revision 1.2  1999/11/08 20:45:27  rahul
53 * Swat for adding in Product name and CVS comment log variable.
54 *
55 */
56
57
58#if !defined(INMEMMSGLOADER_HPP)
59#define INMEMMSGLOADER_HPP
60
61#include <xercesc/util/XercesDefs.hpp>
62#include <xercesc/util/XMLMsgLoader.hpp>
63
64XERCES_CPP_NAMESPACE_BEGIN
65
66//
67//  This is a simple in memory message loader implementation. For those
68//  folks who just want a single language and want something very fast and
69//  efficient, can basically just provide a couple of arrays of Unicode
70//  strings that can be looked up by the message id.
71//
72class XMLUTIL_EXPORT InMemMsgLoader : public XMLMsgLoader
73{
74public :
75    // -----------------------------------------------------------------------
76    //  Public Constructors and Destructor
77    // -----------------------------------------------------------------------
78    InMemMsgLoader(const XMLCh* const msgDomain);
79    ~InMemMsgLoader();
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    InMemMsgLoader();
122    InMemMsgLoader(const InMemMsgLoader&);
123    InMemMsgLoader& operator=(const InMemMsgLoader&);
124
125
126    // -----------------------------------------------------------------------
127    //  Private data members
128    //
129    //  fMsgDomain
130    //      This is the message domain that we are for loading message from.
131    // -----------------------------------------------------------------------
132    XMLCh*  fMsgDomain;
133};
134
135XERCES_CPP_NAMESPACE_END
136
137#endif
Note: See TracBrowser for help on using the repository browser.