source: icXML/icXML-devel/src/icxercesc/util/XMLChTranscoder.hpp @ 2721

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

Fix imports in icXML modified Xerces files

File size: 3.2 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: XMLChTranscoder.hpp 635560 2008-03-10 14:10:09Z borisk $
20 */
21
22#if !defined(XERCESC_INCLUDE_GUARD_XMLCHTRANSCODER_HPP)
23#define XERCESC_INCLUDE_GUARD_XMLCHTRANSCODER_HPP
24
25#include <xercesc/util/XercesDefs.hpp>
26#include <icxercesc/util/TransService.hpp>
27
28XERCES_CPP_NAMESPACE_BEGIN
29
30//
31//  This class provides an implementation of the XMLTranscoder interface
32//  for a simple XMLCh transcoder. This is used for internal entities, which
33//  are already in the native XMLCh format.
34//
35class XMLUTIL_EXPORT XMLChTranscoder : public XMLTranscoder
36{
37public :
38    // -----------------------------------------------------------------------
39    //  Public constructors and destructor
40    // -----------------------------------------------------------------------
41    XMLChTranscoder
42    (
43        const   XMLCh* const   encodingName
44        , const XMLSize_t      blockSize
45        , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
46    );
47
48    virtual ~XMLChTranscoder();
49
50
51    // -----------------------------------------------------------------------
52    //  Implementation of the XMLTranscoder interface
53    // -----------------------------------------------------------------------
54    virtual XMLSize_t transcodeFrom
55    (
56        const   XMLByte* const          srcData
57        , const XMLSize_t               srcCount
58        ,       XMLCh* const            toFill
59        , const XMLSize_t               maxChars
60        ,       XMLSize_t&              bytesEaten
61        ,       unsigned char* const    charSizes
62    );
63
64    virtual XMLSize_t transcodeFrom
65    (
66          const XMLByte* const          srcData
67        , const XMLSize_t               srcCount
68        ,       XMLBuffer &             toFill
69    );
70
71    virtual XMLSize_t transcodeTo
72    (
73        const   XMLCh* const    srcData
74        , const XMLSize_t       srcCount
75        ,       XMLByte* const  toFill
76        , const XMLSize_t       maxBytes
77        ,       XMLSize_t&      charsEaten
78        , const UnRepOpts       options
79    );
80
81    virtual bool canTranscodeTo
82    (
83        const   unsigned int    toCheck
84    );
85
86
87private :
88    // -----------------------------------------------------------------------
89    //  Unimplemented constructors and operators
90    // -----------------------------------------------------------------------
91    XMLChTranscoder(const XMLChTranscoder&);
92    XMLChTranscoder& operator=(const XMLChTranscoder&);
93};
94
95XERCES_CPP_NAMESPACE_END
96
97#endif
Note: See TracBrowser for help on using the repository browser.