source: NonGTP/Xerces/xerces/include/xercesc/util/XMLChTranscoder.hpp @ 358

Revision 358, 2.8 KB checked in by bittner, 19 years ago (diff)

xerces added

Line 
1/*
2 * Copyright 1999-2000,2004 The Apache Software Foundation.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef XMLCHTRANSCODER_HPP
18#define XMLCHTRANSCODER_HPP
19
20#include <xercesc/util/XercesDefs.hpp>
21#include <xercesc/util/TransService.hpp>
22
23XERCES_CPP_NAMESPACE_BEGIN
24
25//
26//  This class provides an implementation of the XMLTranscoder interface
27//  for a simple XMLCh transcoder. This is used for internal entities, which
28//  are already in the native XMLCh format.
29//
30class XMLUTIL_EXPORT XMLChTranscoder : public XMLTranscoder
31{
32public :
33    // -----------------------------------------------------------------------
34    //  Public constructors and destructor
35    // -----------------------------------------------------------------------
36    XMLChTranscoder
37    (
38        const   XMLCh* const    encodingName
39        , const unsigned int    blockSize
40        , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
41    );
42
43    virtual ~XMLChTranscoder();
44
45
46    // -----------------------------------------------------------------------
47    //  Implementation of the XMLTranscoder interface
48    // -----------------------------------------------------------------------
49    virtual unsigned int transcodeFrom
50    (
51        const   XMLByte* const          srcData
52        , const unsigned int            srcCount
53        ,       XMLCh* const            toFill
54        , const unsigned int            maxChars
55        ,       unsigned int&           bytesEaten
56        ,       unsigned char* const    charSizes
57    );
58
59    virtual unsigned int transcodeTo
60    (
61        const   XMLCh* const    srcData
62        , const unsigned int    srcCount
63        ,       XMLByte* const  toFill
64        , const unsigned int    maxBytes
65        ,       unsigned int&   charsEaten
66        , const UnRepOpts       options
67    );
68
69    virtual bool canTranscodeTo
70    (
71        const   unsigned int    toCheck
72    )   const;
73
74
75private :
76    // -----------------------------------------------------------------------
77    //  Unimplemented constructors and operators
78    // -----------------------------------------------------------------------
79    XMLChTranscoder(const XMLChTranscoder&);
80    XMLChTranscoder& operator=(const XMLChTranscoder&);
81};
82
83XERCES_CPP_NAMESPACE_END
84
85#endif
Note: See TracBrowser for help on using the repository browser.