source: icXML/icXML-devel/src/xercesc/util/Transcoders/Iconv/IconvTransService.hpp

Last change on this file was 2722, checked in by cameron, 6 years ago

Original Xerces files with import mods for icxercesc

File size: 5.1 KB
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: IconvTransService.hpp 676954 2008-07-15 16:29:19Z dbertoni $
20 */
21
22#if !defined(XERCESC_INCLUDE_GUARD_ICONVTRANSSERVICE_HPP)
23#define XERCESC_INCLUDE_GUARD_ICONVTRANSSERVICE_HPP
24
25#include <icxercesc/util/TransService.hpp>
26
27XERCES_CPP_NAMESPACE_BEGIN
28
29class XMLUTIL_EXPORT IconvTransService : public XMLTransService
30{
31public :
32    // -----------------------------------------------------------------------
33    //  Constructors and Destructor
34    // -----------------------------------------------------------------------
35    IconvTransService(MemoryManager* manager);
36    ~IconvTransService();
37
38
39    // -----------------------------------------------------------------------
40    //  Implementation of the virtual transcoding service API
41    // -----------------------------------------------------------------------
42    virtual int compareIString
43    (
44        const   XMLCh* const    comp1
45        , const XMLCh* const    comp2
46    );
47
48    virtual int compareNIString
49    (
50        const   XMLCh* const    comp1
51        , const XMLCh* const    comp2
52        , const XMLSize_t       maxChars
53    );
54
55    virtual const XMLCh* getId() const;
56
57    virtual XMLLCPTranscoder* makeNewLCPTranscoder(MemoryManager* manager);
58
59    virtual bool supportsSrcOfs() const;
60
61    virtual void upperCase(XMLCh* const toUpperCase);
62    virtual void lowerCase(XMLCh* const toLowerCase);
63
64protected :
65    // -----------------------------------------------------------------------
66    //  Protected virtual methods
67    // -----------------------------------------------------------------------
68    virtual XMLTranscoder* makeNewXMLTranscoder
69    (
70        const   XMLCh* const            encodingName
71        ,       XMLTransService::Codes& resValue
72        , const XMLSize_t               blockSize
73        ,       MemoryManager* const    manager
74    );
75
76
77private :
78    // -----------------------------------------------------------------------
79    //  Unimplemented constructors and operators
80    // -----------------------------------------------------------------------
81    IconvTransService(const IconvTransService&);
82    IconvTransService& operator=(const IconvTransService&);
83};
84
85
86class XMLUTIL_EXPORT IconvLCPTranscoder : public XMLLCPTranscoder
87{
88public :
89    // -----------------------------------------------------------------------
90    //  Constructors and Destructor
91    // -----------------------------------------------------------------------
92    IconvLCPTranscoder();
93    ~IconvLCPTranscoder();
94
95
96    // -----------------------------------------------------------------------
97    //  Implementation of the virtual transcoder interface
98    // -----------------------------------------------------------------------
99    virtual char* transcode(const XMLCh* const toTranscode,
100                            MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
101
102    virtual XMLCh* transcode(const char* const toTranscode,
103                             MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
104
105
106    // -----------------------------------------------------------------------
107    //  DEPRECATED old transcode interface
108    // -----------------------------------------------------------------------
109    virtual XMLSize_t calcRequiredSize(const char* const srcText
110        , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
111
112    virtual XMLSize_t calcRequiredSize(const XMLCh* const srcText
113        , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
114
115    virtual bool transcode
116    (
117        const   char* const     toTranscode
118        ,       XMLCh* const    toFill
119        , const XMLSize_t       maxChars
120        , MemoryManager* const  manager = XMLPlatformUtils::fgMemoryManager
121    );
122
123    virtual bool transcode
124    (
125        const   XMLCh* const    toTranscode
126        ,       char* const     toFill
127        , const XMLSize_t       maxChars
128        , MemoryManager* const  manager = XMLPlatformUtils::fgMemoryManager
129    );
130
131
132private :
133    // -----------------------------------------------------------------------
134    //  Unimplemented constructors and operators
135    // -----------------------------------------------------------------------
136    IconvLCPTranscoder(const IconvLCPTranscoder&);
137    IconvLCPTranscoder& operator=(const IconvLCPTranscoder&);
138};
139
140XERCES_CPP_NAMESPACE_END
141
142#endif
Note: See TracBrowser for help on using the repository browser.