|
||||
File indexing completed on 2025-01-18 10:14:57
0001 /* 0002 * Licensed to the Apache Software Foundation (ASF) under one or more 0003 * contributor license agreements. See the NOTICE file distributed with 0004 * this work for additional information regarding copyright ownership. 0005 * The ASF licenses this file to You under the Apache License, Version 2.0 0006 * (the "License"); you may not use this file except in compliance with 0007 * the License. You may obtain a copy of the License at 0008 * 0009 * http://www.apache.org/licenses/LICENSE-2.0 0010 * 0011 * Unless required by applicable law or agreed to in writing, software 0012 * distributed under the License is distributed on an "AS IS" BASIS, 0013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 0014 * See the License for the specific language governing permissions and 0015 * limitations under the License. 0016 */ 0017 0018 /* 0019 * $Id$ 0020 */ 0021 0022 #if !defined(XERCESC_INCLUDE_GUARD_INMEMMSGLOADER_HPP) 0023 #define XERCESC_INCLUDE_GUARD_INMEMMSGLOADER_HPP 0024 0025 #include <xercesc/util/XercesDefs.hpp> 0026 #include <xercesc/util/XMLMsgLoader.hpp> 0027 0028 XERCES_CPP_NAMESPACE_BEGIN 0029 0030 // 0031 // This is a simple in memory message loader implementation. For those 0032 // folks who just want a single language and want something very fast and 0033 // efficient, can basically just provide a couple of arrays of Unicode 0034 // strings that can be looked up by the message id. 0035 // 0036 class XMLUTIL_EXPORT InMemMsgLoader : public XMLMsgLoader 0037 { 0038 public : 0039 // ----------------------------------------------------------------------- 0040 // Public Constructors and Destructor 0041 // ----------------------------------------------------------------------- 0042 InMemMsgLoader(const XMLCh* const msgDomain); 0043 ~InMemMsgLoader(); 0044 0045 0046 // ----------------------------------------------------------------------- 0047 // Implementation of the virtual message loader API 0048 // ----------------------------------------------------------------------- 0049 virtual bool loadMsg 0050 ( 0051 const XMLMsgLoader::XMLMsgId msgToLoad 0052 , XMLCh* const toFill 0053 , const XMLSize_t maxChars 0054 ); 0055 0056 virtual bool loadMsg 0057 ( 0058 const XMLMsgLoader::XMLMsgId msgToLoad 0059 , XMLCh* const toFill 0060 , const XMLSize_t maxChars 0061 , const XMLCh* const repText1 0062 , const XMLCh* const repText2 = 0 0063 , const XMLCh* const repText3 = 0 0064 , const XMLCh* const repText4 = 0 0065 , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager 0066 ); 0067 0068 virtual bool loadMsg 0069 ( 0070 const XMLMsgLoader::XMLMsgId msgToLoad 0071 , XMLCh* const toFill 0072 , const XMLSize_t maxChars 0073 , const char* const repText1 0074 , const char* const repText2 = 0 0075 , const char* const repText3 = 0 0076 , const char* const repText4 = 0 0077 , MemoryManager * const manager = XMLPlatformUtils::fgMemoryManager 0078 ); 0079 0080 0081 private : 0082 // ----------------------------------------------------------------------- 0083 // Unimplemented constructors and operators 0084 // ----------------------------------------------------------------------- 0085 InMemMsgLoader(); 0086 InMemMsgLoader(const InMemMsgLoader&); 0087 InMemMsgLoader& operator=(const InMemMsgLoader&); 0088 0089 0090 // ----------------------------------------------------------------------- 0091 // Private data members 0092 // 0093 // fMsgDomain 0094 // This is the message domain that we are for loading message from. 0095 // ----------------------------------------------------------------------- 0096 XMLCh* fMsgDomain; 0097 }; 0098 0099 XERCES_CPP_NAMESPACE_END 0100 0101 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |