secureswitools/swisistools/source/xmlparser/xerces/include/xercesc/util/Transcoders/Iconv/IconvTransService.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 /*
       
    35  * $Id: IconvTransService.hpp 568078 2007-08-21 11:43:25Z amassari $
       
    36  */
       
    37 
       
    38 #ifndef ICONVTRANSSERVICE_HPP
       
    39 #define ICONVTRANSSERVICE_HPP
       
    40 
       
    41 #include <xercesc/util/TransService.hpp>
       
    42 
       
    43 XERCES_CPP_NAMESPACE_BEGIN
       
    44 
       
    45 class XMLUTIL_EXPORT IconvTransService : public XMLTransService
       
    46 {
       
    47 public :
       
    48     // -----------------------------------------------------------------------
       
    49     //  Constructors and Destructor
       
    50     // -----------------------------------------------------------------------
       
    51     IconvTransService();
       
    52     ~IconvTransService();
       
    53 
       
    54 
       
    55     // -----------------------------------------------------------------------
       
    56     //  Implementation of the virtual transcoding service API
       
    57     // -----------------------------------------------------------------------
       
    58     virtual int compareIString
       
    59     (
       
    60         const   XMLCh* const    comp1
       
    61         , const XMLCh* const    comp2
       
    62     );
       
    63 
       
    64     virtual int compareNIString
       
    65     (
       
    66         const   XMLCh* const    comp1
       
    67         , const XMLCh* const    comp2
       
    68         , const unsigned int    maxChars
       
    69     );
       
    70 
       
    71     virtual const XMLCh* getId() const;
       
    72 
       
    73     virtual bool isSpace(const XMLCh toCheck) const;
       
    74 
       
    75     virtual XMLLCPTranscoder* makeNewLCPTranscoder();
       
    76 
       
    77     virtual bool supportsSrcOfs() const;
       
    78 
       
    79     virtual void upperCase(XMLCh* const toUpperCase) const;
       
    80     virtual void lowerCase(XMLCh* const toLowerCase) const;
       
    81 
       
    82 protected :
       
    83     // -----------------------------------------------------------------------
       
    84     //  Protected virtual methods
       
    85     // -----------------------------------------------------------------------
       
    86     virtual XMLTranscoder* makeNewXMLTranscoder
       
    87     (
       
    88         const   XMLCh* const            encodingName
       
    89         ,       XMLTransService::Codes& resValue
       
    90         , const unsigned int            blockSize
       
    91         ,       MemoryManager* const    manager
       
    92     );
       
    93 
       
    94 
       
    95 private :
       
    96     // -----------------------------------------------------------------------
       
    97     //  Unimplemented constructors and operators
       
    98     // -----------------------------------------------------------------------
       
    99     IconvTransService(const IconvTransService&);
       
   100     IconvTransService& operator=(const IconvTransService&);
       
   101 };
       
   102 
       
   103 
       
   104 class XMLUTIL_EXPORT IconvLCPTranscoder : public XMLLCPTranscoder
       
   105 {
       
   106 public :
       
   107     // -----------------------------------------------------------------------
       
   108     //  Constructors and Destructor
       
   109     // -----------------------------------------------------------------------
       
   110     IconvLCPTranscoder();
       
   111     ~IconvLCPTranscoder();
       
   112 
       
   113 
       
   114     // -----------------------------------------------------------------------
       
   115     //  Implementation of the virtual transcoder interface
       
   116     // -----------------------------------------------------------------------
       
   117     virtual unsigned int calcRequiredSize(const char* const srcText
       
   118         , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
       
   119 
       
   120     virtual unsigned int calcRequiredSize(const XMLCh* const srcText
       
   121         , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
       
   122 
       
   123     virtual char* transcode(const XMLCh* const toTranscode);
       
   124     virtual char* transcode(const XMLCh* const toTranscode,
       
   125                             MemoryManager* const manager);
       
   126 
       
   127     virtual bool transcode
       
   128     (
       
   129         const   XMLCh* const    toTranscode
       
   130         ,       char* const     toFill
       
   131         , const unsigned int    maxBytes
       
   132         , MemoryManager* const  manager = XMLPlatformUtils::fgMemoryManager
       
   133     );
       
   134 
       
   135     virtual XMLCh* transcode(const char* const toTranscode);
       
   136     virtual XMLCh* transcode(const char* const toTranscode,
       
   137                              MemoryManager* const manager);
       
   138 
       
   139     virtual bool transcode
       
   140     (
       
   141         const   char* const     toTranscode
       
   142         ,       XMLCh* const    toFill
       
   143         , const unsigned int    maxChars
       
   144         , MemoryManager* const  manager = XMLPlatformUtils::fgMemoryManager
       
   145     );
       
   146 
       
   147 
       
   148 private :
       
   149     // -----------------------------------------------------------------------
       
   150     //  Unimplemented constructors and operators
       
   151     // -----------------------------------------------------------------------
       
   152     IconvLCPTranscoder(const IconvLCPTranscoder&);
       
   153     IconvLCPTranscoder& operator=(const IconvLCPTranscoder&);
       
   154 };
       
   155 
       
   156 XERCES_CPP_NAMESPACE_END
       
   157 
       
   158 #endif