Main Page   Class Hierarchy   Compound List   File List   Header Files   Sources   Compound Members   File Members  

convert.h

This is the verbatim text of the convert.h include file.
/*******************************************************************************
 *
 *   Copyright (C) 1998-1999, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 *
 *******************************************************************************/

#ifndef CONVERT_H
#define CONVERT_H


#include "unicode/unistr.h"
#include "unicode/ucnv.h"

class U_COMMON_API UnicodeConverterCPP
{
 private:
  /*Internal Data representation of the Converter*/
  UConverter* myUnicodeConverter;
  /*Debug method*/
  void printRef(void) const;

  /* list of converter and alias names */
  static const char **availableConverterNames;
  static int32_t availableConverterNamesCount;

 public:

//Constructors and a destructor

 UnicodeConverterCPP();

 UnicodeConverterCPP(const char*             name,
             UErrorCode&              err);

 UnicodeConverterCPP(const UnicodeString&    name,
             UErrorCode&              err);

 UnicodeConverterCPP(int32_t                      codepageNumber,
             UConverterPlatform  platform,
             UErrorCode&                   err);

 ~UnicodeConverterCPP();


void fromUnicodeString(char*                    target,
               int32_t&                 targetSize,
               const UnicodeString&     source,
               UErrorCode&               err) const;

void  toUnicodeString(UnicodeString&    target,
                      const char*       source,
                      int32_t           sourceSize,
                      UErrorCode&        err) const;

void fromUnicode(char*&         target,
                 const char*    targetLimit,
                 const UChar*&      source,
                 const UChar* sourceLimit,
                 int32_t * offsets,
                 UBool         flush,
                 UErrorCode&     err);


 void toUnicode(UChar*&        target,
        const UChar*   targetLimit,
        const char*&     source,
        const char*      sourceLimit,
                int32_t * offsets,
        UBool           flush,
        UErrorCode&       err);


int8_t getMaxBytesPerChar(void) const;

int8_t getMinBytesPerChar(void) const;

UConverterType getType(void) const;

 void getStarters(UBool starters[256],
                  UErrorCode& err) const;
void getSubstitutionChars(char*         subChars,
                          int8_t&       len,
                          UErrorCode&    err) const;
void setSubstitutionChars(const char*   subChars,
                          int8_t        len,
                          UErrorCode&    err);

void resetState(void);

const char*  getName( UErrorCode&  err) const;


 int32_t  getCodepage(UErrorCode& err) const;

 UConverterToUCallback   getMissingCharAction(void) const;

 UConverterFromUCallback   getMissingUnicodeAction(void) const;

 void  setMissingCharAction(UConverterToUCallback     action,
                UErrorCode&            err);

 void  setMissingUnicodeAction(UConverterFromUCallback  action,
                   UErrorCode&            err);
void getDisplayName(const Locale&   displayLocale,
                    UnicodeString&  displayName) const;

UConverterPlatform  getCodepagePlatform(UErrorCode& err) const;


 UnicodeConverterCPP&   operator=(const UnicodeConverterCPP& that);
 UBool              operator==(const UnicodeConverterCPP& that) const;
 UBool              operator!=(const UnicodeConverterCPP& that) const;
 UnicodeConverterCPP(const UnicodeConverterCPP&  that);

static  const char* const* getAvailableNames(int32_t&   num,
                         UErrorCode&  err);

static   int32_t flushCache(void);
void fixFileSeparator(UnicodeString& source) const;

UBool isAmbiguous(void) const;

};
#endif

Generated at Mon Jun 5 12:53:27 2000 for ICU1.5 by doxygen 1.0.0 written by Dimitri van Heesch, © 1997-1999