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

rep.h

This is the verbatim text of the rep.h include file.
/*
**********************************************************************
* Copyright (C) 1999, International Business Machines Corporation and
* others. All Rights Reserved.
**********************************************************************
*   Date        Name        Description
*   11/17/99    aliu        Creation.  Ported from java.  Modified to
*                           match current UnicodeString API.  Forced
*                           to use name "handleReplaceBetween" because
*                           of existing methods in UnicodeString.
**********************************************************************
*/

#ifndef REP_H
#define REP_H

#include "unicode/utypes.h"

class UnicodeString;

class U_COMMON_API Replaceable {

public:

    virtual ~Replaceable();

    virtual int32_t length() const = 0;

    virtual UChar charAt(UTextOffset offset) const = 0;

    virtual UChar32 char32At(UTextOffset offset) const = 0;

    /* THIS API IS NOT NEEDED, BUT KEPT HERE AS A COMMENT IN
       CASE OF FUTURE NEED.  CURRENTLY INDIVIDUAL CHARACTER
       ACCESS SUFFICES. */
    /* virtual void extractBetween(UTextOffset srcStart,
                                UTextOffset srcLimit,
                                UChar* dst,
                                UTextOffset dstStart = 0) const = 0; */

    virtual void handleReplaceBetween(UTextOffset start,
                                      UTextOffset limit,
                                      const UnicodeString& text) = 0;
    // Note: All other methods in this class take the names of
    // existing UnicodeString methods.  This method is the exception.
    // It is named differently because all replace methods of
    // UnicodeString return a UnicodeString&.  The 'between' is
    // required in order to conform to the UnicodeString naming
    // convention; API taking start/length are named <operation>, and
    // those taking start/limit are named <operationBetween>.  The
    // 'handle' is added because 'replaceBetween' and
    // 'doReplaceBetween' are already taken.

    virtual void copy(int32_t start, int32_t limit, int32_t dest) = 0;

protected:

    Replaceable();
};

inline Replaceable::Replaceable() {}

inline Replaceable::~Replaceable() {}

#endif

Generated at Wed Aug 16 16:05:48 2000 for ICU1.6 by doxygen 1.0.0 written by Dimitri van Heesch, © 1997-1999