source: NonGTP/Xerces/xerces-c_2_8_0/include/xercesc/util/MsgLoaders/Win32/Win32MsgLoader.hpp @ 2674

Revision 2674, 4.0 KB checked in by mattausch, 16 years ago (diff)
Line 
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements.  See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License.  You may obtain a copy of the License at
8 *
9 *      http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18/*
19 * $Id: Win32MsgLoader.hpp 568078 2007-08-21 11:43:25Z amassari $
20 */
21
22
23#if !defined(WIN32MSGLOADER_HPP)
24#define WIN32MSGLOADER_HPP
25
26#include <xercesc/util/XercesDefs.hpp>
27#include <xercesc/util/XMLMsgLoader.hpp>
28
29XERCES_CPP_NAMESPACE_BEGIN
30
31//
32//  This is a simple in Win32 RC message loader implementation.
33//
34class XMLUTIL_EXPORT Win32MsgLoader : public XMLMsgLoader
35{
36public :
37    // -----------------------------------------------------------------------
38    //  Public Constructors and Destructor
39    // -----------------------------------------------------------------------
40    Win32MsgLoader(const XMLCh* const msgDomain);
41    ~Win32MsgLoader();
42
43
44    // -----------------------------------------------------------------------
45    //  Implementation of the virtual message loader API
46    // -----------------------------------------------------------------------
47    virtual bool loadMsg
48    (
49        const   XMLMsgLoader::XMLMsgId  msgToLoad
50        ,       XMLCh* const            toFill
51        , const unsigned int            maxChars
52    );
53
54    virtual bool loadMsg
55    (
56        const   XMLMsgLoader::XMLMsgId  msgToLoad
57        ,       XMLCh* const            toFill
58        , const unsigned int            maxChars
59        , const XMLCh* const            repText1
60        , const XMLCh* const            repText2 = 0
61        , const XMLCh* const            repText3 = 0
62        , const XMLCh* const            repText4 = 0
63        , MemoryManager* const          manger   = XMLPlatformUtils::fgMemoryManager
64    );
65
66    virtual bool loadMsg
67    (
68        const   XMLMsgLoader::XMLMsgId  msgToLoad
69        ,       XMLCh* const            toFill
70        , const unsigned int            maxChars
71        , const char* const             repText1
72        , const char* const             repText2 = 0
73        , const char* const             repText3 = 0
74        , const char* const             repText4 = 0
75        , MemoryManager* const          manager  = XMLPlatformUtils::fgMemoryManager
76    );
77
78
79private :
80    // -----------------------------------------------------------------------
81    //  Unimplemented constructors and operators
82    // -----------------------------------------------------------------------
83    Win32MsgLoader();
84    Win32MsgLoader(const Win32MsgLoader&);
85    Win32MsgLoader& operator=(const Win32MsgLoader&);
86
87
88    // -----------------------------------------------------------------------
89    //  Private data members
90    //
91    //  fDomainOfs
92    //      This is the id offset for the current domain. Its used to bias
93    //      the zero based id of each domain, since they are stored in the
94    //      same file and have to have unique ids internally. This is set
95    //      in the ctor from the domain name. We just have to agree with
96    //      what our formatter in the NLSXlat program does.
97    //
98    //  fModHandle
99    //      This is our DLL module handle that we need in order to load
100    //      resource messages. This is set during construction.
101    //
102    //  fMsgDomain
103    //      This is the name of the error domain that this loader is for.
104    // -----------------------------------------------------------------------
105    unsigned int    fDomainOfs;
106    HINSTANCE       fModHandle;
107    XMLCh*          fMsgDomain;
108};
109
110XERCES_CPP_NAMESPACE_END
111
112#endif
Note: See TracBrowser for help on using the repository browser.