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

Revision 2674, 3.8 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: ICUMsgLoader.hpp 568078 2007-08-21 11:43:25Z amassari $
20 */
21
22
23#if !defined(ICUMSGLOADER_HPP)
24#define ICUMSGLOADER_HPP
25
26#include <xercesc/util/XMLMsgLoader.hpp>
27#include "unicode/ures.h"
28
29XERCES_CPP_NAMESPACE_BEGIN
30
31//
32//  This is the ICU specific implementation of the XMLMsgLoader interface.
33//  This one uses ICU resource bundles to store its messages.
34//
35class XMLUTIL_EXPORT ICUMsgLoader : public XMLMsgLoader
36{
37public :
38    // -----------------------------------------------------------------------
39    //  Public Constructors and Destructor
40    // -----------------------------------------------------------------------
41    ICUMsgLoader(const XMLCh* const  msgDomain);
42    ~ICUMsgLoader();
43
44
45    // -----------------------------------------------------------------------
46    //  Implementation of the virtual message loader API
47    // -----------------------------------------------------------------------
48    virtual bool loadMsg
49    (
50        const   XMLMsgLoader::XMLMsgId  msgToLoad
51        ,       XMLCh* const            toFill
52        , const unsigned int           maxChars
53    );
54
55    virtual bool loadMsg
56    (
57        const   XMLMsgLoader::XMLMsgId  msgToLoad
58        ,       XMLCh* const            toFill
59        , const unsigned int            maxChars
60        , const XMLCh* const            repText1
61        , const XMLCh* const            repText2 = 0
62        , const XMLCh* const            repText3 = 0
63        , const XMLCh* const            repText4 = 0
64        , MemoryManager* const          manager  = XMLPlatformUtils::fgMemoryManager
65    );
66
67    virtual bool loadMsg
68    (
69        const   XMLMsgLoader::XMLMsgId  msgToLoad
70        ,       XMLCh* const            toFill
71        , const unsigned int            maxChars
72        , const char* const             repText1
73        , const char* const             repText2 = 0
74        , const char* const             repText3 = 0
75        , const char* const             repText4 = 0
76        , MemoryManager * const         manager  = XMLPlatformUtils::fgMemoryManager
77    );
78
79
80private :
81    // -----------------------------------------------------------------------
82    //  Unimplemented constructors and operators
83    // -----------------------------------------------------------------------
84    ICUMsgLoader();
85    ICUMsgLoader(const ICUMsgLoader&);
86    ICUMsgLoader& operator=(const ICUMsgLoader&);
87
88
89    // -----------------------------------------------------------------------
90    //  Private data members
91    //
92    //  fLocaleBundle
93    //      pointer to the required locale specific resource bundle,
94        //           or to the default locale resrouce bundle in case the required
95        //              locale specific resource bundle unavailable.
96    //
97    //  fDomainBundle
98    //      pointer to the domain specific resource bundle with in the
99        //              required locale specific (or default locale) resource bundle.
100    //
101    // -----------------------------------------------------------------------
102    UResourceBundle*      fLocaleBundle;
103    UResourceBundle*      fDomainBundle;
104};
105
106XERCES_CPP_NAMESPACE_END
107
108#endif
Note: See TracBrowser for help on using the repository browser.