secureswitools/swisistools/source/xmlparser/xerces/include/xercesc/util/XMLChTranscoder.hpp
changeset 0 ba25891c3a9e
child 1 c42dffbd5b4f
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 /*
       
    18  * Licensed to the Apache Software Foundation (ASF) under one or more
       
    19  * contributor license agreements.  See the NOTICE file distributed with
       
    20  * this work for additional information regarding copyright ownership.
       
    21  * The ASF licenses this file to You under the Apache License, Version 2.0
       
    22  * (the "License"); you may not use this file except in compliance with
       
    23  * the License.  You may obtain a copy of the License at
       
    24  * 
       
    25  *      http://www.apache.org/licenses/LICENSE-2.0
       
    26  * 
       
    27  * Unless required by applicable law or agreed to in writing, software
       
    28  * distributed under the License is distributed on an "AS IS" BASIS,
       
    29  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       
    30  * See the License for the specific language governing permissions and
       
    31  * limitations under the License.
       
    32  */
       
    33 
       
    34 #ifndef XMLCHTRANSCODER_HPP
       
    35 #define XMLCHTRANSCODER_HPP
       
    36 
       
    37 #include <xercesc/util/XercesDefs.hpp>
       
    38 #include <xercesc/util/TransService.hpp>
       
    39 
       
    40 XERCES_CPP_NAMESPACE_BEGIN
       
    41 
       
    42 //
       
    43 //  This class provides an implementation of the XMLTranscoder interface
       
    44 //  for a simple XMLCh transcoder. This is used for internal entities, which
       
    45 //  are already in the native XMLCh format.
       
    46 //
       
    47 class XMLUTIL_EXPORT XMLChTranscoder : public XMLTranscoder
       
    48 {
       
    49 public :
       
    50     // -----------------------------------------------------------------------
       
    51     //  Public constructors and destructor
       
    52     // -----------------------------------------------------------------------
       
    53     XMLChTranscoder
       
    54     (
       
    55         const   XMLCh* const    encodingName
       
    56         , const unsigned int    blockSize
       
    57         , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
       
    58     );
       
    59 
       
    60     virtual ~XMLChTranscoder();
       
    61 
       
    62 
       
    63     // -----------------------------------------------------------------------
       
    64     //  Implementation of the XMLTranscoder interface
       
    65     // -----------------------------------------------------------------------
       
    66     virtual unsigned int transcodeFrom
       
    67     (
       
    68         const   XMLByte* const          srcData
       
    69         , const unsigned int            srcCount
       
    70         ,       XMLCh* const            toFill
       
    71         , const unsigned int            maxChars
       
    72         ,       unsigned int&           bytesEaten
       
    73         ,       unsigned char* const    charSizes
       
    74     );
       
    75 
       
    76     virtual unsigned int transcodeTo
       
    77     (
       
    78         const   XMLCh* const    srcData
       
    79         , const unsigned int    srcCount
       
    80         ,       XMLByte* const  toFill
       
    81         , const unsigned int    maxBytes
       
    82         ,       unsigned int&   charsEaten
       
    83         , const UnRepOpts       options
       
    84     );
       
    85 
       
    86     virtual bool canTranscodeTo
       
    87     (
       
    88         const   unsigned int    toCheck
       
    89     )   const;
       
    90 
       
    91 
       
    92 private :
       
    93     // -----------------------------------------------------------------------
       
    94     //  Unimplemented constructors and operators
       
    95     // -----------------------------------------------------------------------
       
    96     XMLChTranscoder(const XMLChTranscoder&);
       
    97     XMLChTranscoder& operator=(const XMLChTranscoder&);
       
    98 };
       
    99 
       
   100 XERCES_CPP_NAMESPACE_END
       
   101 
       
   102 #endif