ICU 73.2  73.2
unirepl.h
Go to the documentation of this file.
00001 // © 2016 and later: Unicode, Inc. and others.
00002 // License & terms of use: http://www.unicode.org/copyright.html
00003 /*
00004 **********************************************************************
00005 *   Copyright (c) 2002-2005, International Business Machines Corporation
00006 *   and others.  All Rights Reserved.
00007 **********************************************************************
00008 *   Date        Name        Description
00009 *   01/14/2002  aliu        Creation.
00010 **********************************************************************
00011 */
00012 #ifndef UNIREPL_H
00013 #define UNIREPL_H
00014 
00015 #include "unicode/utypes.h"
00016 
00017 #if U_SHOW_CPLUSPLUS_API
00018 
00024 U_NAMESPACE_BEGIN
00025 
00026 class Replaceable;
00027 class UnicodeString;
00028 class UnicodeSet;
00029 
00040 class U_I18N_API UnicodeReplacer /* not : public UObject because this is an interface/mixin class */ {
00041 
00042  public:
00043 
00048     virtual ~UnicodeReplacer();
00049 
00068     virtual int32_t replace(Replaceable& text,
00069                             int32_t start,
00070                             int32_t limit,
00071                             int32_t& cursor) = 0;
00072 
00087     virtual UnicodeString& toReplacerPattern(UnicodeString& result,
00088                                              UBool escapeUnprintable) const = 0;
00089 
00096     virtual void addReplacementSetTo(UnicodeSet& toUnionTo) const = 0;
00097 };
00098 
00099 U_NAMESPACE_END
00100 
00101 #endif /* U_SHOW_CPLUSPLUS_API */
00102 
00103 #endif